blob: 1bc880960d3e0c0c731dc35b1c59da4b4b7bdca7 [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]464750f2011-10-24 23:16:18204 # Disable file manager component extension by default.
[email protected]3d38d8e2011-04-16 20:48:51205 'file_manager_extension%': 0,
206
[email protected]77a848262013-02-22 11:17:25207 # Disable image loader component extension by default.
208 'image_loader_extension%': 0,
209
[email protected]e72e55b2011-01-06 22:19:30210 # Python version.
[email protected]a43c5a02011-05-27 06:54:51211 'python_ver%': '2.6',
[email protected]b3f23ba2010-04-26 22:58:17212
[email protected]e72e55b2011-01-06 22:19:30213
[email protected]7d6763422013-04-26 12:06:54214 # Set NEON compilation flags.
[email protected]e72e55b2011-01-06 22:19:30215 'arm_neon%': 1,
216
[email protected]7d6763422013-04-26 12:06:54217 # Detect NEON support at run-time.
218 'arm_neon_optional%': 0,
219
[email protected]e72e55b2011-01-06 22:19:30220 # The system root for cross-compiles. Default: none.
221 'sysroot%': '',
222
[email protected]945361a2011-09-30 04:38:43223 # The system libdir used for this ABI.
224 'system_libdir%': 'lib',
225
[email protected]e72e55b2011-01-06 22:19:30226 # On Linux, we build with sse2 for Chromium builds.
227 'disable_sse2%': 0,
228
229 # Use libjpeg-turbo as the JPEG codec used by Chromium.
[email protected]32e56e52011-02-28 02:28:03230 'use_libjpeg_turbo%': 1,
[email protected]e72e55b2011-01-06 22:19:30231
[email protected]d9113542012-07-18 17:11:28232 # Use system libjpeg. Note that the system's libjepg will be used even if
233 # use_libjpeg_turbo is set.
234 'use_system_libjpeg%': 0,
235
[email protected]aa5e01fc2013-03-06 14:06:17236 # By default, component is set to static_library and it can be overriden
237 # by the GYP command line or by ~/.gyp/include.gypi.
[email protected]5a547332011-05-19 23:18:53238 'component%': 'static_library',
[email protected]e72e55b2011-01-06 22:19:30239
[email protected]bb6aba32011-01-07 19:04:43240 # Set to select the Title Case versions of strings in GRD files.
241 'use_titlecase_in_grd_files%': 0,
[email protected]63692212010-09-16 00:22:21242
[email protected]98da0042011-02-02 00:10:27243 # Use translations provided by volunteers at launchpad.net. This
244 # currently only works on Linux.
[email protected]00dc155832011-02-01 18:51:19245 'use_third_party_translations%': 0,
246
[email protected]9a425422011-01-11 00:53:18247 # Remoting compilation is enabled by default. Set to 0 to disable.
248 'remoting%': 1,
249
[email protected]1ec68c42011-06-01 13:56:25250 # Configuration policy is enabled by default. Set to 0 to disable.
251 'configuration_policy%': 1,
252
[email protected]6c521fed2012-11-29 17:00:03253 # Variable safe_browsing is used to control the build time configuration
254 # for safe browsing feature. Safe browsing can be compiled in 3 different
255 # levels: 0 disables it, 1 enables it fully, and 2 enables only UI and
256 # reporting features without enabling phishing and malware detection. This
257 # is useful to integrate a third party phishing/malware detection to
258 # existing safe browsing logic.
[email protected]4b58e7d2011-07-11 10:22:56259 'safe_browsing%': 1,
260
[email protected]9eb100e2011-10-14 05:08:22261 # Speech input is compiled in by default. Set to 0 to disable.
262 'input_speech%': 1,
263
[email protected]7cce3232011-10-28 10:41:57264 # Notifications are compiled in by default. Set to 0 to disable.
265 'notifications%' : 1,
266
[email protected]970fd4e2012-12-19 11:09:37267 # Use dsymutil to generate real .dSYM files on Mac. The default is 0 for
268 # regular builds and 1 for ASan builds.
269 'mac_want_real_dsym%': 'default',
270
[email protected]5d451ad2011-02-11 16:43:46271 # If this is set, the clang plugins used on the buildbot will be used.
272 # Run tools/clang/scripts/update.sh to make sure they are compiled.
273 # This causes 'clang_chrome_plugins_flags' to be set.
274 # Has no effect if 'clang' is not set as well.
[email protected]3bb37e62012-04-19 03:40:08275 'clang_use_chrome_plugins%': 1,
[email protected]5d451ad2011-02-11 16:43:46276
[email protected]2e82fa52012-11-27 23:41:44277 # Enable building with ASAN (Clang's -fsanitize=address option).
278 # -fsanitize=address only works with clang, but asan=1 implies clang=1
[email protected]92799b632011-08-15 14:33:06279 # See https://sites.google.com/a/chromium.org/dev/developers/testing/addresssanitizer
280 'asan%': 0,
281
[email protected]062522a2013-06-13 15:49:55282 # Enable building with LSan (Clang's -fsanitize=leak option).
283 # -fsanitize=leak only works with clang, but lsan=1 implies clang=1
284 # See https://sites.google.com/a/chromium.org/dev/developers/testing/leaksanitizer
285 'lsan%': 0,
286
[email protected]927a9d672012-11-09 11:28:20287 # Enable building with TSAN (Clang's -fsanitize=thread option).
288 # -fsanitize=thread only works with clang, but tsan=1 implies clang=1
[email protected]c9a829272012-07-04 07:51:12289 # See http://clang.llvm.org/docs/ThreadSanitizer.html
290 'tsan%': 0,
[email protected]7bdd7d7c2012-11-01 10:36:16291 'tsan_blacklist%': '<(PRODUCT_DIR)/../../tools/valgrind/tsan_v2/ignores.txt',
[email protected]c9a829272012-07-04 07:51:12292
[email protected]a10ddd2d2013-02-26 20:06:59293 # Enable building with MSAN (Clang's -fsanitize=memory option).
294 # MemorySanitizer only works with clang, but msan=1 implies clang=1
295 # See http://clang.llvm.org/docs/MemorySanitizer.html
296 'msan%': 0,
297
[email protected]7ce58b22012-09-26 05:17:25298 # Use a modified version of Clang to intercept allocated types and sizes
299 # for allocated objects. clang_type_profiler=1 implies clang=1.
300 # See http://dev.chromium.org/developers/deep-memory-profiler/cpp-object-type-identifier
301 # TODO(dmikurube): Support mac. See http://crbug.com/123758#c11
302 'clang_type_profiler%': 0,
303
[email protected]8a6abd12012-05-16 10:04:44304 # Set to true to instrument the code with function call logger.
305 # See src/third_party/cygprofile/cyg-profile.cc for details.
306 'order_profiling%': 0,
307
[email protected]00b0a7f2012-01-25 15:30:46308 # Use the provided profiled order file to link Chrome image with it.
309 # This makes Chrome faster by better using CPU cache when executing code.
310 # This is known as PGO (profile guided optimization).
311 # See https://sites.google.com/a/google.com/chrome-msk/dev/boot-speed-up-effort
312 'order_text_section%' : "",
313
[email protected]1ad5a7b2011-06-24 03:15:13314 # Set to 1 compile with -fPIC cflag on linux. This is a must for shared
315 # libraries on linux x86-64 and arm, plus ASLR.
316 'linux_fpic%': 1,
317
[email protected]bd7b6fe2012-03-05 21:02:40318 # Whether one-click signin is enabled or not.
319 'enable_one_click_signin%': 0,
320
[email protected]6a3cd37e2012-04-17 17:13:34321 # Enable Chrome browser extensions
322 'enable_extensions%': 1,
323
[email protected]658677f2012-06-09 06:04:02324 # Enable browser automation.
325 'enable_automation%': 1,
326
[email protected]6ee43a72012-12-07 22:44:40327 # Enable Google Now.
328 'enable_google_now%': 1,
329
[email protected]703369a2012-11-05 20:40:31330 # Enable language detection.
331 'enable_language_detection%': 1,
332
[email protected]658677f2012-06-09 06:04:02333 # Enable printing support and UI.
334 'enable_printing%': 1,
335
[email protected]dda90ae2011-07-19 22:07:48336 # Webrtc compilation is enabled by default. Set to 0 to disable.
337 'enable_webrtc%': 1,
338
[email protected]cdb756ef2012-04-05 18:34:53339 # Enables use of the session service, which is enabled by default.
340 # Support for disabling depends on the platform.
341 'enable_session_service%': 1,
342
[email protected]6b40bb582012-03-15 20:50:38343 # Enables theme support, which is enabled by default. Support for
344 # disabling depends on the platform.
345 'enable_themes%': 1,
346
[email protected]57e67ac2013-02-22 03:37:22347 # Enables autofill dialog and associated features; disabled by default.
348 'enable_autofill_dialog%' : 0,
349
[email protected]066ab9882013-06-07 00:55:20350 # Uses spring wallpaper resources on Spring.
351 'use_spring_wallpaper%': 0,
352
[email protected]4ffe78a2012-10-04 20:55:15353 # Uses OEM-specific wallpaper resources on Chrome OS.
354 'use_oem_wallpaper%': 0,
355
[email protected]0acdd772012-04-05 22:53:00356 # Enables support for background apps.
357 'enable_background%': 1,
358
[email protected]44879ed2012-04-06 01:11:02359 # Enable the task manager by default.
360 'enable_task_manager%': 1,
[email protected]e1de87f2012-05-02 17:20:45361
[email protected]9bfe0ab2012-08-30 13:18:11362 # Enable FTP support by default.
363 'disable_ftp_support%': 0,
364
[email protected]22d6dd72012-05-15 07:29:55365 # XInput2 multitouch support is disabled by default (use_xi2_mt=0).
366 # Setting to non-zero value enables XI2 MT. When XI2 MT is enabled,
367 # the input value also defines the required XI2 minor minimum version.
368 # For example, use_xi2_mt=2 means XI2.2 or above version is required.
369 'use_xi2_mt%': 0,
370
[email protected]9061bee82012-01-16 11:45:17371 # Use of precompiled headers on Windows.
372 #
[email protected]9061bee82012-01-16 11:45:17373 # This variable may be explicitly set to 1 (enabled) or 0
374 # (disabled) in ~/.gyp/include.gypi or via the GYP command line.
375 # This setting will override the default.
376 #
[email protected]c3340fb32012-12-20 20:45:39377 # See
[email protected]9061bee82012-01-16 11:45:17378 # http://code.google.com/p/chromium/wiki/WindowsPrecompiledHeaders
379 # for details.
[email protected]d5cf9fb2011-09-27 00:15:16380 'chromium_win_pch%': 0,
381
[email protected]3bb37e62012-04-19 03:40:08382 # Set this to true when building with Clang.
383 # See http://code.google.com/p/chromium/wiki/Clang for details.
384 'clang%': 0,
385
[email protected]18e0f39b2012-01-17 16:47:34386 # Enable plug-in installation by default.
387 'enable_plugin_installation%': 1,
388
[email protected]6d17f6392012-12-05 05:24:54389 # Enable PPAPI and NPAPI by default.
390 # TODO(nileshagrawal): Make this flag enable/disable NPAPI as well
391 # as PPAPI; see crbug.com/162667.
392 'enable_plugins%': 1,
393
[email protected]62424a52012-03-18 03:09:50394 # Specifies whether to use canvas_skia.cc in place of platform
[email protected]4ddae4b2012-03-15 17:32:42395 # specific implementations of gfx::Canvas. Affects text drawing in the
[email protected]d18e50312012-01-25 17:49:35396 # Chrome UI.
397 # TODO(asvitkine): Enable this on all platforms and delete this flag.
398 # http://crbug.com/105550
[email protected]62424a52012-03-18 03:09:50399 'use_canvas_skia%': 0,
[email protected]d18e50312012-01-25 17:49:35400
[email protected]a9318c72012-03-01 01:29:47401 # Set to "tsan", "memcheck", or "drmemory" to configure the build to work
402 # with one of those tools.
403 'build_for_tool%': '',
404
[email protected]37138132013-01-17 23:08:52405 # If no directory is specified then a temporary directory will be used.
406 'test_isolation_outdir%': '',
[email protected]5b38a522013-03-20 17:00:47407 # True if isolate should fail if the isolate files refer to files
408 # that are missing.
409 'test_isolation_fail_on_missing': 0,
[email protected]01971642012-03-07 14:39:56410
[email protected]740ebed2012-06-27 19:14:06411 'sas_dll_path%': '<(DEPTH)/third_party/platformsdk_win7/files/redist/x86',
[email protected]49ae3e52012-04-12 09:50:12412 'wix_path%': '<(DEPTH)/third_party/wix',
413
[email protected]0850e842013-01-19 03:44:31414 # Managed users are enabled by default.
415 'enable_managed_users%': 1,
416
[email protected]199def22013-02-21 17:52:29417 'spdy_proxy_auth_origin%' : '',
418 'spdy_proxy_auth_property%' : '',
[email protected]f37e9412013-05-27 23:18:25419 'spdy_proxy_auth_value%' : '',
[email protected]199def22013-02-21 17:52:29420
[email protected]bb6aba32011-01-07 19:04:43421 'conditions': [
[email protected]79e2336c2011-05-12 18:18:34422 # A flag for POSIX platforms
[email protected]c49ab0c2011-05-18 17:25:37423 ['OS=="win"', {
[email protected]79e2336c2011-05-12 18:18:34424 'os_posix%': 0,
[email protected]c49ab0c2011-05-18 17:25:37425 }, {
426 'os_posix%': 1,
[email protected]79e2336c2011-05-12 18:18:34427 }],
428
[email protected]df9167b2011-11-14 19:15:25429 # A flag for BSD platforms
430 ['OS=="freebsd" or OS=="openbsd"', {
431 'os_bsd%': 1,
432 }, {
433 'os_bsd%': 0,
434 }],
435
[email protected]7d6763422013-04-26 12:06:54436 # Set armv7 for backward compatibility.
437 ['arm_version==7', {
438 'armv7': 1,
439 }, {
440 'armv7': 0,
441 }],
442
[email protected]c329adf82011-10-05 14:34:57443 # NSS usage.
[email protected]e0b85a52011-10-06 03:30:42444 ['(OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris") and use_openssl==0', {
[email protected]c329adf82011-10-05 14:34:57445 'use_nss%': 1,
446 }, {
447 'use_nss%': 0,
448 }],
[email protected]e0b85a52011-10-06 03:30:42449
[email protected]c335f4802013-04-06 04:51:21450 # Flags to use X11 on non-Mac POSIX platforms.
[email protected]1201dd0f2013-05-03 23:39:54451 ['OS=="win" or OS=="mac" or OS=="ios" or OS=="android" or use_ozone==1', {
[email protected]79e2336c2011-05-12 18:18:34452 'use_x11%': 0,
[email protected]c49ab0c2011-05-18 17:25:37453 }, {
[email protected]c49ab0c2011-05-18 17:25:37454 'use_x11%': 1,
[email protected]79e2336c2011-05-12 18:18:34455 }],
[email protected]9a8175892012-03-20 02:11:58456
[email protected]26bade892013-05-23 21:44:15457 # Flags to use pango and glib on non-Mac POSIX platforms.
[email protected]c335f4802013-04-06 04:51:21458 ['OS=="win" or OS=="mac" or OS=="ios" or OS=="android"', {
459 'use_glib%': 0,
[email protected]26bade892013-05-23 21:44:15460 'use_pango%': 0,
[email protected]c335f4802013-04-06 04:51:21461 }, {
462 'use_glib%': 1,
[email protected]26bade892013-05-23 21:44:15463 'use_pango%': 1,
[email protected]c335f4802013-04-06 04:51:21464 }],
465
[email protected]efadeacf2011-10-27 19:01:00466 # We always use skia text rendering in Aura on Windows, since GDI
467 # doesn't agree with our BackingStore.
468 # TODO(beng): remove once skia text rendering is on by default.
469 ['use_aura==1 and OS=="win"', {
470 'enable_skia_text%': 1,
471 }],
[email protected]9edeb712011-09-20 21:20:33472
[email protected]63692212010-09-16 00:22:21473 # A flag to enable or disable our compile-time dependency
474 # on gnome-keyring. If that dependency is disabled, no gnome-keyring
475 # support will be available. This option is useful
[email protected]25bc66a22011-09-24 18:32:49476 # for Linux distributions and for Aura.
[email protected]ab2017e2012-02-07 01:54:50477 ['chromeos==1 or use_aura==1', {
[email protected]63692212010-09-16 00:22:21478 'use_gnome_keyring%': 0,
479 }, {
480 'use_gnome_keyring%': 1,
481 }],
[email protected]0afe5212010-10-01 18:56:11482
[email protected]8796d922012-08-07 01:23:11483 ['toolkit_uses_gtk==1 or OS=="mac" or OS=="ios"', {
[email protected]1e013672012-06-29 22:12:20484 # GTK+, Mac and iOS want Title Case strings
[email protected]bb6aba32011-01-07 19:04:43485 'use_titlecase_in_grd_files%': 1,
486 }],
487
[email protected]77a848262013-02-22 11:17:25488 # Enable file manager and image loader extensions on Chrome OS.
[email protected]5f887612012-03-01 21:34:06489 ['chromeos==1', {
[email protected]ab2017e2012-02-07 01:54:50490 'file_manager_extension%': 1,
[email protected]77a848262013-02-22 11:17:25491 'image_loader_extension%': 1,
[email protected]ab2017e2012-02-07 01:54:50492 }, {
[email protected]3d38d8e2011-04-16 20:48:51493 'file_manager_extension%': 0,
[email protected]77a848262013-02-22 11:17:25494 'image_loader_extension%': 0,
[email protected]3d38d8e2011-04-16 20:48:51495 }],
[email protected]7de46352011-09-12 15:39:19496
[email protected]c79d1972013-02-06 18:47:29497 ['OS=="win" or OS=="mac" or (OS=="linux" and chromeos==0)', {
[email protected]f032fe92012-06-12 19:20:01498 'enable_one_click_signin%': 1,
[email protected]e4b66bf2012-05-29 20:39:51499 }],
500
[email protected]da1c8d692011-09-20 20:35:01501 ['OS=="android"', {
[email protected]098dff8a2013-01-23 20:54:49502 'enable_automation%': 0,
[email protected]55e02302012-08-21 00:50:46503 'enable_extensions%': 0,
[email protected]6ee43a72012-12-07 22:44:40504 'enable_google_now%': 0,
[email protected]7831e9a2013-02-20 13:54:12505 'enable_language_detection%': 1,
[email protected]55e02302012-08-21 00:50:46506 'enable_printing%': 0,
507 'enable_themes%': 0,
[email protected]55e02302012-08-21 00:50:46508 'proprietary_codecs%': 1,
[email protected]48de0fc2012-08-02 11:03:58509 'remoting%': 0,
[email protected]7d6763422013-04-26 12:06:54510 'arm_neon%': 0,
511 'arm_neon_optional%': 1,
[email protected]da1c8d692011-09-20 20:35:01512 }],
[email protected]839d5172011-10-13 17:18:11513
[email protected]57e67ac2013-02-22 03:37:22514 # Enable autofill dialog for Android and Views-enabled platforms for now.
[email protected]c2ecbcf2013-06-07 21:38:38515 ['toolkit_views==1 or (OS=="android" and android_webview_build==0) or OS=="mac"', {
[email protected]57e67ac2013-02-22 03:37:22516 'enable_autofill_dialog%': 1
517 }],
518
[email protected]d999c3cb2013-03-12 10:22:36519 ['OS=="android" and android_webview_build==0', {
[email protected]118347052013-01-12 08:35:43520 'enable_webrtc%': 1,
521 }],
522
523 # Disable WebRTC for building WebView as part of Android system.
524 # TODO(boliu): Decide if we want WebRTC, and if so, also merge
525 # the necessary third_party repositories.
[email protected]d999c3cb2013-03-12 10:22:36526 ['OS=="android" and android_webview_build==1', {
[email protected]118347052013-01-12 08:35:43527 'enable_webrtc%': 0,
528 }],
529
[email protected]0d16f292012-07-02 22:10:48530 ['OS=="ios"', {
[email protected]c4ac4d12012-09-12 12:02:24531 'configuration_policy%': 0,
[email protected]9bfe0ab2012-08-30 13:18:11532 'disable_ftp_support%': 1,
[email protected]c4ac4d12012-09-12 12:02:24533 'enable_automation%': 0,
534 'enable_extensions%': 0,
[email protected]6ee43a72012-12-07 22:44:40535 'enable_google_now%': 0,
[email protected]703369a2012-11-05 20:40:31536 'enable_language_detection%': 0,
[email protected]c4ac4d12012-09-12 12:02:24537 'enable_printing%': 0,
[email protected]3c6aa862012-11-05 17:11:44538 'enable_session_service%': 0,
[email protected]c4ac4d12012-09-12 12:02:24539 'enable_themes%': 0,
540 'enable_webrtc%': 0,
541 'notifications%': 0,
[email protected]0d16f292012-07-02 22:10:48542 'remoting%': 0,
[email protected]3c6aa862012-11-05 17:11:44543 'safe_browsing%': 0,
[email protected]0850e842013-01-19 03:44:31544 'enable_managed_users%': 0,
[email protected]0d16f292012-07-02 22:10:48545 }],
546
[email protected]839d5172011-10-13 17:18:11547 # Use GPU accelerated cross process image transport by default
[email protected]023d8242011-11-22 01:25:27548 # on linux builds with the Aura window manager
[email protected]f83c6f7f2012-01-28 03:23:01549 ['use_aura==1 and OS=="linux"', {
[email protected]1ee7c56c2011-10-19 14:51:33550 'ui_compositor_image_transport%': 1,
[email protected]839d5172011-10-13 17:18:11551 }, {
[email protected]1ee7c56c2011-10-19 14:51:33552 'ui_compositor_image_transport%': 0,
[email protected]839d5172011-10-13 17:18:11553 }],
[email protected]9061bee82012-01-16 11:45:17554
[email protected]c3340fb32012-12-20 20:45:39555 # Turn precompiled headers on by default.
556 ['OS=="win" and buildtype!="Official"', {
[email protected]9061bee82012-01-16 11:45:17557 'chromium_win_pch%': 1
558 }],
[email protected]18e0f39b2012-01-17 16:47:34559
[email protected]deb8b3cd2013-05-07 19:52:10560 ['chromeos==1 or OS=="android" or OS=="ios"', {
[email protected]18e0f39b2012-01-17 16:47:34561 'enable_plugin_installation%': 0,
562 }, {
563 'enable_plugin_installation%': 1,
564 }],
[email protected]b07806c12012-02-03 22:44:59565
[email protected]55d92492013-01-31 05:03:39566 ['(OS=="android" and google_tv!=1) or OS=="ios"', {
[email protected]6d17f6392012-12-05 05:24:54567 'enable_plugins%': 0,
568 }, {
569 'enable_plugins%': 1,
570 }],
571
[email protected]8d726a42012-02-09 03:49:00572 # linux_use_gold_binary: whether to use the binary checked into
[email protected]1e8e7b92013-03-15 07:27:56573 # third_party/gold. Gold is not used for 32-bit linux builds
574 # as it runs out of address space.
575 ['OS=="linux" and (target_arch=="x64" or target_arch=="arm")', {
[email protected]1e033482012-02-09 19:33:51576 'linux_use_gold_binary%': 1,
[email protected]be239492012-02-09 19:00:17577 }, {
[email protected]bd68ea52013-03-26 09:49:37578 'linux_use_gold_binary%': 0,
[email protected]d1d90a42013-03-26 12:01:34579 }],
580
581 # linux_use_gold_flags: whether to use build flags that rely on gold.
582 # On by default for x64 Linux. Temporarily off for ChromeOS as
583 # it failed on a buildbot.
584 ['OS=="linux" and target_arch=="x64" and chromeos==0', {
585 'linux_use_gold_flags%': 1,
586 }, {
[email protected]8d726a42012-02-09 03:49:00587 'linux_use_gold_flags%': 0,
[email protected]b07806c12012-02-03 22:44:59588 }],
[email protected]2e22e2f2012-03-15 21:53:10589
[email protected]9394a3a2012-12-19 19:22:39590 ['chromeos==1', {
591 'linux_use_libgps%': 1,
592 }, { # chromeos==0
593 # Do not use libgps on desktop Linux by default,
594 # see http://crbug.com/103751.
595 'linux_use_libgps%': 0,
596 }],
597
[email protected]a95d5302012-11-03 00:02:19598 ['OS=="android" or OS=="ios"', {
[email protected]e6026962012-06-14 21:28:32599 'enable_captive_portal_detection%': 0,
600 }, {
601 'enable_captive_portal_detection%': 1,
602 }],
603
[email protected]3bd47e022012-03-22 04:19:12604 # Enable Skia UI text drawing incrementally on different platforms.
605 # http://crbug.com/105550
606 #
607 # On Aura, this allows per-tile painting to be used in the browser
608 # compositor.
[email protected]9197a9282012-05-30 14:12:32609 ['OS!="mac" and OS!="android"', {
[email protected]3bd47e022012-03-22 04:19:12610 'use_canvas_skia%': 1,
611 }],
[email protected]adb44342012-07-23 13:36:12612
[email protected]0753ea42012-08-30 20:15:44613 ['chromeos==1', {
614 # When building for ChromeOS we dont want Chromium to use libjpeg_turbo.
615 'use_libjpeg_turbo%': 0,
616 }],
617
[email protected]adb44342012-07-23 13:36:12618 ['OS=="android"', {
619 # When building as part of the Android system, use system libraries
620 # where possible to reduce ROM size.
[email protected]d999c3cb2013-03-12 10:22:36621 'use_system_libjpeg%': '<(android_webview_build)',
[email protected]adb44342012-07-23 13:36:12622 }],
[email protected]8a46f5f2012-12-05 00:47:12623
[email protected]9f4518692013-06-14 00:12:53624 # Do not enable the Settings App on ChromeOS.
625 ['enable_app_list==1 and chromeos==0', {
[email protected]8a46f5f2012-12-05 00:47:12626 'enable_settings_app%': 1,
627 }, {
628 'enable_settings_app%': 0,
629 }],
[email protected]94cdbf42012-12-11 19:49:22630
631 ['OS=="linux" and target_arch=="arm" and chromeos==0', {
632 # Set some defaults for arm/linux chrome builds
[email protected]94cdbf42012-12-11 19:49:22633 'linux_breakpad%': 0,
634 'linux_use_tcmalloc%': 0,
[email protected]84b00d12f2012-12-14 01:53:43635 # sysroot needs to be an absolute path otherwise it generates
[email protected]94cdbf42012-12-11 19:49:22636 # incorrect results when passed to pkg-config
[email protected]84b00d12f2012-12-14 01:53:43637 'sysroot%': '<!(cd <(DEPTH) && pwd -P)/arm-sysroot',
[email protected]94cdbf42012-12-11 19:49:22638 }], # OS=="linux" and target_arch=="arm" and chromeos==0
[email protected]eb5f1672013-01-31 07:56:46639
[email protected]e2aaaac2013-05-08 07:20:09640 ['linux_lsb_release=="12.04"', {
641 'conditions': [
642 ['target_arch=="x64"', {
[email protected]b32bf9fe2013-06-05 23:07:43643 'sysroot%': '<!(cd <(DEPTH) && pwd -P)/chrome/installer/linux/debian_wheezy_amd64-sysroot',
[email protected]e2aaaac2013-05-08 07:20:09644 }],
645 ['target_arch=="ia32"', {
[email protected]b32bf9fe2013-06-05 23:07:43646 'sysroot%': '<!(cd <(DEPTH) && pwd -P)/chrome/installer/linux/debian_wheezy_i386-sysroot',
[email protected]e2aaaac2013-05-08 07:20:09647 }],
648 ],
649 }], # linux_lsb_release=="12.04"
650
[email protected]eb5f1672013-01-31 07:56:46651 ['target_arch=="mipsel"', {
[email protected]f1478932013-03-05 20:50:07652 'sysroot%': '<!(cd <(DEPTH) && pwd -P)/mipsel-sysroot/sysroot',
[email protected]801978d32013-03-09 02:51:28653 'CXX%': '<!(cd <(DEPTH) && pwd -P)/mipsel-sysroot/bin/mipsel-linux-gnu-gcc',
[email protected]eb5f1672013-01-31 07:56:46654 }],
[email protected]5b38a522013-03-20 17:00:47655
656 # Whether tests targets should be run, archived or just have the
[email protected]93fe4002013-04-10 00:17:01657 # dependencies verified. All the tests targets have the '_run' suffix,
[email protected]5b38a522013-03-20 17:00:47658 # e.g. base_unittests_run runs the target base_unittests. The test
659 # target always calls tools/swarm_client/isolate.py. See the script's
660 # --help for more information and the valid --mode values. Meant to be
661 # overriden with GYP_DEFINES.
[email protected]93fe4002013-04-10 00:17:01662 # TODO(maruel): Remove the conditions as more configurations are
663 # supported.
[email protected]349f3062013-04-10 20:44:51664 # TODO(csharp): Remove OS!="mac" once xcode can run the isolate code
665 # again.
[email protected]93fe4002013-04-10 00:17:01666 # NOTE: The check for disable_nacl==0 and component=="static_library"
667 # can't be used here because these variables are not defined yet, but it
668 # is still not supported.
[email protected]0dc310a32013-05-08 23:52:44669 ['OS!="mac" and OS!="ios" and OS!="android" and chromeos==0', {
[email protected]5b38a522013-03-20 17:00:47670 'test_isolation_mode%': 'check',
671 }, {
672 'test_isolation_mode%': 'noop',
673 }],
[email protected]5cbeb502013-04-23 19:25:27674 # Whether Android ARM build uses OpenMAX DL FFT.
[email protected]fc3ab0c2013-04-17 15:26:34675 ['OS=="android" and target_arch=="arm" and android_webview_build==0', {
[email protected]6558fd4f2013-04-17 18:51:38676 # Currently only supported on Android ARM, without webview.
677 # When enabled, this will also enable WebAudio on Android
[email protected]330f3a32013-04-23 05:47:58678 # ARM. Default is enabled.
679 'use_openmax_dl_fft%': 1,
[email protected]d29d61b2013-04-17 04:00:53680 }, {
681 'use_openmax_dl_fft%': 0,
682 }],
[email protected]b3f23ba2010-04-26 22:58:17683 ],
[email protected]2b113652012-09-17 17:01:39684
[email protected]a3a720f2013-04-25 19:35:42685 # Set this to 1 to enable use of concatenated impulse responses
686 # for the HRTF panner in WebAudio.
[email protected]508afb72013-05-02 22:37:26687 'use_concatenated_impulse_responses': 1,
[email protected]a3a720f2013-04-25 19:35:42688
[email protected]f2817cf2013-05-16 11:39:54689 # You can set the variable 'use_official_google_api_keys' to 1
690 # to use the Google-internal file containing official API keys
691 # for Google Chrome even in a developer build. Setting this
692 # variable explicitly to 1 will cause your build to fail if the
693 # internal file is missing.
[email protected]2b113652012-09-17 17:01:39694 #
[email protected]f2817cf2013-05-16 11:39:54695 # The variable is documented here, but not handled in this file;
696 # see //google_apis/determine_use_official_keys.gypi for the
697 # implementation.
[email protected]2b113652012-09-17 17:01:39698 #
[email protected]f2817cf2013-05-16 11:39:54699 # Set the variable to 0 to not use the internal file, even when
700 # it exists in your checkout.
[email protected]2b113652012-09-17 17:01:39701 #
[email protected]f2817cf2013-05-16 11:39:54702 # Leave it unset in your include.gypi to have the variable
703 # implicitly set to 1 if you have
704 # src/google_apis/internal/google_chrome_api_keys.h in your
705 # checkout, and implicitly set to 0 if not.
706 #
707 # Note that official builds always behave as if the variable
[email protected]2b113652012-09-17 17:01:39708 # was explicitly set to 1, i.e. they always use official keys,
709 # and will fail to build if the internal file is missing.
[email protected]f2817cf2013-05-16 11:39:54710 #
711 # NOTE: You MUST NOT explicitly set the variable to 2 in your
712 # include.gypi or by other means. Due to subtleties of GYP, this
713 # is not the same as leaving the variable unset, even though its
714 # default value in
715 # //google_apis/determine_use_official_keys.gypi is 2.
[email protected]2b113652012-09-17 17:01:39716
717 # Set these to bake the specified API keys and OAuth client
718 # IDs/secrets into your build.
719 #
720 # If you create a build without values baked in, you can instead
721 # set environment variables to provide the keys at runtime (see
722 # src/google_apis/google_api_keys.h for details). Features that
723 # require server-side APIs may fail to work if no keys are
724 # provided.
725 #
726 # Note that if you are building an official build or if
727 # use_official_google_api_keys has been set to 1 (explicitly or
728 # implicitly), these values will be ignored and the official
729 # keys will be used instead.
730 'google_api_key%': '',
731 'google_default_client_id%': '',
732 'google_default_client_secret%': '',
[email protected]e14a9f92009-08-05 19:26:07733 },
734
[email protected]e72e55b2011-01-06 22:19:30735 # Copy conditionally-set variables out one scope.
[email protected]e14a9f92009-08-05 19:26:07736 'branding%': '<(branding)',
737 'buildtype%': '<(buildtype)',
[email protected]e0d00142009-09-18 22:10:27738 'target_arch%': '<(target_arch)',
[email protected]cf185b32010-01-12 04:29:59739 'host_arch%': '<(host_arch)',
[email protected]c153e5352009-09-22 12:37:44740 'toolkit_views%': '<(toolkit_views)',
[email protected]1ee7c56c2011-10-19 14:51:33741 'ui_compositor_image_transport%': '<(ui_compositor_image_transport)',
[email protected]41423092011-08-25 15:39:58742 'use_aura%': '<(use_aura)',
[email protected]ed329be2012-01-03 22:02:16743 'use_ash%': '<(use_ash)',
[email protected]e0b85a52011-10-06 03:30:42744 'use_openssl%': '<(use_openssl)',
[email protected]c329adf82011-10-05 14:34:57745 'use_nss%': '<(use_nss)',
[email protected]df9167b2011-11-14 19:15:25746 'os_bsd%': '<(os_bsd)',
[email protected]79e2336c2011-05-12 18:18:34747 'os_posix%': '<(os_posix)',
[email protected]258dca42011-09-21 00:17:19748 'use_glib%': '<(use_glib)',
[email protected]26bade892013-05-23 21:44:15749 'use_pango%': '<(use_pango)',
[email protected]ff78e4e2013-05-03 19:19:15750 'use_ozone%': '<(use_ozone)',
[email protected]79e2336c2011-05-12 18:18:34751 'toolkit_uses_gtk%': '<(toolkit_uses_gtk)',
752 'use_x11%': '<(use_x11)',
[email protected]63692212010-09-16 00:22:21753 'use_gnome_keyring%': '<(use_gnome_keyring)',
[email protected]0afe5212010-10-01 18:56:11754 'linux_fpic%': '<(linux_fpic)',
[email protected]c153e5352009-09-22 12:37:44755 'chromeos%': '<(chromeos)',
[email protected]7ddea9802012-02-22 23:08:05756 'enable_viewport%': '<(enable_viewport)',
[email protected]1efbaaa2012-04-24 02:43:24757 'enable_hidpi%': '<(enable_hidpi)',
[email protected]6155e702012-05-02 17:56:06758 'enable_touch_ui%': '<(enable_touch_ui)',
[email protected]f56797b2011-09-25 00:04:35759 'use_xi2_mt%':'<(use_xi2_mt)',
[email protected]e47c32032011-03-01 19:26:20760 'file_manager_extension%': '<(file_manager_extension)',
[email protected]77a848262013-02-22 11:17:25761 'image_loader_extension%': '<(image_loader_extension)',
[email protected]9c1949e2009-10-02 19:59:54762 'fastbuild%': '<(fastbuild)',
[email protected]20960e072011-09-20 20:59:01763 'dcheck_always_on%': '<(dcheck_always_on)',
[email protected]a76fe1a2010-03-01 23:39:36764 'python_ver%': '<(python_ver)',
[email protected]7d6763422013-04-26 12:06:54765 'arm_version%': '<(arm_version)',
[email protected]eafc0b452010-02-26 21:53:43766 'armv7%': '<(armv7)',
767 'arm_neon%': '<(arm_neon)',
[email protected]7d6763422013-04-26 12:06:54768 'arm_neon_optional%': '<(arm_neon_optional)',
[email protected]4d83eb72010-03-04 16:42:23769 'sysroot%': '<(sysroot)',
[email protected]945361a2011-09-30 04:38:43770 'system_libdir%': '<(system_libdir)',
[email protected]8974e042010-06-21 18:06:52771 'component%': '<(component)',
[email protected]bb6aba32011-01-07 19:04:43772 'use_titlecase_in_grd_files%': '<(use_titlecase_in_grd_files)',
[email protected]9e94cca2011-02-04 17:38:17773 'use_third_party_translations%': '<(use_third_party_translations)',
[email protected]9a425422011-01-11 00:53:18774 'remoting%': '<(remoting)',
[email protected]bd7b6fe2012-03-05 21:02:40775 'enable_one_click_signin%': '<(enable_one_click_signin)',
[email protected]dda90ae2011-07-19 22:07:48776 'enable_webrtc%': '<(enable_webrtc)',
[email protected]d5cf9fb2011-09-27 00:15:16777 'chromium_win_pch%': '<(chromium_win_pch)',
[email protected]1ec68c42011-06-01 13:56:25778 'configuration_policy%': '<(configuration_policy)',
[email protected]4b58e7d2011-07-11 10:22:56779 'safe_browsing%': '<(safe_browsing)',
[email protected]9eb100e2011-10-14 05:08:22780 'input_speech%': '<(input_speech)',
[email protected]7cce3232011-10-28 10:41:57781 'notifications%': '<(notifications)',
[email protected]5d451ad2011-02-11 16:43:46782 'clang_use_chrome_plugins%': '<(clang_use_chrome_plugins)',
[email protected]970fd4e2012-12-19 11:09:37783 'mac_want_real_dsym%': '<(mac_want_real_dsym)',
[email protected]92799b632011-08-15 14:33:06784 'asan%': '<(asan)',
[email protected]062522a2013-06-13 15:49:55785 'lsan%': '<(lsan)',
[email protected]a10ddd2d2013-02-26 20:06:59786 'msan%': '<(msan)',
[email protected]c9a829272012-07-04 07:51:12787 'tsan%': '<(tsan)',
[email protected]7bdd7d7c2012-11-01 10:36:16788 'tsan_blacklist%': '<(tsan_blacklist)',
[email protected]7ce58b22012-09-26 05:17:25789 'clang_type_profiler%': '<(clang_type_profiler)',
[email protected]8a6abd12012-05-16 10:04:44790 'order_profiling%': '<(order_profiling)',
[email protected]00b0a7f2012-01-25 15:30:46791 'order_text_section%': '<(order_text_section)',
[email protected]6a3cd37e2012-04-17 17:13:34792 'enable_extensions%': '<(enable_extensions)',
[email protected]18e0f39b2012-01-17 16:47:34793 'enable_plugin_installation%': '<(enable_plugin_installation)',
[email protected]6d17f6392012-12-05 05:24:54794 'enable_plugins%': '<(enable_plugins)',
[email protected]cdb756ef2012-04-05 18:34:53795 'enable_session_service%': '<(enable_session_service)',
[email protected]6b40bb582012-03-15 20:50:38796 'enable_themes%': '<(enable_themes)',
[email protected]57e67ac2013-02-22 03:37:22797 'enable_autofill_dialog%': '<(enable_autofill_dialog)',
[email protected]066ab9882013-06-07 00:55:20798 'use_spring_wallpaper%': '<(use_spring_wallpaper)',
[email protected]4ffe78a2012-10-04 20:55:15799 'use_oem_wallpaper%': '<(use_oem_wallpaper)',
[email protected]0acdd772012-04-05 22:53:00800 'enable_background%': '<(enable_background)',
[email protected]b07806c12012-02-03 22:44:59801 'linux_use_gold_binary%': '<(linux_use_gold_binary)',
[email protected]8d726a42012-02-09 03:49:00802 'linux_use_gold_flags%': '<(linux_use_gold_flags)',
[email protected]9394a3a2012-12-19 19:22:39803 'linux_use_libgps%': '<(linux_use_libgps)',
[email protected]62424a52012-03-18 03:09:50804 'use_canvas_skia%': '<(use_canvas_skia)',
[email protected]0ef3a522012-05-15 14:56:33805 'test_isolation_mode%': '<(test_isolation_mode)',
806 'test_isolation_outdir%': '<(test_isolation_outdir)',
[email protected]5b38a522013-03-20 17:00:47807 'test_isolation_fail_on_missing': '<(test_isolation_fail_on_missing)',
[email protected]2e22e2f2012-03-15 21:53:10808 'enable_automation%': '<(enable_automation)',
[email protected]658677f2012-06-09 06:04:02809 'enable_printing%': '<(enable_printing)',
[email protected]6ee43a72012-12-07 22:44:40810 'enable_google_now%': '<(enable_google_now)',
[email protected]703369a2012-11-05 20:40:31811 'enable_language_detection%': '<(enable_language_detection)',
[email protected]e6026962012-06-14 21:28:32812 'enable_captive_portal_detection%': '<(enable_captive_portal_detection)',
[email protected]9bfe0ab2012-08-30 13:18:11813 'disable_ftp_support%': '<(disable_ftp_support)',
[email protected]44879ed2012-04-06 01:11:02814 'enable_task_manager%': '<(enable_task_manager)',
[email protected]740ebed2012-06-27 19:14:06815 'sas_dll_path%': '<(sas_dll_path)',
[email protected]49ae3e52012-04-12 09:50:12816 'wix_path%': '<(wix_path)',
[email protected]e190d272012-08-30 17:36:44817 'use_libjpeg_turbo%': '<(use_libjpeg_turbo)',
[email protected]adb44342012-07-23 13:36:12818 'use_system_libjpeg%': '<(use_system_libjpeg)',
[email protected]d999c3cb2013-03-12 10:22:36819 'android_webview_build%': '<(android_webview_build)',
[email protected]5660f192013-04-02 16:55:46820 'gyp_managed_install%': 0,
[email protected]55d92492013-01-31 05:03:39821 'google_tv%': '<(google_tv)',
[email protected]dc4e8b82012-11-15 03:58:16822 'enable_app_list%': '<(enable_app_list)',
[email protected]cb800562012-11-20 22:36:07823 'use_default_render_theme%': '<(use_default_render_theme)',
[email protected]dc4e8b82012-11-15 03:58:16824 'enable_settings_app%': '<(enable_settings_app)',
[email protected]2b113652012-09-17 17:01:39825 'google_api_key%': '<(google_api_key)',
826 'google_default_client_id%': '<(google_default_client_id)',
827 'google_default_client_secret%': '<(google_default_client_secret)',
[email protected]0850e842013-01-19 03:44:31828 'enable_managed_users%': '<(enable_managed_users)',
[email protected]199def22013-02-21 17:52:29829 'spdy_proxy_auth_origin%': '<(spdy_proxy_auth_origin)',
830 'spdy_proxy_auth_property%': '<(spdy_proxy_auth_property)',
[email protected]f37e9412013-05-27 23:18:25831 'spdy_proxy_auth_value%': '<(spdy_proxy_auth_value)',
[email protected]01971642012-03-07 14:39:56832
[email protected]46aa05cc42013-01-15 17:34:31833 # Use system mesa instead of bundled one.
834 'use_system_mesa%': 0,
835
[email protected]c486e4e2013-01-08 16:49:07836 # Use system nspr instead of the bundled one.
837 'use_system_nspr%': 0,
838
[email protected]2f325672012-10-31 23:29:37839 # Use system protobuf instead of bundled one.
840 'use_system_protobuf%': 0,
841
[email protected]371e1092011-10-12 20:37:36842 # Use system yasm instead of bundled one.
843 'use_system_yasm%': 0,
844
[email protected]ea02e962013-04-26 11:18:16845 # Use system ICU instead of bundled one.
846 'use_system_icu%' : 0,
847
[email protected]cd00bd862012-02-29 00:40:36848 # Default to enabled PIE; this is important for ASLR but we may need to be
849 # able to turn it off for various reasons.
850 'linux_disable_pie%': 0,
851
[email protected]caa95c82009-11-23 22:39:32852 # The release channel that this build targets. This is used to restrict
853 # channel-specific build options, like which installer packages to create.
854 # The default is 'all', which does no channel-specific filtering.
855 'channel%': 'all',
856
[email protected]b3fb8092009-03-12 19:09:24857 # Override chromium_mac_pch and set it to 0 to suppress the use of
858 # precompiled headers on the Mac. Prefix header injection may still be
859 # used, but prefix headers will not be precompiled. This is useful when
860 # using distcc to distribute a build to compile slaves that don't
861 # share the same compiler executable as the system driving the compilation,
862 # because precompiled headers rely on pointers into a specific compiler
863 # executable's image. Setting this to 0 is needed to use an experimental
864 # Linux-Mac cross compiler distcc farm.
865 'chromium_mac_pch%': 1,
866
[email protected]27b687ec42012-03-26 22:22:15867 # The default value for mac_strip in target_defaults. This cannot be
868 # set there, per the comment about variable% in a target_defaults.
869 'mac_strip_release%': 1,
870
[email protected]f5ecbba12009-04-03 04:35:18871 # Set to 1 to enable code coverage. In addition to build changes
872 # (e.g. extra CFLAGS), also creates a new target in the src/chrome
873 # project file called "coverage".
874 # Currently ignored on Windows.
875 'coverage%': 0,
[email protected]653bd5f032009-04-08 12:55:49876
[email protected]9619e65d2012-05-23 19:06:52877 # Set to 1 to force Visual C++ to use legacy debug information format /Z7.
878 # This is useful for parallel compilation tools which can't support /Zi.
879 # Only used on Windows.
880 'win_z7%' : 0,
881
[email protected]7477ea6f2009-12-22 23:28:15882 # Although base/allocator lets you select a heap library via an
[email protected]7e0d664a2009-12-03 21:07:47883 # environment variable, the libcmt shim it uses sometimes gets in
884 # the way. To disable it entirely, and switch to normal msvcrt, do e.g.
885 # 'win_use_allocator_shim': 0,
886 # 'win_release_RuntimeLibrary': 2
887 # to ~/.gyp/include.gypi, gclient runhooks --force, and do a release build.
[email protected]8974e042010-06-21 18:06:52888 'win_use_allocator_shim%': 1, # 1 = shim allocator via libcmt; 0 = msvcrt
[email protected]279cd4212009-09-11 22:32:11889
[email protected]95ff8082009-11-13 22:21:01890 # Whether usage of OpenMAX is enabled.
891 'enable_openmax%': 0,
892
[email protected]d01120e62010-05-10 17:04:48893 # Whether proprietary audio/video codecs are assumed to be included with
894 # this build (only meaningful if branding!=Chrome).
895 'proprietary_codecs%': 0,
896
[email protected]e5b2eaa2009-04-14 01:39:12897 # TODO(bradnelson): eliminate this when possible.
898 # To allow local gyp files to prevent release.vsprops from being included.
899 # Yes(1) means include release.vsprops.
900 # Once all vsprops settings are migrated into gyp, this can go away.
901 'msvs_use_common_release%': 1,
[email protected]606116d22009-05-06 22:38:23902
[email protected]cbd5fd52009-08-26 00:14:27903 # TODO(bradnelson): eliminate this when possible.
904 # To allow local gyp files to override additional linker options for msvs.
905 # Yes(1) means set use the common linker options.
[email protected]48c7af72009-07-03 22:00:19906 'msvs_use_common_linker_extras%': 1,
907
[email protected]1ffb6502009-06-02 07:46:24908 # TODO(sgk): eliminate this if possible.
909 # It would be nicer to support this via a setting in 'target_defaults'
910 # in chrome/app/locales/locales.gypi overriding the setting in the
911 # 'Debug' configuration in the 'target_defaults' dict below,
912 # but that doesn't work as we'd like.
913 'msvs_debug_link_incremental%': '2',
914
[email protected]1f790ef2011-01-11 20:45:36915 # Needed for some of the largest modules.
916 'msvs_debug_link_nonincremental%': '1',
917
[email protected]6f390be2012-08-16 18:57:10918 # Turns on Use Library Dependency Inputs for linking chrome.dll on Windows
[email protected]5ab8f482011-08-18 18:30:06919 # to get incremental linking to be faster in debug builds.
[email protected]8f1da83d2012-08-06 21:49:26920 'incremental_chrome_dll%': '0',
[email protected]5ab8f482011-08-18 18:30:06921
[email protected]ac4d0ff2013-05-14 20:04:15922 # Experimental setting to break chrome.dll in to multiple parts (currently
923 # two, split primarily along browser/render lines).
[email protected]56c248b2013-05-08 17:51:02924 'chrome_split_dll%': '0',
925
[email protected]c54b41cb2012-08-24 20:58:24926 # The default settings for third party code for treating
927 # warnings-as-errors. Ideally, this would not be required, however there
928 # is some third party code that takes a long time to fix/roll. So, this
929 # flag allows us to have warnings as errors in general to prevent
930 # regressions in most modules, while working on the bits that are
931 # remaining.
932 'win_third_party_warn_as_error%': 'true',
933
[email protected]573136142009-07-15 22:48:37934 # This is the location of the sandbox binary. Chrome looks for this before
935 # running the zygote process. If found, and SUID, it will be used to
936 # sandbox the zygote process and, thus, all renderer processes.
937 'linux_sandbox_path%': '',
938
[email protected]3bb37e62012-04-19 03:40:08939 # Clang stuff.
940 'clang%': '<(clang)',
[email protected]e4ddf332011-10-20 21:52:24941 'make_clang_dir%': 'third_party/llvm-build/Release+Asserts',
[email protected]58680ce2010-09-18 00:09:15942
[email protected]5e781232011-01-28 02:57:59943 # These two variables can be set in GYP_DEFINES while running
944 # |gclient runhooks| to let clang run a plugin in every compilation.
945 # Only has an effect if 'clang=1' is in GYP_DEFINES as well.
946 # Example:
[email protected]93120fe2011-02-03 20:46:42947 # 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:59948
949 'clang_load%': '',
950 'clang_add_plugin%': '',
951
[email protected]da1c8d692011-09-20 20:35:01952 # The default type of gtest.
953 'gtest_target_type%': 'executable',
954
[email protected]7664ab32011-02-01 23:35:25955 # Enable sampling based profiler.
956 # See http://google-perftools.googlecode.com/svn/trunk/doc/cpuprofile.html
957 'profiling%': '0',
958
[email protected]93b373502011-08-16 19:06:22959 # Enable strict glibc debug mode.
960 'glibcxx_debug%': 0,
[email protected]ce4367d2013-01-15 16:13:10961 # Compile in Breakpad support by default so that it can be tested,
962 # even if it not enabled by default at runtime.
963 'linux_breakpad%': 1,
[email protected]36532f332010-08-25 00:22:01964 # And if we want to dump symbols for Breakpad-enabled builds.
965 'linux_dump_symbols%': 0,
966 # And if we want to strip the binary after dumping symbols.
[email protected]05cb6962009-10-01 23:29:03967 'linux_strip_binary%': 0,
[email protected]1d87c282010-09-15 22:24:49968 # Strip the test binaries needed for Linux reliability tests.
969 'linux_strip_reliability_tests%': 0,
[email protected]05cb6962009-10-01 23:29:03970
[email protected]46ce5b562010-06-16 18:39:53971 # Enable TCMalloc.
972 'linux_use_tcmalloc%': 1,
[email protected]3c8fe5482013-05-22 15:17:03973 'android_use_tcmalloc%': 0,
[email protected]01699e22009-11-11 19:24:24974
[email protected]d8b60602010-03-26 09:41:22975 # Disable TCMalloc's heapchecker.
976 'linux_use_heapchecker%': 0,
977
[email protected]64e2d4a42010-08-27 10:13:21978 # Disable shadow stack keeping used by heapcheck to unwind the stacks
979 # better.
980 'linux_keep_shadow_stacks%': 0,
981
[email protected]556c5d72010-06-10 05:45:01982 # Set to 1 to link against libgnome-keyring instead of using dlopen().
983 'linux_link_gnome_keyring%': 0,
[email protected]abcc9ac2011-05-16 20:04:35984 # Set to 1 to link against gsettings APIs instead of using dlopen().
985 'linux_link_gsettings%': 0,
[email protected]556c5d72010-06-10 05:45:01986
[email protected]23eea4a42013-04-27 04:10:26987 # Default arch variant for MIPS.
988 'mips_arch_variant%': 'mips32r2',
989
[email protected]a63e8d22013-03-23 16:17:08990 # Enable use of OpenMAX DL FFT routines.
991 'use_openmax_dl_fft%': '<(use_openmax_dl_fft)',
[email protected]fc3ab0c2013-04-17 15:26:34992
[email protected]9821d0d2010-04-16 22:40:37993 # Enable new NPDevice API.
994 'enable_new_npdevice_api%': 0,
[email protected]ed154592010-04-29 00:18:50995
996 # Enable EGLImage support in OpenMAX
[email protected]58023be2011-02-04 20:34:14997 'enable_eglimage%': 1,
[email protected]ed154592010-04-29 00:18:50998
[email protected]6f51b27e2010-06-22 20:43:53999 # Enable a variable used elsewhere throughout the GYP files to determine
1000 # whether to compile in the sources for the GPU plugin / process.
1001 'enable_gpu%': 1,
1002
[email protected]e72e55b2011-01-06 22:19:301003 # .gyp files or targets should set chromium_code to 1 if they build
1004 # Chromium-specific code, as opposed to external code. This variable is
1005 # used to control such things as the set of warnings to enable, and
1006 # whether warnings are treated as errors.
1007 'chromium_code%': 0,
1008
[email protected]8d726a42012-02-09 03:49:001009 'release_valgrind_build%': 0,
1010
[email protected]b1eb341c2011-11-09 18:46:071011 # TODO(thakis): Make this a blacklist instead, http://crbug.com/101600
1012 'enable_wexit_time_destructors%': 0,
1013
[email protected]e72e55b2011-01-06 22:19:301014 # Set to 1 to compile with the built in pdf viewer.
1015 'internal_pdf%': 0,
1016
[email protected]9e1149d72012-07-24 01:27:171017 # Set to 1 to compile with the OpenGL ES 2.0 conformance tests.
1018 'internal_gles2_conform_tests%': 0,
1019
[email protected]e72e55b2011-01-06 22:19:301020 # NOTE: When these end up in the Mac bundle, we need to replace '-' for '_'
1021 # so Cocoa is happy (http://crbug.com/20441).
1022 'locales': [
1023 'am', 'ar', 'bg', 'bn', 'ca', 'cs', 'da', 'de', 'el', 'en-GB',
1024 'en-US', 'es-419', 'es', 'et', 'fa', 'fi', 'fil', 'fr', 'gu', 'he',
1025 'hi', 'hr', 'hu', 'id', 'it', 'ja', 'kn', 'ko', 'lt', 'lv',
[email protected]b6fbd6742013-03-15 11:15:411026 'ml', 'mr', 'ms', 'nb', 'nl', 'pl', 'pt-BR', 'pt-PT', 'ro', 'ru',
[email protected]e72e55b2011-01-06 22:19:301027 'sk', 'sl', 'sr', 'sv', 'sw', 'ta', 'te', 'th', 'tr', 'uk',
1028 'vi', 'zh-CN', 'zh-TW',
1029 ],
1030
[email protected]cc0322d2011-07-24 09:29:191031 # Pseudo locales are special locales which are used for testing and
1032 # debugging. They don't get copied to the final app. For more info,
1033 # check out https://sites.google.com/a/chromium.org/dev/Home/fake-bidi
1034 'pseudo_locales': [
1035 'fake-bidi',
1036 ],
1037
[email protected]bb6aba32011-01-07 19:04:431038 'grit_defines': [],
1039
[email protected]bd3bd442011-03-28 07:58:511040 # If debug_devtools is set to 1, JavaScript files for DevTools are
1041 # stored as is and loaded from disk. Otherwise, a concatenated file
1042 # is stored in resources.pak. It is still possible to load JS files
1043 # from disk by passing --debug-devtools cmdline switch.
1044 'debug_devtools%': 0,
1045
[email protected]464750f2011-10-24 23:16:181046 # The Java Bridge is not compiled in by default.
1047 'java_bridge%': 0,
1048
[email protected]1e013672012-06-29 22:12:201049 # Code signing for iOS binaries. The bots need to be able to disable this.
1050 'chromium_ios_signing%': 1,
1051
[email protected]33e1c372011-12-14 16:32:071052 # This flag is only used when disable_nacl==0 and disables all those
1053 # subcomponents which would require the installation of a native_client
1054 # untrusted toolchain.
1055 'disable_nacl_untrusted%': 0,
1056
[email protected]407dfa632011-12-23 11:59:351057 # Disable Dart by default.
1058 'enable_dart%': 0,
1059
[email protected]ff10b132012-02-29 22:53:301060 # The desired version of Windows SDK can be set in ~/.gyp/include.gypi.
1061 'msbuild_toolset%': '',
1062
[email protected]836285f22012-04-03 16:19:261063 # Native Client is enabled by default.
1064 'disable_nacl%': 0,
1065
[email protected]1e40ba002013-03-07 22:07:331066 # Portable Native Client is enabled by default.
1067 'disable_pnacl%': 0,
1068
[email protected]fa9d4e262012-08-21 04:39:001069 # Whether to build full debug version for Debug configuration on Android.
1070 # Compared to full debug version, the default Debug configuration on Android
1071 # has no full v8 debug, has size optimization and linker gc section, so that
1072 # we can build a debug version with acceptable size and performance.
1073 'android_full_debug%': 0,
1074
[email protected]65885272012-10-05 23:55:501075 # Sets the default version name and code for Android app, by default we
1076 # do a developer build.
1077 'android_app_version_name%': 'Developer Build',
1078 'android_app_version_code%': 0,
1079
[email protected]740ebed2012-06-27 19:14:061080 'sas_dll_exists': '<!(python <(DEPTH)/build/dir_exists.py <(sas_dll_path))',
[email protected]49ae3e52012-04-12 09:50:121081 'wix_exists': '<!(python <(DEPTH)/build/dir_exists.py <(wix_path))',
1082
[email protected]1f8d9402012-07-06 22:47:561083 'windows_sdk_default_path': '<(DEPTH)/third_party/platformsdk_win8/files',
1084 'directx_sdk_default_path': '<(DEPTH)/third_party/directxsdk/files',
[email protected]1ab48032012-07-02 21:48:051085
[email protected]fd6d8822012-12-08 06:56:111086 # Whether we are using the rlz library or not. Platforms like Android send
1087 # rlz codes for searches but do not use the library.
[email protected]b6a5ac92012-10-29 18:17:221088 'enable_rlz%': 0,
1089
[email protected]5cbeb502013-04-23 19:25:271090 # MDNS is disabled by default.
1091 'enable_mdns%' : 0,
1092
[email protected]912c55c2009-07-31 23:33:551093 'conditions': [
[email protected]5f683172013-04-27 01:53:191094 # The version of GCC in use, set later in platforms that use GCC and have
1095 # not explicitly chosen to build with clang. Currently, this means all
1096 # platforms except Windows, Mac and iOS.
1097 # TODO(glider): set clang to 1 earlier for ASan and TSan builds so that
1098 # it takes effect here.
[email protected]062522a2013-06-13 15:49:551099 ['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:191100 'gcc_version%': '<!(python <(DEPTH)/build/compiler_version.py)',
1101 }, {
1102 'gcc_version%': 0,
1103 }],
[email protected]1f8d9402012-07-06 22:47:561104 ['OS=="win" and "<!(python <(DEPTH)/build/dir_exists.py <(windows_sdk_default_path))"=="True"', {
1105 'windows_sdk_path%': '<(windows_sdk_default_path)',
1106 }, {
1107 'windows_sdk_path%': 'C:/Program Files (x86)/Windows Kits/8.0',
1108 }],
1109 ['OS=="win" and "<!(python <(DEPTH)/build/dir_exists.py <(directx_sdk_default_path))"=="True"', {
1110 'directx_sdk_path%': '<(directx_sdk_default_path)',
1111 }, {
1112 'directx_sdk_path%': '$(DXSDK_DIR)',
1113 }],
[email protected]54184ce72012-10-18 07:11:261114 ['OS=="win"', {
1115 'windows_driver_kit_path%': '$(WDK_DIR)',
[email protected]b81164812013-02-22 21:02:071116 # Set the python arch to prevent conflicts with pyauto on Win64 build.
1117 # TODO(jschuh): crbug.com/177664 Investigate Win64 pyauto build.
1118 'python_arch%': 'ia32',
[email protected]54184ce72012-10-18 07:11:261119 }],
[email protected]1e013672012-06-29 22:12:201120 ['os_posix==1 and OS!="mac" and OS!="ios"', {
[email protected]4d83eb72010-03-04 16:42:231121 # Figure out the python architecture to decide if we build pyauto.
[email protected]945361a2011-09-30 04:38:431122 '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:271123 'conditions': [
[email protected]eb5f1672013-01-31 07:56:461124 ['target_arch=="mipsel"', {
1125 'werror%': '',
1126 'disable_nacl%': 1,
[email protected]eb5f1672013-01-31 07:56:461127 'nacl_untrusted_build%': 0,
1128 'linux_use_tcmalloc%': 0,
1129 'linux_breakpad%': 0,
1130 'sysroot%': '<(sysroot)',
[email protected]801978d32013-03-09 02:51:281131 'CXX%': '<(CXX)',
[email protected]eb5f1672013-01-31 07:56:461132 }],
[email protected]4c9cc6c2009-10-01 18:54:571133 # All Chrome builds have breakpad symbols, but only process the
1134 # symbols from official builds.
[email protected]c913cb82010-08-31 19:44:081135 ['(branding=="Chrome" and buildtype=="Official")', {
[email protected]4c9cc6c2009-10-01 18:54:571136 'linux_dump_symbols%': 1,
[email protected]4c9cc6c2009-10-01 18:54:571137 }],
[email protected]cbd5fd52009-08-26 00:14:271138 ],
[email protected]1e013672012-06-29 22:12:201139 }], # os_posix==1 and OS!="mac" and OS!="ios"
[email protected]0d16f292012-07-02 22:10:481140 ['OS=="ios"', {
1141 'disable_nacl%': 1,
[email protected]a95d5302012-11-03 00:02:191142 'enable_background%': 0,
[email protected]aeaaaf02012-09-10 17:46:151143 'enable_gpu%': 0,
[email protected]a35aa362012-10-30 13:55:071144 'enable_task_manager%': 0,
[email protected]abde6732012-08-16 16:10:351145 'icu_use_data_file_flag%': 1,
[email protected]4e3996f92012-07-17 10:41:131146 'use_system_libxml%': 1,
[email protected]073bef82012-07-24 18:03:471147 'use_system_sqlite%': 1,
[email protected]b6fbd6742013-03-15 11:15:411148 'locales==': [
1149 'ar', 'ca', 'cs', 'da', 'de', 'el', 'en-GB', 'en-US', 'es', 'fi',
[email protected]6e9c15f2013-06-13 16:03:441150 'fr', 'he', 'hr', 'hu', 'id', 'it', 'ja', 'ko', 'ms', 'nb', 'nl',
1151 'pl', 'pt', 'pt-PT', 'ro', 'ru', 'sk', 'sv', 'th', 'tr', 'uk', 'vi',
[email protected]b6fbd6742013-03-15 11:15:411152 'zh-CN', 'zh-TW',
1153 ],
[email protected]57871bc2012-08-20 16:28:121154
1155 # The Mac SDK is set for iOS builds and passed through to Mac
1156 # sub-builds. This allows the Mac sub-build SDK in an iOS build to be
1157 # overridden from the command line the same way it is for a Mac build.
1158 'mac_sdk%': '<!(python <(DEPTH)/build/mac/find_sdk.py 10.6)',
[email protected]2c261532012-10-06 00:46:291159
1160 # iOS SDK and deployment target support. The iOS 5.0 SDK is actually
1161 # what is required, but the value is left blank so when it is set in
1162 # the project files it will be the "current" iOS SDK. Forcing 5.0
1163 # even though it is "current" causes Xcode to spit out a warning for
1164 # every single project file for not using the "current" SDK.
1165 'ios_sdk%': '',
1166 'ios_sdk_path%': '',
[email protected]4e4a42652012-12-20 16:56:181167 'ios_deployment_target%': '5.0',
[email protected]fcd634182012-10-09 10:50:321168
1169 'conditions': [
1170 # ios_product_name is set to the name of the .app bundle as it should
1171 # appear on disk.
1172 ['branding=="Chrome"', {
1173 'ios_product_name%': 'Chrome',
1174 }, { # else: branding!="Chrome"
1175 'ios_product_name%': 'Chromium',
1176 }],
1177 ['branding=="Chrome" and buildtype=="Official"', {
1178 'ios_breakpad%': 1,
1179 }, { # else: branding!="Chrome" or buildtype!="Official"
1180 'ios_breakpad%': 0,
1181 }],
1182 ],
1183 }], # OS=="ios"
[email protected]da1c8d692011-09-20 20:35:011184 ['OS=="android"', {
1185 # Location of Android NDK.
1186 'variables': {
1187 'variables': {
[email protected]5061d152013-01-16 17:45:571188 # Unfortuantely we have to use absolute paths to the SDK/NDK beause
1189 # they're passed to ant which uses a different relative path from
1190 # gyp.
1191 'android_ndk_root%': '<!(cd <(DEPTH) && pwd -P)/third_party/android_tools/ndk/',
1192 'android_sdk_root%': '<!(cd <(DEPTH) && pwd -P)/third_party/android_tools/sdk/',
1193 'android_host_arch%': '<!(uname -m)',
[email protected]e20a8ad2013-03-18 15:05:041194 # Android API-level of the SDK used for compilation.
1195 'android_sdk_version%': '17',
[email protected]da1c8d692011-09-20 20:35:011196 },
[email protected]5061d152013-01-16 17:45:571197 # Copy conditionally-set variables out one scope.
[email protected]da1c8d692011-09-20 20:35:011198 'android_ndk_root%': '<(android_ndk_root)',
[email protected]5061d152013-01-16 17:45:571199 'android_sdk_root%': '<(android_sdk_root)',
[email protected]e20a8ad2013-03-18 15:05:041200 'android_sdk_version%': '<(android_sdk_version)',
[email protected]225ec632013-04-03 18:20:221201 'android_stlport_root': '<(android_ndk_root)/sources/cxx-stl/stlport',
[email protected]5061d152013-01-16 17:45:571202
[email protected]e20a8ad2013-03-18 15:05:041203 'android_sdk%': '<(android_sdk_root)/platforms/android-<(android_sdk_version)',
[email protected]5061d152013-01-16 17:45:571204
[email protected]5cfec2b2013-03-05 20:54:331205 # Android API level 14 is ICS (Android 4.0) which is the minimum
1206 # platform requirement for Chrome on Android, we use it for native
1207 # code compilation.
[email protected]5061d152013-01-16 17:45:571208 'conditions': [
1209 ['target_arch == "ia32"', {
1210 'android_app_abi%': 'x86',
1211 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-x86/gdbserver/gdbserver',
[email protected]5cfec2b2013-03-05 20:54:331212 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-14/arch-x86',
[email protected]5061d152013-01-16 17:45:571213 'android_toolchain%': '<(android_ndk_root)/toolchains/x86-4.6/prebuilt/<(host_os)-<(android_host_arch)/bin',
1214 }],
1215 ['target_arch=="arm"', {
1216 'conditions': [
[email protected]7d6763422013-04-26 12:06:541217 ['arm_version<7', {
[email protected]5061d152013-01-16 17:45:571218 'android_app_abi%': 'armeabi',
1219 }, {
1220 'android_app_abi%': 'armeabi-v7a',
1221 }],
1222 ],
1223 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-arm/gdbserver/gdbserver',
[email protected]5cfec2b2013-03-05 20:54:331224 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-14/arch-arm',
[email protected]5061d152013-01-16 17:45:571225 'android_toolchain%': '<(android_ndk_root)/toolchains/arm-linux-androideabi-4.6/prebuilt/<(host_os)-<(android_host_arch)/bin',
1226 }],
[email protected]23eea4a42013-04-27 04:10:261227 ['target_arch == "mipsel"', {
1228 'android_app_abi%': 'mips',
1229 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-mips/gdbserver/gdbserver',
1230 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-14/arch-mips',
[email protected]7a956a62013-05-10 16:40:471231 '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:261232 }],
[email protected]5061d152013-01-16 17:45:571233 ],
[email protected]da1c8d692011-09-20 20:35:011234 },
[email protected]5061d152013-01-16 17:45:571235 # Copy conditionally-set variables out one scope.
1236 'android_app_abi%': '<(android_app_abi)',
1237 'android_gdbserver%': '<(android_gdbserver)',
[email protected]da1c8d692011-09-20 20:35:011238 'android_ndk_root%': '<(android_ndk_root)',
1239 'android_ndk_sysroot': '<(android_ndk_sysroot)',
[email protected]5061d152013-01-16 17:45:571240 'android_sdk_root%': '<(android_sdk_root)',
1241 'android_sdk_version%': '<(android_sdk_version)',
1242 'android_toolchain%': '<(android_toolchain)',
1243
[email protected]da1c8d692011-09-20 20:35:011244 'android_ndk_include': '<(android_ndk_sysroot)/usr/include',
1245 'android_ndk_lib': '<(android_ndk_sysroot)/usr/lib',
[email protected]5061d152013-01-16 17:45:571246 'android_sdk_tools%': '<(android_sdk_root)/platform-tools',
[email protected]e20a8ad2013-03-18 15:05:041247 'android_sdk%': '<(android_sdk)',
1248 'android_sdk_jar%': '<(android_sdk)/android.jar',
[email protected]da1c8d692011-09-20 20:35:011249
[email protected]225ec632013-04-03 18:20:221250 'android_stlport_root': '<(android_stlport_root)',
[email protected]225ec632013-04-03 18:20:221251 'android_stlport_include': '<(android_stlport_root)/stlport',
[email protected]225ec632013-04-03 18:20:221252 'android_stlport_libs_dir': '<(android_stlport_root)/libs/<(android_app_abi)',
[email protected]225ec632013-04-03 18:20:221253
[email protected]c0f76312012-08-16 13:52:041254 # Location of the "strip" binary, used by both gyp and scripts.
1255 'android_strip%' : '<!(/bin/echo -n <(android_toolchain)/*-strip)',
1256
[email protected]225ec632013-04-03 18:20:221257 # Location of the "readelf" binary.
1258 'android_readelf%' : '<!(/bin/echo -n <(android_toolchain)/*-readelf)',
1259
[email protected]ef7ed7a2012-05-29 23:19:131260 # Provides an absolute path to PRODUCT_DIR (e.g. out/Release). Used
1261 # to specify the output directory for Ant in the Android build.
1262 'ant_build_out': '`cd <(PRODUCT_DIR) && pwd -P`',
1263
[email protected]d8621ce2013-02-22 00:37:331264 # Determines whether we should optimize JNI generation at the cost of
1265 # breaking assumptions in the build system that when inputs have changed
1266 # the outputs should always change as well. This is meant purely for
1267 # developer builds, to avoid spurious re-linking of native files.
1268 'optimize_jni_generation%': 0,
1269
[email protected]da1c8d692011-09-20 20:35:011270 # Always uses openssl.
1271 'use_openssl%': 1,
1272
1273 'proprietary_codecs%': '<(proprietary_codecs)',
[email protected]44879ed2012-04-06 01:11:021274 'enable_task_manager%': 0,
[email protected]23a30e62012-12-01 03:39:071275 'safe_browsing%': 2,
[email protected]da1c8d692011-09-20 20:35:011276 'configuration_policy%': 0,
[email protected]9eb100e2011-10-14 05:08:221277 'input_speech%': 0,
[email protected]658677f2012-06-09 06:04:021278 'enable_automation%': 0,
[email protected]464750f2011-10-24 23:16:181279 'java_bridge%': 1,
[email protected]48de0fc2012-08-02 11:03:581280 'build_ffmpegsumo%': 0,
1281 'linux_use_tcmalloc%': 0,
[email protected]658677f2012-06-09 06:04:021282
[email protected]ad17e342012-07-17 20:45:481283 # Disable Native Client.
1284 'disable_nacl%': 1,
1285
[email protected]58242012012-04-12 16:14:311286 # Android does not support background apps.
[email protected]0acdd772012-04-05 22:53:001287 'enable_background%': 0,
[email protected]5fd2e842012-03-01 00:29:111288
[email protected]cdb756ef2012-04-05 18:34:531289 # Sessions are store separately in the Java side.
1290 'enable_session_service%': 0,
1291
[email protected]5fd2e842012-03-01 00:29:111292 # Set to 1 once we have a notification system for Android.
1293 # http://crbug.com/115320
[email protected]7cce3232011-10-28 10:41:571294 'notifications%': 0,
[email protected]da1c8d692011-09-20 20:35:011295
[email protected]ad17e342012-07-17 20:45:481296 'p2p_apis%' : 0,
1297
[email protected]48de0fc2012-08-02 11:03:581298 'gtest_target_type%': 'shared_library',
[email protected]da1c8d692011-09-20 20:35:011299
1300 # Uses system APIs for decoding audio and video.
1301 'use_libffmpeg%': '0',
1302
[email protected]f1dc1e52012-12-12 21:39:001303 # Always use the chromium skia.
[email protected]da1c8d692011-09-20 20:35:011304 'use_system_skia%': '0',
[email protected]da1c8d692011-09-20 20:35:011305
[email protected]adb44342012-07-23 13:36:121306 # When building as part of the Android system, use system libraries
1307 # where possible to reduce ROM size.
1308 # TODO(steveblock): Investigate using the system version of sqlite.
[email protected]d999c3cb2013-03-12 10:22:361309 'use_system_sqlite%': 0, # '<(android_webview_build)',
1310 'use_system_expat%': '<(android_webview_build)',
1311 'use_system_icu%': '<(android_webview_build)',
1312 'use_system_stlport%': '<(android_webview_build)',
[email protected]adb44342012-07-23 13:36:121313
[email protected]0850e842013-01-19 03:44:311314 'enable_managed_users%': 0,
1315
[email protected]da1c8d692011-09-20 20:35:011316 # Copy it out one scope.
[email protected]d999c3cb2013-03-12 10:22:361317 'android_webview_build%': '<(android_webview_build)',
[email protected]da1c8d692011-09-20 20:35:011318 }], # OS=="android"
[email protected]b3139552013-05-30 14:16:121319 ['android_webview_build==1', {
1320 # When building the WebView in the Android tree, jarjar will remap all
1321 # the class names, so the JNI generator needs to know this.
1322 'jni_generator_jarjar_file': '../android_webview/build/jarjar-rules.txt',
1323 }],
[email protected]e14a9f92009-08-05 19:26:071324 ['OS=="mac"', {
[email protected]296bc452013-05-13 21:29:471325 # Enable clang on mac by default!
1326 'clang%': 1,
1327 }], # OS=="mac"
1328 ['OS=="mac" or OS=="ios"', {
[email protected]2c261532012-10-06 00:46:291329 'variables': {
1330 # Mac OS X SDK and deployment target support. The SDK identifies
1331 # the version of the system headers that will be used, and
1332 # corresponds to the MAC_OS_X_VERSION_MAX_ALLOWED compile-time
1333 # macro. "Maximum allowed" refers to the operating system version
1334 # whose APIs are available in the headers. The deployment target
1335 # identifies the minimum system version that the built products are
1336 # expected to function on. It corresponds to the
1337 # MAC_OS_X_VERSION_MIN_REQUIRED compile-time macro. To ensure these
1338 # macros are available, #include <AvailabilityMacros.h>. Additional
1339 # documentation on these macros is available at
1340 # http://developer.apple.com/mac/library/technotes/tn2002/tn2064.html#SECTION3
1341 # Chrome normally builds with the Mac OS X 10.6 SDK and sets the
1342 # deployment target to 10.6. Other projects, such as O3D, may
1343 # override these defaults.
1344
1345 # Normally, mac_sdk_min is used to find an SDK that Xcode knows
1346 # about that is at least the specified version. In official builds,
1347 # the SDK must match mac_sdk_min exactly. If the SDK is installed
1348 # someplace that Xcode doesn't know about, set mac_sdk_path to the
1349 # path to the SDK; when set to a non-empty string, SDK detection
1350 # based on mac_sdk_min will be bypassed entirely.
1351 'mac_sdk_min%': '10.6',
1352 'mac_sdk_path%': '',
1353
1354 'mac_deployment_target%': '10.6',
1355 },
1356
1357 'mac_sdk_min': '<(mac_sdk_min)',
1358 'mac_sdk_path': '<(mac_sdk_path)',
1359 'mac_deployment_target': '<(mac_deployment_target)',
1360
[email protected]794fb4782011-12-14 19:10:561361 # Compile in Breakpad support by default so that it can be
1362 # tested, even if it is not enabled by default at runtime.
1363 'mac_breakpad_compiled_in%': 1,
[email protected]e14a9f92009-08-05 19:26:071364 'conditions': [
1365 # mac_product_name is set to the name of the .app bundle as it should
1366 # appear on disk. This duplicates data from
1367 # chrome/app/theme/chromium/BRANDING and
1368 # chrome/app/theme/google_chrome/BRANDING, but is necessary to get
1369 # these names into the build system.
1370 ['branding=="Chrome"', {
1371 'mac_product_name%': 'Google Chrome',
1372 }, { # else: branding!="Chrome"
1373 'mac_product_name%': 'Chromium',
1374 }],
1375
[email protected]e14a9f92009-08-05 19:26:071376 ['branding=="Chrome" and buildtype=="Official"', {
[email protected]2c261532012-10-06 00:46:291377 '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:561378 # Enable uploading crash dumps.
1379 'mac_breakpad_uploads%': 1,
1380 # Enable dumping symbols at build time for use by Mac Breakpad.
[email protected]e14a9f92009-08-05 19:26:071381 'mac_breakpad%': 1,
[email protected]794fb4782011-12-14 19:10:561382 # Enable Keystone auto-update support.
[email protected]e14a9f92009-08-05 19:26:071383 'mac_keystone%': 1,
1384 }, { # else: branding!="Chrome" or buildtype!="Official"
[email protected]2c261532012-10-06 00:46:291385 'mac_sdk%': '<!(python <(DEPTH)/build/mac/find_sdk.py <(mac_sdk_min))',
[email protected]794fb4782011-12-14 19:10:561386 'mac_breakpad_uploads%': 0,
[email protected]e14a9f92009-08-05 19:26:071387 'mac_breakpad%': 0,
1388 'mac_keystone%': 0,
1389 }],
1390 ],
[email protected]296bc452013-05-13 21:29:471391 }], # OS=="mac" or OS=="ios"
[email protected]912c55c2009-07-31 23:33:551392 ['OS=="win"', {
1393 'conditions': [
[email protected]8974e042010-06-21 18:06:521394 ['component=="shared_library"', {
1395 'win_use_allocator_shim%': 0,
1396 }],
[email protected]fa0f16e2012-08-20 22:30:041397 ['component=="shared_library" and "<(GENERATOR)"=="ninja"', {
[email protected]6f390be2012-08-16 18:57:101398 # Only enabled by default for ninja because it's buggy in VS.
[email protected]fa0f16e2012-08-20 22:30:041399 # Not enabled for component=static_library because some targets
1400 # are too large and the toolchain fails due to the size of the
1401 # .obj files.
[email protected]6f390be2012-08-16 18:57:101402 'incremental_chrome_dll%': 1,
1403 }],
[email protected]10bb8c92009-08-07 21:16:031404 # Don't do incremental linking for large modules on 32-bit.
1405 ['MSVS_OS_BITS==32', {
1406 'msvs_large_module_debug_link_mode%': '1', # No
1407 },{
1408 'msvs_large_module_debug_link_mode%': '2', # Yes
1409 }],
[email protected]78764182013-01-23 20:32:511410 ['MSVS_VERSION=="2012e" or MSVS_VERSION=="2010e"', {
[email protected]3e2648a2011-03-21 20:58:501411 'msvs_express%': 1,
1412 'secure_atl%': 0,
1413 },{
1414 'msvs_express%': 0,
1415 'secure_atl%': 1,
1416 }],
[email protected]912c55c2009-07-31 23:33:551417 ],
[email protected]ef4fa4072009-12-04 22:46:501418 'nacl_win64_defines': [
1419 # This flag is used to minimize dependencies when building
1420 # Native Client loader for 64-bit Windows.
1421 'NACL_WIN64',
1422 ],
[email protected]912c55c2009-07-31 23:33:551423 }],
[email protected]bb6aba32011-01-07 19:04:431424
[email protected]a35aa362012-10-30 13:55:071425 ['os_posix==1 and chromeos==0 and OS!="android" and OS!="ios"', {
[email protected]8e553f42010-10-25 20:05:441426 'use_cups%': 1,
1427 }, {
1428 'use_cups%': 0,
1429 }],
[email protected]bb6aba32011-01-07 19:04:431430
[email protected]280755c2013-05-23 10:44:351431 ['enable_plugins==1 and (OS=="linux" or OS=="mac" or OS=="win" or google_tv==1)', {
1432 'enable_pepper_cdms%': 1,
1433 }, {
1434 'enable_pepper_cdms%': 0,
1435 }],
1436
[email protected]eb5f1672013-01-31 07:56:461437 # Native Client glibc toolchain is enabled
1438 # by default except on arm and mips.
1439 ['target_arch=="arm" or target_arch=="mipsel"', {
[email protected]2f7da672012-06-21 08:38:321440 'disable_glibc%': 1,
1441 }, {
1442 'disable_glibc%': 0,
1443 }],
1444
[email protected]712c3da2012-09-24 21:31:241445 # Disable SSE2 when building for ARM or MIPS.
1446 ['target_arch=="arm" or target_arch=="mipsel"', {
1447 'disable_sse2%': 1,
1448 }, {
1449 'disable_sse2%': '<(disable_sse2)',
1450 }],
1451
[email protected]19fe8f0b2010-12-07 07:27:271452 # Set the relative path from this file to the GYP file of the JPEG
1453 # library used by Chromium.
[email protected]d9113542012-07-18 17:11:281454 ['use_system_libjpeg==1 or use_libjpeg_turbo==0', {
1455 # Configuration for using the system libjeg is here.
[email protected]19fe8f0b2010-12-07 07:27:271456 'libjpeg_gyp_path': '../third_party/libjpeg/libjpeg.gyp',
[email protected]d9113542012-07-18 17:11:281457 }, {
1458 'libjpeg_gyp_path': '../third_party/libjpeg_turbo/libjpeg.gyp',
1459 }],
[email protected]bb6aba32011-01-07 19:04:431460
[email protected]abcc9ac2011-05-16 20:04:351461 # Options controlling the use of GConf (the classic GNOME configuration
1462 # system) and GIO, which contains GSettings (the new GNOME config system).
[email protected]1c6fe29302011-01-20 22:14:311463 ['chromeos==1', {
1464 'use_gconf%': 0,
[email protected]abcc9ac2011-05-16 20:04:351465 'use_gio%': 0,
[email protected]1c6fe29302011-01-20 22:14:311466 }, {
1467 'use_gconf%': 1,
[email protected]abcc9ac2011-05-16 20:04:351468 'use_gio%': 1,
[email protected]1c6fe29302011-01-20 22:14:311469 }],
1470
[email protected]4de39f82011-03-28 12:01:291471 # Set up -D and -E flags passed into grit.
[email protected]1660bffd2011-03-23 16:24:291472 ['branding=="Chrome"', {
1473 # TODO(mmoss) The .grd files look for _google_chrome, but for
1474 # consistency they should look for google_chrome_build like C++.
[email protected]4de39f82011-03-28 12:01:291475 'grit_defines': ['-D', '_google_chrome',
1476 '-E', 'CHROMIUM_BUILD=google_chrome'],
[email protected]1660bffd2011-03-23 16:24:291477 }, {
[email protected]4de39f82011-03-28 12:01:291478 'grit_defines': ['-D', '_chromium',
1479 '-E', 'CHROMIUM_BUILD=chromium'],
[email protected]1660bffd2011-03-23 16:24:291480 }],
[email protected]bb6aba32011-01-07 19:04:431481 ['chromeos==1', {
[email protected]d4d81e92012-06-04 20:10:131482 'grit_defines': ['-D', 'chromeos', '-D', 'scale_factors=2x'],
[email protected]bb6aba32011-01-07 19:04:431483 }],
1484 ['toolkit_views==1', {
1485 'grit_defines': ['-D', 'toolkit_views'],
1486 }],
[email protected]8dd791d2011-09-16 16:37:301487 ['use_aura==1', {
1488 'grit_defines': ['-D', 'use_aura'],
1489 }],
[email protected]ed329be2012-01-03 22:02:161490 ['use_ash==1', {
1491 'grit_defines': ['-D', 'use_ash'],
1492 }],
[email protected]c329adf82011-10-05 14:34:571493 ['use_nss==1', {
1494 'grit_defines': ['-D', 'use_nss'],
1495 }],
[email protected]ff78e4e2013-05-03 19:19:151496 ['use_ozone==1', {
1497 'grit_defines': ['-D', 'use_ozone'],
1498 }],
[email protected]e47c32032011-03-01 19:26:201499 ['file_manager_extension==1', {
1500 'grit_defines': ['-D', 'file_manager_extension'],
1501 }],
[email protected]77a848262013-02-22 11:17:251502 ['image_loader_extension==1', {
1503 'grit_defines': ['-D', 'image_loader_extension'],
1504 }],
[email protected]9a425422011-01-11 00:53:181505 ['remoting==1', {
1506 'grit_defines': ['-D', 'remoting'],
1507 }],
[email protected]bb6aba32011-01-07 19:04:431508 ['use_titlecase_in_grd_files==1', {
1509 'grit_defines': ['-D', 'use_titlecase'],
1510 }],
[email protected]00dc155832011-02-01 18:51:191511 ['use_third_party_translations==1', {
1512 'grit_defines': ['-D', 'use_third_party_translations'],
[email protected]fb6c1022011-06-27 21:58:121513 'locales': [
[email protected]8581e1ba2011-08-22 23:27:161514 'ast', 'bs', 'ca@valencia', 'en-AU', 'eo', 'eu', 'gl', 'hy', 'ia',
1515 'ka', 'ku', 'kw', 'ms', 'ug'
[email protected]fb6c1022011-06-27 21:58:121516 ],
[email protected]00dc155832011-02-01 18:51:191517 }],
[email protected]da1c8d692011-09-20 20:35:011518 ['OS=="android"', {
[email protected]77e59c52013-05-21 15:29:171519 'grit_defines': ['-t', 'android',
[email protected]7dc76812013-03-26 07:31:571520 '-E', 'ANDROID_JAVA_TAGGED_ONLY=true'],
[email protected]7a2ce042013-05-28 03:20:351521 'conditions': [
1522 ['google_tv==1', {
1523 'grit_defines': ['-D', 'google_tv'],
1524 }],
1525 ],
[email protected]da1c8d692011-09-20 20:35:011526 }],
[email protected]d39e3862012-06-26 22:38:231527 ['OS=="mac"', {
1528 'grit_defines': ['-D', 'scale_factors=2x'],
1529 }],
[email protected]ad563d02012-10-03 10:37:031530 ['OS == "ios"', {
1531 'grit_defines': [
1532 # define for iOS specific resources.
1533 '-D', 'ios',
1534 # iOS uses a whitelist to filter resources.
1535 '-w', '<(DEPTH)/build/ios/grit_whitelist.txt'
1536 ],
[email protected]b4530c82013-05-09 09:20:011537
1538 # Enable clang and host builds when generating with ninja-ios.
1539 'conditions': [
1540 ['"<(GENERATOR)"=="ninja"', {
1541 'clang%': 1,
1542 'host_os%': "mac",
1543 }]
1544 ],
[email protected]ad563d02012-10-03 10:37:031545 }],
[email protected]6a3cd37e2012-04-17 17:13:341546 ['enable_extensions==1', {
1547 'grit_defines': ['-D', 'enable_extensions'],
1548 }],
[email protected]658677f2012-06-09 06:04:021549 ['enable_printing==1', {
1550 'grit_defines': ['-D', 'enable_printing'],
1551 }],
[email protected]c2aad542012-07-31 20:40:331552 ['enable_themes==1', {
1553 'grit_defines': ['-D', 'enable_themes'],
1554 }],
[email protected]066ab9882013-06-07 00:55:201555 ['use_spring_wallpaper==1', {
1556 'grit_defines': ['-D', 'use_spring_wallpaper'],
1557 }],
[email protected]4ffe78a2012-10-04 20:55:151558 ['use_oem_wallpaper==1', {
1559 'grit_defines': ['-D', 'use_oem_wallpaper'],
1560 }],
[email protected]ef1dd5062012-12-17 06:41:331561 ['enable_app_list==1', {
1562 'grit_defines': ['-D', 'enable_app_list'],
1563 }],
[email protected]dc4e8b82012-11-15 03:58:161564 ['enable_settings_app==1', {
1565 'grit_defines': ['-D', 'enable_settings_app'],
1566 }],
[email protected]5411d8202013-01-30 01:32:151567 ['enable_google_now==1', {
1568 'grit_defines': ['-D', 'enable_google_now'],
1569 }],
[email protected]a3a720f2013-04-25 19:35:421570 ['use_concatenated_impulse_responses==1', {
1571 'grit_defines': ['-D', 'use_concatenated_impulse_responses'],
1572 }],
[email protected]3bb37e62012-04-19 03:40:081573 ['clang_use_chrome_plugins==1 and OS!="win"', {
[email protected]7d389e22013-05-15 00:45:071574 'clang_chrome_plugins_flags': [
1575 '<!@(<(DEPTH)/tools/clang/scripts/plugin_flags.sh)'
[email protected]c872dc52012-05-19 06:36:311576 ],
[email protected]5d451ad2011-02-11 16:43:461577 }],
[email protected]cfa2e1102011-04-27 22:30:231578
[email protected]696de4e62012-11-21 21:18:541579 ['asan==1 and OS!="win"', {
[email protected]92799b632011-08-15 14:33:061580 'clang%': 1,
1581 }],
[email protected]f5d8c222012-08-29 17:47:021582 ['asan==1 and OS=="mac"', {
[email protected]93064ee2013-02-11 19:25:091583 # TODO(glider): we do not strip ASan binaries until the dynamic ASan
[email protected]2fccd422013-05-21 21:27:571584 # runtime is fully adopted. See http://crbug.com/242503.
[email protected]93064ee2013-02-11 19:25:091585 'mac_strip_release': 0,
[email protected]f5d8c222012-08-29 17:47:021586 }],
[email protected]062522a2013-06-13 15:49:551587 ['lsan==1', {
1588 'clang%': 1,
1589 }],
[email protected]c9a829272012-07-04 07:51:121590 ['tsan==1', {
1591 'clang%': 1,
1592 }],
[email protected]a10ddd2d2013-02-26 20:06:591593 ['msan==1', {
1594 'clang%': 1,
1595 }],
[email protected]c9a829272012-07-04 07:51:121596
[email protected]7ce58b22012-09-26 05:17:251597 ['OS=="linux" and clang_type_profiler==1', {
1598 'clang%': 1,
1599 'clang_use_chrome_plugins%': 0,
[email protected]b0c45722013-01-23 04:47:321600 'conditions': [
1601 ['host_arch=="x64"', {
1602 'make_clang_dir%': 'third_party/llvm-allocated-type/Linux_x64',
1603 }],
1604 ['host_arch=="ia32"', {
1605 # 32-bit Clang is unsupported. It may not build. Put your 32-bit
1606 # Clang in this directory at your own risk if needed for some
1607 # purpose (e.g. to compare 32-bit and 64-bit behavior like memory
1608 # usage). Any failure by this compiler should not close the tree.
1609 'make_clang_dir%': 'third_party/llvm-allocated-type/Linux_ia32',
1610 }],
1611 ],
[email protected]7ce58b22012-09-26 05:17:251612 }],
1613
[email protected]a9318c72012-03-01 01:29:471614 # On valgrind bots, override the optimizer settings so we don't inline too
1615 # much and make the stacks harder to figure out.
1616 #
1617 # TODO(rnk): Kill off variables that no one else uses and just implement
1618 # them under a build_for_tool== condition.
1619 ['build_for_tool=="memcheck" or build_for_tool=="tsan"', {
1620 # gcc flags
1621 'mac_debug_optimization': '1',
1622 'mac_release_optimization': '1',
1623 'release_optimize': '1',
1624 'no_gc_sections': 1,
1625 'debug_extra_cflags': '-g -fno-inline -fno-omit-frame-pointer '
1626 '-fno-builtin -fno-optimize-sibling-calls',
1627 'release_extra_cflags': '-g -fno-inline -fno-omit-frame-pointer '
1628 '-fno-builtin -fno-optimize-sibling-calls',
1629
1630 # MSVS flags for TSan on Pin and Windows.
1631 'win_debug_RuntimeChecks': '0',
1632 'win_debug_disable_iterator_debugging': '1',
1633 'win_debug_Optimization': '1',
1634 'win_debug_InlineFunctionExpansion': '0',
1635 'win_release_InlineFunctionExpansion': '0',
1636 'win_release_OmitFramePointers': '0',
1637
1638 'linux_use_tcmalloc': 1,
1639 'release_valgrind_build': 1,
1640 'werror': '',
1641 'component': 'static_library',
1642 'use_system_zlib': 0,
1643 }],
1644
1645 # Build tweaks for DrMemory.
1646 # TODO(rnk): Combine with tsan config to share the builder.
1647 # http://crbug.com/108155
1648 ['build_for_tool=="drmemory"', {
[email protected]a9318c72012-03-01 01:29:471649 # These runtime checks force initialization of stack vars which blocks
1650 # DrMemory's uninit detection.
1651 'win_debug_RuntimeChecks': '0',
1652 # Iterator debugging is slow.
1653 'win_debug_disable_iterator_debugging': '1',
1654 # Try to disable optimizations that mess up stacks in a release build.
[email protected]c13d00302012-10-18 15:45:161655 # DrM-i#1054 (http://code.google.com/p/drmemory/issues/detail?id=1054)
1656 # /O2 and /Ob0 (disable inline) cannot be used together because of a
1657 # compiler bug, so we use /Ob1 instead.
1658 'win_release_InlineFunctionExpansion': '1',
[email protected]a9318c72012-03-01 01:29:471659 'win_release_OmitFramePointers': '0',
[email protected]6bf3373d2012-08-15 22:27:501660 # Ditto for debug, to support bumping win_debug_Optimization.
1661 'win_debug_InlineFunctionExpansion': 0,
1662 'win_debug_OmitFramePointers': 0,
[email protected]a9318c72012-03-01 01:29:471663 # Keep the code under #ifndef NVALGRIND.
1664 'release_valgrind_build': 1,
1665 }],
[email protected]b6a5ac92012-10-29 18:17:221666
[email protected]f40a6912012-12-10 21:52:411667 # Enable RLZ on Win, Mac and ChromeOS.
1668 ['branding=="Chrome" and (OS=="win" or OS=="mac" or chromeos==1)', {
[email protected]b6a5ac92012-10-29 18:17:221669 'enable_rlz%': 1,
1670 }],
[email protected]7d6763422013-04-26 12:06:541671
1672 # Set default compiler flags depending on ARM version.
1673 ['arm_version==5 and android_webview_build==0', {
1674 # Flags suitable for Android emulator
1675 'arm_arch%': 'armv5te',
1676 'arm_tune%': 'xscale',
1677 'arm_fpu%': '',
1678 'arm_float_abi%': 'soft',
1679 'arm_thumb%': 0,
1680 }],
1681 ['arm_version==6 and android_webview_build==0', {
1682 'arm_arch%': 'armv6',
1683 'arm_tune%': '',
1684 'arm_fpu%': '',
1685 'arm_float_abi%': 'soft',
1686 'arm_thumb%': 0,
1687 }],
1688 ['arm_version==7 and android_webview_build==0', {
1689 'arm_arch%': 'armv7-a',
1690 'arm_tune%': 'cortex-a8',
1691 'conditions': [
1692 ['arm_neon==1', {
1693 'arm_fpu%': 'neon',
1694 }, {
1695 'arm_fpu%': 'vfpv3-d16',
1696 }],
1697 ],
1698 'arm_float_abi%': 'softfp',
1699 'arm_thumb%': 1,
1700 }],
1701
1702 ['android_webview_build==1', {
1703 # The WebView build gets its cpu-specific flags from the Android build system.
1704 'arm_arch%': '',
1705 'arm_tune%': '',
1706 'arm_fpu%': '',
1707 'arm_float_abi%': '',
1708 'arm_thumb%': 0,
1709 }],
[email protected]912c55c2009-07-31 23:33:551710 ],
[email protected]a9318c72012-03-01 01:29:471711
[email protected]c91dc722013-06-12 22:53:011712
1713 # The path to the ANGLE library. TODO(apatrick): This is to help
1714 # transition to a new version of ANGLE at a new location. After the
1715 # transition is complete, this can be removed.
1716 'angle_path': '<(DEPTH)/third_party/angle',
1717
[email protected]35958422011-09-28 02:03:591718 # List of default apps to install in new profiles. The first list contains
1719 # the source files as found in svn. The second list, used only for linux,
[email protected]20cc0bb72011-10-26 00:57:061720 # contains the destination location for each of the files. When a crx
1721 # is added or removed from the list, the chrome/browser/resources/
1722 # default_apps/external_extensions.json file must also be updated.
[email protected]35958422011-09-28 02:03:591723 'default_apps_list': [
1724 'browser/resources/default_apps/external_extensions.json',
1725 'browser/resources/default_apps/gmail.crx',
[email protected]20cc0bb72011-10-26 00:57:061726 'browser/resources/default_apps/search.crx',
[email protected]35958422011-09-28 02:03:591727 'browser/resources/default_apps/youtube.crx',
[email protected]c3875e22012-09-06 01:07:001728 'browser/resources/default_apps/drive.crx',
[email protected]40b38c932012-09-27 20:42:231729 'browser/resources/default_apps/docs.crx',
[email protected]35958422011-09-28 02:03:591730 ],
1731 'default_apps_list_linux_dest': [
1732 '<(PRODUCT_DIR)/default_apps/external_extensions.json',
1733 '<(PRODUCT_DIR)/default_apps/gmail.crx',
[email protected]20cc0bb72011-10-26 00:57:061734 '<(PRODUCT_DIR)/default_apps/search.crx',
[email protected]35958422011-09-28 02:03:591735 '<(PRODUCT_DIR)/default_apps/youtube.crx',
[email protected]c3875e22012-09-06 01:07:001736 '<(PRODUCT_DIR)/default_apps/drive.crx',
[email protected]40b38c932012-09-27 20:42:231737 '<(PRODUCT_DIR)/default_apps/docs.crx',
[email protected]35958422011-09-28 02:03:591738 ],
[email protected]2f80c312009-02-25 21:26:551739 },
1740 'target_defaults': {
[email protected]1c966092009-08-20 21:19:261741 'variables': {
[email protected]a6e22132010-02-10 20:43:181742 # The condition that operates on chromium_code is in a target_conditions
1743 # section, and will not have access to the default fallback value of
1744 # chromium_code at the top of this file, or to the chromium_code
1745 # variable placed at the root variables scope of .gyp files, because
1746 # those variables are not set at target scope. As a workaround,
1747 # if chromium_code is not set at target scope, define it in target scope
1748 # to contain whatever value it has during early variable expansion.
1749 # That's enough to make it available during target conditional
1750 # processing.
1751 'chromium_code%': '<(chromium_code)',
1752
[email protected]7e0d664a2009-12-03 21:07:471753 # See http://msdn.microsoft.com/en-us/library/aa652360(VS.71).aspx
1754 'win_release_Optimization%': '2', # 2 = /Os
1755 'win_debug_Optimization%': '0', # 0 = /Od
[email protected]626d2d22011-10-11 15:47:331756
1757 # See http://msdn.microsoft.com/en-us/library/2kxx5t2c(v=vs.80).aspx
[email protected]ef5c5f1b2011-12-17 02:16:241758 # Tri-state: blank is default, 1 on, 0 off
[email protected]65d61e62012-06-01 21:52:111759 'win_release_OmitFramePointers%': '0',
[email protected]ef5c5f1b2011-12-17 02:16:241760 # Tri-state: blank is default, 1 on, 0 off
1761 'win_debug_OmitFramePointers%': '',
[email protected]626d2d22011-10-11 15:47:331762
[email protected]6b0507b2010-05-07 07:41:211763 # See http://msdn.microsoft.com/en-us/library/8wtf2dfz(VS.71).aspx
1764 'win_debug_RuntimeChecks%': '3', # 3 = all checks enabled, 0 = off
[email protected]626d2d22011-10-11 15:47:331765
[email protected]6b0507b2010-05-07 07:41:211766 # See http://msdn.microsoft.com/en-us/library/47238hez(VS.71).aspx
[email protected]2ae6e022010-05-07 13:19:151767 'win_debug_InlineFunctionExpansion%': '', # empty = default, 0 = off,
1768 'win_release_InlineFunctionExpansion%': '2', # 1 = only __inline, 2 = max
[email protected]626d2d22011-10-11 15:47:331769
[email protected]fac10d12010-11-08 16:00:311770 # VS inserts quite a lot of extra checks to algorithms like
1771 # std::partial_sort in Debug build which make them O(N^2)
1772 # instead of O(N*logN). This is particularly slow under memory
1773 # tools like ThreadSanitizer so we want it to be disablable.
1774 # See http://msdn.microsoft.com/en-us/library/aa985982(v=VS.80).aspx
1775 'win_debug_disable_iterator_debugging%': '0',
[email protected]7e0d664a2009-12-03 21:07:471776
[email protected]ffd984b12009-09-11 19:37:001777 'release_extra_cflags%': '',
1778 'debug_extra_cflags%': '',
[email protected]8d726a42012-02-09 03:49:001779
1780 'release_valgrind_build%': '<(release_valgrind_build)',
[email protected]8974e042010-06-21 18:06:521781
[email protected]ef5c5f1b2011-12-17 02:16:241782 # the non-qualified versions are widely assumed to be *nix-only
1783 'win_release_extra_cflags%': '',
1784 'win_debug_extra_cflags%': '',
1785
[email protected]b1eb341c2011-11-09 18:46:071786 # TODO(thakis): Make this a blacklist instead, http://crbug.com/101600
1787 'enable_wexit_time_destructors%': '<(enable_wexit_time_destructors)',
1788
[email protected]ef3326702011-10-06 18:06:441789 # Only used by Windows build for now. Can be used to build into a
1790 # differet output directory, e.g., a build_dir_prefix of VS2010_ would
1791 # output files in src/build/VS2010_{Debug,Release}.
1792 'build_dir_prefix%': '',
1793
[email protected]9ac2db692012-06-08 01:01:571794 # Targets are by default not nacl untrusted code.
1795 'nacl_untrusted_build%': 0,
1796
[email protected]9c55d9d2012-11-15 23:28:441797 'pnacl_compile_flags': [
1798 # pnacl uses the clang compiler so we need to supress all the
1799 # same warnings as we do for clang.
1800 # TODO(sbc): Remove these if/when they are removed from the clang
1801 # build.
1802 '-Wno-unused-function',
1803 '-Wno-char-subscripts',
1804 '-Wno-c++11-extensions',
1805 '-Wno-unnamed-type-template-args',
1806 ],
1807
[email protected]8974e042010-06-21 18:06:521808 'conditions': [
1809 ['OS=="win" and component=="shared_library"', {
1810 # See http://msdn.microsoft.com/en-us/library/aa652367.aspx
[email protected]49e8e022012-03-16 15:22:161811 'win_release_RuntimeLibrary%': '2', # 2 = /MD (nondebug DLL)
1812 'win_debug_RuntimeLibrary%': '3', # 3 = /MDd (debug DLL)
[email protected]8974e042010-06-21 18:06:521813 }, {
1814 # See http://msdn.microsoft.com/en-us/library/aa652367.aspx
1815 'win_release_RuntimeLibrary%': '0', # 0 = /MT (nondebug static)
1816 'win_debug_RuntimeLibrary%': '1', # 1 = /MTd (debug static)
1817 }],
[email protected]1e013672012-06-29 22:12:201818 ['OS=="ios"', {
1819 # See http://gcc.gnu.org/onlinedocs/gcc-4.4.2/gcc/Optimize-Options.html
1820 'mac_release_optimization%': 's', # Use -Os unless overridden
1821 'mac_debug_optimization%': '0', # Use -O0 unless overridden
1822 }, {
1823 # See http://gcc.gnu.org/onlinedocs/gcc-4.4.2/gcc/Optimize-Options.html
1824 'mac_release_optimization%': '3', # Use -O3 unless overridden
1825 'mac_debug_optimization%': '0', # Use -O0 unless overridden
1826 }],
[email protected]8974e042010-06-21 18:06:521827 ],
[email protected]1c966092009-08-20 21:19:261828 },
[email protected]c91dc722013-06-12 22:53:011829 'defines': [
1830 # Set this to use the new DX11 version of ANGLE.
1831 # TODO(apatrick): Remove this when the transition is complete.
1832 #'ANGLE_DX11',
1833 ],
[email protected]32aa8cc2009-03-04 21:36:391834 'conditions': [
[email protected]d808e212013-03-12 14:06:161835 ['(OS=="mac" or OS=="ios") and asan==1', {
[email protected]5ec8c962013-03-12 11:56:311836 'dependencies': [
1837 '<(DEPTH)/build/mac/asan.gyp:asan_dynamic_runtime',
1838 ],
1839 }],
[email protected]7ce58b22012-09-26 05:17:251840 ['OS=="linux" and linux_use_tcmalloc==1 and clang_type_profiler==1', {
1841 'cflags_cc!': ['-fno-rtti'],
1842 'cflags_cc+': [
1843 '-frtti',
1844 '-gline-tables-only',
1845 '-fintercept-allocation-functions',
1846 ],
1847 'defines': ['TYPE_PROFILING'],
1848 'dependencies': [
1849 '<(DEPTH)/base/allocator/allocator.gyp:type_profiler',
1850 ],
1851 }],
[email protected]56c248b2013-05-08 17:51:021852 ['chrome_split_dll', {
[email protected]ac4d0ff2013-05-14 20:04:151853 'variables': {
1854 'chrome_split_dll': '<!(python <(DEPTH)/tools/win/split_link/check_installed.py)',
1855 },
[email protected]56c248b2013-05-08 17:51:021856 'defines': ['CHROME_SPLIT_DLL'],
1857 }],
[email protected]b0c45722013-01-23 04:47:321858 ['OS=="linux" and clang==1 and host_arch=="ia32"', {
1859 # TODO(dmikurube): Remove -Wno-sentinel when Clang/LLVM is fixed.
1860 # See http://crbug.com/162818.
1861 'cflags+': ['-Wno-sentinel'],
1862 }],
[email protected]ff10b132012-02-29 22:53:301863 ['OS=="win" and "<(msbuild_toolset)"!=""', {
1864 'msbuild_toolset': '<(msbuild_toolset)',
1865 }],
[email protected]32aa8cc2009-03-04 21:36:391866 ['branding=="Chrome"', {
1867 'defines': ['GOOGLE_CHROME_BUILD'],
1868 }, { # else: branding!="Chrome"
1869 'defines': ['CHROMIUM_BUILD'],
1870 }],
[email protected]286d9a12012-05-30 16:20:381871 ['OS=="mac" and component=="shared_library"', {
1872 'xcode_settings': {
1873 'DYLIB_INSTALL_NAME_BASE': '@rpath',
1874 'LD_RUNPATH_SEARCH_PATHS': [
1875 # For unbundled binaries.
1876 '@loader_path/.',
1877 # For bundled binaries, to get back from Binary.app/Contents/MacOS.
1878 '@loader_path/../../..',
1879 ],
1880 },
1881 }],
[email protected]b6a5ac92012-10-29 18:17:221882 ['enable_rlz==1', {
[email protected]81d9b72d2012-03-26 22:29:171883 'defines': ['ENABLE_RLZ'],
1884 }],
[email protected]63e39a282011-07-13 20:41:281885 ['component=="shared_library"', {
1886 'defines': ['COMPONENT_BUILD'],
1887 }],
[email protected]06c756182010-04-27 18:31:311888 ['toolkit_views==1', {
[email protected]e6970232009-05-12 23:51:171889 'defines': ['TOOLKIT_VIEWS=1'],
1890 }],
[email protected]1ee7c56c2011-10-19 14:51:331891 ['ui_compositor_image_transport==1', {
[email protected]839d5172011-10-13 17:18:111892 'defines': ['UI_COMPOSITOR_IMAGE_TRANSPORT'],
1893 }],
[email protected]41423092011-08-25 15:39:581894 ['use_aura==1', {
1895 'defines': ['USE_AURA=1'],
[email protected]e599f0132011-08-24 19:03:351896 }],
[email protected]ed329be2012-01-03 22:02:161897 ['use_ash==1', {
1898 'defines': ['USE_ASH=1'],
1899 }],
[email protected]ff78e4e2013-05-03 19:19:151900 ['use_ozone==1', {
1901 'defines': ['USE_OZONE=1'],
1902 }],
[email protected]cb800562012-11-20 22:36:071903 ['use_default_render_theme==1', {
1904 'defines': ['USE_DEFAULT_RENDER_THEME=1'],
1905 }],
[email protected]e190d272012-08-30 17:36:441906 ['use_libjpeg_turbo==1', {
1907 'defines': ['USE_LIBJPEG_TURBO=1'],
1908 }],
[email protected]c329adf82011-10-05 14:34:571909 ['use_nss==1', {
1910 'defines': ['USE_NSS=1'],
1911 }],
[email protected]2fa2f2d82013-04-29 18:13:121912 ['use_x11==1', {
1913 'defines': ['USE_X11=1'],
1914 }],
[email protected]bd7b6fe2012-03-05 21:02:401915 ['enable_one_click_signin==1', {
1916 'defines': ['ENABLE_ONE_CLICK_SIGNIN'],
1917 }],
[email protected]a47aa892011-11-22 03:12:311918 ['toolkit_uses_gtk==1 and toolkit_views==0', {
1919 # TODO(erg): We are progressively sealing up use of deprecated features
1920 # in gtk in preparation for an eventual porting to gtk3.
1921 'defines': ['GTK_DISABLE_SINGLE_INCLUDES=1'],
1922 }],
[email protected]fdc5bed2010-01-09 01:16:571923 ['chromeos==1', {
[email protected]16779842009-07-08 23:45:291924 'defines': ['OS_CHROMEOS=1'],
[email protected]2b883b92009-06-02 22:57:501925 }],
[email protected]55d92492013-01-31 05:03:391926 ['google_tv==1', {
1927 'defines': ['GOOGLE_TV=1'],
1928 }],
[email protected]f56797b2011-09-25 00:04:351929 ['use_xi2_mt!=0', {
1930 'defines': ['USE_XI2_MT=<(use_xi2_mt)'],
1931 }],
[email protected]e47c32032011-03-01 19:26:201932 ['file_manager_extension==1', {
1933 'defines': ['FILE_MANAGER_EXTENSION=1'],
1934 }],
[email protected]77a848262013-02-22 11:17:251935 ['image_loader_extension==1', {
1936 'defines': ['IMAGE_LOADER_EXTENSION=1'],
1937 }],
[email protected]7664ab32011-02-01 23:35:251938 ['profiling==1', {
1939 'defines': ['ENABLE_PROFILING=1'],
1940 }],
[email protected]93b373502011-08-16 19:06:221941 ['OS=="linux" and glibcxx_debug==1', {
1942 'defines': ['_GLIBCXX_DEBUG=1',],
[email protected]f6a45d92012-10-24 19:26:591943 'cflags_cc+': ['-g'],
[email protected]93b373502011-08-16 19:06:221944 }],
[email protected]542bf24a2010-06-11 23:08:171945 ['remoting==1', {
1946 'defines': ['ENABLE_REMOTING=1'],
[email protected]c0bac532010-06-11 00:39:001947 }],
[email protected]5b87e782012-02-09 18:19:321948 ['enable_webrtc==1', {
1949 'defines': ['ENABLE_WEBRTC=1'],
1950 }],
[email protected]d01120e62010-05-10 17:04:481951 ['proprietary_codecs==1', {
1952 'defines': ['USE_PROPRIETARY_CODECS'],
1953 }],
[email protected]7ddea9802012-02-22 23:08:051954 ['enable_viewport==1', {
1955 'defines': ['ENABLE_VIEWPORT'],
1956 }],
[email protected]280755c2013-05-23 10:44:351957 ['enable_pepper_cdms==1', {
1958 'defines': ['ENABLE_PEPPER_CDMS'],
1959 }],
[email protected]f31e2e52011-07-14 16:01:191960 ['configuration_policy==1', {
1961 'defines': ['ENABLE_CONFIGURATION_POLICY'],
1962 }],
[email protected]9eb100e2011-10-14 05:08:221963 ['input_speech==1', {
1964 'defines': ['ENABLE_INPUT_SPEECH'],
1965 }],
[email protected]7cce3232011-10-28 10:41:571966 ['notifications==1', {
1967 'defines': ['ENABLE_NOTIFICATIONS'],
1968 }],
[email protected]1efbaaa2012-04-24 02:43:241969 ['enable_hidpi==1', {
1970 'defines': ['ENABLE_HIDPI=1'],
1971 }],
[email protected]9c1949e2009-10-02 19:59:541972 ['fastbuild!=0', {
[email protected]3b0bc5e2013-04-24 11:42:311973 'xcode_settings': {
1974 'GCC_GENERATE_DEBUGGING_SYMBOLS': 'NO',
1975 },
[email protected]9c1949e2009-10-02 19:59:541976 'conditions': [
[email protected]7df38122012-11-05 23:54:431977 ['clang==1', {
[email protected]c86fd472013-04-02 19:42:301978 # Clang creates chubby debug information, which makes linking very
1979 # slow. For now, don't create debug information with clang. See
1980 # http://crbug.com/70000
[email protected]7df38122012-11-05 23:54:431981 'conditions': [
1982 ['OS=="linux"', {
1983 'variables': {
1984 'debug_extra_cflags': '-g0',
1985 },
1986 }],
1987 # Android builds symbols on release by default, disable them.
1988 ['OS=="android"', {
1989 'variables': {
1990 'debug_extra_cflags': '-g0',
1991 'release_extra_cflags': '-g0',
1992 },
1993 }],
1994 ],
1995 }, { # else clang!=1
1996 'conditions': [
[email protected]c86fd472013-04-02 19:42:301997 ['OS=="win" and fastbuild==2', {
1998 # Completely disable debug information.
1999 'msvs_settings': {
2000 'VCLinkerTool': {
2001 'GenerateDebugInformation': 'false',
2002 },
2003 'VCCLCompilerTool': {
2004 'DebugInformationFormat': '0',
2005 },
2006 },
2007 }],
2008 ['OS=="win" and fastbuild==1', {
[email protected]7df38122012-11-05 23:54:432009 'msvs_settings': {
2010 'VCLinkerTool': {
[email protected]6c97ee072013-01-28 10:45:312011 # This tells the linker to generate .pdbs, so that
2012 # we can get meaningful stack traces.
2013 'GenerateDebugInformation': 'true',
[email protected]7df38122012-11-05 23:54:432014 },
2015 'VCCLCompilerTool': {
[email protected]6c97ee072013-01-28 10:45:312016 # No debug info to be generated by compiler.
[email protected]7df38122012-11-05 23:54:432017 'DebugInformationFormat': '0',
2018 },
2019 },
2020 }],
[email protected]c86fd472013-04-02 19:42:302021 ['OS=="linux" and fastbuild==2', {
2022 'variables': {
2023 'debug_extra_cflags': '-g0',
2024 },
2025 }],
2026 ['OS=="linux" and fastbuild==1', {
[email protected]7df38122012-11-05 23:54:432027 'variables': {
2028 'debug_extra_cflags': '-g1',
2029 },
2030 }],
[email protected]c86fd472013-04-02 19:42:302031 ['OS=="android" and fastbuild==2', {
2032 'variables': {
2033 'debug_extra_cflags': '-g0',
2034 'release_extra_cflags': '-g0',
2035 },
2036 }],
2037 ['OS=="android" and fastbuild==1', {
[email protected]7df38122012-11-05 23:54:432038 'variables': {
2039 'debug_extra_cflags': '-g1',
2040 'release_extra_cflags': '-g1',
2041 },
2042 }],
2043 ],
2044 }], # clang!=1
2045 ],
[email protected]9c1949e2009-10-02 19:59:542046 }], # fastbuild!=0
[email protected]20960e072011-09-20 20:59:012047 ['dcheck_always_on!=0', {
2048 'defines': ['DCHECK_ALWAYS_ON=1'],
2049 }], # dcheck_always_on!=0
[email protected]7e0d664a2009-12-03 21:07:472050 ['win_use_allocator_shim==0', {
2051 'conditions': [
2052 ['OS=="win"', {
2053 'defines': ['NO_TCMALLOC'],
2054 }],
2055 ],
2056 }],
[email protected]43f28f832010-02-03 02:28:482057 ['enable_gpu==1', {
[email protected]7477ea6f2009-12-22 23:28:152058 'defines': [
2059 'ENABLE_GPU=1',
2060 ],
2061 }],
[email protected]b1c2a5542010-10-08 12:44:402062 ['use_openssl==1', {
2063 'defines': [
2064 'USE_OPENSSL=1',
2065 ],
2066 }],
[email protected]ed154592010-04-29 00:18:502067 ['enable_eglimage==1', {
2068 'defines': [
2069 'ENABLE_EGLIMAGE=1',
2070 ],
2071 }],
[email protected]696de4e62012-11-21 21:18:542072 ['asan==1 and OS=="win"', {
2073 # Since asan on windows uses Syzygy, we need /PROFILE turned on to
2074 # produce appropriate pdbs.
2075 'msvs_settings': {
2076 'VCLinkerTool': {
2077 'Profile': 'true',
2078 },
2079 },
[email protected]2f047202013-06-14 06:36:392080 'defines': [
2081 'ADDRESS_SANITIZER'
2082 'MEMORY_TOOL_REPLACES_ALLOCATOR',
2083 ],
[email protected]696de4e62012-11-21 21:18:542084 }], # asan==1 and OS=="win"
[email protected]f5ecbba12009-04-03 04:35:182085 ['coverage!=0', {
2086 'conditions': [
[email protected]fc642ec2012-10-12 19:07:032087 ['OS=="mac" or OS=="ios"', {
[email protected]f5ecbba12009-04-03 04:35:182088 'xcode_settings': {
[email protected]ab2956372009-08-13 18:11:042089 'GCC_INSTRUMENT_PROGRAM_FLOW_ARCS': 'YES', # -fprofile-arcs
2090 'GCC_GENERATE_TEST_COVERAGE_FILES': 'YES', # -ftest-coverage
[email protected]5ae4f55e2009-04-13 23:19:472091 },
[email protected]fc642ec2012-10-12 19:07:032092 }],
2093 ['OS=="mac"', {
[email protected]e4fb84c2009-12-28 20:45:432094 # Add -lgcov for types executable, shared_library, and
[email protected]dc259ce52010-04-13 04:03:102095 # loadable_module; not for static_library.
[email protected]e4fb84c2009-12-28 20:45:432096 # This is a delayed conditional.
[email protected]f5ecbba12009-04-03 04:35:182097 'target_conditions': [
[email protected]e4fb84c2009-12-28 20:45:432098 ['_type!="static_library"', {
[email protected]f5ecbba12009-04-03 04:35:182099 'xcode_settings': { 'OTHER_LDFLAGS': [ '-lgcov' ] },
[email protected]5ae4f55e2009-04-13 23:19:472100 }],
2101 ],
2102 }],
[email protected]da1c8d692011-09-20 20:35:012103 ['OS=="linux" or OS=="android"', {
[email protected]f5ecbba12009-04-03 04:35:182104 'cflags': [ '-ftest-coverage',
2105 '-fprofile-arcs' ],
[email protected]7122ffd52009-04-30 23:19:002106 'link_settings': { 'libraries': [ '-lgcov' ] },
[email protected]f5ecbba12009-04-03 04:35:182107 }],
[email protected]e8f6ff42009-07-07 18:20:532108 ['OS=="win"', {
[email protected]0915c3b2012-11-22 17:24:072109 'variables': {
2110 # Disable incremental linking for all modules.
2111 # 0: inherit, 1: disabled, 2: enabled.
2112 'msvs_debug_link_incremental': '1',
2113 'msvs_large_module_debug_link_mode': '1',
[email protected]8ade58a62013-02-12 21:02:292114 # Disable RTC. Syzygy explicitly doesn't support RTC instrumented
2115 # binaries for now.
2116 'win_debug_RuntimeChecks': '0',
[email protected]0915c3b2012-11-22 17:24:072117 },
2118 'defines': [
2119 # Disable iterator debugging (huge speed boost without any
2120 # change in coverage results).
2121 '_HAS_ITERATOR_DEBUGGING=0',
2122 ],
[email protected]e8f6ff42009-07-07 18:20:532123 'msvs_settings': {
2124 'VCLinkerTool': {
[email protected]0915c3b2012-11-22 17:24:072125 # Enable profile information (necessary for coverage
2126 # instrumentation). This is incompatible with incremental
2127 # linking.
[email protected]e8f6ff42009-07-07 18:20:532128 'Profile': 'true',
2129 },
[email protected]e8f6ff42009-07-07 18:20:532130 }
2131 }], # OS==win
2132 ], # conditions for coverage
2133 }], # coverage!=0
[email protected]4e4d6042010-08-26 18:34:382134 ['OS=="win"', {
2135 'defines': [
2136 '__STD_C',
2137 '_CRT_SECURE_NO_DEPRECATE',
2138 '_SCL_SECURE_NO_DEPRECATE',
[email protected]2d0aa3242012-10-22 16:23:102139 # This define is required to pull in the new Win8 interfaces from
2140 # system headers like ShObjIdl.h.
2141 'NTDDI_VERSION=0x06020000',
[email protected]4e4d6042010-08-26 18:34:382142 ],
2143 'include_dirs': [
2144 '<(DEPTH)/third_party/wtl/include',
2145 ],
[email protected]9619e65d2012-05-23 19:06:522146 'conditions': [
2147 ['win_z7!=0', {
2148 'msvs_settings': {
[email protected]5146e0b2012-08-23 05:49:092149 # Generates debug info when win_z7=1
2150 # even if fastbuild=1 (that makes GenerateDebugInformation false).
2151 'VCLinkerTool': {
2152 'GenerateDebugInformation': 'true',
2153 },
[email protected]9619e65d2012-05-23 19:06:522154 'VCCLCompilerTool': {
2155 'DebugInformationFormat': '1',
2156 }
2157 }
2158 }],
[email protected]45a77072012-11-17 00:28:422159 ['"<(GENERATOR)"=="msvs"', {
2160 'msvs_settings': {
2161 'VCLinkerTool': {
2162 # Make the pdb name sane. Otherwise foo.exe and foo.dll both
2163 # have foo.pdb. The ninja generator already defaults to this and
2164 # can't handle the $(TargetPath) macro.
2165 'ProgramDatabaseFile': '$(TargetPath).pdb',
2166 }
2167 },
2168 }],
[email protected]9619e65d2012-05-23 19:06:522169 ], # win_z7!=0
[email protected]4e4d6042010-08-26 18:34:382170 }], # OS==win
[email protected]44879ed2012-04-06 01:11:022171 ['enable_task_manager==1', {
2172 'defines': [
2173 'ENABLE_TASK_MANAGER=1',
2174 ],
2175 }],
[email protected]6a3cd37e2012-04-17 17:13:342176 ['enable_extensions==1', {
2177 'defines': [
2178 'ENABLE_EXTENSIONS=1',
2179 ],
2180 }],
[email protected]13eb97d2012-01-05 01:07:122181 ['OS=="win" and branding=="Chrome"', {
2182 'defines': ['ENABLE_SWIFTSHADER'],
2183 }],
[email protected]407dfa632011-12-23 11:59:352184 ['enable_dart==1', {
2185 'defines': ['WEBKIT_USING_DART=1'],
2186 }],
[email protected]18e0f39b2012-01-17 16:47:342187 ['enable_plugin_installation==1', {
2188 'defines': ['ENABLE_PLUGIN_INSTALLATION=1'],
2189 }],
[email protected]6d17f6392012-12-05 05:24:542190 ['enable_plugins==1', {
2191 'defines': ['ENABLE_PLUGINS=1'],
2192 }],
[email protected]cdb756ef2012-04-05 18:34:532193 ['enable_session_service==1', {
2194 'defines': ['ENABLE_SESSION_SERVICE=1'],
2195 }],
[email protected]6b40bb582012-03-15 20:50:382196 ['enable_themes==1', {
2197 'defines': ['ENABLE_THEMES=1'],
2198 }],
[email protected]57e67ac2013-02-22 03:37:222199 ['enable_autofill_dialog==1', {
2200 'defines': ['ENABLE_AUTOFILL_DIALOG=1'],
2201 }],
[email protected]0acdd772012-04-05 22:53:002202 ['enable_background==1', {
2203 'defines': ['ENABLE_BACKGROUND=1'],
2204 }],
[email protected]2e22e2f2012-03-15 21:53:102205 ['enable_automation==1', {
2206 'defines': ['ENABLE_AUTOMATION=1'],
2207 }],
[email protected]6ee43a72012-12-07 22:44:402208 ['enable_google_now==1', {
2209 'defines': ['ENABLE_GOOGLE_NOW=1'],
2210 }],
[email protected]703369a2012-11-05 20:40:312211 ['enable_language_detection==1', {
2212 'defines': ['ENABLE_LANGUAGE_DETECTION=1'],
2213 }],
[email protected]658677f2012-06-09 06:04:022214 ['enable_printing==1', {
2215 'defines': ['ENABLE_PRINTING=1'],
2216 }],
[email protected]e6026962012-06-14 21:28:322217 ['enable_captive_portal_detection==1', {
2218 'defines': ['ENABLE_CAPTIVE_PORTAL_DETECTION=1'],
2219 }],
[email protected]dc4e8b82012-11-15 03:58:162220 ['enable_app_list==1', {
2221 'defines': ['ENABLE_APP_LIST=1'],
2222 }],
2223 ['enable_settings_app==1', {
2224 'defines': ['ENABLE_SETTINGS_APP=1'],
2225 }],
[email protected]9bfe0ab2012-08-30 13:18:112226 ['disable_ftp_support==1', {
2227 'defines': ['DISABLE_FTP_SUPPORT=1'],
2228 }],
[email protected]0850e842013-01-19 03:44:312229 ['enable_managed_users==1', {
2230 'defines': ['ENABLE_MANAGED_USERS=1'],
2231 }],
[email protected]199def22013-02-21 17:52:292232 ['spdy_proxy_auth_origin != ""', {
2233 'defines': ['SPDY_PROXY_AUTH_ORIGIN="<(spdy_proxy_auth_origin)"'],
2234 }],
2235 ['spdy_proxy_auth_property != ""', {
2236 'defines': ['SPDY_PROXY_AUTH_PROPERTY="<(spdy_proxy_auth_property)"'],
2237 }],
[email protected]f37e9412013-05-27 23:18:252238 ['spdy_proxy_auth_value != ""', {
2239 'defines': ['SPDY_PROXY_AUTH_VALUE="<(spdy_proxy_auth_value)"'],
2240 }],
[email protected]5cbeb502013-04-23 19:25:272241 ['enable_mdns==1', {
2242 'defines': ['ENABLE_MDNS=1'],
2243 }]
[email protected]a6e22132010-02-10 20:43:182244 ], # conditions for 'target_defaults'
2245 'target_conditions': [
[email protected]b1eb341c2011-11-09 18:46:072246 ['enable_wexit_time_destructors==1', {
2247 'conditions': [
2248 [ 'clang==1', {
2249 'cflags': [
2250 '-Wexit-time-destructors',
2251 ],
2252 'xcode_settings': {
2253 'WARNING_CFLAGS': [
2254 '-Wexit-time-destructors',
2255 ],
2256 },
2257 }],
2258 ],
2259 }],
[email protected]c14d8e772010-02-09 22:06:152260 ['chromium_code==0', {
[email protected]d8543312010-02-10 17:43:282261 'conditions': [
[email protected]1e013672012-06-29 22:12:202262 [ 'os_posix==1 and OS!="mac" and OS!="ios"', {
[email protected]c0a6b272011-02-09 22:32:332263 # We don't want to get warnings from third-party code,
2264 # so remove any existing warning-enabling flags like -Wall.
[email protected]d8543312010-02-10 17:43:282265 'cflags!': [
2266 '-Wall',
2267 '-Wextra',
[email protected]d8543312010-02-10 17:43:282268 ],
[email protected]167ec822011-10-24 22:05:272269 'cflags_cc': [
[email protected]ec1d155be2011-02-08 22:19:002270 # Don't warn about hash_map in third-party code.
2271 '-Wno-deprecated',
[email protected]167ec822011-10-24 22:05:272272 ],
2273 'cflags': [
[email protected]c0a6b272011-02-09 22:32:332274 # Don't warn about printf format problems.
2275 # This is off by default in gcc but on in Ubuntu's gcc(!).
[email protected]ec392872011-02-10 22:38:222276 '-Wno-format',
[email protected]ec1d155be2011-02-08 22:19:002277 ],
[email protected]d16bd642011-07-25 23:59:182278 'cflags_cc!': [
2279 # TODO(fischman): remove this.
2280 # http://code.google.com/p/chromium/issues/detail?id=90453
2281 '-Wsign-compare',
2282 ]
[email protected]d8543312010-02-10 17:43:282283 }],
[email protected]82dd5eb32012-08-18 04:24:322284 # TODO: Fix all warnings on chromeos too.
2285 [ 'os_posix==1 and OS!="mac" and OS!="ios" and (clang!=1 or chromeos==1)', {
2286 'cflags!': [
2287 '-Werror',
2288 ],
2289 }],
[email protected]bc073c062012-01-13 06:28:032290 [ 'os_posix==1 and os_bsd!=1 and OS!="mac" and OS!="android"', {
[email protected]6e4451892011-07-27 10:32:112291 'cflags': [
2292 # Don't warn about ignoring the return value from e.g. close().
2293 # This is off by default in some gccs but on by default in others.
[email protected]bc073c062012-01-13 06:28:032294 # BSD systems do not support this option, since they are usually
2295 # using gcc 4.2.1, which does not have this flag yet.
[email protected]6e4451892011-07-27 10:32:112296 '-Wno-unused-result',
2297 ],
2298 }],
[email protected]d8543312010-02-10 17:43:282299 [ 'OS=="win"', {
2300 'defines': [
2301 '_CRT_SECURE_NO_DEPRECATE',
2302 '_CRT_NONSTDC_NO_WARNINGS',
2303 '_CRT_NONSTDC_NO_DEPRECATE',
2304 '_SCL_SECURE_NO_DEPRECATE',
2305 ],
2306 'msvs_disabled_warnings': [4800],
2307 'msvs_settings': {
2308 'VCCLCompilerTool': {
[email protected]942c3a60f2011-05-03 02:04:112309 'WarningLevel': '3',
[email protected]c54b41cb2012-08-24 20:58:242310 'WarnAsError': '<(win_third_party_warn_as_error)',
[email protected]d8543312010-02-10 17:43:282311 'Detect64BitPortabilityProblems': 'false',
2312 },
2313 },
[email protected]c54b41cb2012-08-24 20:58:242314 'conditions': [
2315 ['buildtype=="Official"', {
2316 'msvs_settings': {
2317 'VCCLCompilerTool': { 'WarnAsError': 'false' },
2318 }
2319 }],
2320 ],
[email protected]d8543312010-02-10 17:43:282321 }],
[email protected]0915c3b2012-11-22 17:24:072322 # TODO(darin): Unfortunately, some third_party code depends on base.
[email protected]ea47b6a2011-07-17 19:39:422323 [ 'OS=="win" and component=="shared_library"', {
2324 'msvs_disabled_warnings': [
2325 4251, # class 'std::xx' needs to have dll-interface.
2326 ],
2327 }],
[email protected]1e013672012-06-29 22:12:202328 [ 'OS=="mac" or OS=="ios"', {
[email protected]d8543312010-02-10 17:43:282329 'xcode_settings': {
[email protected]4c4c2e5332010-06-15 11:51:062330 'WARNING_CFLAGS!': ['-Wall', '-Wextra'],
[email protected]d8543312010-02-10 17:43:282331 },
[email protected]3a352c362012-05-08 19:45:492332 'conditions': [
2333 ['buildtype=="Official"', {
2334 'xcode_settings': {
2335 'GCC_TREAT_WARNINGS_AS_ERRORS': 'NO', # -Werror
2336 },
2337 }],
2338 ],
[email protected]d8543312010-02-10 17:43:282339 }],
[email protected]1e013672012-06-29 22:12:202340 [ 'OS=="ios"', {
2341 'xcode_settings': {
[email protected]7afca862012-07-11 15:11:222342 # TODO(ios): Fix remaining warnings in third-party code, then
2343 # remove this; the Mac cleanup didn't get everything that's
2344 # flagged in an iOS build.
2345 'GCC_TREAT_WARNINGS_AS_ERRORS': 'NO',
[email protected]1e013672012-06-29 22:12:202346 'RUN_CLANG_STATIC_ANALYZER': 'NO',
2347 },
2348 }],
[email protected]c14d8e772010-02-09 22:06:152349 ],
2350 }, {
[email protected]a5c598152012-01-27 04:55:132351 'includes': [
2352 # Rules for excluding e.g. foo_win.cc from the build on non-Windows.
2353 'filename_rules.gypi',
2354 ],
[email protected]41af4f82012-11-08 00:09:312355 # In Chromium code, we define __STDC_foo_MACROS in order to get the
[email protected]c14d8e772010-02-09 22:06:152356 # C99 macros on Mac and Linux.
2357 'defines': [
[email protected]41af4f82012-11-08 00:09:312358 '__STDC_CONSTANT_MACROS',
[email protected]c14d8e772010-02-09 22:06:152359 '__STDC_FORMAT_MACROS',
2360 ],
2361 'conditions': [
[email protected]c14d8e772010-02-09 22:06:152362 ['OS=="win"', {
[email protected]f55bd4862010-05-27 15:38:072363 # turn on warnings for signed/unsigned mismatch on chromium code.
2364 'msvs_settings': {
2365 'VCCLCompilerTool': {
2366 'AdditionalOptions': ['/we4389'],
2367 },
2368 },
[email protected]c14d8e772010-02-09 22:06:152369 }],
[email protected]63e39a282011-07-13 20:41:282370 ['OS=="win" and component=="shared_library"', {
2371 'msvs_disabled_warnings': [
2372 4251, # class 'std::xx' needs to have dll-interface.
2373 ],
2374 }],
[email protected]c14d8e772010-02-09 22:06:152375 ],
2376 }],
[email protected]a6e22132010-02-10 20:43:182377 ], # target_conditions for 'target_defaults'
[email protected]2f80c312009-02-25 21:26:552378 'default_configuration': 'Debug',
2379 'configurations': {
[email protected]5153767c2009-12-22 01:52:502380 # VCLinkerTool LinkIncremental values below:
2381 # 0 == default
2382 # 1 == /INCREMENTAL:NO
2383 # 2 == /INCREMENTAL
2384 # Debug links incremental, Release does not.
2385 #
[email protected]7b99801e2010-11-03 17:26:232386 # Abstract base configurations to cover common attributes.
[email protected]5153767c2009-12-22 01:52:502387 #
2388 'Common_Base': {
[email protected]bb05e452009-10-29 21:24:562389 'abstract': 1,
2390 'msvs_configuration_attributes': {
[email protected]534303c2011-09-28 00:02:512391 'OutputDirectory': '<(DEPTH)\\build\\<(build_dir_prefix)$(ConfigurationName)',
[email protected]bb05e452009-10-29 21:24:562392 'IntermediateDirectory': '$(OutDir)\\obj\\$(ProjectName)',
2393 'CharacterSet': '1',
2394 },
[email protected]f59e1302013-02-15 13:48:402395 # Add the default import libs.
2396 'msvs_settings':{
2397 'VCLinkerTool': {
2398 'AdditionalDependencies': [
2399 'kernel32.lib',
2400 'gdi32.lib',
2401 'winspool.lib',
2402 'comdlg32.lib',
2403 'advapi32.lib',
2404 'shell32.lib',
2405 'ole32.lib',
2406 'oleaut32.lib',
2407 'user32.lib',
2408 'uuid.lib',
2409 'odbc32.lib',
2410 'odbccp32.lib',
[email protected]36bb739c2013-02-25 22:10:392411 'delayimp.lib',
[email protected]f59e1302013-02-15 13:48:402412 ],
2413 },
2414 },
[email protected]5153767c2009-12-22 01:52:502415 },
2416 'x86_Base': {
2417 'abstract': 1,
[email protected]ef4fa4072009-12-04 22:46:502418 'msvs_settings': {
2419 'VCLinkerTool': {
2420 'TargetMachine': '1',
2421 },
2422 },
[email protected]2fa40782009-11-01 21:17:342423 'msvs_configuration_platform': 'Win32',
[email protected]bb05e452009-10-29 21:24:562424 },
[email protected]5153767c2009-12-22 01:52:502425 'x64_Base': {
2426 'abstract': 1,
2427 'msvs_configuration_platform': 'x64',
2428 'msvs_settings': {
2429 'VCLinkerTool': {
2430 'TargetMachine': '17', # x86 - 64
[email protected]5153767c2009-12-22 01:52:502431 'AdditionalLibraryDirectories!':
[email protected]1ab48032012-07-02 21:48:052432 ['<(windows_sdk_path)/Lib/win8/um/x86'],
[email protected]5153767c2009-12-22 01:52:502433 'AdditionalLibraryDirectories':
[email protected]1ab48032012-07-02 21:48:052434 ['<(windows_sdk_path)/Lib/win8/um/x64'],
[email protected]50f99662013-03-04 20:58:362435 # Doesn't exist x64 SDK. Should use oleaut32 in any case.
2436 'IgnoreDefaultLibraryNames': [ 'olepro32.lib' ],
[email protected]5153767c2009-12-22 01:52:502437 },
[email protected]d26b4418ab2010-03-24 22:06:352438 'VCLibrarianTool': {
[email protected]5153767c2009-12-22 01:52:502439 'AdditionalLibraryDirectories!':
[email protected]1ab48032012-07-02 21:48:052440 ['<(windows_sdk_path)/Lib/win8/um/x86'],
[email protected]5153767c2009-12-22 01:52:502441 'AdditionalLibraryDirectories':
[email protected]1ab48032012-07-02 21:48:052442 ['<(windows_sdk_path)/Lib/win8/um/x64'],
[email protected]5153767c2009-12-22 01:52:502443 },
2444 },
[email protected]5153767c2009-12-22 01:52:502445 },
2446 'Debug_Base': {
2447 'abstract': 1,
[email protected]14339762011-04-05 07:36:582448 'defines': [
2449 'DYNAMIC_ANNOTATIONS_ENABLED=1',
2450 'WTF_USE_DYNAMIC_ANNOTATIONS=1',
2451 ],
[email protected]1c966092009-08-20 21:19:262452 'xcode_settings': {
2453 'COPY_PHASE_STRIP': 'NO',
[email protected]d5d593a2009-08-28 23:23:292454 'GCC_OPTIMIZATION_LEVEL': '<(mac_debug_optimization)',
[email protected]a68c29a2011-07-01 16:23:492455 'OTHER_CFLAGS': [
[email protected]a68c29a2011-07-01 16:23:492456 '<@(debug_extra_cflags)',
2457 ],
[email protected]1c966092009-08-20 21:19:262458 },
[email protected]bb05e452009-10-29 21:24:562459 'msvs_settings': {
2460 'VCCLCompilerTool': {
[email protected]7e0d664a2009-12-03 21:07:472461 'Optimization': '<(win_debug_Optimization)',
[email protected]bb05e452009-10-29 21:24:562462 'PreprocessorDefinitions': ['_DEBUG'],
[email protected]6b0507b2010-05-07 07:41:212463 'BasicRuntimeChecks': '<(win_debug_RuntimeChecks)',
[email protected]7e0d664a2009-12-03 21:07:472464 'RuntimeLibrary': '<(win_debug_RuntimeLibrary)',
[email protected]2ae6e022010-05-07 13:19:152465 'conditions': [
2466 # According to MSVS, InlineFunctionExpansion=0 means
2467 # "default inlining", not "/Ob0".
2468 # Thus, we have to handle InlineFunctionExpansion==0 separately.
2469 ['win_debug_InlineFunctionExpansion==0', {
2470 'AdditionalOptions': ['/Ob0'],
2471 }],
2472 ['win_debug_InlineFunctionExpansion!=""', {
2473 'InlineFunctionExpansion':
2474 '<(win_debug_InlineFunctionExpansion)',
2475 }],
[email protected]fac10d12010-11-08 16:00:312476 ['win_debug_disable_iterator_debugging==1', {
2477 'PreprocessorDefinitions': ['_HAS_ITERATOR_DEBUGGING=0'],
2478 }],
[email protected]ef5c5f1b2011-12-17 02:16:242479
2480 # if win_debug_OmitFramePointers is blank, leave as default
2481 ['win_debug_OmitFramePointers==1', {
2482 'OmitFramePointers': 'true',
2483 }],
2484 ['win_debug_OmitFramePointers==0', {
2485 'OmitFramePointers': 'false',
2486 # The above is not sufficient (http://crbug.com/106711): it
2487 # simply eliminates an explicit "/Oy", but both /O2 and /Ox
2488 # perform FPO regardless, so we must explicitly disable.
2489 # We still want the false setting above to avoid having
2490 # "/Oy /Oy-" and warnings about overriding.
2491 'AdditionalOptions': ['/Oy-'],
2492 }],
[email protected]2ae6e022010-05-07 13:19:152493 ],
[email protected]ef5c5f1b2011-12-17 02:16:242494 'AdditionalOptions': [ '<@(win_debug_extra_cflags)', ],
[email protected]bb05e452009-10-29 21:24:562495 },
2496 'VCLinkerTool': {
2497 'LinkIncremental': '<(msvs_debug_link_incremental)',
[email protected]7cf23ce62012-01-13 02:43:332498 # ASLR makes debugging with windbg difficult because Chrome.exe and
2499 # Chrome.dll share the same base name. As result, windbg will
2500 # name the Chrome.dll module like chrome_<base address>, where
2501 # <base address> typically changes with each launch. This in turn
2502 # means that breakpoints in Chrome.dll don't stick from one launch
2503 # to the next. For this reason, we turn ASLR off in debug builds.
2504 # Note that this is a three-way bool, where 0 means to pick up
2505 # the default setting, 1 is off and 2 is on.
2506 'RandomizedBaseAddress': 1,
[email protected]bb05e452009-10-29 21:24:562507 },
2508 'VCResourceCompilerTool': {
2509 'PreprocessorDefinitions': ['_DEBUG'],
2510 },
2511 },
[email protected]2f80c312009-02-25 21:26:552512 'conditions': [
[email protected]78204c92012-09-14 04:42:552513 ['OS=="linux" or OS=="android"', {
[email protected]d8e3b122012-05-31 23:07:542514 'target_conditions': [
2515 ['_toolset=="target"', {
2516 'cflags': [
2517 '<@(debug_extra_cflags)',
2518 ],
2519 }],
[email protected]bb05e452009-10-29 21:24:562520 ],
[email protected]2f80c312009-02-25 21:26:552521 }],
[email protected]1e013672012-06-29 22:12:202522 # Disabled on iOS because it was causing a crash on startup.
2523 # TODO(michelea): investigate, create a reduced test and possibly
2524 # submit a radar.
2525 ['release_valgrind_build==0 and OS!="ios"', {
[email protected]56cca4e2011-07-01 21:33:352526 'xcode_settings': {
2527 'OTHER_CFLAGS': [
2528 '-fstack-protector-all', # Implies -fstack-protector
2529 ],
2530 },
2531 }],
[email protected]2f80c312009-02-25 21:26:552532 ],
2533 },
[email protected]5153767c2009-12-22 01:52:502534 'Release_Base': {
2535 'abstract': 1,
[email protected]2f80c312009-02-25 21:26:552536 'defines': [
2537 'NDEBUG',
2538 ],
[email protected]1c966092009-08-20 21:19:262539 'xcode_settings': {
2540 'DEAD_CODE_STRIPPING': 'YES', # -Wl,-dead_strip
2541 'GCC_OPTIMIZATION_LEVEL': '<(mac_release_optimization)',
[email protected]ffd984b12009-09-11 19:37:002542 'OTHER_CFLAGS': [ '<@(release_extra_cflags)', ],
[email protected]1c966092009-08-20 21:19:262543 },
[email protected]bb05e452009-10-29 21:24:562544 'msvs_settings': {
[email protected]7e0d664a2009-12-03 21:07:472545 'VCCLCompilerTool': {
[email protected]7e0d664a2009-12-03 21:07:472546 'RuntimeLibrary': '<(win_release_RuntimeLibrary)',
[email protected]2ae6e022010-05-07 13:19:152547 'conditions': [
[email protected]2212d272011-12-20 21:37:372548 # In official builds, each target will self-select
2549 # an optimization level.
2550 ['buildtype!="Official"', {
2551 'Optimization': '<(win_release_Optimization)',
2552 },
2553 ],
[email protected]2ae6e022010-05-07 13:19:152554 # According to MSVS, InlineFunctionExpansion=0 means
2555 # "default inlining", not "/Ob0".
2556 # Thus, we have to handle InlineFunctionExpansion==0 separately.
2557 ['win_release_InlineFunctionExpansion==0', {
2558 'AdditionalOptions': ['/Ob0'],
2559 }],
2560 ['win_release_InlineFunctionExpansion!=""', {
2561 'InlineFunctionExpansion':
2562 '<(win_release_InlineFunctionExpansion)',
2563 }],
[email protected]626d2d22011-10-11 15:47:332564
[email protected]ef5c5f1b2011-12-17 02:16:242565 # if win_release_OmitFramePointers is blank, leave as default
[email protected]626d2d22011-10-11 15:47:332566 ['win_release_OmitFramePointers==1', {
2567 'OmitFramePointers': 'true',
2568 }],
2569 ['win_release_OmitFramePointers==0', {
2570 'OmitFramePointers': 'false',
[email protected]ef5c5f1b2011-12-17 02:16:242571 # The above is not sufficient (http://crbug.com/106711): it
2572 # simply eliminates an explicit "/Oy", but both /O2 and /Ox
2573 # perform FPO regardless, so we must explicitly disable.
2574 # We still want the false setting above to avoid having
2575 # "/Oy /Oy-" and warnings about overriding.
2576 'AdditionalOptions': ['/Oy-'],
[email protected]626d2d22011-10-11 15:47:332577 }],
[email protected]2ae6e022010-05-07 13:19:152578 ],
[email protected]ef5c5f1b2011-12-17 02:16:242579 'AdditionalOptions': [ '<@(win_release_extra_cflags)', ],
[email protected]7e0d664a2009-12-03 21:07:472580 },
[email protected]bb05e452009-10-29 21:24:562581 'VCLinkerTool': {
[email protected]c059c612011-08-08 20:56:342582 # LinkIncremental is a tri-state boolean, where 0 means default
2583 # (i.e., inherit from parent solution), 1 means false, and
2584 # 2 means true.
[email protected]bb05e452009-10-29 21:24:562585 'LinkIncremental': '1',
[email protected]c059c612011-08-08 20:56:342586 # This corresponds to the /PROFILE flag which ensures the PDB
2587 # file contains FIXUP information (growing the PDB file by about
2588 # 5%) but does not otherwise alter the output binary. This
2589 # information is used by the Syzygy optimization tool when
2590 # decomposing the release image.
2591 'Profile': 'true',
[email protected]bb05e452009-10-29 21:24:562592 },
2593 },
[email protected]2f80c312009-02-25 21:26:552594 'conditions': [
[email protected]fd3fb3bf2012-05-23 22:15:162595 ['msvs_use_common_release', {
2596 'includes': ['release.gypi'],
2597 }],
[email protected]7bdd7d7c2012-11-01 10:36:162598 ['release_valgrind_build==0 and tsan==0', {
[email protected]14339762011-04-05 07:36:582599 'defines': [
2600 'NVALGRIND',
2601 'DYNAMIC_ANNOTATIONS_ENABLED=0',
2602 ],
[email protected]ee857512010-05-14 08:24:422603 }, {
[email protected]14339762011-04-05 07:36:582604 'defines': [
[email protected]2f047202013-06-14 06:36:392605 'MEMORY_TOOL_REPLACES_ALLOCATOR',
[email protected]14339762011-04-05 07:36:582606 'DYNAMIC_ANNOTATIONS_ENABLED=1',
2607 'WTF_USE_DYNAMIC_ANNOTATIONS=1',
2608 ],
[email protected]92822e82009-09-18 14:26:562609 }],
[email protected]7e0d664a2009-12-03 21:07:472610 ['win_use_allocator_shim==0', {
2611 'defines': ['NO_TCMALLOC'],
2612 }],
[email protected]37305ae2012-12-11 01:54:582613 ['os_posix==1 and chromium_code==1', {
2614 # Non-chromium code is not guaranteed to compile cleanly
2615 # with _FORTIFY_SOURCE. Also, fortified build may fail
2616 # when optimizations are disabled, so only do that for Release
2617 # build.
2618 'defines': [
2619 '_FORTIFY_SOURCE=2',
2620 ],
2621 }],
[email protected]7df38122012-11-05 23:54:432622 ['OS=="linux" or OS=="android"', {
[email protected]d8e3b122012-05-31 23:07:542623 'target_conditions': [
2624 ['_toolset=="target"', {
2625 'cflags': [
2626 '<@(release_extra_cflags)',
2627 ],
2628 }],
[email protected]bb05e452009-10-29 21:24:562629 ],
2630 }],
[email protected]b64ec822013-05-23 12:57:412631 ['OS=="ios"', {
2632 'defines': [
2633 'NS_BLOCK_ASSERTIONS=1',
2634 ],
2635 }],
[email protected]2f80c312009-02-25 21:26:552636 ],
2637 },
[email protected]5153767c2009-12-22 01:52:502638 #
2639 # Concrete configurations
2640 #
2641 'Debug': {
2642 'inherit_from': ['Common_Base', 'x86_Base', 'Debug_Base'],
2643 },
2644 'Release': {
2645 'inherit_from': ['Common_Base', 'x86_Base', 'Release_Base'],
[email protected]5153767c2009-12-22 01:52:502646 },
[email protected]f926fa0a2009-08-04 22:50:132647 'conditions': [
2648 [ 'OS=="win"', {
2649 # TODO(bradnelson): add a gyp mechanism to make this more graceful.
[email protected]ef4fa4072009-12-04 22:46:502650 'Debug_x64': {
[email protected]5153767c2009-12-22 01:52:502651 'inherit_from': ['Common_Base', 'x64_Base', 'Debug_Base'],
[email protected]78263c12009-11-01 23:45:302652 },
2653 'Release_x64': {
[email protected]5153767c2009-12-22 01:52:502654 'inherit_from': ['Common_Base', 'x64_Base', 'Release_Base'],
[email protected]78263c12009-11-01 23:45:302655 },
[email protected]f926fa0a2009-08-04 22:50:132656 }],
2657 ],
[email protected]2f80c312009-02-25 21:26:552658 },
2659 },
2660 'conditions': [
[email protected]43539ec2012-11-20 22:35:252661 ['os_posix==1', {
2662 'target_defaults': {
[email protected]43539ec2012-11-20 22:35:252663 'ldflags': [
2664 '-Wl,-z,now',
2665 '-Wl,-z,relro',
2666 ],
[email protected]43539ec2012-11-20 22:35:252667 },
2668 }],
[email protected]d2ca75c2013-02-01 05:47:172669 ['os_posix==1 and chromeos==0', {
2670 # Chrome OS enables -fstack-protector-strong via its build wrapper,
2671 # and we want to avoid overriding this, so stack-protector is only
2672 # enabled when not building on Chrome OS.
2673 # TODO(phajdan.jr): Use -fstack-protector-strong when our gcc
2674 # supports it.
2675 'target_defaults': {
2676 'cflags': [
2677 '-fstack-protector',
2678 '--param=ssp-buffer-size=4',
2679 ],
2680 },
2681 }],
[email protected]1e013672012-06-29 22:12:202682 ['os_posix==1 and OS!="mac" and OS!="ios"', {
[email protected]9d384032009-03-20 23:13:262683 'target_defaults': {
[email protected]5315f2842009-04-28 00:43:272684 # Enable -Werror by default, but put it in a variable so it can
2685 # be disabled in ~/.gyp/include.gypi on the valgrind builders.
2686 'variables': {
[email protected]cbbb3472012-01-25 18:32:312687 'werror%': '-Werror',
[email protected]1e013672012-06-29 22:12:202688 'libraries_for_target%': '',
[email protected]5315f2842009-04-28 00:43:272689 },
[email protected]6863896f2012-01-25 17:51:362690 'defines': [
2691 '_FILE_OFFSET_BITS=64',
2692 ],
[email protected]9d384032009-03-20 23:13:262693 'cflags': [
[email protected]1bba09c2009-08-13 12:53:162694 '<(werror)', # See note above about the werror variable.
2695 '-pthread',
2696 '-fno-exceptions',
[email protected]ef8c3cf2012-01-24 04:37:292697 '-fno-strict-aliasing', # See http://crbug.com/32204
[email protected]1bba09c2009-08-13 12:53:162698 '-Wall',
[email protected]0fa17082010-03-26 00:48:052699 # TODO(evan): turn this back on once all the builds work.
2700 # '-Wextra',
[email protected]225c8f52010-02-05 22:23:202701 # Don't warn about unused function params. We use those everywhere.
2702 '-Wno-unused-parameter',
2703 # Don't warn about the "struct foo f = {0};" initialization pattern.
2704 '-Wno-missing-field-initializers',
[email protected]3df6e3a2010-01-21 20:23:122705 # Don't export any symbols (for example, to plugins we dlopen()).
2706 # Note: this is *required* to make some plugins work.
2707 '-fvisibility=hidden',
[email protected]7ca6ce12010-09-15 23:39:352708 '-pipe',
[email protected]8a2fcba2009-07-29 00:52:242709 ],
2710 'cflags_cc': [
[email protected]832d0212009-10-28 19:12:222711 '-fno-rtti',
[email protected]8a2fcba2009-07-29 00:52:242712 '-fno-threadsafe-statics',
[email protected]f5986c42009-11-17 18:39:362713 # Make inline functions have hidden visiblity by default.
2714 # Surprisingly, not covered by -fvisibility=hidden.
2715 '-fvisibility-inlines-hidden',
[email protected]554abd902011-07-25 04:03:172716 # GCC turns on -Wsign-compare for C++ under -Wall, but clang doesn't,
2717 # so we specify it explicitly.
2718 # TODO(fischman): remove this if http://llvm.org/PR10448 obsoletes it.
[email protected]d16bd642011-07-25 23:59:182719 # http://code.google.com/p/chromium/issues/detail?id=90453
[email protected]554abd902011-07-25 04:03:172720 '-Wsign-compare',
[email protected]9d384032009-03-20 23:13:262721 ],
[email protected]a6cf87e2009-04-03 04:07:382722 'ldflags': [
[email protected]138241f2010-03-30 23:53:102723 '-pthread', '-Wl,-z,noexecstack',
[email protected]9d384032009-03-20 23:13:262724 ],
[email protected]1e013672012-06-29 22:12:202725 'libraries' : [
2726 '<(libraries_for_target)',
2727 ],
[email protected]3aacaf952009-04-02 15:34:092728 'configurations': {
[email protected]5153767c2009-12-22 01:52:502729 'Debug_Base': {
[email protected]c5bdc032009-04-20 19:11:312730 'variables': {
2731 'debug_optimize%': '0',
2732 },
[email protected]3aacaf952009-04-02 15:34:092733 'defines': [
2734 '_DEBUG',
2735 ],
2736 'cflags': [
[email protected]95ad2032012-08-24 00:49:252737 '-O>(debug_optimize)',
[email protected]3aacaf952009-04-02 15:34:092738 '-g',
2739 ],
[email protected]da1c8d692011-09-20 20:35:012740 'conditions' : [
[email protected]3f05e912013-04-11 20:38:342741 ['OS=="android"', {
2742 # Only link with needed input sections. This is to avoid getting
2743 # undefined reference to __cxa_bad_typeid in the CDU library.
2744 'ldflags': [
2745 '-Wl,--gc-sections',
2746 ],
2747 }],
[email protected]fa9d4e262012-08-21 04:39:002748 ['OS=="android" and android_full_debug==0', {
[email protected]8a37e4502012-08-14 22:42:552749 # Some configurations are copied from Release_Base to reduce
2750 # the binary size.
2751 'variables': {
2752 'debug_optimize%': 's',
2753 },
[email protected]da1c8d692011-09-20 20:35:012754 'cflags': [
[email protected]8a37e4502012-08-14 22:42:552755 '-fomit-frame-pointer',
2756 '-fdata-sections',
2757 '-ffunction-sections',
[email protected]da1c8d692011-09-20 20:35:012758 ],
[email protected]8a37e4502012-08-14 22:42:552759 'ldflags': [
2760 '-Wl,-O1',
2761 '-Wl,--as-needed',
[email protected]8a37e4502012-08-14 22:42:552762 ],
[email protected]da1c8d692011-09-20 20:35:012763 }],
[email protected]d4c0ec5b2013-03-10 03:07:452764 ['OS=="linux" and target_arch=="ia32"', {
2765 'ldflags': [
2766 '-Wl,--no-as-needed',
2767 ],
2768 }],
[email protected]da1c8d692011-09-20 20:35:012769 ],
[email protected]5315f2842009-04-28 00:43:272770 },
[email protected]5153767c2009-12-22 01:52:502771 'Release_Base': {
[email protected]740e2de2009-07-21 11:41:012772 'variables': {
2773 'release_optimize%': '2',
[email protected]1dd529642010-05-15 01:02:512774 # Binaries become big and gold is unable to perform GC
2775 # and remove unused sections for some of test targets
2776 # on 32 bit platform.
2777 # (This is currently observed only in chromeos valgrind bots)
2778 # The following flag is to disable --gc-sections linker
2779 # option for these bots.
2780 'no_gc_sections%': 0,
[email protected]409dceef2011-05-10 19:49:122781
2782 # TODO(bradnelson): reexamine how this is done if we change the
2783 # expansion of configurations
2784 'release_valgrind_build%': 0,
[email protected]740e2de2009-07-21 11:41:012785 },
[email protected]3aacaf952009-04-02 15:34:092786 'cflags': [
[email protected]296ce7ce2012-08-02 19:41:182787 '-O<(release_optimize)',
[email protected]d8cc3a62009-04-08 18:29:532788 # Don't emit the GCC version ident directives, they just end up
2789 # in the .comment section taking up binary size.
2790 '-fno-ident',
2791 # Put data and code in their own sections, so that unused symbols
2792 # can be removed at link time with --gc-sections.
2793 '-fdata-sections',
2794 '-ffunction-sections',
[email protected]3aacaf952009-04-02 15:34:092795 ],
[email protected]c902f2c2010-08-06 20:04:182796 'ldflags': [
2797 # Specifically tell the linker to perform optimizations.
2798 # See http://lwn.net/Articles/192624/ .
2799 '-Wl,-O1',
[email protected]27c2e492010-08-06 22:55:222800 '-Wl,--as-needed',
[email protected]c902f2c2010-08-06 20:04:182801 ],
[email protected]1dd529642010-05-15 01:02:512802 'conditions' : [
2803 ['no_gc_sections==0', {
2804 'ldflags': [
2805 '-Wl,--gc-sections',
2806 ],
2807 }],
[email protected]da1c8d692011-09-20 20:35:012808 ['OS=="android"', {
[email protected]48de0fc2012-08-02 11:03:582809 'variables': {
2810 'release_optimize%': 's',
2811 },
[email protected]da1c8d692011-09-20 20:35:012812 'cflags': [
2813 '-fomit-frame-pointer',
2814 ],
2815 }],
[email protected]ecf7b6482010-10-13 09:15:202816 ['clang==1', {
2817 'cflags!': [
2818 '-fno-ident',
2819 ],
2820 }],
[email protected]7664ab32011-02-01 23:35:252821 ['profiling==1', {
2822 'cflags': [
2823 '-fno-omit-frame-pointer',
2824 '-g',
2825 ],
2826 }],
[email protected]bdbe3d22013-02-22 04:10:352827 # Can be omitted to reduce output size. Does not seem to affect
2828 # crash reporting.
2829 ['target_arch=="ia32"', {
2830 'cflags': [
2831 '-fno-unwind-tables',
2832 '-fno-asynchronous-unwind-tables',
2833 ],
2834 }],
[email protected]8d726a42012-02-09 03:49:002835 ],
[email protected]3aacaf952009-04-02 15:34:092836 },
2837 },
[email protected]601b540222009-04-03 21:32:042838 'variants': {
2839 'coverage': {
2840 'cflags': ['-fprofile-arcs', '-ftest-coverage'],
2841 'ldflags': ['-fprofile-arcs'],
2842 },
2843 'profile': {
2844 'cflags': ['-pg', '-g'],
2845 'ldflags': ['-pg'],
2846 },
2847 'symbols': {
2848 'cflags': ['-g'],
2849 },
2850 },
[email protected]606116d22009-05-06 22:38:232851 'conditions': [
[email protected]04b482602011-09-14 02:36:212852 ['target_arch=="ia32"', {
2853 'target_conditions': [
2854 ['_toolset=="target"', {
2855 'asflags': [
2856 # Needed so that libs with .s files (e.g. libicudata.a)
2857 # are compatible with the general 32-bit-ness.
2858 '-32',
2859 ],
2860 # All floating-point computations on x87 happens in 80-bit
2861 # precision. Because the C and C++ language standards allow
2862 # the compiler to keep the floating-point values in higher
2863 # precision than what's specified in the source and doing so
2864 # is more efficient than constantly rounding up to 64-bit or
2865 # 32-bit precision as specified in the source, the compiler,
2866 # especially in the optimized mode, tries very hard to keep
2867 # values in x87 floating-point stack (in 80-bit precision)
2868 # as long as possible. This has important side effects, that
2869 # the real value used in computation may change depending on
2870 # how the compiler did the optimization - that is, the value
2871 # kept in 80-bit is different than the value rounded down to
2872 # 64-bit or 32-bit. There are possible compiler options to
2873 # make this behavior consistent (e.g. -ffloat-store would keep
2874 # all floating-values in the memory, thus force them to be
2875 # rounded to its original precision) but they have significant
2876 # runtime performance penalty.
2877 #
2878 # -mfpmath=sse -msse2 makes the compiler use SSE instructions
2879 # which keep floating-point values in SSE registers in its
2880 # native precision (32-bit for single precision, and 64-bit
2881 # for double precision values). This means the floating-point
2882 # value used during computation does not change depending on
2883 # how the compiler optimized the code, since the value is
2884 # always kept in its specified precision.
2885 'conditions': [
2886 ['branding=="Chromium" and disable_sse2==0', {
2887 'cflags': [
2888 '-march=pentium4',
2889 '-msse2',
2890 '-mfpmath=sse',
2891 ],
2892 }],
2893 # ChromeOS targets Pinetrail, which is sse3, but most of the
2894 # benefit comes from sse2 so this setting allows ChromeOS
2895 # to build on other CPUs. In the future -march=atom would
2896 # help but requires a newer compiler.
2897 ['chromeos==1 and disable_sse2==0', {
2898 'cflags': [
2899 '-msse2',
2900 ],
2901 }],
[email protected]0a0063c52013-03-29 06:36:212902 # Use gold linker for Android ia32 target.
2903 ['OS=="android"', {
2904 'cflags': [
2905 '-fuse-ld=gold',
2906 ],
2907 'ldflags': [
2908 '-fuse-ld=gold',
2909 ],
2910 }],
[email protected]04b482602011-09-14 02:36:212911 # Install packages have started cropping up with
2912 # different headers between the 32-bit and 64-bit
2913 # versions, so we have to shadow those differences off
2914 # and make sure a 32-bit-on-64-bit build picks up the
2915 # right files.
[email protected]32594022012-05-10 03:22:282916 # For android build, use NDK headers instead of host headers
2917 ['host_arch!="ia32" and OS!="android"', {
[email protected]04b482602011-09-14 02:36:212918 'include_dirs+': [
2919 '/usr/include32',
2920 ],
2921 }],
2922 ],
2923 # -mmmx allows mmintrin.h to be used for mmx intrinsics.
2924 # video playback is mmx and sse2 optimized.
[email protected]ffde7932009-05-29 00:39:062925 'cflags': [
[email protected]04b482602011-09-14 02:36:212926 '-m32',
2927 '-mmmx',
2928 ],
2929 'ldflags': [
2930 '-m32',
[email protected]ffde7932009-05-29 00:39:062931 ],
2932 }],
[email protected]606116d22009-05-06 22:38:232933 ],
2934 }],
[email protected]3dda8a962009-08-10 18:58:072935 ['target_arch=="arm"', {
[email protected]77c1b29392009-12-04 06:21:292936 'target_conditions': [
2937 ['_toolset=="target"', {
2938 'cflags_cc': [
2939 # The codesourcery arm-2009q3 toolchain warns at that the ABI
2940 # has changed whenever it encounters a varargs function. This
2941 # silences those warnings, as they are not helpful and
2942 # clutter legitimate warnings.
2943 '-Wno-abi',
2944 ],
2945 'conditions': [
[email protected]7d6763422013-04-26 12:06:542946 ['arm_arch!=""', {
2947 'cflags': [
2948 '-march=<(arm_arch)',
2949 ],
2950 }],
2951 ['arm_tune!=""', {
2952 'cflags': [
2953 '-mtune=<(arm_tune)',
2954 ],
2955 }],
2956 ['arm_fpu!=""', {
2957 'cflags': [
2958 '-mfpu=<(arm_fpu)',
2959 ],
2960 }],
2961 ['arm_float_abi!=""', {
2962 'cflags': [
2963 '-mfloat-abi=<(arm_float_abi)',
2964 ],
2965 }],
2966 ['arm_thumb==1', {
[email protected]77c1b29392009-12-04 06:21:292967 'cflags': [
2968 '-mthumb',
[email protected]77c1b29392009-12-04 06:21:292969 ]
2970 }],
[email protected]da1c8d692011-09-20 20:35:012971 ['OS=="android"', {
[email protected]7b1112c2012-03-16 22:03:532972 # Most of the following flags are derived from what Android
2973 # uses by default when building for arm, reference for which
2974 # can be found in the following file in the Android NDK:
2975 # toolchains/arm-linux-androideabi-4.4.3/setup.mk
2976 'cflags': [
2977 # The tree-sra optimization (scalar replacement for
2978 # aggregates enabling subsequent optimizations) leads to
2979 # invalid code generation when using the Android NDK's
2980 # compiler (r5-r7). This can be verified using
[email protected]b78f8f62013-04-24 01:35:432981 # webkit_unit_tests' WTF.Checked_int8_t test.
[email protected]7b1112c2012-03-16 22:03:532982 '-fno-tree-sra',
[email protected]9cc13e42012-08-20 20:09:482983 '-fuse-ld=gold',
[email protected]7b1112c2012-03-16 22:03:532984 '-Wno-psabi',
2985 ],
[email protected]ad17e342012-07-17 20:45:482986 # Android now supports .relro sections properly.
2987 # NOTE: While these flags enable the generation of .relro
2988 # sections, the generated libraries can still be loaded on
2989 # older Android platform versions.
2990 'ldflags': [
2991 '-Wl,-z,relro',
2992 '-Wl,-z,now',
[email protected]9cc13e42012-08-20 20:09:482993 '-fuse-ld=gold',
[email protected]ad17e342012-07-17 20:45:482994 ],
[email protected]da1c8d692011-09-20 20:35:012995 'conditions': [
[email protected]7d6763422013-04-26 12:06:542996 ['arm_thumb==1', {
[email protected]94cdbf42012-12-11 19:49:222997 'cflags': [ '-mthumb-interwork' ],
[email protected]da1c8d692011-09-20 20:35:012998 }],
[email protected]4c48ef102012-11-29 22:00:382999 ['profiling==1', {
3000 'cflags': [
3001 '-marm', # Probably reduntant, but recommend by "perf" docs.
3002 '-mapcs-frame', # Seems required by -fno-omit-frame-pointer.
3003 ],
3004 }],
[email protected]220ea5932012-08-09 10:44:073005 ['clang==1', {
3006 'cflags!': [
3007 # Clang does not support the following options.
3008 '-mthumb-interwork',
3009 '-finline-limit=64',
3010 '-fno-tree-sra',
[email protected]9cc13e42012-08-20 20:09:483011 '-fuse-ld=gold',
[email protected]220ea5932012-08-09 10:44:073012 '-Wno-psabi',
3013 ],
3014 }],
[email protected]da1c8d692011-09-20 20:35:013015 ],
3016 }],
[email protected]3dda8a962009-08-10 18:58:073017 ],
3018 }],
3019 ],
3020 }],
[email protected]23eea4a42013-04-27 04:10:263021 ['target_arch=="mipsel"', {
3022 'target_conditions': [
3023 ['_toolset=="target"', {
3024 'conditions': [
3025 ['mips_arch_variant=="mips32r2"', {
3026 'cflags': ['-mips32r2', '-Wa,-mips32r2'],
3027 }, {
3028 'cflags': ['-mips32', '-Wa,-mips32'],
3029 }],
3030 ],
3031 'cflags': [
3032 '-EL',
3033 '-mhard-float',
3034 ],
3035 'ldflags': [
3036 '-EL',
3037 '-Wl,--no-keep-memory'
3038 ],
3039 'cflags_cc': [
3040 '-Wno-uninitialized',
3041 ],
3042 }],
3043 ],
3044 }],
[email protected]2fb843b2010-08-12 02:11:083045 ['linux_fpic==1', {
[email protected]c76723a2010-01-25 23:10:583046 'cflags': [
3047 '-fPIC',
3048 ],
[email protected]d3f692b32011-12-14 19:04:353049 'ldflags': [
3050 '-fPIC',
3051 ],
[email protected]c76723a2010-01-25 23:10:583052 }],
[email protected]ee28c9f2009-09-04 01:53:013053 ['sysroot!=""', {
[email protected]fd36ce822009-10-28 20:13:573054 'target_conditions': [
3055 ['_toolset=="target"', {
3056 'cflags': [
3057 '--sysroot=<(sysroot)',
3058 ],
3059 'ldflags': [
3060 '--sysroot=<(sysroot)',
[email protected]a7e10b9a2013-03-22 05:26:153061 '<!(<(DEPTH)/build/linux/sysroot_ld_path.sh <(sysroot))',
[email protected]fd36ce822009-10-28 20:13:573062 ],
3063 }]]
[email protected]ee28c9f2009-09-04 01:53:013064 }],
[email protected]58680ce2010-09-18 00:09:153065 ['clang==1', {
[email protected]18ca15a2011-08-10 03:07:123066 'cflags': [
3067 '-Wheader-hygiene',
[email protected]8dec02e2013-04-30 21:40:073068
[email protected]7ddcb1d2013-04-19 04:52:533069 # Don't die on dtoa code that uses a char as an array index.
3070 '-Wno-char-subscripts',
[email protected]8dec02e2013-04-30 21:40:073071
3072 # Clang spots more unused functions.
3073 '-Wno-unused-function',
[email protected]9242c7642012-01-29 09:02:103074
3075 # Warns on switches on enums that cover all enum values but
3076 # also contain a default: branch. Chrome is full of that.
3077 '-Wno-covered-switch-default',
[email protected]e6844cb2013-02-22 03:37:513078
3079 # Warns when a const char[] is converted to bool.
3080 '-Wstring-conversion',
[email protected]18ca15a2011-08-10 03:07:123081 ],
3082 'cflags!': [
3083 # Clang doesn't seem to know know this flag.
3084 '-mfpmath=sse',
3085 ],
[email protected]58680ce2010-09-18 00:09:153086 }],
[email protected]bca3e082013-05-30 21:13:443087 ['clang==1 and OS!="android"', {
[email protected]8dec02e2013-04-30 21:40:073088 # Turn on C++11.
3089 'cflags': [
3090 # This warns on using ints as initializers for floats in
3091 # initializer lists (e.g. |int a = f(); CGSize s = { a, a };|),
3092 # which happens in several places in chrome code. Not sure if
3093 # this is worth fixing.
3094 '-Wno-c++11-narrowing',
3095
3096 # This warns about code like |"0x%08"NACL_PRIxPTR| -- with C++11
3097 # user-defined literals, this is now a string literal with a UD
3098 # suffix. However, this is used heavily in NaCl code, so disable
3099 # the warning for now.
3100 '-Wno-reserved-user-defined-literal',
3101 ],
3102 'cflags_cc': [
3103 # See the comment in the Mac section for what it takes to move
3104 # this to -std=c++11.
3105 '-std=gnu++11',
3106 ],
3107 }],
[email protected]bca3e082013-05-30 21:13:443108 ['clang==1 and OS=="android"', {
[email protected]8dec02e2013-04-30 21:40:073109 # Android uses gcc4.4, and clang isn't compatible with gcc4.4's
3110 # libstdc++ in C++11 mode. So no C++11 mode for Android yet.
3111 # Doesn't work with asan for some reason either: crbug.com/233464
3112 'cflags': [
[email protected]296bc452013-05-13 21:29:473113 # Especially needed for gtest macros using enum values from Mac
3114 # system headers.
3115 # TODO(pkasting): In C++11 this is legal, so this should be
3116 # removed when we change to that. (This is also why we don't
3117 # bother fixing all these cases today.)
3118 '-Wno-unnamed-type-template-args',
3119 # This (rightfully) complains about 'override', which we use
3120 # heavily.
[email protected]8dec02e2013-04-30 21:40:073121 '-Wno-c++11-extensions',
3122 ],
3123 }],
[email protected]5d451ad2011-02-11 16:43:463124 ['clang==1 and clang_use_chrome_plugins==1', {
[email protected]d23720682011-08-11 00:16:263125 'cflags': [
[email protected]c872dc52012-05-19 06:36:313126 '<@(clang_chrome_plugins_flags)',
[email protected]d23720682011-08-11 00:16:263127 ],
[email protected]5d451ad2011-02-11 16:43:463128 }],
[email protected]4a9ac22e2011-12-02 03:41:533129 ['clang==1 and clang_load!=""', {
[email protected]d23720682011-08-11 00:16:263130 'cflags': [
3131 '-Xclang', '-load', '-Xclang', '<(clang_load)',
[email protected]4a9ac22e2011-12-02 03:41:533132 ],
3133 }],
3134 ['clang==1 and clang_add_plugin!=""', {
3135 'cflags': [
[email protected]d23720682011-08-11 00:16:263136 '-Xclang', '-add-plugin', '-Xclang', '<(clang_add_plugin)',
3137 ],
[email protected]5e781232011-01-28 02:57:593138 }],
[email protected]49110f02013-04-22 22:51:343139 ['clang==1 and target_arch=="ia32"', {
3140 'cflags': [
3141 # Else building libyuv gives clang's register allocator issues,
3142 # see llvm.org/PR15798 / crbug.com/233709
3143 '-momit-leaf-frame-pointer',
3144 ],
3145 }],
[email protected]2616d45d2012-01-19 03:15:483146 ['clang==1 and "<(GENERATOR)"=="ninja"', {
3147 'cflags': [
3148 # See http://crbug.com/110262
3149 '-fcolor-diagnostics',
3150 ],
3151 }],
[email protected]062522a2013-06-13 15:49:553152 # Common options for AddressSanitizer, LeakSanitizer,
3153 # ThreadSanitizer and MemorySanitizer.
3154 ['asan==1 or lsan==1 or tsan==1 or msan==1', {
[email protected]cf351c22013-04-19 13:00:543155 'target_conditions': [
3156 ['_toolset=="target"', {
3157 'cflags': [
3158 '-fno-omit-frame-pointer',
3159 '-gline-tables-only',
3160 ],
[email protected]49110f02013-04-22 22:51:343161 'ldflags!': [
3162 # Functions interposed by the sanitizers can make ld think
3163 # that some libraries aren't needed when they actually are,
3164 # http://crbug.com/234010. As workaround, disable --as-needed.
3165 '-Wl,--as-needed',
3166 ],
[email protected]2f047202013-06-14 06:36:393167 'defines': [
3168 'MEMORY_TOOL_REPLACES_ALLOCATOR',
3169 ],
[email protected]cf351c22013-04-19 13:00:543170 }],
[email protected]a26740dd2013-05-28 11:50:493171 ['_toolset=="target" and OS=="linux"', {
3172 'ldflags': [
3173 # http://crbug.com/234010.
3174 '-lrt',
3175 ],
3176 }],
[email protected]cf351c22013-04-19 13:00:543177 ],
3178 }],
[email protected]92799b632011-08-15 14:33:063179 ['asan==1', {
[email protected]1ffc3b3962012-05-16 14:08:423180 'target_conditions': [
3181 ['_toolset=="target"', {
[email protected]cb770a4c2012-07-25 20:06:453182 'cflags': [
[email protected]48688df02012-11-27 21:04:563183 '-fsanitize=address',
[email protected]48688df02012-11-27 21:04:563184 '-w', # http://crbug.com/162783
[email protected]cb770a4c2012-07-25 20:06:453185 ],
3186 'ldflags': [
[email protected]48688df02012-11-27 21:04:563187 '-fsanitize=address',
[email protected]cb770a4c2012-07-25 20:06:453188 ],
3189 'defines': [
3190 'ADDRESS_SANITIZER',
3191 ],
[email protected]1ffc3b3962012-05-16 14:08:423192 }],
[email protected]921c7b52011-11-25 10:34:353193 ],
[email protected]1d3bc322013-04-12 14:26:373194 'conditions': [
3195 ['OS=="mac"', {
3196 'cflags': [
3197 '-mllvm -asan-globals=0', # http://crbug.com/196561
3198 ],
3199 }],
3200 ],
[email protected]92799b632011-08-15 14:33:063201 }],
[email protected]062522a2013-06-13 15:49:553202 ['lsan==1', {
3203 'target_conditions': [
3204 ['_toolset=="target"', {
3205 'cflags': [
3206 '-fsanitize=leak',
3207 ],
3208 'ldflags': [
3209 '-fsanitize=leak',
3210 ],
3211 'defines': [
3212 'LEAK_SANITIZER',
3213 ],
3214 }],
3215 ],
3216 }],
[email protected]c9a829272012-07-04 07:51:123217 ['tsan==1', {
3218 'target_conditions': [
3219 ['_toolset=="target"', {
[email protected]cb770a4c2012-07-25 20:06:453220 'cflags': [
[email protected]927a9d672012-11-09 11:28:203221 '-fsanitize=thread',
[email protected]9d46a572013-01-23 10:38:293222 '-fPIC',
[email protected]927a9d672012-11-09 11:28:203223 '-mllvm', '-tsan-blacklist=<(tsan_blacklist)',
[email protected]cb770a4c2012-07-25 20:06:453224 ],
3225 'ldflags': [
[email protected]927a9d672012-11-09 11:28:203226 '-fsanitize=thread',
[email protected]cb770a4c2012-07-25 20:06:453227 ],
3228 'defines': [
3229 'THREAD_SANITIZER',
3230 'DYNAMIC_ANNOTATIONS_EXTERNAL_IMPL=1',
[email protected]7bdd7d7c2012-11-01 10:36:163231 'WTF_USE_DYNAMIC_ANNOTATIONS_NOIMPL=1',
[email protected]cb770a4c2012-07-25 20:06:453232 ],
3233 'target_conditions': [
3234 ['_type=="executable"', {
3235 'ldflags': [
[email protected]c9a829272012-07-04 07:51:123236 '-pie',
[email protected]cb770a4c2012-07-25 20:06:453237 ],
3238 }],
3239 ],
[email protected]c9a829272012-07-04 07:51:123240 }],
3241 ],
3242 }],
[email protected]a10ddd2d2013-02-26 20:06:593243 ['msan==1', {
3244 'target_conditions': [
3245 ['_toolset=="target"', {
3246 'cflags': [
3247 '-fsanitize=memory',
3248 '-fsanitize-memory-track-origins',
[email protected]a10ddd2d2013-02-26 20:06:593249 '-fPIC',
3250 ],
3251 'ldflags': [
3252 '-fsanitize=memory',
3253 ],
3254 'defines': [
3255 'MEMORY_SANITIZER',
3256 ],
3257 'target_conditions': [
3258 ['_type=="executable"', {
3259 'ldflags': [
3260 '-pie',
3261 ],
3262 }],
3263 ],
3264 }],
3265 ],
3266 }],
[email protected]8a48f3f2012-12-04 20:14:043267 ['order_profiling!=0 and (chromeos==1 or OS=="linux" or OS=="android")', {
[email protected]8a6abd12012-05-16 10:04:443268 'target_conditions' : [
3269 ['_toolset=="target"', {
3270 'cflags': [
3271 '-finstrument-functions',
[email protected]c2a8d2e2012-10-05 09:31:453272 # Allow mmx intrinsics to inline, so that the
3273 # compiler can expand the intrinsics.
3274 '-finstrument-functions-exclude-file-list=mmintrin.h',
[email protected]8a6abd12012-05-16 10:04:443275 ],
3276 }],
3277 ],
3278 }],
[email protected]cbd5fd52009-08-26 00:14:273279 ['linux_breakpad==1', {
[email protected]cbd5fd52009-08-26 00:14:273280 'defines': ['USE_LINUX_BREAKPAD'],
[email protected]ce4367d2013-01-15 16:13:103281 }],
3282 ['linux_dump_symbols==1', {
3283 'cflags': [ '-g' ],
[email protected]c50c8d72012-11-15 00:29:253284 'conditions': [
[email protected]791262fe2013-02-21 17:20:153285 ['target_arch=="ia32" and OS!="android"', {
[email protected]c50c8d72012-11-15 00:29:253286 'target_conditions': [
3287 ['_toolset=="target"', {
3288 'ldflags': [
[email protected]567370a32013-03-01 00:11:233289 # Workaround for linker OOM.
3290 '-Wl,--no-keep-memory',
[email protected]c50c8d72012-11-15 00:29:253291 ],
3292 }],
3293 ],
3294 }],
3295 ],
[email protected]cbd5fd52009-08-26 00:14:273296 }],
[email protected]d8b60602010-03-26 09:41:223297 ['linux_use_heapchecker==1', {
3298 'variables': {'linux_use_tcmalloc%': 1},
[email protected]2f047202013-06-14 06:36:393299 'defines': [
3300 'USE_HEAPCHECKER'
3301 'MEMORY_TOOL_REPLACES_ALLOCATOR',
3302 ],
[email protected]272ef0b2013-05-14 12:32:453303 'conditions': [
3304 ['component=="shared_library"', {
3305 # See crbug.com/112389
3306 # TODO(glider): replace with --dynamic-list or something
3307 'ldflags': ['-rdynamic'],
3308 }],
3309 ],
[email protected]d8b60602010-03-26 09:41:223310 }],
[email protected]3c8fe5482013-05-22 15:17:033311 ['linux_use_tcmalloc==0 and android_use_tcmalloc==0', {
[email protected]61a9b2d82010-02-26 00:31:083312 'defines': ['NO_TCMALLOC'],
[email protected]01699e22009-11-11 19:24:243313 }],
[email protected]64e2d4a42010-08-27 10:13:213314 ['linux_keep_shadow_stacks==1', {
3315 'defines': ['KEEP_SHADOW_STACKS'],
[email protected]987a7422012-02-23 19:10:513316 'cflags': [
3317 '-finstrument-functions',
3318 # Allow mmx intrinsics to inline, so that the compiler can expand
3319 # the intrinsics.
3320 '-finstrument-functions-exclude-file-list=mmintrin.h',
3321 ],
[email protected]64e2d4a42010-08-27 10:13:213322 }],
[email protected]8d726a42012-02-09 03:49:003323 ['linux_use_gold_flags==1', {
[email protected]68d01e82012-12-08 03:36:323324 'ldflags': [
3325 # Experimentation found that using four linking threads
3326 # saved ~20% of link time.
3327 # https://groups.google.com/a/chromium.org/group/chromium-dev/browse_thread/thread/281527606915bb36
3328 '-Wl,--threads',
3329 '-Wl,--thread-count=4',
3330 ],
[email protected]8d726a42012-02-09 03:49:003331 'conditions': [
3332 ['release_valgrind_build==0', {
3333 'target_conditions': [
3334 ['_toolset=="target"', {
3335 'ldflags': [
3336 # There seems to be a conflict of --icf and -pie
3337 # in gold which can generate crashy binaries. As
3338 # a security measure, -pie takes precendence for
3339 # now.
3340 #'-Wl,--icf=safe',
3341 '-Wl,--icf=none',
3342 ],
3343 }],
3344 ],
3345 }],
3346 ],
3347 }],
[email protected]b07806c12012-02-03 22:44:593348 ['linux_use_gold_binary==1', {
[email protected]b07806c12012-02-03 22:44:593349 'ldflags': [
3350 # Put our gold binary in the search path for the linker.
[email protected]0dc310a32013-05-08 23:52:443351 # We pass the path to gold to the compiler. gyp leaves
3352 # unspecified what the cwd is when running the compiler,
3353 # so the normal gyp path-munging fails us. This hack
3354 # gets the right path.
3355 '-B<(PRODUCT_DIR)/../../third_party/gold',
[email protected]b07806c12012-02-03 22:44:593356 ],
3357 }],
[email protected]606116d22009-05-06 22:38:233358 ],
[email protected]9d384032009-03-20 23:13:263359 },
3360 }],
[email protected]c51e8d52009-12-11 20:04:063361 # FreeBSD-specific options; note that most FreeBSD options are set above,
3362 # with Linux.
3363 ['OS=="freebsd"', {
3364 'target_defaults': {
3365 'ldflags': [
3366 '-Wl,--no-keep-memory',
3367 ],
3368 },
3369 }],
[email protected]da1c8d692011-09-20 20:35:013370 # Android-specific options; note that most are set above with Linux.
3371 ['OS=="android"', {
3372 'variables': {
[email protected]25036722012-12-11 10:36:173373 # This is a unique identifier for a given build. It's used for
3374 # identifying various build artifacts corresponding to a particular
3375 # build of chrome (e.g. where to find archived symbols).
3376 'chrome_build_id%': '',
[email protected]da1c8d692011-09-20 20:35:013377 'conditions': [
[email protected]da1c8d692011-09-20 20:35:013378 # Use shared stlport library when system one used.
3379 # Figure this out early since it needs symbols from libgcc.a, so it
3380 # has to be before that in the set of libraries.
3381 ['use_system_stlport==1', {
3382 'android_stlport_library': 'stlport',
3383 }, {
[email protected]806b5232012-11-19 21:19:043384 'conditions': [
3385 ['component=="shared_library"', {
3386 'android_stlport_library': 'stlport_shared',
3387 }, {
3388 'android_stlport_library': 'stlport_static',
3389 }],
3390 ],
[email protected]da1c8d692011-09-20 20:35:013391 }],
3392 ],
3393
3394 # Placing this variable here prevents from forking libvpx, used
3395 # by remoting. Remoting is off, so it needn't built,
3396 # so forking it's deps seems like overkill.
3397 # But this variable need defined to properly run gyp.
3398 # A proper solution is to have an OS==android conditional
3399 # in third_party/libvpx/libvpx.gyp to define it.
3400 'libvpx_path': 'lib/linux/arm',
3401 },
3402 'target_defaults': {
[email protected]da1c8d692011-09-20 20:35:013403 'variables': {
3404 'release_extra_cflags%': '',
[email protected]e4865252013-04-04 09:15:593405 'conditions': [
3406 # If we're using the components build, append "cr" to all shared
3407 # libraries to avoid naming collisions with android system library
3408 # versions with the same name (e.g. skia, icu).
3409 ['component=="shared_library"', {
3410 'android_product_extension': 'cr.so',
3411 }, {
3412 'android_product_extension': 'so',
3413 } ],
3414 ],
[email protected]8a37e4502012-08-14 22:42:553415 },
[email protected]da1c8d692011-09-20 20:35:013416 'target_conditions': [
[email protected]e4865252013-04-04 09:15:593417 ['_type=="shared_library"', {
3418 'product_extension': '<(android_product_extension)',
3419 }],
3420
[email protected]da1c8d692011-09-20 20:35:013421 # Settings for building device targets using Android's toolchain.
3422 # These are based on the setup.mk file from the Android NDK.
3423 #
3424 # The NDK Android executable link step looks as follows:
3425 # $LDFLAGS
3426 # $(TARGET_CRTBEGIN_DYNAMIC_O) <-- crtbegin.o
3427 # $(PRIVATE_OBJECTS) <-- The .o that we built
3428 # $(PRIVATE_STATIC_LIBRARIES) <-- The .a that we built
3429 # $(TARGET_LIBGCC) <-- libgcc.a
3430 # $(PRIVATE_SHARED_LIBRARIES) <-- The .so that we built
3431 # $(PRIVATE_LDLIBS) <-- System .so
3432 # $(TARGET_CRTEND_O) <-- crtend.o
3433 #
3434 # For now the above are approximated for executables by adding
3435 # crtbegin.o to the end of the ldflags and 'crtend.o' to the end
3436 # of 'libraries'.
3437 #
3438 # The NDK Android shared library link step looks as follows:
3439 # $LDFLAGS
3440 # $(PRIVATE_OBJECTS) <-- The .o that we built
3441 # -l,--whole-archive
3442 # $(PRIVATE_WHOLE_STATIC_LIBRARIES)
3443 # -l,--no-whole-archive
3444 # $(PRIVATE_STATIC_LIBRARIES) <-- The .a that we built
3445 # $(TARGET_LIBGCC) <-- libgcc.a
3446 # $(PRIVATE_SHARED_LIBRARIES) <-- The .so that we built
3447 # $(PRIVATE_LDLIBS) <-- System .so
3448 #
[email protected]ad17e342012-07-17 20:45:483449 # For now, assume that whole static libraries are not needed.
[email protected]da1c8d692011-09-20 20:35:013450 #
3451 # For both executables and shared libraries, add the proper
3452 # libgcc.a to the start of libraries which puts it in the
3453 # proper spot after .o and .a files get linked in.
3454 #
3455 # TODO: The proper thing to do longer-tem would be proper gyp
3456 # support for a custom link command line.
3457 ['_toolset=="target"', {
3458 'cflags!': [
3459 '-pthread', # Not supported by Android toolchain.
3460 ],
3461 'cflags': [
[email protected]da1c8d692011-09-20 20:35:013462 '-ffunction-sections',
3463 '-funwind-tables',
3464 '-g',
3465 '-fstack-protector',
3466 '-fno-short-enums',
3467 '-finline-limit=64',
3468 '-Wa,--noexecstack',
[email protected]da1c8d692011-09-20 20:35:013469 '<@(release_extra_cflags)',
[email protected]da1c8d692011-09-20 20:35:013470 ],
3471 'defines': [
3472 'ANDROID',
3473 '__GNU_SOURCE=1', # Necessary for clone()
3474 'USE_STLPORT=1',
3475 '_STLP_USE_PTR_SPECIALIZATIONS=1',
[email protected]25036722012-12-11 10:36:173476 'CHROME_BUILD_ID="<(chrome_build_id)"',
[email protected]da1c8d692011-09-20 20:35:013477 ],
3478 'ldflags!': [
3479 '-pthread', # Not supported by Android toolchain.
3480 ],
3481 'ldflags': [
3482 '-nostdlib',
3483 '-Wl,--no-undefined',
[email protected]da1c8d692011-09-20 20:35:013484 # Don't export symbols from statically linked libraries.
3485 '-Wl,--exclude-libs=ALL',
3486 ],
[email protected]a0e48b02011-11-22 07:53:013487 'libraries': [
3488 '-l<(android_stlport_library)',
3489 # Manually link the libgcc.a that the cross compiler uses.
[email protected]c0f76312012-08-16 13:52:043490 '<!(<(android_toolchain)/*-gcc -print-libgcc-file-name)',
[email protected]a0e48b02011-11-22 07:53:013491 '-lc',
3492 '-ldl',
3493 '-lstdc++',
3494 '-lm',
[email protected]da1c8d692011-09-20 20:35:013495 ],
3496 'conditions': [
[email protected]806b5232012-11-19 21:19:043497 ['component=="shared_library"', {
[email protected]4d6f9d7db2012-11-21 16:27:473498 'ldflags!': [
3499 '-Wl,--exclude-libs=ALL',
3500 ],
[email protected]806b5232012-11-19 21:19:043501 }],
[email protected]220ea5932012-08-09 10:44:073502 ['clang==1', {
3503 'cflags': [
3504 # Work around incompatibilities between bionic and clang
3505 # headers.
3506 '-D__compiler_offsetof=__builtin_offsetof',
3507 '-Dnan=__builtin_nan',
3508 ],
3509 'conditions': [
3510 ['target_arch=="arm"', {
3511 'cflags': [
3512 '-target arm-linux-androideabi',
3513 '-mllvm -arm-enable-ehabi',
3514 ],
3515 'ldflags': [
3516 '-target arm-linux-androideabi',
3517 ],
3518 }],
3519 ['target_arch=="ia32"', {
3520 'cflags': [
3521 '-target x86-linux-androideabi',
3522 ],
3523 'ldflags': [
3524 '-target x86-linux-androideabi',
3525 ],
3526 }],
3527 ],
3528 }],
[email protected]ed70ed1862012-11-07 12:11:253529 ['asan==1', {
3530 'cflags': [
3531 # Android build relies on -Wl,--gc-sections removing
3532 # unreachable code. ASan instrumentation for globals inhibits
3533 # this and results in a library with unresolvable relocations.
3534 # TODO(eugenis): find a way to reenable this.
3535 '-mllvm -asan-globals=0',
3536 ],
3537 }],
[email protected]d999c3cb2013-03-12 10:22:363538 ['android_webview_build==0', {
[email protected]34baed112012-06-27 16:10:463539 'defines': [
[email protected]f5c7758a2012-07-25 16:17:573540 # The NDK has these things, but doesn't define the constants
3541 # to say that it does. Define them here instead.
3542 'HAVE_SYS_UIO_H',
3543 ],
3544 'cflags': [
3545 '--sysroot=<(android_ndk_sysroot)',
[email protected]34baed112012-06-27 16:10:463546 ],
[email protected]da1c8d692011-09-20 20:35:013547 'ldflags': [
[email protected]5baf7482011-12-13 16:00:523548 '--sysroot=<(android_ndk_sysroot)',
[email protected]da1c8d692011-09-20 20:35:013549 ],
3550 }],
[email protected]d999c3cb2013-03-12 10:22:363551 ['android_webview_build==1', {
[email protected]0d7291e2012-10-04 19:16:083552 'include_dirs': [
3553 # OpenAL headers from the Android tree.
3554 '<(android_src)/frameworks/wilhelm/include',
3555 ],
3556 'cflags': [
[email protected]04882132012-11-21 12:40:453557 # Android predefines this as 1; undefine it here so Chromium
3558 # can redefine it later to be 2 for chromium code and unset
3559 # for third party code. This works because cflags are added
3560 # before defines.
3561 '-U_FORTIFY_SOURCE',
[email protected]53f93c92013-01-04 00:48:553562 # Disable any additional warnings enabled by the Android build system but which
3563 # chromium does not build cleanly with (when treating warning as errors).
[email protected]0d7291e2012-10-04 19:16:083564 # Things that are part of -Wextra:
[email protected]53f93c92013-01-04 00:48:553565 '-Wno-extra', # Enabled by -Wextra, but no specific flag
3566 '-Wno-ignored-qualifiers',
3567 '-Wno-type-limits',
[email protected]0d7291e2012-10-04 19:16:083568 ],
3569 'cflags_cc': [
3570 # Disabling c++0x-compat should be handled in WebKit, but
3571 # this currently doesn't work because gcc_version is not set
3572 # correctly when building with the Android build system.
3573 # TODO(torne): Fix this in WebKit.
3574 '-Wno-error=c++0x-compat',
[email protected]2f34a202013-03-11 13:59:163575 # Other things unrelated to -Wextra:
3576 '-Wno-non-virtual-dtor',
3577 '-Wno-sign-promo',
[email protected]0d7291e2012-10-04 19:16:083578 ],
3579 }],
[email protected]d999c3cb2013-03-12 10:22:363580 ['android_webview_build==1 and chromium_code==0', {
[email protected]0d7291e2012-10-04 19:16:083581 'cflags': [
3582 # There is a class of warning which:
3583 # 1) Android always enables and also treats as errors
3584 # 2) Chromium ignores in third party code
[email protected]2f34a202013-03-11 13:59:163585 # So we re-enable those warnings when building Android.
[email protected]53f93c92013-01-04 00:48:553586 '-Wno-address',
3587 '-Wno-format-security',
[email protected]53f93c92013-01-04 00:48:553588 '-Wno-return-type',
3589 '-Wno-sequence-point',
[email protected]0d7291e2012-10-04 19:16:083590 ],
[email protected]2f34a202013-03-11 13:59:163591 'cflags_cc': [
3592 '-Wno-non-virtual-dtor',
3593 ]
[email protected]0d7291e2012-10-04 19:16:083594 }],
[email protected]febd3572012-05-03 09:17:453595 ['target_arch == "arm"', {
3596 'ldflags': [
3597 # Enable identical code folding to reduce size.
3598 '-Wl,--icf=safe',
3599 ],
3600 }],
[email protected]da1c8d692011-09-20 20:35:013601 # NOTE: The stlport header include paths below are specified in
3602 # cflags rather than include_dirs because they need to come
3603 # after include_dirs. Think of them like system headers, but
3604 # don't use '-isystem' because the arm-linux-androideabi-4.4.3
3605 # toolchain (circa Gingerbread) will exhibit strange errors.
3606 # The include ordering here is important; change with caution.
[email protected]f91ba812012-07-11 00:00:513607 ['use_system_stlport==1', {
3608 'cflags': [
3609 # For libstdc++/include, which is used by stlport.
3610 '-I<(android_src)/bionic',
3611 '-I<(android_src)/external/stlport/stlport',
3612 ],
3613 }, { # else: use_system_stlport!=1
[email protected]da1c8d692011-09-20 20:35:013614 'cflags': [
[email protected]225ec632013-04-03 18:20:223615 '-I<(android_stlport_include)',
[email protected]da1c8d692011-09-20 20:35:013616 ],
[email protected]225ec632013-04-03 18:20:223617 'ldflags': [
3618 '-L<(android_stlport_libs_dir)',
[email protected]da1c8d692011-09-20 20:35:013619 ],
3620 }],
3621 ['target_arch=="ia32"', {
3622 # The x86 toolchain currently has problems with stack-protector.
3623 'cflags!': [
3624 '-fstack-protector',
3625 ],
3626 'cflags': [
3627 '-fno-stack-protector',
3628 ],
3629 }],
3630 ],
3631 'target_conditions': [
3632 ['_type=="executable"', {
3633 'ldflags': [
3634 '-Bdynamic',
3635 '-Wl,-dynamic-linker,/system/bin/linker',
3636 '-Wl,--gc-sections',
3637 '-Wl,-z,nocopyreloc',
3638 # crtbegin_dynamic.o should be the last item in ldflags.
3639 '<(android_ndk_lib)/crtbegin_dynamic.o',
3640 ],
3641 'libraries': [
3642 # crtend_android.o needs to be the last item in libraries.
3643 # Do not add any libraries after this!
3644 '<(android_ndk_lib)/crtend_android.o',
3645 ],
[email protected]63a131fd2012-11-06 16:01:213646 'conditions': [
3647 ['asan==1', {
3648 'cflags': [
3649 '-fPIE',
3650 ],
3651 'ldflags': [
3652 '-pie',
3653 ],
3654 }],
3655 ],
[email protected]da1c8d692011-09-20 20:35:013656 }],
[email protected]f5c7758a2012-07-25 16:17:573657 ['_type=="shared_library" or _type=="loadable_module"', {
[email protected]da1c8d692011-09-20 20:35:013658 'ldflags': [
3659 '-Wl,-shared,-Bsymbolic',
3660 ],
[email protected]d093fe8b2013-04-30 18:00:233661 'conditions': [
3662 ['android_webview_build==0', {
3663 'ldflags': [
3664 # crtbegin_so.o should be the last item in ldflags.
3665 '<(android_ndk_lib)/crtbegin_so.o',
3666 ],
3667 'libraries': [
3668 # crtend_so.o needs to be the last item in libraries.
3669 # Do not add any libraries after this!
3670 '<(android_ndk_lib)/crtend_so.o',
3671 ],
3672 }],
[email protected]a08029b42012-04-25 03:18:463673 ],
[email protected]da1c8d692011-09-20 20:35:013674 }],
[email protected]7b1eac42013-05-09 20:55:133675 # ndk-build copies .a's around the filesystem, breaking
3676 # relative paths in thin archives. Disable using thin
3677 # archives to avoid problems until one of these is fixed:
3678 # http://code.google.com/p/android/issues/detail?id=40302
3679 # http://code.google.com/p/android/issues/detail?id=40303
3680 ['_type=="static_library"', {
3681 'standalone_static_library': 1,
3682 }],
[email protected]da1c8d692011-09-20 20:35:013683 ],
3684 }],
3685 # Settings for building host targets using the system toolchain.
3686 ['_toolset=="host"', {
[email protected]3984aaf2012-02-16 11:42:123687 'cflags!': [
3688 # Due to issues in Clang build system, using ASan on 32-bit
3689 # binaries on x86_64 host is problematic.
3690 # TODO(eugenis): re-enable.
[email protected]48688df02012-11-27 21:04:563691 '-fsanitize=address',
3692 '-w', # http://crbug.com/162783
[email protected]3984aaf2012-02-16 11:42:123693 ],
[email protected]da1c8d692011-09-20 20:35:013694 'ldflags!': [
[email protected]2e82fa52012-11-27 23:41:443695 '-fsanitize=address',
[email protected]da1c8d692011-09-20 20:35:013696 '-Wl,-z,noexecstack',
3697 '-Wl,--gc-sections',
3698 '-Wl,-O1',
3699 '-Wl,--as-needed',
3700 ],
[email protected]965b6b22011-09-29 16:07:283701 'sources/': [
3702 ['exclude', '_android(_unittest)?\\.cc$'],
3703 ['exclude', '(^|/)android/']
3704 ],
[email protected]da1c8d692011-09-20 20:35:013705 }],
[email protected]0ccf578f2013-03-13 11:13:393706 # Settings for building host targets on mac.
3707 ['_toolset=="host" and host_os=="mac"', {
3708 'ldflags!': [
3709 '-Wl,-z,now',
3710 '-Wl,-z,relro',
3711 ],
3712 }],
[email protected]da1c8d692011-09-20 20:35:013713 ],
3714 },
3715 }],
[email protected]93f21e42010-04-01 00:35:153716 ['OS=="solaris"', {
3717 'cflags!': ['-fvisibility=hidden'],
3718 'cflags_cc!': ['-fvisibility-inlines-hidden'],
3719 }],
[email protected]1e013672012-06-29 22:12:203720 ['OS=="mac" or OS=="ios"', {
[email protected]2f80c312009-02-25 21:26:553721 'target_defaults': {
[email protected]d92c7c012009-03-19 19:26:423722 'mac_bundle': 0,
[email protected]2f80c312009-02-25 21:26:553723 'xcode_settings': {
3724 'ALWAYS_SEARCH_USER_PATHS': 'NO',
[email protected]2429bb732012-10-19 00:24:243725 # Don't link in libarclite_macosx.a, see http://crbug.com/156530.
3726 'CLANG_LINK_OBJC_RUNTIME': 'NO', # -fno-objc-link-runtime
[email protected]ab2956372009-08-13 18:11:043727 'GCC_C_LANGUAGE_STANDARD': 'c99', # -std=c99
3728 'GCC_CW_ASM_SYNTAX': 'NO', # No -fasm-blocks
[email protected]ab2956372009-08-13 18:11:043729 'GCC_ENABLE_CPP_EXCEPTIONS': 'NO', # -fno-exceptions
3730 'GCC_ENABLE_CPP_RTTI': 'NO', # -fno-rtti
3731 'GCC_ENABLE_PASCAL_STRINGS': 'NO', # No -mpascal-strings
[email protected]3224dcd2009-09-16 17:31:253732 # GCC_INLINES_ARE_PRIVATE_EXTERN maps to -fvisibility-inlines-hidden
3733 'GCC_INLINES_ARE_PRIVATE_EXTERN': 'YES',
[email protected]ab2956372009-08-13 18:11:043734 'GCC_OBJC_CALL_CXX_CDTORS': 'YES', # -fobjc-call-cxx-cdtors
3735 'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES', # -fvisibility=hidden
3736 'GCC_THREADSAFE_STATICS': 'NO', # -fno-threadsafe-statics
3737 'GCC_TREAT_WARNINGS_AS_ERRORS': 'YES', # -Werror
[email protected]2f80c312009-02-25 21:26:553738 'GCC_VERSION': '4.2',
[email protected]ab2956372009-08-13 18:11:043739 'GCC_WARN_ABOUT_MISSING_NEWLINE': 'YES', # -Wnewline-eof
[email protected]2f80c312009-02-25 21:26:553740 'USE_HEADERMAP': 'NO',
[email protected]080e86f2010-06-21 15:19:043741 'WARNING_CFLAGS': [
3742 '-Wall',
3743 '-Wendif-labels',
3744 '-Wextra',
3745 # Don't warn about unused function parameters.
3746 '-Wno-unused-parameter',
3747 # Don't warn about the "struct foo f = {0};" initialization
3748 # pattern.
3749 '-Wno-missing-field-initializers',
3750 ],
[email protected]b3fb8092009-03-12 19:09:243751 'conditions': [
3752 ['chromium_mac_pch', {'GCC_PRECOMPILE_PREFIX_HEADER': 'YES'},
[email protected]9543af052009-09-15 22:42:593753 {'GCC_PRECOMPILE_PREFIX_HEADER': 'NO'}
3754 ],
[email protected]2936b8c2012-10-29 10:57:313755 # Note that the prebuilt Clang binaries should not be used for iOS
3756 # development except for ASan builds.
[email protected]66733172010-09-22 00:09:283757 ['clang==1', {
[email protected]34f40892011-09-06 21:53:303758 'CC': '$(SOURCE_ROOT)/<(clang_dir)/clang',
3759 'LDPLUSPLUS': '$(SOURCE_ROOT)/<(clang_dir)/clang++',
[email protected]a79fd882011-10-03 18:22:383760
[email protected]6c648f12011-12-24 07:50:433761 # Don't use -Wc++0x-extensions, which Xcode 4 enables by default
[email protected]aae0e592012-11-15 00:25:533762 # when building with clang. This warning is triggered when the
[email protected]6c648f12011-12-24 07:50:433763 # override keyword is used via the OVERRIDE macro from
3764 # base/compiler_specific.h.
3765 'CLANG_WARN_CXX0X_EXTENSIONS': 'NO',
[email protected]3e893e0c2012-11-16 16:58:443766 # Warn if automatic synthesis is triggered with
3767 # the -Wobjc-missing-property-synthesis flag.
[email protected]aae0e592012-11-15 00:25:533768 'CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS': 'YES',
[email protected]34f40892011-09-06 21:53:303769 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0',
[email protected]66733172010-09-22 00:09:283770 'WARNING_CFLAGS': [
[email protected]7f8d486f2011-04-05 19:49:073771 '-Wheader-hygiene',
[email protected]c67e8ca2012-12-04 16:01:523772
3773 # This warns on using ints as initializers for floats in
3774 # initializer lists (e.g. |int a = f(); CGSize s = { a, a };|),
3775 # which happens in several places in chrome code. Not sure if
3776 # this is worth fixing.
3777 '-Wno-c++11-narrowing',
3778
3779 # This warns about code like |"0x%08"NACL_PRIxPTR| -- with C++11
3780 # user-defined literals, this is now a string literal with a UD
3781 # suffix. However, this is used heavily in NaCl code, so disable
3782 # the warning for now.
3783 '-Wno-reserved-user-defined-literal',
3784
[email protected]66733172010-09-22 00:09:283785 # Don't die on dtoa code that uses a char as an array index.
3786 # This is required solely for base/third_party/dmg_fp/dtoa.cc.
3787 '-Wno-char-subscripts',
[email protected]8dec02e2013-04-30 21:40:073788
[email protected]25d3bb722010-11-22 14:31:453789 # Clang spots more unused functions.
3790 '-Wno-unused-function',
[email protected]9242c7642012-01-29 09:02:103791
3792 # Warns on switches on enums that cover all enum values but
3793 # also contain a default: branch. Chrome is full of that.
3794 '-Wno-covered-switch-default',
[email protected]e6844cb2013-02-22 03:37:513795
3796 # Warns when a const char[] is converted to bool.
3797 '-Wstring-conversion',
[email protected]66733172010-09-22 00:09:283798 ],
[email protected]c67e8ca2012-12-04 16:01:523799 'OTHER_CPLUSPLUSFLAGS': [
[email protected]a7cd1a52013-05-09 00:27:443800 # gnu++11 instead of c++11 is needed because some code uses
3801 # typeof() (a GNU extension).
[email protected]c67e8ca2012-12-04 16:01:523802 # TODO(thakis): Eventually switch this to c++11 instead of
3803 # gnu++11 (once typeof can be removed, which is blocked on c++11
3804 # being available everywhere).
[email protected]a7cd1a52013-05-09 00:27:443805 # TODO(thakis): Use CLANG_CXX_LANGUAGE_STANDARD instead once all
3806 # bots use xcode 4 -- http://crbug.com/147515).
[email protected]c67e8ca2012-12-04 16:01:523807 '$(inherited)', '-std=gnu++11',
3808 ],
[email protected]66733172010-09-22 00:09:283809 }],
[email protected]2fccd422013-05-21 21:27:573810 ['clang==1 and clang_use_chrome_plugins==1', {
[email protected]5d451ad2011-02-11 16:43:463811 'OTHER_CFLAGS': [
[email protected]c872dc52012-05-19 06:36:313812 '<@(clang_chrome_plugins_flags)',
[email protected]5d451ad2011-02-11 16:43:463813 ],
3814 }],
[email protected]4a9ac22e2011-12-02 03:41:533815 ['clang==1 and clang_load!=""', {
[email protected]5e781232011-01-28 02:57:593816 'OTHER_CFLAGS': [
3817 '-Xclang', '-load', '-Xclang', '<(clang_load)',
[email protected]4a9ac22e2011-12-02 03:41:533818 ],
3819 }],
3820 ['clang==1 and clang_add_plugin!=""', {
3821 'OTHER_CFLAGS': [
[email protected]5e781232011-01-28 02:57:593822 '-Xclang', '-add-plugin', '-Xclang', '<(clang_add_plugin)',
3823 ],
3824 }],
[email protected]2616d45d2012-01-19 03:15:483825 ['clang==1 and "<(GENERATOR)"=="ninja"', {
3826 'OTHER_CFLAGS': [
3827 # See http://crbug.com/110262
3828 '-fcolor-diagnostics',
3829 ],
3830 }],
[email protected]b3fb8092009-03-12 19:09:243831 ],
[email protected]2f80c312009-02-25 21:26:553832 },
[email protected]34f40892011-09-06 21:53:303833 'conditions': [
3834 ['clang==1', {
3835 'variables': {
3836 'clang_dir': '../third_party/llvm-build/Release+Asserts/bin',
3837 },
3838 }],
[email protected]921c7b52011-11-25 10:34:353839 ['asan==1', {
3840 'xcode_settings': {
3841 'OTHER_CFLAGS': [
[email protected]48688df02012-11-27 21:04:563842 '-fsanitize=address',
[email protected]1d3bc322013-04-12 14:26:373843 '-mllvm -asan-globals=0', # http://crbug.com/196561
[email protected]48688df02012-11-27 21:04:563844 '-w', # http://crbug.com/162783
[email protected]921c7b52011-11-25 10:34:353845 ],
[email protected]921c7b52011-11-25 10:34:353846 },
3847 'defines': [
3848 'ADDRESS_SANITIZER',
[email protected]2f047202013-06-14 06:36:393849 'MEMORY_TOOL_REPLACES_ALLOCATOR',
[email protected]921c7b52011-11-25 10:34:353850 ],
3851 }],
[email protected]34f40892011-09-06 21:53:303852 ],
[email protected]2f80c312009-02-25 21:26:553853 'target_conditions': [
[email protected]2f80c312009-02-25 21:26:553854 ['_type!="static_library"', {
[email protected]5d7dc972009-04-16 15:30:463855 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-search_paths_first']},
[email protected]4281a4e2012-08-24 19:05:083856 'conditions': [
3857 ['asan==1', {
3858 'xcode_settings': {
3859 'OTHER_LDFLAGS': [
[email protected]2e82fa52012-11-27 23:41:443860 '-fsanitize=address',
[email protected]4281a4e2012-08-24 19:05:083861 ],
3862 },
3863 }],
3864 ],
[email protected]5d7dc972009-04-16 15:30:463865 }],
3866 ['_mac_bundle', {
3867 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-ObjC']},
[email protected]5ec8c962013-03-12 11:56:313868 'target_conditions': [
3869 ['_type=="executable"', {
3870 'conditions': [
3871 ['asan==1', {
3872 'postbuilds': [
3873 {
3874 'variables': {
3875 # Define copy_asan_dylib_path in a variable ending in
3876 # _path so that gyp understands it's a path and
3877 # performs proper relativization during dict merging.
3878 'copy_asan_dylib_path':
3879 'mac/copy_asan_runtime_dylib.sh',
3880 },
3881 'postbuild_name': 'Copy ASan runtime dylib',
3882 'action': [
3883 '<(copy_asan_dylib_path)',
3884 ],
3885 },
3886 ],
3887 }],
3888 ],
3889 }],
3890 ],
[email protected]87fde4a2009-02-28 00:50:083891 }],
[email protected]2936b8c2012-10-29 10:57:313892 ], # target_conditions
3893 }, # target_defaults
3894 }], # OS=="mac" or OS=="ios"
3895 ['OS=="mac"', {
3896 'target_defaults': {
3897 'variables': {
3898 # These should end with %, but there seems to be a bug with % in
3899 # variables that are intended to be set to different values in
3900 # different targets, like these.
3901 'mac_pie': 1, # Most executables can be position-independent.
[email protected]2936b8c2012-10-29 10:57:313902 # Strip debugging symbols from the target.
3903 'mac_strip': '<(mac_strip_release)',
[email protected]970fd4e2012-12-19 11:09:373904 'conditions': [
3905 ['asan==1', {
3906 'conditions': [
3907 ['mac_want_real_dsym=="default"', {
[email protected]97ab1fa2012-12-24 10:50:353908 'mac_real_dsym': 1,
[email protected]970fd4e2012-12-19 11:09:373909 }, {
3910 'mac_real_dsym': '<(mac_want_real_dsym)'
3911 }],
3912 ],
3913 }, {
3914 'conditions': [
3915 ['mac_want_real_dsym=="default"', {
3916 'mac_real_dsym': 0, # Fake .dSYMs are fine in most cases.
3917 }, {
3918 'mac_real_dsym': '<(mac_want_real_dsym)'
3919 }],
3920 ],
3921 }],
3922 ],
[email protected]2936b8c2012-10-29 10:57:313923 },
3924 'xcode_settings': {
3925 'GCC_DYNAMIC_NO_PIC': 'NO', # No -mdynamic-no-pic
3926 # (Equivalent to -fPIC)
3927 # MACOSX_DEPLOYMENT_TARGET maps to -mmacosx-version-min
3928 'MACOSX_DEPLOYMENT_TARGET': '<(mac_deployment_target)',
3929 # Keep pch files below xcodebuild/.
3930 'SHARED_PRECOMPS_DIR': '$(CONFIGURATION_BUILD_DIR)/SharedPrecompiledHeaders',
3931 'OTHER_CFLAGS': [
3932 '-fno-strict-aliasing', # See http://crbug.com/32204
3933 ],
3934 },
3935 'target_conditions': [
[email protected]6303fed2011-08-11 01:12:103936 ['_type=="executable"', {
3937 'postbuilds': [
3938 {
3939 # Arranges for data (heap) pages to be protected against
[email protected]8c40f322011-08-24 03:33:363940 # code execution when running on Mac OS X 10.7 ("Lion"), and
3941 # ensures that the position-independent executable (PIE) bit
3942 # is set for ASLR when running on Mac OS X 10.5 ("Leopard").
[email protected]6303fed2011-08-11 01:12:103943 'variables': {
[email protected]8c40f322011-08-24 03:33:363944 # Define change_mach_o_flags in a variable ending in _path
3945 # so that GYP understands it's a path and performs proper
3946 # relativization during dict merging.
3947 'change_mach_o_flags_path':
3948 'mac/change_mach_o_flags_from_xcode.sh',
[email protected]162407f2011-09-08 15:33:173949 'change_mach_o_flags_options%': [
[email protected]081c0342011-08-24 14:59:133950 ],
3951 'target_conditions': [
[email protected]162407f2011-09-08 15:33:173952 ['mac_pie==0 or release_valgrind_build==1', {
3953 # Don't enable PIE if it's unwanted. It's unwanted if
3954 # the target specifies mac_pie=0 or if building for
3955 # Valgrind, because Valgrind doesn't understand slide.
3956 # See the similar mac_pie/release_valgrind_build check
3957 # below.
[email protected]081c0342011-08-24 14:59:133958 'change_mach_o_flags_options': [
[email protected]081c0342011-08-24 14:59:133959 '--no-pie',
3960 ],
3961 }],
3962 ],
[email protected]6303fed2011-08-11 01:12:103963 },
[email protected]8c40f322011-08-24 03:33:363964 'postbuild_name': 'Change Mach-O Flags',
3965 'action': [
3966 '<(change_mach_o_flags_path)',
[email protected]081c0342011-08-24 14:59:133967 '>@(change_mach_o_flags_options)',
[email protected]8c40f322011-08-24 03:33:363968 ],
[email protected]6303fed2011-08-11 01:12:103969 },
3970 ],
[email protected]5a5d97aa2011-09-02 15:34:003971 'conditions': [
3972 ['asan==1', {
3973 'variables': {
3974 'asan_saves_file': 'asan.saves',
3975 },
3976 'xcode_settings': {
[email protected]6a4cad02011-11-25 07:26:563977 'CHROMIUM_STRIP_SAVE_FILE': '<(asan_saves_file)',
[email protected]5a5d97aa2011-09-02 15:34:003978 },
3979 }],
3980 ],
[email protected]162407f2011-09-08 15:33:173981 'target_conditions': [
3982 ['mac_pie==1 and release_valgrind_build==0', {
3983 # Turn on position-independence (ASLR) for executables. When
3984 # PIE is on for the Chrome executables, the framework will
3985 # also be subject to ASLR.
3986 # Don't do this when building for Valgrind, because Valgrind
3987 # doesn't understand slide. TODO: Make Valgrind on Mac OS X
3988 # understand slide, and get rid of the Valgrind check.
3989 'xcode_settings': {
3990 'OTHER_LDFLAGS': [
3991 '-Wl,-pie', # Position-independent executable (MH_PIE)
3992 ],
3993 },
3994 }],
3995 ],
[email protected]6a0242bc2011-07-01 00:34:463996 }],
[email protected]9a5e72862010-09-02 16:16:583997 ['(_type=="executable" or _type=="shared_library" or \
3998 _type=="loadable_module") and mac_strip!=0', {
[email protected]24700642009-06-01 16:01:203999 'target_conditions': [
4000 ['mac_real_dsym == 1', {
4001 # To get a real .dSYM bundle produced by dsymutil, set the
4002 # debug information format to dwarf-with-dsym. Since
4003 # strip_from_xcode will not be used, set Xcode to do the
4004 # stripping as well.
4005 'configurations': {
[email protected]5153767c2009-12-22 01:52:504006 'Release_Base': {
[email protected]24700642009-06-01 16:01:204007 'xcode_settings': {
4008 'DEBUG_INFORMATION_FORMAT': 'dwarf-with-dsym',
4009 'DEPLOYMENT_POSTPROCESSING': 'YES',
4010 'STRIP_INSTALLED_PRODUCT': 'YES',
[email protected]e14a9f92009-08-05 19:26:074011 'target_conditions': [
[email protected]c2111422010-06-01 18:30:254012 ['_type=="shared_library" or _type=="loadable_module"', {
[email protected]e14a9f92009-08-05 19:26:074013 # The Xcode default is to strip debugging symbols
4014 # only (-S). Local symbols should be stripped as
4015 # well, which will be handled by -x. Xcode will
4016 # continue to insert -S when stripping even when
4017 # additional flags are added with STRIPFLAGS.
4018 'STRIPFLAGS': '-x',
[email protected]ed7e83692012-12-24 10:13:404019 }], # _type=="shared_library" or _type=="loadable_module"
4020 ['_type=="executable"', {
4021 'conditions': [
4022 ['asan==1', {
4023 'STRIPFLAGS': '-s $(CHROMIUM_STRIP_SAVE_FILE)',
4024 }]
4025 ],
4026 }], # _type=="executable" and asan==1
[email protected]e14a9f92009-08-05 19:26:074027 ], # target_conditions
4028 }, # xcode_settings
4029 }, # configuration "Release"
4030 }, # configurations
[email protected]24700642009-06-01 16:01:204031 }, { # mac_real_dsym != 1
4032 # To get a fast fake .dSYM bundle, use a post-build step to
4033 # produce the .dSYM and strip the executable. strip_from_xcode
4034 # only operates in the Release configuration.
4035 'postbuilds': [
4036 {
4037 'variables': {
4038 # Define strip_from_xcode in a variable ending in _path
4039 # so that gyp understands it's a path and performs proper
4040 # relativization during dict merging.
4041 'strip_from_xcode_path': 'mac/strip_from_xcode',
4042 },
4043 'postbuild_name': 'Strip If Needed',
4044 'action': ['<(strip_from_xcode_path)'],
4045 },
[email protected]e14a9f92009-08-05 19:26:074046 ], # postbuilds
4047 }], # mac_real_dsym
4048 ], # target_conditions
[email protected]9a5e72862010-09-02 16:16:584049 }], # (_type=="executable" or _type=="shared_library" or
4050 # _type=="loadable_module") and mac_strip!=0
[email protected]e14a9f92009-08-05 19:26:074051 ], # target_conditions
4052 }, # target_defaults
4053 }], # OS=="mac"
[email protected]1e013672012-06-29 22:12:204054 ['OS=="ios"', {
4055 'target_defaults': {
4056 'xcode_settings' : {
4057 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0',
4058
4059 # This next block is mostly common with the 'mac' section above,
4060 # but keying off (or setting) 'clang' isn't valid for iOS as it
4061 # also seems to mean using the custom build of clang.
4062
[email protected]e31ef5b2013-05-21 11:08:494063 # TODO(stuartmorgan): switch to c++0x (see TODOs in the clang
4064 # section above).
4065 'CLANG_CXX_LANGUAGE_STANDARD': 'gnu++0x',
[email protected]1e013672012-06-29 22:12:204066 # Don't use -Wc++0x-extensions, which Xcode 4 enables by default
[email protected]aae0e592012-11-15 00:25:534067 # when building with clang. This warning is triggered when the
[email protected]1e013672012-06-29 22:12:204068 # override keyword is used via the OVERRIDE macro from
4069 # base/compiler_specific.h.
4070 'CLANG_WARN_CXX0X_EXTENSIONS': 'NO',
[email protected]3e893e0c2012-11-16 16:58:444071 # Warn if automatic synthesis is triggered with
4072 # the -Wobjc-missing-property-synthesis flag.
[email protected]aae0e592012-11-15 00:25:534073 'CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS': 'YES',
[email protected]1e013672012-06-29 22:12:204074 'WARNING_CFLAGS': [
4075 '-Wheader-hygiene',
4076 # Don't die on dtoa code that uses a char as an array index.
4077 # This is required solely for base/third_party/dmg_fp/dtoa.cc.
4078 '-Wno-char-subscripts',
4079 # Clang spots more unused functions.
4080 '-Wno-unused-function',
4081 # See comments on this flag higher up in this file.
4082 '-Wno-unnamed-type-template-args',
[email protected]e31ef5b2013-05-21 11:08:494083 # Match OS X clang C++11 warning settings.
4084 '-Wno-c++11-narrowing',
4085 '-Wno-reserved-user-defined-literal',
[email protected]1e013672012-06-29 22:12:204086 ],
4087 },
4088 'target_conditions': [
[email protected]296bc452013-05-13 21:29:474089 ['_toolset=="host"', {
4090 'xcode_settings': {
4091 'SDKROOT': 'macosx<(mac_sdk)', # -isysroot
4092 'MACOSX_DEPLOYMENT_TARGET': '<(mac_deployment_target)',
4093 },
4094 }],
4095 ['_toolset=="target"', {
4096 'xcode_settings': {
4097 # This section should be for overriding host settings. But,
4098 # since we can't negate the iphone deployment target above, we
4099 # instead set it here for target only.
4100 'IPHONEOS_DEPLOYMENT_TARGET': '<(ios_deployment_target)',
4101 },
4102 }],
[email protected]1e013672012-06-29 22:12:204103 ['_type=="executable"', {
4104 'configurations': {
4105 'Release_Base': {
4106 'xcode_settings': {
4107 'DEPLOYMENT_POSTPROCESSING': 'YES',
4108 'STRIP_INSTALLED_PRODUCT': 'YES',
4109 },
4110 },
[email protected]3c6aa862012-11-05 17:11:444111 'Debug_Base': {
4112 'xcode_settings': {
4113 # Remove dSYM to reduce build time.
4114 'DEBUG_INFORMATION_FORMAT': 'dwarf',
4115 },
4116 },
[email protected]1e013672012-06-29 22:12:204117 },
[email protected]0286b6f2013-05-03 11:06:404118 'conditions': [
[email protected]8dec8fc52013-05-23 23:05:054119 ['"<(GENERATOR)"=="xcode"', {
[email protected]0286b6f2013-05-03 11:06:404120 'xcode_settings': {
[email protected]8dec8fc52013-05-23 23:05:054121 # TODO(justincohen): ninja builds don't support signing yet.
[email protected]0286b6f2013-05-03 11:06:404122 'conditions': [
4123 ['chromium_ios_signing', {
4124 # iOS SDK wants everything for device signed.
4125 'CODE_SIGN_IDENTITY[sdk=iphoneos*]': 'iPhone Developer',
4126 }, {
4127 'CODE_SIGNING_REQUIRED': 'NO',
4128 'CODE_SIGN_IDENTITY[sdk=iphoneos*]': '',
4129 }],
4130 ],
4131 },
4132 }],
[email protected]8dec8fc52013-05-23 23:05:054133 ['"<(GENERATOR)"=="xcode" and clang!=1', {
4134 'xcode_settings': {
4135 # It is necessary to link with the -fobjc-arc flag to use
4136 # subscripting on iOS < 6.
4137 'OTHER_LDFLAGS': [
4138 '-fobjc-arc',
4139 ],
4140 },
4141 }],
4142 ['clang==1', {
4143 'target_conditions': [
4144 ['_toolset=="target"', {
4145 'variables': {
4146 'developer_dir': '<!(xcode-select -print-path)',
4147 'arc_toolchain_path': '<(developer_dir)/Toolchains/XcodeDefault.xctoolchain/usr/lib/arc',
4148 },
4149 # It is necessary to force load libarclite from Xcode for
4150 # third_party/llvm-build because libarclite_* is only
4151 # distributed by Xcode.
4152 'conditions': [
4153 ['"<(GENERATOR)"=="ninja" and target_arch=="armv7"', {
4154 'xcode_settings': {
4155 'OTHER_LDFLAGS': [
4156 '-force_load',
4157 '<(arc_toolchain_path)/libarclite_iphoneos.a',
4158 ],
4159 },
4160 }],
4161 ['"<(GENERATOR)"=="ninja" and target_arch!="armv7"', {
4162 'xcode_settings': {
4163 'OTHER_LDFLAGS': [
4164 '-force_load',
4165 '<(arc_toolchain_path)/libarclite_iphonesimulator.a',
4166 ],
4167 },
4168 }],
4169 # Xcode sets target_arch at compile-time.
4170 ['"<(GENERATOR)"=="xcode"', {
4171 'xcode_settings': {
4172 'OTHER_LDFLAGS[arch=armv7]': [
[email protected]86671442013-06-11 13:25:124173 '$(inherited)',
[email protected]8dec8fc52013-05-23 23:05:054174 '-force_load',
4175 '<(arc_toolchain_path)/libarclite_iphoneos.a',
4176 ],
4177 'OTHER_LDFLAGS[arch=i386]': [
[email protected]86671442013-06-11 13:25:124178 '$(inherited)',
[email protected]8dec8fc52013-05-23 23:05:054179 '-force_load',
4180 '<(arc_toolchain_path)/libarclite_iphonesimulator.a',
4181 ],
4182 },
4183 }],
4184 ],
4185 }],
4186 ],
4187 }],
[email protected]0286b6f2013-05-03 11:06:404188 ],
[email protected]1e013672012-06-29 22:12:204189 }],
4190 ], # target_conditions
4191 }, # target_defaults
4192 }], # OS=="ios"
[email protected]2f80c312009-02-25 21:26:554193 ['OS=="win"', {
4194 'target_defaults': {
4195 'defines': [
[email protected]8e345da2012-07-01 22:10:304196 '_WIN32_WINNT=0x0602',
4197 'WINVER=0x0602',
[email protected]2f80c312009-02-25 21:26:554198 'WIN32',
4199 '_WINDOWS',
[email protected]2f80c312009-02-25 21:26:554200 'NOMINMAX',
[email protected]e3116282011-08-13 00:52:284201 'PSAPI_VERSION=1',
[email protected]2f80c312009-02-25 21:26:554202 '_CRT_RAND_S',
4203 'CERT_CHAIN_PARA_HAS_EXTRA_FIELDS',
4204 'WIN32_LEAN_AND_MEAN',
[email protected]7a812dd62010-06-30 18:52:274205 '_ATL_NO_OPENGL',
[email protected]2f80c312009-02-25 21:26:554206 ],
[email protected]8974e042010-06-21 18:06:524207 'conditions': [
[email protected]2212d272011-12-20 21:37:374208 ['buildtype=="Official"', {
4209 # In official builds, targets can self-select an optimization
4210 # level by defining a variable named 'optimize', and setting it
4211 # to one of
4212 # - "size", optimizes for minimal code size - the default.
4213 # - "speed", optimizes for speed over code size.
4214 # - "max", whole program optimization and link-time code
4215 # generation. This is very expensive and should be used
4216 # sparingly.
4217 'variables': {
4218 'optimize%': 'size',
4219 },
4220 'target_conditions': [
4221 ['optimize=="size"', {
4222 'msvs_settings': {
4223 'VCCLCompilerTool': {
4224 # 1, optimizeMinSpace, Minimize Size (/O1)
4225 'Optimization': '1',
4226 # 2, favorSize - Favor small code (/Os)
4227 'FavorSizeOrSpeed': '2',
4228 },
4229 },
4230 },
4231 ],
4232 ['optimize=="speed"', {
4233 'msvs_settings': {
4234 'VCCLCompilerTool': {
4235 # 2, optimizeMaxSpeed, Maximize Speed (/O2)
4236 'Optimization': '2',
4237 # 1, favorSpeed - Favor fast code (/Ot)
4238 'FavorSizeOrSpeed': '1',
4239 },
4240 },
4241 },
4242 ],
4243 ['optimize=="max"', {
4244 'msvs_settings': {
4245 'VCCLCompilerTool': {
4246 # 2, optimizeMaxSpeed, Maximize Speed (/O2)
4247 'Optimization': '2',
4248 # 1, favorSpeed - Favor fast code (/Ot)
4249 'FavorSizeOrSpeed': '1',
4250 # This implies link time code generation.
4251 'WholeProgramOptimization': 'true',
4252 },
4253 },
4254 },
4255 ],
4256 ],
4257 },
4258 ],
[email protected]8974e042010-06-21 18:06:524259 ['component=="static_library"', {
4260 'defines': [
4261 '_HAS_EXCEPTIONS=0',
4262 ],
4263 }],
[email protected]3e2648a2011-03-21 20:58:504264 ['secure_atl', {
4265 'defines': [
4266 '_SECURE_ATL',
4267 ],
4268 }],
[email protected]54184ce72012-10-18 07:11:264269 ['msvs_express', {
4270 'configurations': {
4271 'x86_Base': {
4272 'msvs_settings': {
4273 'VCLinkerTool': {
4274 'AdditionalLibraryDirectories':
4275 ['<(windows_driver_kit_path)/lib/ATL/i386'],
4276 },
4277 'VCLibrarianTool': {
4278 'AdditionalLibraryDirectories':
4279 ['<(windows_driver_kit_path)/lib/ATL/i386'],
4280 },
4281 },
4282 },
4283 'x64_Base': {
4284 'msvs_settings': {
4285 'VCLibrarianTool': {
4286 'AdditionalLibraryDirectories':
4287 ['<(windows_driver_kit_path)/lib/ATL/amd64'],
4288 },
4289 'VCLinkerTool': {
4290 'AdditionalLibraryDirectories':
4291 ['<(windows_driver_kit_path)/lib/ATL/amd64'],
4292 },
4293 },
4294 },
4295 },
4296 'msvs_settings': {
4297 'VCLinkerTool': {
4298 # Explicitly required when using the ATL with express
4299 'AdditionalDependencies': ['atlthunk.lib'],
4300
4301 # ATL 8.0 included in WDK 7.1 makes the linker to generate
4302 # almost eight hundred LNK4254 and LNK4078 warnings:
4303 # - warning LNK4254: section 'ATL' (50000040) merged into
4304 # '.rdata' (40000040) with different attributes
4305 # - warning LNK4078: multiple 'ATL' sections found with
4306 # different attributes
4307 'AdditionalOptions': ['/ignore:4254', '/ignore:4078'],
4308 },
4309 },
4310 'msvs_system_include_dirs': [
4311 '<(windows_driver_kit_path)/inc/atl71',
4312 '<(windows_driver_kit_path)/inc/mfc42',
4313 ],
4314 }],
[email protected]8974e042010-06-21 18:06:524315 ],
[email protected]5b5ca7cb2009-07-20 23:00:204316 'msvs_system_include_dirs': [
[email protected]1ab48032012-07-02 21:48:054317 '<(windows_sdk_path)/Include/shared',
4318 '<(windows_sdk_path)/Include/um',
4319 '<(windows_sdk_path)/Include/winrt',
[email protected]2f80c312009-02-25 21:26:554320 '$(VSInstallDir)/VC/atlmfc/include',
4321 ],
[email protected]a8d99cef2009-08-26 20:47:494322 'msvs_cygwin_dirs': ['<(DEPTH)/third_party/cygwin'],
[email protected]7815a362013-04-26 08:12:004323 'msvs_disabled_warnings': [4351, 4355, 4396, 4503, 4819,
[email protected]942c3a60f2011-05-03 02:04:114324 # TODO(maruel): These warnings are level 4. They will be slowly
4325 # removed as code is fixed.
4326 4100, 4121, 4125, 4127, 4130, 4131, 4189, 4201, 4238, 4244, 4245,
[email protected]7815a362013-04-26 08:12:004327 4310, 4428, 4481, 4505, 4510, 4512, 4530, 4610, 4611, 4701, 4702,
4328 4706,
[email protected]942c3a60f2011-05-03 02:04:114329 ],
[email protected]2f80c312009-02-25 21:26:554330 'msvs_settings': {
4331 'VCCLCompilerTool': {
[email protected]e9b96bb2012-09-07 01:10:444332 'AdditionalOptions': ['/MP'],
[email protected]2f80c312009-02-25 21:26:554333 'MinimalRebuild': 'false',
[email protected]2f80c312009-02-25 21:26:554334 'BufferSecurityCheck': 'true',
4335 'EnableFunctionLevelLinking': 'true',
4336 'RuntimeTypeInfo': 'false',
[email protected]942c3a60f2011-05-03 02:04:114337 'WarningLevel': '4',
[email protected]2f80c312009-02-25 21:26:554338 'WarnAsError': 'true',
4339 'DebugInformationFormat': '3',
[email protected]3fef6e62009-07-31 19:58:584340 'conditions': [
[email protected]8974e042010-06-21 18:06:524341 ['component=="shared_library"', {
4342 'ExceptionHandling': '1', # /EHsc
4343 }, {
4344 'ExceptionHandling': '0',
4345 }],
[email protected]3fef6e62009-07-31 19:58:584346 ],
[email protected]2f80c312009-02-25 21:26:554347 },
4348 'VCLibrarianTool': {
[email protected]1f9471a2010-01-04 06:40:164349 'AdditionalOptions': ['/ignore:4221'],
[email protected]a78da50e2010-06-09 21:31:374350 'AdditionalLibraryDirectories': [
[email protected]1ab48032012-07-02 21:48:054351 '<(windows_sdk_path)/Lib/win8/um/x86',
[email protected]a78da50e2010-06-09 21:31:374352 ],
[email protected]2f80c312009-02-25 21:26:554353 },
4354 'VCLinkerTool': {
[email protected]2f80c312009-02-25 21:26:554355 'AdditionalDependencies': [
4356 'wininet.lib',
[email protected]b1d8c252011-01-13 20:27:504357 'dnsapi.lib',
[email protected]2f80c312009-02-25 21:26:554358 'version.lib',
4359 'msimg32.lib',
4360 'ws2_32.lib',
4361 'usp10.lib',
4362 'psapi.lib',
[email protected]96fd0032009-04-24 00:13:084363 'dbghelp.lib',
[email protected]dfdf7ee2011-04-28 18:51:484364 'winmm.lib',
4365 'shlwapi.lib',
[email protected]2f80c312009-02-25 21:26:554366 ],
[email protected]a78da50e2010-06-09 21:31:374367 'AdditionalLibraryDirectories': [
[email protected]1ab48032012-07-02 21:48:054368 '<(windows_sdk_path)/Lib/win8/um/x86',
[email protected]a78da50e2010-06-09 21:31:374369 ],
[email protected]2f80c312009-02-25 21:26:554370 'GenerateDebugInformation': 'true',
4371 'MapFileName': '$(OutDir)\\$(TargetName).map',
4372 'ImportLibrary': '$(OutDir)\\lib\\$(TargetName).lib',
[email protected]2f80c312009-02-25 21:26:554373 'FixedBaseAddress': '1',
[email protected]825ff8d2009-05-22 01:40:484374 # SubSystem values:
4375 # 0 == not set
4376 # 1 == /SUBSYSTEM:CONSOLE
4377 # 2 == /SUBSYSTEM:WINDOWS
4378 # Most of the executables we'll ever create are tests
4379 # and utilities with console output.
4380 'SubSystem': '1',
[email protected]2f80c312009-02-25 21:26:554381 },
4382 'VCMIDLTool': {
4383 'GenerateStublessProxies': 'true',
[email protected]279904d2012-03-31 00:03:094384 'TypeLibraryName': '$(InputName).tlb',
4385 'OutputDirectory': '$(IntDir)',
4386 'HeaderFileName': '$(InputName).h',
[email protected]4fdb3cc2012-04-07 01:49:334387 'DLLDataFileName': '$(InputName).dlldata.c',
[email protected]279904d2012-03-31 00:03:094388 'InterfaceIdentifierFileName': '$(InputName)_i.c',
4389 'ProxyFileName': '$(InputName)_p.c',
[email protected]2f80c312009-02-25 21:26:554390 },
4391 'VCResourceCompilerTool': {
4392 'Culture' : '1033',
[email protected]4d91cbc2010-05-07 20:41:384393 'AdditionalIncludeDirectories': [
4394 '<(DEPTH)',
4395 '<(SHARED_INTERMEDIATE_DIR)',
4396 ],
[email protected]2f80c312009-02-25 21:26:554397 },
4398 },
4399 },
4400 }],
[email protected]79e2336c2011-05-12 18:18:344401 ['disable_nacl==1', {
[email protected]d8c7cbcc2009-10-02 19:00:314402 'target_defaults': {
4403 'defines': [
4404 'DISABLE_NACL',
4405 ],
4406 },
4407 }],
[email protected]cfbf9bc2009-12-07 22:07:564408 ['OS=="win" and msvs_use_common_linker_extras', {
[email protected]48c7af72009-07-03 22:00:194409 'target_defaults': {
4410 'msvs_settings': {
4411 'VCLinkerTool': {
[email protected]48c7af72009-07-03 22:00:194412 'DelayLoadDLLs': [
4413 'dbghelp.dll',
4414 'dwmapi.dll',
[email protected]e15a4ce52012-01-04 20:11:014415 'shell32.dll',
[email protected]48c7af72009-07-03 22:00:194416 'uxtheme.dll',
4417 ],
4418 },
4419 },
[email protected]ef4fa4072009-12-04 22:46:504420 'configurations': {
[email protected]5153767c2009-12-22 01:52:504421 'x86_Base': {
[email protected]ef4fa4072009-12-04 22:46:504422 'msvs_settings': {
4423 'VCLinkerTool': {
[email protected]1f9471a2010-01-04 06:40:164424 'AdditionalOptions': [
4425 '/safeseh',
[email protected]7cf23ce62012-01-13 02:43:334426 '/dynamicbase',
[email protected]1f9471a2010-01-04 06:40:164427 '/ignore:4199',
4428 '/ignore:4221',
4429 '/nxcompat',
4430 ],
[email protected]ef4fa4072009-12-04 22:46:504431 },
4432 },
4433 },
[email protected]5153767c2009-12-22 01:52:504434 'x64_Base': {
[email protected]ef4fa4072009-12-04 22:46:504435 'msvs_settings': {
4436 'VCLinkerTool': {
[email protected]1f9471a2010-01-04 06:40:164437 'AdditionalOptions': [
[email protected]ef4fa4072009-12-04 22:46:504438 # safeseh is not compatible with x64
[email protected]7cf23ce62012-01-13 02:43:334439 '/dynamicbase',
[email protected]1f9471a2010-01-04 06:40:164440 '/ignore:4199',
4441 '/ignore:4221',
4442 '/nxcompat',
4443 ],
[email protected]ef4fa4072009-12-04 22:46:504444 },
4445 },
4446 },
4447 },
[email protected]48c7af72009-07-03 22:00:194448 },
4449 }],
[email protected]9821d0d2010-04-16 22:40:374450 ['enable_new_npdevice_api==1', {
4451 'target_defaults': {
4452 'defines': [
4453 'ENABLE_NEW_NPDEVICE_API',
4454 ],
4455 },
4456 }],
[email protected]5f683172013-04-27 01:53:194457 # Don't warn about the "typedef 'foo' locally defined but not used"
4458 # for gcc 4.8.
4459 # TODO: remove this flag once all builds work. See crbug.com/227506
4460 ['gcc_version>=48', {
4461 'target_defaults': {
4462 'cflags': [
4463 '-Wno-unused-local-typedefs',
4464 ],
4465 },
4466 }],
[email protected]220ea5932012-08-09 10:44:074467 ['clang==1', {
[email protected]f1faf212012-10-05 21:04:234468 'conditions': [
4469 ['OS=="android"', {
4470 # Android could use the goma with clang.
4471 'make_global_settings': [
4472 ['CC', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} ${CHROME_SRC}/<(make_clang_dir)/bin/clang)'],
4473 ['CXX', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} ${CHROME_SRC}/<(make_clang_dir)/bin/clang++)'],
4474 ['LINK', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} ${CHROME_SRC}/<(make_clang_dir)/bin/clang++)'],
4475 ['CC.host', '$(CC)'],
4476 ['CXX.host', '$(CXX)'],
4477 ['LINK.host', '$(LINK)'],
4478 ],
4479 }, {
4480 'make_global_settings': [
4481 ['CC', '<(make_clang_dir)/bin/clang'],
4482 ['CXX', '<(make_clang_dir)/bin/clang++'],
4483 ['LINK', '$(CXX)'],
4484 ['CC.host', '$(CC)'],
4485 ['CXX.host', '$(CXX)'],
4486 ['LINK.host', '$(LINK)'],
4487 ],
4488 }],
[email protected]34f40892011-09-06 21:53:304489 ],
4490 }],
[email protected]615fa6642012-08-14 19:17:074491 ['OS=="android" and clang==0', {
[email protected]d10e2cc2012-03-20 10:45:274492 # Hardcode the compiler names in the Makefile so that
4493 # it won't depend on the environment at make time.
[email protected]7fc96c82012-07-24 18:15:114494 'make_global_settings': [
[email protected]c0f76312012-08-16 13:52:044495 ['CC', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} <(android_toolchain)/*-gcc)'],
4496 ['CXX', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} <(android_toolchain)/*-g++)'],
4497 ['LINK', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} <(android_toolchain)/*-gcc)'],
[email protected]615fa6642012-08-14 19:17:074498 ['CC.host', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} <!(which gcc))'],
4499 ['CXX.host', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} <!(which g++))'],
4500 ['LINK.host', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} <!(which g++))'],
[email protected]d10e2cc2012-03-20 10:45:274501 ],
4502 }],
[email protected]23eea4a42013-04-27 04:10:264503 ['OS=="linux" and target_arch=="mipsel"', {
[email protected]eb5f1672013-01-31 07:56:464504 'make_global_settings': [
4505 ['CC', '<(sysroot)/../bin/mipsel-linux-gnu-gcc'],
4506 ['CXX', '<(sysroot)/../bin/mipsel-linux-gnu-g++'],
4507 ['LINK', '$(CXX)'],
4508 ['CC.host', '<!(which gcc)'],
4509 ['CXX.host', '<!(which g++)'],
4510 ['LINK.host', '<!(which g++)'],
4511 ],
4512 }],
[email protected]2f80c312009-02-25 21:26:554513 ],
4514 'xcode_settings': {
[email protected]0c8ab452009-11-06 21:57:504515 # DON'T ADD ANYTHING NEW TO THIS BLOCK UNLESS YOU REALLY REALLY NEED IT!
4516 # This block adds *project-wide* configuration settings to each project
4517 # file. It's almost always wrong to put things here. Specify your
4518 # custom xcode_settings in target_defaults to add them to targets instead.
4519
[email protected]1e013672012-06-29 22:12:204520 'conditions': [
[email protected]fca3d812012-07-27 00:55:364521 # In an Xcode Project Info window, the "Base SDK for All Configurations"
4522 # setting sets the SDK on a project-wide basis. In order to get the
4523 # configured SDK to show properly in the Xcode UI, SDKROOT must be set
4524 # here at the project level.
[email protected]2c261532012-10-06 00:46:294525 ['OS=="mac"', {
[email protected]fca3d812012-07-27 00:55:364526 'conditions': [
[email protected]2c261532012-10-06 00:46:294527 ['mac_sdk_path==""', {
[email protected]fca3d812012-07-27 00:55:364528 'SDKROOT': 'macosx<(mac_sdk)', # -isysroot
[email protected]2c261532012-10-06 00:46:294529 }, {
4530 'SDKROOT': '<(mac_sdk_path)', # -isysroot
[email protected]fca3d812012-07-27 00:55:364531 }],
4532 ],
[email protected]2c261532012-10-06 00:46:294533 }],
4534 ['OS=="ios"', {
4535 'conditions': [
4536 ['ios_sdk_path==""', {
[email protected]0286b6f2013-05-03 11:06:404537 'conditions': [
4538 # TODO(justincohen): Ninja only supports simulator for now.
4539 ['"<(GENERATOR)"=="ninja"', {
4540 'SDKROOT': 'iphonesimulator<(ios_sdk)', # -isysroot
4541 }, {
4542 'SDKROOT': 'iphoneos<(ios_sdk)', # -isysroot
4543 }],
4544 ],
[email protected]2c261532012-10-06 00:46:294545 }, {
4546 'SDKROOT': '<(ios_sdk_path)', # -isysroot
4547 }],
4548 ],
[email protected]1e013672012-06-29 22:12:204549 }],
4550 ['OS=="ios"', {
[email protected]1e013672012-06-29 22:12:204551 'ARCHS': '$(ARCHS_UNIVERSAL_IPHONE_OS)',
[email protected]3c6aa862012-11-05 17:11:444552 # Just build armv7, until armv7s is correctly tested.
4553 'VALID_ARCHS': 'armv7 i386',
[email protected]1e013672012-06-29 22:12:204554 # Target both iPhone and iPad.
4555 'TARGETED_DEVICE_FAMILY': '1,2',
4556 }],
[email protected]f9335b42013-01-24 21:00:234557 ['target_arch=="x64"', {
4558 'ARCHS': [
4559 'x86_64'
4560 ],
4561 }],
[email protected]1e013672012-06-29 22:12:204562 ],
[email protected]0c8ab452009-11-06 21:57:504563
[email protected]2f80c312009-02-25 21:26:554564 # The Xcode generator will look for an xcode_settings section at the root
4565 # of each dict and use it to apply settings on a file-wide basis. Most
4566 # settings should not be here, they should be in target-specific
4567 # xcode_settings sections, or better yet, should use non-Xcode-specific
4568 # settings in target dicts. SYMROOT is a special case, because many other
4569 # Xcode variables depend on it, including variables such as
4570 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something
4571 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the
4572 # files to appear (when present) in the UI as actual files and not red
4573 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR,
4574 # and therefore SYMROOT, needs to be set at the project level.
[email protected]bfa24b962009-03-02 00:16:164575 'SYMROOT': '<(DEPTH)/xcodebuild',
[email protected]2f80c312009-02-25 21:26:554576 },
[email protected]ee28c9f2009-09-04 01:53:014577}