blob: 49c28b934ebe819e75b923f0d2fab97a6cdbf1e8 [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,
29 },
30 # Copy conditionally-set variables out one scope.
31 'chromeos%': '<(chromeos)',
32 'use_aura%': '<(use_aura)',
33 'use_ash%': '<(use_ash)',
[email protected]e72e55b2011-01-06 22:19:3034
[email protected]3fa441d2011-09-18 17:28:5035 # Whether we are using Views Toolkit
36 'toolkit_views%': 0,
37
[email protected]e0b85a52011-10-06 03:30:4238 # Use OpenSSL instead of NSS. Under development: see http://crbug.com/62803
39 'use_openssl%': 0,
[email protected]023d8242011-11-22 01:25:2740
[email protected]7ddea9802012-02-22 23:08:0541 # Disable viewport meta tag by default.
42 'enable_viewport%': 0,
[email protected]1efbaaa2012-04-24 02:43:2443
44 # Enable HiDPI support.
45 'enable_hidpi%': 0,
[email protected]219c7312012-05-10 20:32:4046
[email protected]6155e702012-05-02 17:56:0647 # Enable touch optimized art assets and metrics.
48 'enable_touch_ui%': 0,
[email protected]8973c3a2012-04-25 02:24:1849
[email protected]f1f362b42012-05-15 17:46:5850 # Override buildtype to select the desired build flavor.
51 # Dev - everyday build for development/testing
52 # Official - release build (generally implies additional processing)
53 # TODO(mmoss) Once 'buildtype' is fully supported (e.g. Windows gyp
54 # conversion is done), some of the things which are now controlled by
55 # 'branding', such as symbol generation, will need to be refactored
56 # based on 'buildtype' (i.e. we don't care about saving symbols for
57 # non-Official # builds).
58 'buildtype%': 'Dev',
[email protected]8796d922012-08-07 01:23:1159
60 'conditions': [
61 # ChromeOS implies ash.
62 ['chromeos==1', {
63 'use_ash%': 1,
64 'use_aura%': 1,
65 }],
66
[email protected]e9c4c1c2013-02-06 06:46:4867 # For now, Windows builds that |use_aura| should also imply using
68 # ash. This rule should be removed for the future when Windows is
69 # using the aura windows without the ash interface.
70 ['use_aura==1 and OS=="win"', {
[email protected]8796d922012-08-07 01:23:1171 'use_ash%': 1,
72 }],
73 ['use_ash==1', {
74 'use_aura%': 1,
75 }],
[email protected]94cdbf42012-12-11 19:49:2276
77 # Compute the architecture that we're building on.
78 ['OS=="win" or OS=="mac" or OS=="ios"', {
79 'host_arch%': 'ia32',
80 }, {
81 # This handles the Unix platforms for which there is some support.
82 # Anything else gets passed through, which probably won't work
83 # very well; such hosts should pass an explicit target_arch to
84 # gyp.
85 'host_arch%':
86 '<!(uname -m | sed -e "s/i.86/ia32/;s/x86_64/x64/;s/amd64/x64/;s/arm.*/arm/;s/i86pc/ia32/")',
87 }],
[email protected]8796d922012-08-07 01:23:1188 ],
[email protected]bb6aba32011-01-07 19:04:4389 },
90 # Copy conditionally-set variables out one scope.
91 'chromeos%': '<(chromeos)',
[email protected]41423092011-08-25 15:39:5892 'use_aura%': '<(use_aura)',
[email protected]ed329be2012-01-03 22:02:1693 'use_ash%': '<(use_ash)',
[email protected]e0b85a52011-10-06 03:30:4294 'use_openssl%': '<(use_openssl)',
[email protected]7ddea9802012-02-22 23:08:0595 'enable_viewport%': '<(enable_viewport)',
[email protected]1efbaaa2012-04-24 02:43:2496 'enable_hidpi%': '<(enable_hidpi)',
[email protected]6155e702012-05-02 17:56:0697 'enable_touch_ui%': '<(enable_touch_ui)',
[email protected]f1f362b42012-05-15 17:46:5898 'buildtype%': '<(buildtype)',
[email protected]94cdbf42012-12-11 19:49:2299 'host_arch%': '<(host_arch)',
100
101 # Default architecture we're building for is the architecture we're
102 # building on.
103 'target_arch%': '<(host_arch)',
[email protected]f1f362b42012-05-15 17:46:58104
[email protected]0115f042012-07-27 20:36:53105 # Sets whether we're building with the Android SDK/NDK (and hence with
106 # Ant, value 0), or as part of the Android system (and hence with the
107 # Android build system, value 1).
108 'android_build_type%': 0,
109
[email protected]55d92492013-01-31 05:03:39110 # Sets whether chrome is built for google tv device.
111 'google_tv%': 0,
112
[email protected]e72e55b2011-01-06 22:19:30113 'conditions': [
[email protected]ab2017e2012-02-07 01:54:50114 # Set default value of toolkit_views based on OS.
[email protected]6e00601b72012-03-19 15:40:35115 ['OS=="win" or chromeos==1 or use_aura==1', {
[email protected]bb6aba32011-01-07 19:04:43116 'toolkit_views%': 1,
117 }, {
118 'toolkit_views%': 0,
119 }],
[email protected]1efbaaa2012-04-24 02:43:24120
[email protected]8796d922012-08-07 01:23:11121 # Set toolkit_uses_gtk for the Chromium browser on Linux.
122 ['(OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris") and use_aura==0', {
123 'toolkit_uses_gtk%': 1,
124 }, {
125 'toolkit_uses_gtk%': 0,
126 }],
127
[email protected]3aa8a682012-08-11 00:04:29128 # Enable HiDPI on Mac OS and Chrome OS.
129 ['OS=="mac" or chromeos==1', {
[email protected]1efbaaa2012-04-24 02:43:24130 'enable_hidpi%': 1,
131 }],
[email protected]219c7312012-05-10 20:32:40132
[email protected]c71fe6402012-08-15 15:22:55133 # Enable touch UI on Metro.
134 ['OS=="win"', {
[email protected]6155e702012-05-02 17:56:06135 'enable_touch_ui%': 1,
136 }],
[email protected]dc4e8b82012-11-15 03:58:16137
[email protected]b1a2b542013-01-10 07:33:09138 # Enable App Launcher only on ChromeOS, Windows and OSX.
139 ['use_ash==1 or OS=="win" or OS=="mac"', {
[email protected]dc4e8b82012-11-15 03:58:16140 'enable_app_list%': 1,
141 }, {
142 'enable_app_list%': 0,
[email protected]b1a2b542013-01-10 07:33:09143 }],
144
145 # Enable Message Center only on ChromeOS and Windows for now.
146 ['use_ash==1 or OS=="win"', {
147 'enable_message_center%': 1,
148 }, {
[email protected]9b5dbf72013-01-09 20:29:15149 'enable_message_center%': 0,
[email protected]dc4e8b82012-11-15 03:58:16150 }],
[email protected]cb800562012-11-20 22:36:07151
152 ['use_aura==1 or (OS!="win" and OS!="mac" and OS!="ios" and OS!="android")', {
[email protected]a6f1bdf2012-11-28 15:52:26153 'use_default_render_theme%': 1,
[email protected]cb800562012-11-20 22:36:07154 }, {
155 'use_default_render_theme%': 0,
156 }],
[email protected]e72e55b2011-01-06 22:19:30157 ],
158 },
159
160 # Copy conditionally-set variables out one scope.
161 'chromeos%': '<(chromeos)',
[email protected]e72e55b2011-01-06 22:19:30162 'host_arch%': '<(host_arch)',
[email protected]94cdbf42012-12-11 19:49:22163 'target_arch%': '<(target_arch)',
[email protected]bb6aba32011-01-07 19:04:43164 'toolkit_views%': '<(toolkit_views)',
[email protected]8796d922012-08-07 01:23:11165 'toolkit_uses_gtk%': '<(toolkit_uses_gtk)',
[email protected]41423092011-08-25 15:39:58166 'use_aura%': '<(use_aura)',
[email protected]ed329be2012-01-03 22:02:16167 'use_ash%': '<(use_ash)',
[email protected]e0b85a52011-10-06 03:30:42168 'use_openssl%': '<(use_openssl)',
[email protected]7ddea9802012-02-22 23:08:05169 'enable_viewport%': '<(enable_viewport)',
[email protected]1efbaaa2012-04-24 02:43:24170 'enable_hidpi%': '<(enable_hidpi)',
[email protected]6155e702012-05-02 17:56:06171 'enable_touch_ui%': '<(enable_touch_ui)',
[email protected]0115f042012-07-27 20:36:53172 'android_build_type%': '<(android_build_type)',
[email protected]55d92492013-01-31 05:03:39173 'google_tv%': '<(google_tv)',
[email protected]dc4e8b82012-11-15 03:58:16174 'enable_app_list%': '<(enable_app_list)',
[email protected]9b5dbf72013-01-09 20:29:15175 'enable_message_center%': '<(enable_message_center)',
[email protected]cb800562012-11-20 22:36:07176 'use_default_render_theme%': '<(use_default_render_theme)',
[email protected]422e4efe2013-02-05 19:18:45177 'enable_web_intents%': 0, # TODO(thakis): Remove, http://crbug.com/173194
[email protected]94cdbf42012-12-11 19:49:22178 'buildtype%': '<(buildtype)',
[email protected]023d8242011-11-22 01:25:27179
[email protected]e14a9f92009-08-05 19:26:07180 # Override branding to select the desired branding flavor.
181 'branding%': 'Chromium',
182
[email protected]e72e55b2011-01-06 22:19:30183 # This variable tells WebCore.gyp and JavaScriptCore.gyp whether they are
184 # are built under a chromium full build (1) or a webkit.org chromium
185 # build (0).
186 'inside_chromium_build%': 1,
[email protected]8974e042010-06-21 18:06:52187
[email protected]e72e55b2011-01-06 22:19:30188 # Set to 1 to enable fast builds. It disables debug info for fastest
189 # compilation.
190 'fastbuild%': 0,
[email protected]93012ca2010-08-10 20:10:49191
[email protected]20960e072011-09-20 20:59:01192 # Set to 1 to enable dcheck in release without having to use the flag.
193 'dcheck_always_on%': 0,
194
[email protected]464750f2011-10-24 23:16:18195 # Disable file manager component extension by default.
[email protected]3d38d8e2011-04-16 20:48:51196 'file_manager_extension%': 0,
197
[email protected]e72e55b2011-01-06 22:19:30198 # Python version.
[email protected]a43c5a02011-05-27 06:54:51199 'python_ver%': '2.6',
[email protected]b3f23ba2010-04-26 22:58:17200
[email protected]e72e55b2011-01-06 22:19:30201 # Set ARM-v7 compilation flags
202 'armv7%': 0,
203
204 # Set Neon compilation flags (only meaningful if armv7==1).
205 'arm_neon%': 1,
206
207 # The system root for cross-compiles. Default: none.
208 'sysroot%': '',
209
[email protected]945361a2011-09-30 04:38:43210 # The system libdir used for this ABI.
211 'system_libdir%': 'lib',
212
[email protected]e72e55b2011-01-06 22:19:30213 # On Linux, we build with sse2 for Chromium builds.
214 'disable_sse2%': 0,
215
216 # Use libjpeg-turbo as the JPEG codec used by Chromium.
[email protected]32e56e52011-02-28 02:28:03217 'use_libjpeg_turbo%': 1,
[email protected]e72e55b2011-01-06 22:19:30218
[email protected]d9113542012-07-18 17:11:28219 # Use system libjpeg. Note that the system's libjepg will be used even if
220 # use_libjpeg_turbo is set.
221 'use_system_libjpeg%': 0,
222
[email protected]e72e55b2011-01-06 22:19:30223 # Variable 'component' is for cases where we would like to build some
224 # components as dynamic shared libraries but still need variable
225 # 'library' for static libraries.
226 # By default, component is set to whatever library is set to and
227 # it can be overriden by the GYP command line or by ~/.gyp/include.gypi.
[email protected]5a547332011-05-19 23:18:53228 'component%': 'static_library',
[email protected]e72e55b2011-01-06 22:19:30229
[email protected]bb6aba32011-01-07 19:04:43230 # Set to select the Title Case versions of strings in GRD files.
231 'use_titlecase_in_grd_files%': 0,
[email protected]63692212010-09-16 00:22:21232
[email protected]98da0042011-02-02 00:10:27233 # Use translations provided by volunteers at launchpad.net. This
234 # currently only works on Linux.
[email protected]00dc155832011-02-01 18:51:19235 'use_third_party_translations%': 0,
236
[email protected]9a425422011-01-11 00:53:18237 # Remoting compilation is enabled by default. Set to 0 to disable.
238 'remoting%': 1,
239
[email protected]1ec68c42011-06-01 13:56:25240 # Configuration policy is enabled by default. Set to 0 to disable.
241 'configuration_policy%': 1,
242
[email protected]6c521fed2012-11-29 17:00:03243 # Variable safe_browsing is used to control the build time configuration
244 # for safe browsing feature. Safe browsing can be compiled in 3 different
245 # levels: 0 disables it, 1 enables it fully, and 2 enables only UI and
246 # reporting features without enabling phishing and malware detection. This
247 # is useful to integrate a third party phishing/malware detection to
248 # existing safe browsing logic.
[email protected]4b58e7d2011-07-11 10:22:56249 'safe_browsing%': 1,
250
[email protected]9eb100e2011-10-14 05:08:22251 # Speech input is compiled in by default. Set to 0 to disable.
252 'input_speech%': 1,
253
[email protected]7cce3232011-10-28 10:41:57254 # Notifications are compiled in by default. Set to 0 to disable.
255 'notifications%' : 1,
256
[email protected]970fd4e2012-12-19 11:09:37257 # Use dsymutil to generate real .dSYM files on Mac. The default is 0 for
258 # regular builds and 1 for ASan builds.
259 'mac_want_real_dsym%': 'default',
260
[email protected]5d451ad2011-02-11 16:43:46261 # If this is set, the clang plugins used on the buildbot will be used.
262 # Run tools/clang/scripts/update.sh to make sure they are compiled.
263 # This causes 'clang_chrome_plugins_flags' to be set.
264 # Has no effect if 'clang' is not set as well.
[email protected]3bb37e62012-04-19 03:40:08265 'clang_use_chrome_plugins%': 1,
[email protected]5d451ad2011-02-11 16:43:46266
[email protected]2e82fa52012-11-27 23:41:44267 # Enable building with ASAN (Clang's -fsanitize=address option).
268 # -fsanitize=address only works with clang, but asan=1 implies clang=1
[email protected]92799b632011-08-15 14:33:06269 # See https://sites.google.com/a/chromium.org/dev/developers/testing/addresssanitizer
270 'asan%': 0,
271
[email protected]927a9d672012-11-09 11:28:20272 # Enable building with TSAN (Clang's -fsanitize=thread option).
273 # -fsanitize=thread only works with clang, but tsan=1 implies clang=1
[email protected]c9a829272012-07-04 07:51:12274 # See http://clang.llvm.org/docs/ThreadSanitizer.html
275 'tsan%': 0,
[email protected]7bdd7d7c2012-11-01 10:36:16276 'tsan_blacklist%': '<(PRODUCT_DIR)/../../tools/valgrind/tsan_v2/ignores.txt',
[email protected]c9a829272012-07-04 07:51:12277
[email protected]7ce58b22012-09-26 05:17:25278 # Use a modified version of Clang to intercept allocated types and sizes
279 # for allocated objects. clang_type_profiler=1 implies clang=1.
280 # See http://dev.chromium.org/developers/deep-memory-profiler/cpp-object-type-identifier
281 # TODO(dmikurube): Support mac. See http://crbug.com/123758#c11
282 'clang_type_profiler%': 0,
283
[email protected]8a6abd12012-05-16 10:04:44284 # Set to true to instrument the code with function call logger.
285 # See src/third_party/cygprofile/cyg-profile.cc for details.
286 'order_profiling%': 0,
287
[email protected]00b0a7f2012-01-25 15:30:46288 # Use the provided profiled order file to link Chrome image with it.
289 # This makes Chrome faster by better using CPU cache when executing code.
290 # This is known as PGO (profile guided optimization).
291 # See https://sites.google.com/a/google.com/chrome-msk/dev/boot-speed-up-effort
292 'order_text_section%' : "",
293
[email protected]1ad5a7b2011-06-24 03:15:13294 # Set to 1 compile with -fPIC cflag on linux. This is a must for shared
295 # libraries on linux x86-64 and arm, plus ASLR.
296 'linux_fpic%': 1,
297
[email protected]bd7b6fe2012-03-05 21:02:40298 # Whether one-click signin is enabled or not.
299 'enable_one_click_signin%': 0,
300
[email protected]6a3cd37e2012-04-17 17:13:34301 # Enable Chrome browser extensions
302 'enable_extensions%': 1,
303
[email protected]658677f2012-06-09 06:04:02304 # Enable browser automation.
305 'enable_automation%': 1,
306
[email protected]6ee43a72012-12-07 22:44:40307 # Enable Google Now.
308 'enable_google_now%': 1,
309
[email protected]703369a2012-11-05 20:40:31310 # Enable language detection.
311 'enable_language_detection%': 1,
312
[email protected]658677f2012-06-09 06:04:02313 # Enable printing support and UI.
314 'enable_printing%': 1,
315
[email protected]5ffb0a42012-01-27 09:36:11316 # Enable Web Intents web content registration via HTML element
317 # and WebUI managing such registrations.
318 'enable_web_intents_tag%': 0,
[email protected]62af76e2011-08-01 02:34:01319
[email protected]dda90ae2011-07-19 22:07:48320 # Webrtc compilation is enabled by default. Set to 0 to disable.
321 'enable_webrtc%': 1,
322
[email protected]67c125d2011-10-11 18:58:22323 # PPAPI by default does not support plugins making calls off the main
324 # thread. Set to 1 to turn on experimental support for out-of-process
325 # plugins to make call of the main thread.
[email protected]719b7812012-11-08 00:33:21326 'enable_pepper_threading%': 1,
[email protected]67c125d2011-10-11 18:58:22327
[email protected]cdb756ef2012-04-05 18:34:53328 # Enables use of the session service, which is enabled by default.
329 # Support for disabling depends on the platform.
330 'enable_session_service%': 1,
331
[email protected]6b40bb582012-03-15 20:50:38332 # Enables theme support, which is enabled by default. Support for
333 # disabling depends on the platform.
334 'enable_themes%': 1,
335
[email protected]4ffe78a2012-10-04 20:55:15336 # Uses OEM-specific wallpaper resources on Chrome OS.
337 'use_oem_wallpaper%': 0,
338
[email protected]0acdd772012-04-05 22:53:00339 # Enables support for background apps.
340 'enable_background%': 1,
341
[email protected]44879ed2012-04-06 01:11:02342 # Enable the task manager by default.
343 'enable_task_manager%': 1,
[email protected]e1de87f2012-05-02 17:20:45344
[email protected]9bfe0ab2012-08-30 13:18:11345 # Enable FTP support by default.
346 'disable_ftp_support%': 0,
347
[email protected]22d6dd72012-05-15 07:29:55348 # XInput2 multitouch support is disabled by default (use_xi2_mt=0).
349 # Setting to non-zero value enables XI2 MT. When XI2 MT is enabled,
350 # the input value also defines the required XI2 minor minimum version.
351 # For example, use_xi2_mt=2 means XI2.2 or above version is required.
352 'use_xi2_mt%': 0,
353
[email protected]9061bee82012-01-16 11:45:17354 # Use of precompiled headers on Windows.
355 #
[email protected]9061bee82012-01-16 11:45:17356 # This variable may be explicitly set to 1 (enabled) or 0
357 # (disabled) in ~/.gyp/include.gypi or via the GYP command line.
358 # This setting will override the default.
359 #
[email protected]c3340fb32012-12-20 20:45:39360 # See
[email protected]9061bee82012-01-16 11:45:17361 # http://code.google.com/p/chromium/wiki/WindowsPrecompiledHeaders
362 # for details.
[email protected]d5cf9fb2011-09-27 00:15:16363 'chromium_win_pch%': 0,
364
[email protected]3bb37e62012-04-19 03:40:08365 # Set this to true when building with Clang.
366 # See http://code.google.com/p/chromium/wiki/Clang for details.
367 'clang%': 0,
368
[email protected]18e0f39b2012-01-17 16:47:34369 # Enable plug-in installation by default.
370 'enable_plugin_installation%': 1,
371
[email protected]6d17f6392012-12-05 05:24:54372 # Enable PPAPI and NPAPI by default.
373 # TODO(nileshagrawal): Make this flag enable/disable NPAPI as well
374 # as PPAPI; see crbug.com/162667.
375 'enable_plugins%': 1,
376
[email protected]62424a52012-03-18 03:09:50377 # Specifies whether to use canvas_skia.cc in place of platform
[email protected]4ddae4b2012-03-15 17:32:42378 # specific implementations of gfx::Canvas. Affects text drawing in the
[email protected]d18e50312012-01-25 17:49:35379 # Chrome UI.
380 # TODO(asvitkine): Enable this on all platforms and delete this flag.
381 # http://crbug.com/105550
[email protected]62424a52012-03-18 03:09:50382 'use_canvas_skia%': 0,
[email protected]d18e50312012-01-25 17:49:35383
[email protected]a9318c72012-03-01 01:29:47384 # Set to "tsan", "memcheck", or "drmemory" to configure the build to work
385 # with one of those tools.
386 'build_for_tool%': '',
387
[email protected]01971642012-03-07 14:39:56388 # Whether tests targets should be run, archived or just have the
389 # dependencies verified. All the tests targets have the '_run' suffix,
390 # e.g. base_unittests_run runs the target base_unittests. The test target
[email protected]5dcce7f82012-10-04 00:08:07391 # always calls tools/swarm_client/isolate.py. See the script's --help for
392 # more information and the valid --mode values. Meant to be overriden with
[email protected]01971642012-03-07 14:39:56393 # GYP_DEFINES.
[email protected]5d606072012-04-30 20:14:13394 # TODO(maruel): Converted the default from 'check' to 'noop' so work can
395 # be done while the builders are being reconfigured to check out test data
396 # files.
[email protected]0ef3a522012-05-15 14:56:33397 'test_isolation_mode%': 'noop',
[email protected]37138132013-01-17 23:08:52398 # If no directory is specified then a temporary directory will be used.
399 'test_isolation_outdir%': '',
[email protected]01971642012-03-07 14:39:56400
[email protected]740ebed2012-06-27 19:14:06401 'sas_dll_path%': '<(DEPTH)/third_party/platformsdk_win7/files/redist/x86',
[email protected]49ae3e52012-04-12 09:50:12402 'wix_path%': '<(DEPTH)/third_party/wix',
403
[email protected]0850e842013-01-19 03:44:31404 # Managed users are enabled by default.
405 'enable_managed_users%': 1,
406
[email protected]bb6aba32011-01-07 19:04:43407 'conditions': [
[email protected]33423fa2011-09-23 18:18:14408 # TODO(epoger): Figure out how to set use_skia=1 for Mac outside of
409 # the 'conditions' clause. Initial attempts resulted in chromium and
410 # webkit disagreeing on its setting.
[email protected]7d7564a12011-06-21 19:20:22411 ['OS=="mac"', {
[email protected]53c98db2012-03-14 16:02:21412 'use_skia%': 1,
[email protected]7d7564a12011-06-21 19:20:22413 }, {
414 'use_skia%': 1,
415 }],
416
[email protected]79e2336c2011-05-12 18:18:34417 # A flag for POSIX platforms
[email protected]c49ab0c2011-05-18 17:25:37418 ['OS=="win"', {
[email protected]79e2336c2011-05-12 18:18:34419 'os_posix%': 0,
[email protected]c49ab0c2011-05-18 17:25:37420 }, {
421 'os_posix%': 1,
[email protected]79e2336c2011-05-12 18:18:34422 }],
423
[email protected]df9167b2011-11-14 19:15:25424 # A flag for BSD platforms
425 ['OS=="freebsd" or OS=="openbsd"', {
426 'os_bsd%': 1,
427 }, {
428 'os_bsd%': 0,
429 }],
430
[email protected]c329adf82011-10-05 14:34:57431 # NSS usage.
[email protected]e0b85a52011-10-06 03:30:42432 ['(OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris") and use_openssl==0', {
[email protected]c329adf82011-10-05 14:34:57433 'use_nss%': 1,
434 }, {
435 'use_nss%': 0,
436 }],
[email protected]e0b85a52011-10-06 03:30:42437
[email protected]258dca42011-09-21 00:17:19438 # Flags to use X11 on non-Mac POSIX platforms
[email protected]1e013672012-06-29 22:12:20439 ['OS=="win" or OS=="mac" or OS=="ios" or OS=="android"', {
[email protected]258dca42011-09-21 00:17:19440 'use_glib%': 0,
[email protected]79e2336c2011-05-12 18:18:34441 'use_x11%': 0,
[email protected]c49ab0c2011-05-18 17:25:37442 }, {
[email protected]258dca42011-09-21 00:17:19443 'use_glib%': 1,
[email protected]c49ab0c2011-05-18 17:25:37444 'use_x11%': 1,
[email protected]79e2336c2011-05-12 18:18:34445 }],
[email protected]9a8175892012-03-20 02:11:58446
[email protected]efadeacf2011-10-27 19:01:00447 # We always use skia text rendering in Aura on Windows, since GDI
448 # doesn't agree with our BackingStore.
449 # TODO(beng): remove once skia text rendering is on by default.
450 ['use_aura==1 and OS=="win"', {
451 'enable_skia_text%': 1,
452 }],
[email protected]9edeb712011-09-20 21:20:33453
[email protected]63692212010-09-16 00:22:21454 # A flag to enable or disable our compile-time dependency
455 # on gnome-keyring. If that dependency is disabled, no gnome-keyring
456 # support will be available. This option is useful
[email protected]25bc66a22011-09-24 18:32:49457 # for Linux distributions and for Aura.
[email protected]ab2017e2012-02-07 01:54:50458 ['chromeos==1 or use_aura==1', {
[email protected]63692212010-09-16 00:22:21459 'use_gnome_keyring%': 0,
460 }, {
461 'use_gnome_keyring%': 1,
462 }],
[email protected]0afe5212010-10-01 18:56:11463
[email protected]8796d922012-08-07 01:23:11464 ['toolkit_uses_gtk==1 or OS=="mac" or OS=="ios"', {
[email protected]1e013672012-06-29 22:12:20465 # GTK+, Mac and iOS want Title Case strings
[email protected]bb6aba32011-01-07 19:04:43466 'use_titlecase_in_grd_files%': 1,
467 }],
468
[email protected]5f887612012-03-01 21:34:06469 # Enable file manager extension on Chrome OS.
470 ['chromeos==1', {
[email protected]ab2017e2012-02-07 01:54:50471 'file_manager_extension%': 1,
472 }, {
[email protected]3d38d8e2011-04-16 20:48:51473 'file_manager_extension%': 0,
474 }],
[email protected]7de46352011-09-12 15:39:19475
[email protected]c79d1972013-02-06 18:47:29476 ['OS=="win" or OS=="mac" or (OS=="linux" and chromeos==0)', {
[email protected]f032fe92012-06-12 19:20:01477 'enable_one_click_signin%': 1,
[email protected]e4b66bf2012-05-29 20:39:51478 }],
479
[email protected]da1c8d692011-09-20 20:35:01480 ['OS=="android"', {
[email protected]098dff8a2013-01-23 20:54:49481 'enable_automation%': 0,
[email protected]55e02302012-08-21 00:50:46482 'enable_extensions%': 0,
[email protected]6ee43a72012-12-07 22:44:40483 'enable_google_now%': 0,
[email protected]7831e9a2013-02-20 13:54:12484 'enable_language_detection%': 1,
[email protected]55e02302012-08-21 00:50:46485 'enable_printing%': 0,
486 'enable_themes%': 0,
[email protected]55e02302012-08-21 00:50:46487 'proprietary_codecs%': 1,
[email protected]48de0fc2012-08-02 11:03:58488 'remoting%': 0,
[email protected]da1c8d692011-09-20 20:35:01489 }],
[email protected]839d5172011-10-13 17:18:11490
[email protected]118347052013-01-12 08:35:43491 ['OS=="android" and android_build_type==0', {
492 'enable_webrtc%': 1,
493 }],
494
495 # Disable WebRTC for building WebView as part of Android system.
496 # TODO(boliu): Decide if we want WebRTC, and if so, also merge
497 # the necessary third_party repositories.
498 ['OS=="android" and android_build_type==1', {
499 'enable_webrtc%': 0,
500 }],
501
[email protected]0d16f292012-07-02 22:10:48502 ['OS=="ios"', {
[email protected]c4ac4d12012-09-12 12:02:24503 'configuration_policy%': 0,
[email protected]9bfe0ab2012-08-30 13:18:11504 'disable_ftp_support%': 1,
[email protected]c4ac4d12012-09-12 12:02:24505 'enable_automation%': 0,
506 'enable_extensions%': 0,
[email protected]6ee43a72012-12-07 22:44:40507 'enable_google_now%': 0,
[email protected]703369a2012-11-05 20:40:31508 'enable_language_detection%': 0,
[email protected]c4ac4d12012-09-12 12:02:24509 'enable_printing%': 0,
[email protected]3c6aa862012-11-05 17:11:44510 'enable_session_service%': 0,
[email protected]c4ac4d12012-09-12 12:02:24511 'enable_themes%': 0,
512 'enable_webrtc%': 0,
513 'notifications%': 0,
[email protected]0d16f292012-07-02 22:10:48514 'remoting%': 0,
[email protected]3c6aa862012-11-05 17:11:44515 'safe_browsing%': 0,
[email protected]0850e842013-01-19 03:44:31516 'enable_managed_users%': 0,
[email protected]0d16f292012-07-02 22:10:48517 }],
518
[email protected]839d5172011-10-13 17:18:11519 # Use GPU accelerated cross process image transport by default
[email protected]023d8242011-11-22 01:25:27520 # on linux builds with the Aura window manager
[email protected]f83c6f7f2012-01-28 03:23:01521 ['use_aura==1 and OS=="linux"', {
[email protected]1ee7c56c2011-10-19 14:51:33522 'ui_compositor_image_transport%': 1,
[email protected]839d5172011-10-13 17:18:11523 }, {
[email protected]1ee7c56c2011-10-19 14:51:33524 'ui_compositor_image_transport%': 0,
[email protected]839d5172011-10-13 17:18:11525 }],
[email protected]9061bee82012-01-16 11:45:17526
[email protected]c3340fb32012-12-20 20:45:39527 # Turn precompiled headers on by default.
528 ['OS=="win" and buildtype!="Official"', {
[email protected]9061bee82012-01-16 11:45:17529 'chromium_win_pch%': 1
530 }],
[email protected]18e0f39b2012-01-17 16:47:34531
[email protected]3d5173ec2012-03-27 04:08:23532 ['use_aura==1 or chromeos==1 or OS=="android"', {
[email protected]18e0f39b2012-01-17 16:47:34533 'enable_plugin_installation%': 0,
534 }, {
535 'enable_plugin_installation%': 1,
536 }],
[email protected]b07806c12012-02-03 22:44:59537
[email protected]55d92492013-01-31 05:03:39538 ['(OS=="android" and google_tv!=1) or OS=="ios"', {
[email protected]6d17f6392012-12-05 05:24:54539 'enable_plugins%': 0,
540 }, {
541 'enable_plugins%': 1,
542 }],
543
[email protected]8d726a42012-02-09 03:49:00544 # linux_use_gold_binary: whether to use the binary checked into
545 # third_party/gold.
[email protected]1d4ace782012-03-07 09:20:40546 ['OS=="linux"', {
[email protected]1e033482012-02-09 19:33:51547 'linux_use_gold_binary%': 1,
548 }, {
549 'linux_use_gold_binary%': 0,
550 }],
551
[email protected]be239492012-02-09 19:00:17552 # linux_use_gold_flags: whether to use build flags that rely on gold.
553 # On by default for x64 Linux. Temporarily off for ChromeOS as
554 # it failed on a buildbot.
[email protected]1d4ace782012-03-07 09:20:40555 ['OS=="linux" and chromeos==0', {
[email protected]be239492012-02-09 19:00:17556 'linux_use_gold_flags%': 1,
557 }, {
[email protected]8d726a42012-02-09 03:49:00558 'linux_use_gold_flags%': 0,
[email protected]b07806c12012-02-03 22:44:59559 }],
[email protected]2e22e2f2012-03-15 21:53:10560
[email protected]9394a3a2012-12-19 19:22:39561 ['chromeos==1', {
562 'linux_use_libgps%': 1,
563 }, { # chromeos==0
564 # Do not use libgps on desktop Linux by default,
565 # see http://crbug.com/103751.
566 'linux_use_libgps%': 0,
567 }],
568
[email protected]a95d5302012-11-03 00:02:19569 ['OS=="android" or OS=="ios"', {
[email protected]e6026962012-06-14 21:28:32570 'enable_captive_portal_detection%': 0,
571 }, {
572 'enable_captive_portal_detection%': 1,
573 }],
574
[email protected]3bd47e022012-03-22 04:19:12575 # Enable Skia UI text drawing incrementally on different platforms.
576 # http://crbug.com/105550
577 #
578 # On Aura, this allows per-tile painting to be used in the browser
579 # compositor.
[email protected]9197a9282012-05-30 14:12:32580 ['OS!="mac" and OS!="android"', {
[email protected]3bd47e022012-03-22 04:19:12581 'use_canvas_skia%': 1,
582 }],
[email protected]adb44342012-07-23 13:36:12583
[email protected]0753ea42012-08-30 20:15:44584 ['chromeos==1', {
585 # When building for ChromeOS we dont want Chromium to use libjpeg_turbo.
586 'use_libjpeg_turbo%': 0,
587 }],
588
[email protected]adb44342012-07-23 13:36:12589 ['OS=="android"', {
590 # When building as part of the Android system, use system libraries
591 # where possible to reduce ROM size.
592 'use_system_libjpeg%': '<(android_build_type)',
593 }],
[email protected]8a46f5f2012-12-05 00:47:12594
595 # Enable Settings App only on Windows.
596 ['enable_app_list==1 and OS=="win"', {
597 'enable_settings_app%': 1,
598 }, {
599 'enable_settings_app%': 0,
600 }],
[email protected]94cdbf42012-12-11 19:49:22601
602 ['OS=="linux" and target_arch=="arm" and chromeos==0', {
603 # Set some defaults for arm/linux chrome builds
604 'armv7%': 1,
605 'linux_breakpad%': 0,
606 'linux_use_tcmalloc%': 0,
607 'linux_use_gold_flags%': 0,
[email protected]84b00d12f2012-12-14 01:53:43608 # sysroot needs to be an absolute path otherwise it generates
[email protected]94cdbf42012-12-11 19:49:22609 # incorrect results when passed to pkg-config
[email protected]84b00d12f2012-12-14 01:53:43610 'sysroot%': '<!(cd <(DEPTH) && pwd -P)/arm-sysroot',
[email protected]94cdbf42012-12-11 19:49:22611 }], # OS=="linux" and target_arch=="arm" and chromeos==0
[email protected]eb5f1672013-01-31 07:56:46612
613 ['target_arch=="mipsel"', {
614 'sysroot': '<!(cd <(DEPTH) && pwd -P)/native_client/toolchain/linux_mips-trusted/sysroot',
615 }],
[email protected]b3f23ba2010-04-26 22:58:17616 ],
[email protected]2b113652012-09-17 17:01:39617
618 # Set this to 1 to use the Google-internal file containing
619 # official API keys for Google Chrome even in a developer build.
620 # Setting this variable explicitly to 1 will cause your build to
621 # fail if the internal file is missing.
622 #
623 # Set this to 0 to not use the internal file, even when it
624 # exists in your checkout.
625 #
626 # Leave set to 2 to have this variable implicitly set to 1 if
627 # you have src/google_apis/internal/google_chrome_api_keys.h in
628 # your checkout, and implicitly set to 0 if not.
629 #
630 # Note that official builds always behave as if this variable
631 # was explicitly set to 1, i.e. they always use official keys,
632 # and will fail to build if the internal file is missing.
633 'use_official_google_api_keys%': 2,
634
635 # Set these to bake the specified API keys and OAuth client
636 # IDs/secrets into your build.
637 #
638 # If you create a build without values baked in, you can instead
639 # set environment variables to provide the keys at runtime (see
640 # src/google_apis/google_api_keys.h for details). Features that
641 # require server-side APIs may fail to work if no keys are
642 # provided.
643 #
644 # Note that if you are building an official build or if
645 # use_official_google_api_keys has been set to 1 (explicitly or
646 # implicitly), these values will be ignored and the official
647 # keys will be used instead.
648 'google_api_key%': '',
649 'google_default_client_id%': '',
650 'google_default_client_secret%': '',
[email protected]e14a9f92009-08-05 19:26:07651 },
652
[email protected]e72e55b2011-01-06 22:19:30653 # Copy conditionally-set variables out one scope.
[email protected]e14a9f92009-08-05 19:26:07654 'branding%': '<(branding)',
655 'buildtype%': '<(buildtype)',
[email protected]e0d00142009-09-18 22:10:27656 'target_arch%': '<(target_arch)',
[email protected]cf185b32010-01-12 04:29:59657 'host_arch%': '<(host_arch)',
[email protected]c153e5352009-09-22 12:37:44658 'toolkit_views%': '<(toolkit_views)',
[email protected]1ee7c56c2011-10-19 14:51:33659 'ui_compositor_image_transport%': '<(ui_compositor_image_transport)',
[email protected]41423092011-08-25 15:39:58660 'use_aura%': '<(use_aura)',
[email protected]ed329be2012-01-03 22:02:16661 'use_ash%': '<(use_ash)',
[email protected]e0b85a52011-10-06 03:30:42662 'use_openssl%': '<(use_openssl)',
[email protected]c329adf82011-10-05 14:34:57663 'use_nss%': '<(use_nss)',
[email protected]df9167b2011-11-14 19:15:25664 'os_bsd%': '<(os_bsd)',
[email protected]79e2336c2011-05-12 18:18:34665 'os_posix%': '<(os_posix)',
[email protected]258dca42011-09-21 00:17:19666 'use_glib%': '<(use_glib)',
[email protected]79e2336c2011-05-12 18:18:34667 'toolkit_uses_gtk%': '<(toolkit_uses_gtk)',
[email protected]7d7564a12011-06-21 19:20:22668 'use_skia%': '<(use_skia)',
[email protected]79e2336c2011-05-12 18:18:34669 'use_x11%': '<(use_x11)',
[email protected]63692212010-09-16 00:22:21670 'use_gnome_keyring%': '<(use_gnome_keyring)',
[email protected]0afe5212010-10-01 18:56:11671 'linux_fpic%': '<(linux_fpic)',
[email protected]67c125d2011-10-11 18:58:22672 'enable_pepper_threading%': '<(enable_pepper_threading)',
[email protected]c153e5352009-09-22 12:37:44673 'chromeos%': '<(chromeos)',
[email protected]7ddea9802012-02-22 23:08:05674 'enable_viewport%': '<(enable_viewport)',
[email protected]1efbaaa2012-04-24 02:43:24675 'enable_hidpi%': '<(enable_hidpi)',
[email protected]6155e702012-05-02 17:56:06676 'enable_touch_ui%': '<(enable_touch_ui)',
[email protected]f56797b2011-09-25 00:04:35677 'use_xi2_mt%':'<(use_xi2_mt)',
[email protected]e47c32032011-03-01 19:26:20678 'file_manager_extension%': '<(file_manager_extension)',
[email protected]b2f030c2009-09-24 20:36:21679 'inside_chromium_build%': '<(inside_chromium_build)',
[email protected]9c1949e2009-10-02 19:59:54680 'fastbuild%': '<(fastbuild)',
[email protected]20960e072011-09-20 20:59:01681 'dcheck_always_on%': '<(dcheck_always_on)',
[email protected]a76fe1a2010-03-01 23:39:36682 'python_ver%': '<(python_ver)',
[email protected]eafc0b452010-02-26 21:53:43683 'armv7%': '<(armv7)',
684 'arm_neon%': '<(arm_neon)',
[email protected]4d83eb72010-03-04 16:42:23685 'sysroot%': '<(sysroot)',
[email protected]945361a2011-09-30 04:38:43686 'system_libdir%': '<(system_libdir)',
[email protected]8974e042010-06-21 18:06:52687 'component%': '<(component)',
[email protected]bb6aba32011-01-07 19:04:43688 'use_titlecase_in_grd_files%': '<(use_titlecase_in_grd_files)',
[email protected]9e94cca2011-02-04 17:38:17689 'use_third_party_translations%': '<(use_third_party_translations)',
[email protected]9a425422011-01-11 00:53:18690 'remoting%': '<(remoting)',
[email protected]bd7b6fe2012-03-05 21:02:40691 'enable_one_click_signin%': '<(enable_one_click_signin)',
[email protected]dda90ae2011-07-19 22:07:48692 'enable_webrtc%': '<(enable_webrtc)',
[email protected]d5cf9fb2011-09-27 00:15:16693 'chromium_win_pch%': '<(chromium_win_pch)',
[email protected]1ec68c42011-06-01 13:56:25694 'configuration_policy%': '<(configuration_policy)',
[email protected]4b58e7d2011-07-11 10:22:56695 'safe_browsing%': '<(safe_browsing)',
[email protected]9eb100e2011-10-14 05:08:22696 'input_speech%': '<(input_speech)',
[email protected]7cce3232011-10-28 10:41:57697 'notifications%': '<(notifications)',
[email protected]5d451ad2011-02-11 16:43:46698 'clang_use_chrome_plugins%': '<(clang_use_chrome_plugins)',
[email protected]970fd4e2012-12-19 11:09:37699 'mac_want_real_dsym%': '<(mac_want_real_dsym)',
[email protected]92799b632011-08-15 14:33:06700 'asan%': '<(asan)',
[email protected]c9a829272012-07-04 07:51:12701 'tsan%': '<(tsan)',
[email protected]7bdd7d7c2012-11-01 10:36:16702 'tsan_blacklist%': '<(tsan_blacklist)',
[email protected]7ce58b22012-09-26 05:17:25703 'clang_type_profiler%': '<(clang_type_profiler)',
[email protected]8a6abd12012-05-16 10:04:44704 'order_profiling%': '<(order_profiling)',
[email protected]00b0a7f2012-01-25 15:30:46705 'order_text_section%': '<(order_text_section)',
[email protected]6a3cd37e2012-04-17 17:13:34706 'enable_extensions%': '<(enable_extensions)',
[email protected]5ffb0a42012-01-27 09:36:11707 'enable_web_intents_tag%': '<(enable_web_intents_tag)',
[email protected]18e0f39b2012-01-17 16:47:34708 'enable_plugin_installation%': '<(enable_plugin_installation)',
[email protected]6d17f6392012-12-05 05:24:54709 'enable_plugins%': '<(enable_plugins)',
[email protected]cdb756ef2012-04-05 18:34:53710 'enable_session_service%': '<(enable_session_service)',
[email protected]6b40bb582012-03-15 20:50:38711 'enable_themes%': '<(enable_themes)',
[email protected]4ffe78a2012-10-04 20:55:15712 'use_oem_wallpaper%': '<(use_oem_wallpaper)',
[email protected]0acdd772012-04-05 22:53:00713 'enable_background%': '<(enable_background)',
[email protected]b07806c12012-02-03 22:44:59714 'linux_use_gold_binary%': '<(linux_use_gold_binary)',
[email protected]8d726a42012-02-09 03:49:00715 'linux_use_gold_flags%': '<(linux_use_gold_flags)',
[email protected]9394a3a2012-12-19 19:22:39716 'linux_use_libgps%': '<(linux_use_libgps)',
[email protected]62424a52012-03-18 03:09:50717 'use_canvas_skia%': '<(use_canvas_skia)',
[email protected]0ef3a522012-05-15 14:56:33718 'test_isolation_mode%': '<(test_isolation_mode)',
719 'test_isolation_outdir%': '<(test_isolation_outdir)',
[email protected]2e22e2f2012-03-15 21:53:10720 'enable_automation%': '<(enable_automation)',
[email protected]658677f2012-06-09 06:04:02721 'enable_printing%': '<(enable_printing)',
[email protected]6ee43a72012-12-07 22:44:40722 'enable_google_now%': '<(enable_google_now)',
[email protected]703369a2012-11-05 20:40:31723 'enable_language_detection%': '<(enable_language_detection)',
[email protected]e6026962012-06-14 21:28:32724 'enable_captive_portal_detection%': '<(enable_captive_portal_detection)',
[email protected]9bfe0ab2012-08-30 13:18:11725 'disable_ftp_support%': '<(disable_ftp_support)',
[email protected]44879ed2012-04-06 01:11:02726 'enable_task_manager%': '<(enable_task_manager)',
[email protected]740ebed2012-06-27 19:14:06727 'sas_dll_path%': '<(sas_dll_path)',
[email protected]49ae3e52012-04-12 09:50:12728 'wix_path%': '<(wix_path)',
[email protected]e190d272012-08-30 17:36:44729 'use_libjpeg_turbo%': '<(use_libjpeg_turbo)',
[email protected]adb44342012-07-23 13:36:12730 'use_system_libjpeg%': '<(use_system_libjpeg)',
[email protected]0115f042012-07-27 20:36:53731 'android_build_type%': '<(android_build_type)',
[email protected]55d92492013-01-31 05:03:39732 'google_tv%': '<(google_tv)',
[email protected]dc4e8b82012-11-15 03:58:16733 'enable_app_list%': '<(enable_app_list)',
[email protected]9b5dbf72013-01-09 20:29:15734 'enable_message_center%': '<(enable_message_center)',
[email protected]cb800562012-11-20 22:36:07735 'use_default_render_theme%': '<(use_default_render_theme)',
[email protected]efdc3442013-02-01 00:56:07736 'enable_web_intents%': '<(enable_web_intents)',
[email protected]dc4e8b82012-11-15 03:58:16737 'enable_settings_app%': '<(enable_settings_app)',
[email protected]2b113652012-09-17 17:01:39738 'use_official_google_api_keys%': '<(use_official_google_api_keys)',
739 'google_api_key%': '<(google_api_key)',
740 'google_default_client_id%': '<(google_default_client_id)',
741 'google_default_client_secret%': '<(google_default_client_secret)',
[email protected]0850e842013-01-19 03:44:31742 'enable_managed_users%': '<(enable_managed_users)',
[email protected]01971642012-03-07 14:39:56743
[email protected]b32da81e2013-02-20 10:35:01744 # Use system ffmpeg instead of bundled one.
745 'use_system_ffmpeg%': 0,
746
[email protected]46aa05cc42013-01-15 17:34:31747 # Use system mesa instead of bundled one.
748 'use_system_mesa%': 0,
749
[email protected]c486e4e2013-01-08 16:49:07750 # Use system nspr instead of the bundled one.
751 'use_system_nspr%': 0,
752
[email protected]2f325672012-10-31 23:29:37753 # Use system protobuf instead of bundled one.
754 'use_system_protobuf%': 0,
755
[email protected]371e1092011-10-12 20:37:36756 # Use system yasm instead of bundled one.
757 'use_system_yasm%': 0,
758
[email protected]cd00bd862012-02-29 00:40:36759 # Default to enabled PIE; this is important for ASLR but we may need to be
760 # able to turn it off for various reasons.
761 'linux_disable_pie%': 0,
762
[email protected]caa95c82009-11-23 22:39:32763 # The release channel that this build targets. This is used to restrict
764 # channel-specific build options, like which installer packages to create.
765 # The default is 'all', which does no channel-specific filtering.
766 'channel%': 'all',
767
[email protected]b3fb8092009-03-12 19:09:24768 # Override chromium_mac_pch and set it to 0 to suppress the use of
769 # precompiled headers on the Mac. Prefix header injection may still be
770 # used, but prefix headers will not be precompiled. This is useful when
771 # using distcc to distribute a build to compile slaves that don't
772 # share the same compiler executable as the system driving the compilation,
773 # because precompiled headers rely on pointers into a specific compiler
774 # executable's image. Setting this to 0 is needed to use an experimental
775 # Linux-Mac cross compiler distcc farm.
776 'chromium_mac_pch%': 1,
777
[email protected]27b687ec42012-03-26 22:22:15778 # The default value for mac_strip in target_defaults. This cannot be
779 # set there, per the comment about variable% in a target_defaults.
780 'mac_strip_release%': 1,
781
[email protected]f5ecbba12009-04-03 04:35:18782 # Set to 1 to enable code coverage. In addition to build changes
783 # (e.g. extra CFLAGS), also creates a new target in the src/chrome
784 # project file called "coverage".
785 # Currently ignored on Windows.
786 'coverage%': 0,
[email protected]653bd5f032009-04-08 12:55:49787
[email protected]9619e65d2012-05-23 19:06:52788 # Set to 1 to force Visual C++ to use legacy debug information format /Z7.
789 # This is useful for parallel compilation tools which can't support /Zi.
790 # Only used on Windows.
791 'win_z7%' : 0,
792
[email protected]7477ea6f2009-12-22 23:28:15793 # Although base/allocator lets you select a heap library via an
[email protected]7e0d664a2009-12-03 21:07:47794 # environment variable, the libcmt shim it uses sometimes gets in
795 # the way. To disable it entirely, and switch to normal msvcrt, do e.g.
796 # 'win_use_allocator_shim': 0,
797 # 'win_release_RuntimeLibrary': 2
798 # to ~/.gyp/include.gypi, gclient runhooks --force, and do a release build.
[email protected]8974e042010-06-21 18:06:52799 'win_use_allocator_shim%': 1, # 1 = shim allocator via libcmt; 0 = msvcrt
[email protected]279cd4212009-09-11 22:32:11800
[email protected]95ff8082009-11-13 22:21:01801 # Whether usage of OpenMAX is enabled.
802 'enable_openmax%': 0,
803
[email protected]d01120e62010-05-10 17:04:48804 # Whether proprietary audio/video codecs are assumed to be included with
805 # this build (only meaningful if branding!=Chrome).
806 'proprietary_codecs%': 0,
807
[email protected]e5b2eaa2009-04-14 01:39:12808 # TODO(bradnelson): eliminate this when possible.
809 # To allow local gyp files to prevent release.vsprops from being included.
810 # Yes(1) means include release.vsprops.
811 # Once all vsprops settings are migrated into gyp, this can go away.
812 'msvs_use_common_release%': 1,
[email protected]606116d22009-05-06 22:38:23813
[email protected]cbd5fd52009-08-26 00:14:27814 # TODO(bradnelson): eliminate this when possible.
815 # To allow local gyp files to override additional linker options for msvs.
816 # Yes(1) means set use the common linker options.
[email protected]48c7af72009-07-03 22:00:19817 'msvs_use_common_linker_extras%': 1,
818
[email protected]1ffb6502009-06-02 07:46:24819 # TODO(sgk): eliminate this if possible.
820 # It would be nicer to support this via a setting in 'target_defaults'
821 # in chrome/app/locales/locales.gypi overriding the setting in the
822 # 'Debug' configuration in the 'target_defaults' dict below,
823 # but that doesn't work as we'd like.
824 'msvs_debug_link_incremental%': '2',
825
[email protected]1f790ef2011-01-11 20:45:36826 # Needed for some of the largest modules.
827 'msvs_debug_link_nonincremental%': '1',
828
[email protected]6f390be2012-08-16 18:57:10829 # Turns on Use Library Dependency Inputs for linking chrome.dll on Windows
[email protected]5ab8f482011-08-18 18:30:06830 # to get incremental linking to be faster in debug builds.
[email protected]8f1da83d2012-08-06 21:49:26831 'incremental_chrome_dll%': '0',
[email protected]5ab8f482011-08-18 18:30:06832
[email protected]c54b41cb2012-08-24 20:58:24833 # The default settings for third party code for treating
834 # warnings-as-errors. Ideally, this would not be required, however there
835 # is some third party code that takes a long time to fix/roll. So, this
836 # flag allows us to have warnings as errors in general to prevent
837 # regressions in most modules, while working on the bits that are
838 # remaining.
839 'win_third_party_warn_as_error%': 'true',
840
[email protected]573136142009-07-15 22:48:37841 # This is the location of the sandbox binary. Chrome looks for this before
842 # running the zygote process. If found, and SUID, it will be used to
843 # sandbox the zygote process and, thus, all renderer processes.
844 'linux_sandbox_path%': '',
845
[email protected]ad6d2c42009-09-15 20:13:38846 # Set this to true to enable SELinux support.
847 'selinux%': 0,
[email protected]4c9cc6c2009-10-01 18:54:57848
[email protected]3bb37e62012-04-19 03:40:08849 # Clang stuff.
850 'clang%': '<(clang)',
[email protected]e4ddf332011-10-20 21:52:24851 'make_clang_dir%': 'third_party/llvm-build/Release+Asserts',
[email protected]58680ce2010-09-18 00:09:15852
[email protected]5e781232011-01-28 02:57:59853 # These two variables can be set in GYP_DEFINES while running
854 # |gclient runhooks| to let clang run a plugin in every compilation.
855 # Only has an effect if 'clang=1' is in GYP_DEFINES as well.
856 # Example:
[email protected]93120fe2011-02-03 20:46:42857 # 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:59858
859 'clang_load%': '',
860 'clang_add_plugin%': '',
861
[email protected]da1c8d692011-09-20 20:35:01862 # The default type of gtest.
863 'gtest_target_type%': 'executable',
864
[email protected]7664ab32011-02-01 23:35:25865 # Enable sampling based profiler.
866 # See http://google-perftools.googlecode.com/svn/trunk/doc/cpuprofile.html
867 'profiling%': '0',
868
[email protected]93b373502011-08-16 19:06:22869 # Enable strict glibc debug mode.
870 'glibcxx_debug%': 0,
[email protected]ce4367d2013-01-15 16:13:10871 # Compile in Breakpad support by default so that it can be tested,
872 # even if it not enabled by default at runtime.
873 'linux_breakpad%': 1,
[email protected]36532f332010-08-25 00:22:01874 # And if we want to dump symbols for Breakpad-enabled builds.
875 'linux_dump_symbols%': 0,
876 # And if we want to strip the binary after dumping symbols.
[email protected]05cb6962009-10-01 23:29:03877 'linux_strip_binary%': 0,
[email protected]1d87c282010-09-15 22:24:49878 # Strip the test binaries needed for Linux reliability tests.
879 'linux_strip_reliability_tests%': 0,
[email protected]05cb6962009-10-01 23:29:03880
[email protected]46ce5b562010-06-16 18:39:53881 # Enable TCMalloc.
882 'linux_use_tcmalloc%': 1,
[email protected]01699e22009-11-11 19:24:24883
[email protected]d8b60602010-03-26 09:41:22884 # Disable TCMalloc's heapchecker.
885 'linux_use_heapchecker%': 0,
886
[email protected]64e2d4a42010-08-27 10:13:21887 # Disable shadow stack keeping used by heapcheck to unwind the stacks
888 # better.
889 'linux_keep_shadow_stacks%': 0,
890
[email protected]556c5d72010-06-10 05:45:01891 # Set to 1 to link against libgnome-keyring instead of using dlopen().
892 'linux_link_gnome_keyring%': 0,
[email protected]abcc9ac2011-05-16 20:04:35893 # Set to 1 to link against gsettings APIs instead of using dlopen().
894 'linux_link_gsettings%': 0,
[email protected]556c5d72010-06-10 05:45:01895
[email protected]77c1b29392009-12-04 06:21:29896 # Set Thumb compilation flags.
897 'arm_thumb%': 0,
898
[email protected]53e0f642010-03-05 01:41:56899 # Set ARM fpu compilation flags (only meaningful if armv7==1 and
900 # arm_neon==0).
901 'arm_fpu%': 'vfpv3',
902
[email protected]5252af72012-05-04 19:26:40903 # Set ARM float abi compilation flag.
904 'arm_float_abi%': 'softfp',
905
[email protected]9821d0d2010-04-16 22:40:37906 # Enable new NPDevice API.
907 'enable_new_npdevice_api%': 0,
[email protected]ed154592010-04-29 00:18:50908
909 # Enable EGLImage support in OpenMAX
[email protected]58023be2011-02-04 20:34:14910 'enable_eglimage%': 1,
[email protected]ed154592010-04-29 00:18:50911
[email protected]6f51b27e2010-06-22 20:43:53912 # Enable a variable used elsewhere throughout the GYP files to determine
913 # whether to compile in the sources for the GPU plugin / process.
914 'enable_gpu%': 1,
915
[email protected]e72e55b2011-01-06 22:19:30916 # .gyp files or targets should set chromium_code to 1 if they build
917 # Chromium-specific code, as opposed to external code. This variable is
918 # used to control such things as the set of warnings to enable, and
919 # whether warnings are treated as errors.
920 'chromium_code%': 0,
921
[email protected]8d726a42012-02-09 03:49:00922 'release_valgrind_build%': 0,
923
[email protected]b1eb341c2011-11-09 18:46:07924 # TODO(thakis): Make this a blacklist instead, http://crbug.com/101600
925 'enable_wexit_time_destructors%': 0,
926
[email protected]e72e55b2011-01-06 22:19:30927 # Set to 1 to compile with the built in pdf viewer.
928 'internal_pdf%': 0,
929
[email protected]9e1149d72012-07-24 01:27:17930 # Set to 1 to compile with the OpenGL ES 2.0 conformance tests.
931 'internal_gles2_conform_tests%': 0,
932
[email protected]e72e55b2011-01-06 22:19:30933 # NOTE: When these end up in the Mac bundle, we need to replace '-' for '_'
934 # so Cocoa is happy (http://crbug.com/20441).
935 'locales': [
936 'am', 'ar', 'bg', 'bn', 'ca', 'cs', 'da', 'de', 'el', 'en-GB',
937 'en-US', 'es-419', 'es', 'et', 'fa', 'fi', 'fil', 'fr', 'gu', 'he',
938 'hi', 'hr', 'hu', 'id', 'it', 'ja', 'kn', 'ko', 'lt', 'lv',
[email protected]507066e2012-10-26 10:50:47939 'ml', 'mr', 'ms', 'nb', 'nl', 'pl', 'pt-PT', 'ro', 'ru',
[email protected]e72e55b2011-01-06 22:19:30940 'sk', 'sl', 'sr', 'sv', 'sw', 'ta', 'te', 'th', 'tr', 'uk',
941 'vi', 'zh-CN', 'zh-TW',
942 ],
943
[email protected]cc0322d2011-07-24 09:29:19944 # Pseudo locales are special locales which are used for testing and
945 # debugging. They don't get copied to the final app. For more info,
946 # check out https://sites.google.com/a/chromium.org/dev/Home/fake-bidi
947 'pseudo_locales': [
948 'fake-bidi',
949 ],
950
[email protected]bb6aba32011-01-07 19:04:43951 'grit_defines': [],
952
[email protected]bd3bd442011-03-28 07:58:51953 # If debug_devtools is set to 1, JavaScript files for DevTools are
954 # stored as is and loaded from disk. Otherwise, a concatenated file
955 # is stored in resources.pak. It is still possible to load JS files
956 # from disk by passing --debug-devtools cmdline switch.
957 'debug_devtools%': 0,
958
[email protected]464750f2011-10-24 23:16:18959 # The Java Bridge is not compiled in by default.
960 'java_bridge%': 0,
961
[email protected]1e013672012-06-29 22:12:20962 # Code signing for iOS binaries. The bots need to be able to disable this.
963 'chromium_ios_signing%': 1,
964
[email protected]33e1c372011-12-14 16:32:07965 # This flag is only used when disable_nacl==0 and disables all those
966 # subcomponents which would require the installation of a native_client
967 # untrusted toolchain.
968 'disable_nacl_untrusted%': 0,
969
[email protected]407dfa632011-12-23 11:59:35970 # Disable Dart by default.
971 'enable_dart%': 0,
972
[email protected]ff10b132012-02-29 22:53:30973 # The desired version of Windows SDK can be set in ~/.gyp/include.gypi.
974 'msbuild_toolset%': '',
975
[email protected]836285f22012-04-03 16:19:26976 # Native Client is enabled by default.
977 'disable_nacl%': 0,
978
[email protected]fa9d4e262012-08-21 04:39:00979 # Whether to build full debug version for Debug configuration on Android.
980 # Compared to full debug version, the default Debug configuration on Android
981 # has no full v8 debug, has size optimization and linker gc section, so that
982 # we can build a debug version with acceptable size and performance.
983 'android_full_debug%': 0,
984
[email protected]65885272012-10-05 23:55:50985 # Sets the default version name and code for Android app, by default we
986 # do a developer build.
987 'android_app_version_name%': 'Developer Build',
988 'android_app_version_code%': 0,
989
[email protected]740ebed2012-06-27 19:14:06990 'sas_dll_exists': '<!(python <(DEPTH)/build/dir_exists.py <(sas_dll_path))',
[email protected]49ae3e52012-04-12 09:50:12991 'wix_exists': '<!(python <(DEPTH)/build/dir_exists.py <(wix_path))',
992
[email protected]1f8d9402012-07-06 22:47:56993 'windows_sdk_default_path': '<(DEPTH)/third_party/platformsdk_win8/files',
994 'directx_sdk_default_path': '<(DEPTH)/third_party/directxsdk/files',
[email protected]1ab48032012-07-02 21:48:05995
[email protected]fd6d8822012-12-08 06:56:11996 # Whether we are using the rlz library or not. Platforms like Android send
997 # rlz codes for searches but do not use the library.
[email protected]b6a5ac92012-10-29 18:17:22998 'enable_rlz%': 0,
999
[email protected]912c55c2009-07-31 23:33:551000 'conditions': [
[email protected]1f8d9402012-07-06 22:47:561001 ['OS=="win" and "<!(python <(DEPTH)/build/dir_exists.py <(windows_sdk_default_path))"=="True"', {
1002 'windows_sdk_path%': '<(windows_sdk_default_path)',
1003 }, {
1004 'windows_sdk_path%': 'C:/Program Files (x86)/Windows Kits/8.0',
1005 }],
1006 ['OS=="win" and "<!(python <(DEPTH)/build/dir_exists.py <(directx_sdk_default_path))"=="True"', {
1007 'directx_sdk_path%': '<(directx_sdk_default_path)',
1008 }, {
1009 'directx_sdk_path%': '$(DXSDK_DIR)',
1010 }],
[email protected]54184ce72012-10-18 07:11:261011 ['OS=="win"', {
1012 'windows_driver_kit_path%': '$(WDK_DIR)',
1013 }],
[email protected]2b113652012-09-17 17:01:391014 # If use_official_google_api_keys is already set (to 0 or 1), we
1015 # do none of the implicit checking. If it is set to 1 and the
1016 # internal keys file is missing, the build will fail at compile
1017 # time. If it is set to 0 and keys are not provided by other
1018 # means, a warning will be printed at compile time.
1019 ['use_official_google_api_keys==2', {
1020 'use_official_google_api_keys%':
1021 '<!(python <(DEPTH)/google_apis/build/check_internal.py <(DEPTH)/google_apis/internal/google_chrome_api_keys.h)',
1022 }],
[email protected]1e013672012-06-29 22:12:201023 ['os_posix==1 and OS!="mac" and OS!="ios"', {
[email protected]4d83eb72010-03-04 16:42:231024 # Figure out the python architecture to decide if we build pyauto.
[email protected]945361a2011-09-30 04:38:431025 '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:271026 'conditions': [
[email protected]07c27ab02012-07-17 17:00:201027 # TODO(glider): set clang to 1 earlier for ASan and TSan builds so
1028 # that it takes effect here.
1029 ['clang==0 and asan==0 and tsan==0', {
1030 # This will set gcc_version to XY if you are running gcc X.Y.*.
1031 # This is used to tweak build flags for gcc 4.5.
1032 'gcc_version%': '<!(python <(DEPTH)/build/compiler_version.py)',
1033 }, {
1034 'gcc_version%': 0,
1035 }],
[email protected]eb5f1672013-01-31 07:56:461036 ['target_arch=="mipsel"', {
1037 'werror%': '',
1038 'disable_nacl%': 1,
1039 'linux_use_gold_binary%': 0,
1040 'linux_use_gold_flags%': 0,
1041 'nacl_untrusted_build%': 0,
1042 'linux_use_tcmalloc%': 0,
1043 'linux_breakpad%': 0,
1044 'sysroot%': '<(sysroot)',
1045 }],
[email protected]4c9cc6c2009-10-01 18:54:571046 # All Chrome builds have breakpad symbols, but only process the
1047 # symbols from official builds.
[email protected]c913cb82010-08-31 19:44:081048 ['(branding=="Chrome" and buildtype=="Official")', {
[email protected]4c9cc6c2009-10-01 18:54:571049 'linux_dump_symbols%': 1,
[email protected]4c9cc6c2009-10-01 18:54:571050 }],
[email protected]cbd5fd52009-08-26 00:14:271051 ],
[email protected]1e013672012-06-29 22:12:201052 }], # os_posix==1 and OS!="mac" and OS!="ios"
[email protected]0d16f292012-07-02 22:10:481053 ['OS=="ios"', {
1054 'disable_nacl%': 1,
[email protected]a95d5302012-11-03 00:02:191055 'enable_background%': 0,
[email protected]aeaaaf02012-09-10 17:46:151056 'enable_gpu%': 0,
[email protected]a35aa362012-10-30 13:55:071057 'enable_task_manager%': 0,
[email protected]abde6732012-08-16 16:10:351058 'icu_use_data_file_flag%': 1,
[email protected]861557e2012-07-24 16:27:151059 'use_system_bzip2%': 1,
[email protected]4e3996f92012-07-17 10:41:131060 'use_system_libxml%': 1,
[email protected]073bef82012-07-24 18:03:471061 'use_system_sqlite%': 1,
[email protected]57871bc2012-08-20 16:28:121062
1063 # The Mac SDK is set for iOS builds and passed through to Mac
1064 # sub-builds. This allows the Mac sub-build SDK in an iOS build to be
1065 # overridden from the command line the same way it is for a Mac build.
1066 'mac_sdk%': '<!(python <(DEPTH)/build/mac/find_sdk.py 10.6)',
[email protected]2c261532012-10-06 00:46:291067
1068 # iOS SDK and deployment target support. The iOS 5.0 SDK is actually
1069 # what is required, but the value is left blank so when it is set in
1070 # the project files it will be the "current" iOS SDK. Forcing 5.0
1071 # even though it is "current" causes Xcode to spit out a warning for
1072 # every single project file for not using the "current" SDK.
1073 'ios_sdk%': '',
1074 'ios_sdk_path%': '',
[email protected]4e4a42652012-12-20 16:56:181075 'ios_deployment_target%': '5.0',
[email protected]fcd634182012-10-09 10:50:321076
1077 'conditions': [
1078 # ios_product_name is set to the name of the .app bundle as it should
1079 # appear on disk.
1080 ['branding=="Chrome"', {
1081 'ios_product_name%': 'Chrome',
1082 }, { # else: branding!="Chrome"
1083 'ios_product_name%': 'Chromium',
1084 }],
1085 ['branding=="Chrome" and buildtype=="Official"', {
1086 'ios_breakpad%': 1,
1087 }, { # else: branding!="Chrome" or buildtype!="Official"
1088 'ios_breakpad%': 0,
1089 }],
1090 ],
1091 }], # OS=="ios"
[email protected]da1c8d692011-09-20 20:35:011092 ['OS=="android"', {
1093 # Location of Android NDK.
1094 'variables': {
1095 'variables': {
[email protected]5061d152013-01-16 17:45:571096 # Unfortuantely we have to use absolute paths to the SDK/NDK beause
1097 # they're passed to ant which uses a different relative path from
1098 # gyp.
1099 'android_ndk_root%': '<!(cd <(DEPTH) && pwd -P)/third_party/android_tools/ndk/',
1100 'android_sdk_root%': '<!(cd <(DEPTH) && pwd -P)/third_party/android_tools/sdk/',
1101 'android_host_arch%': '<!(uname -m)',
[email protected]da1c8d692011-09-20 20:35:011102 },
[email protected]5061d152013-01-16 17:45:571103 # Copy conditionally-set variables out one scope.
[email protected]da1c8d692011-09-20 20:35:011104 'android_ndk_root%': '<(android_ndk_root)',
[email protected]5061d152013-01-16 17:45:571105 'android_sdk_root%': '<(android_sdk_root)',
1106
1107 # Android API-level of the SDK used for compilation.
1108 'android_sdk_version%': '17',
1109
1110 'conditions': [
1111 ['target_arch == "ia32"', {
1112 'android_app_abi%': 'x86',
1113 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-x86/gdbserver/gdbserver',
1114 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-9/arch-x86',
1115 'android_toolchain%': '<(android_ndk_root)/toolchains/x86-4.6/prebuilt/<(host_os)-<(android_host_arch)/bin',
1116 }],
1117 ['target_arch=="arm"', {
1118 'conditions': [
1119 ['armv7==0', {
1120 'android_app_abi%': 'armeabi',
1121 }, {
1122 'android_app_abi%': 'armeabi-v7a',
1123 }],
1124 ],
1125 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-arm/gdbserver/gdbserver',
1126 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-9/arch-arm',
1127 'android_toolchain%': '<(android_ndk_root)/toolchains/arm-linux-androideabi-4.6/prebuilt/<(host_os)-<(android_host_arch)/bin',
1128 }],
1129 ],
[email protected]da1c8d692011-09-20 20:35:011130 },
[email protected]5061d152013-01-16 17:45:571131 # Copy conditionally-set variables out one scope.
1132 'android_app_abi%': '<(android_app_abi)',
1133 'android_gdbserver%': '<(android_gdbserver)',
[email protected]da1c8d692011-09-20 20:35:011134 'android_ndk_root%': '<(android_ndk_root)',
1135 'android_ndk_sysroot': '<(android_ndk_sysroot)',
[email protected]5061d152013-01-16 17:45:571136 'android_sdk_root%': '<(android_sdk_root)',
1137 'android_sdk_version%': '<(android_sdk_version)',
1138 'android_toolchain%': '<(android_toolchain)',
1139
[email protected]da1c8d692011-09-20 20:35:011140 'android_ndk_include': '<(android_ndk_sysroot)/usr/include',
1141 'android_ndk_lib': '<(android_ndk_sysroot)/usr/lib',
[email protected]5061d152013-01-16 17:45:571142 'android_sdk_tools%': '<(android_sdk_root)/platform-tools',
1143 'android_sdk%': '<(android_sdk_root)/platforms/android-<(android_sdk_version)',
[email protected]da1c8d692011-09-20 20:35:011144
[email protected]c0f76312012-08-16 13:52:041145 # Location of the "strip" binary, used by both gyp and scripts.
1146 'android_strip%' : '<!(/bin/echo -n <(android_toolchain)/*-strip)',
1147
[email protected]ef7ed7a2012-05-29 23:19:131148 # Provides an absolute path to PRODUCT_DIR (e.g. out/Release). Used
1149 # to specify the output directory for Ant in the Android build.
1150 'ant_build_out': '`cd <(PRODUCT_DIR) && pwd -P`',
1151
[email protected]da1c8d692011-09-20 20:35:011152 # Always uses openssl.
1153 'use_openssl%': 1,
1154
1155 'proprietary_codecs%': '<(proprietary_codecs)',
[email protected]44879ed2012-04-06 01:11:021156 'enable_task_manager%': 0,
[email protected]23a30e62012-12-01 03:39:071157 'safe_browsing%': 2,
[email protected]da1c8d692011-09-20 20:35:011158 'configuration_policy%': 0,
[email protected]9eb100e2011-10-14 05:08:221159 'input_speech%': 0,
[email protected]658677f2012-06-09 06:04:021160 'enable_automation%': 0,
[email protected]464750f2011-10-24 23:16:181161 'java_bridge%': 1,
[email protected]48de0fc2012-08-02 11:03:581162 'build_ffmpegsumo%': 0,
1163 'linux_use_tcmalloc%': 0,
[email protected]658677f2012-06-09 06:04:021164
[email protected]ad17e342012-07-17 20:45:481165 # Disable Native Client.
1166 'disable_nacl%': 1,
1167
[email protected]58242012012-04-12 16:14:311168 # Android does not support background apps.
[email protected]0acdd772012-04-05 22:53:001169 'enable_background%': 0,
[email protected]5fd2e842012-03-01 00:29:111170
[email protected]cdb756ef2012-04-05 18:34:531171 # Sessions are store separately in the Java side.
1172 'enable_session_service%': 0,
1173
[email protected]5fd2e842012-03-01 00:29:111174 # Set to 1 once we have a notification system for Android.
1175 # http://crbug.com/115320
[email protected]7cce3232011-10-28 10:41:571176 'notifications%': 0,
[email protected]da1c8d692011-09-20 20:35:011177
[email protected]ad17e342012-07-17 20:45:481178 'p2p_apis%' : 0,
1179
[email protected]7b56f1872012-05-23 00:48:501180 # TODO(jrg): when 'gtest_target_type'=='shared_library' and
[email protected]d9f96952012-04-19 21:02:091181 # OS==android, make all gtest_targets depend on
1182 # testing/android/native_test.gyp:native_test_apk.
[email protected]48de0fc2012-08-02 11:03:581183 'gtest_target_type%': 'shared_library',
[email protected]da1c8d692011-09-20 20:35:011184
1185 # Uses system APIs for decoding audio and video.
1186 'use_libffmpeg%': '0',
1187
[email protected]f1dc1e52012-12-12 21:39:001188 # Always use the chromium skia.
[email protected]da1c8d692011-09-20 20:35:011189 'use_system_skia%': '0',
[email protected]da1c8d692011-09-20 20:35:011190
[email protected]adb44342012-07-23 13:36:121191 # When building as part of the Android system, use system libraries
1192 # where possible to reduce ROM size.
1193 # TODO(steveblock): Investigate using the system version of sqlite.
[email protected]3a820d12012-06-27 12:56:321194 'use_system_sqlite%': 0, # '<(android_build_type)',
[email protected]03bdcc122012-07-10 09:02:251195 'use_system_expat%': '<(android_build_type)',
[email protected]ad17e342012-07-17 20:45:481196 'use_system_icu%': '<(android_build_type)',
[email protected]f91ba812012-07-11 00:00:511197 'use_system_stlport%': '<(android_build_type)',
[email protected]adb44342012-07-23 13:36:121198
[email protected]0850e842013-01-19 03:44:311199 'enable_managed_users%': 0,
1200
[email protected]da1c8d692011-09-20 20:35:011201 # Copy it out one scope.
1202 'android_build_type%': '<(android_build_type)',
1203 }], # OS=="android"
[email protected]e14a9f92009-08-05 19:26:071204 ['OS=="mac"', {
[email protected]2c261532012-10-06 00:46:291205 'variables': {
1206 # Mac OS X SDK and deployment target support. The SDK identifies
1207 # the version of the system headers that will be used, and
1208 # corresponds to the MAC_OS_X_VERSION_MAX_ALLOWED compile-time
1209 # macro. "Maximum allowed" refers to the operating system version
1210 # whose APIs are available in the headers. The deployment target
1211 # identifies the minimum system version that the built products are
1212 # expected to function on. It corresponds to the
1213 # MAC_OS_X_VERSION_MIN_REQUIRED compile-time macro. To ensure these
1214 # macros are available, #include <AvailabilityMacros.h>. Additional
1215 # documentation on these macros is available at
1216 # http://developer.apple.com/mac/library/technotes/tn2002/tn2064.html#SECTION3
1217 # Chrome normally builds with the Mac OS X 10.6 SDK and sets the
1218 # deployment target to 10.6. Other projects, such as O3D, may
1219 # override these defaults.
1220
1221 # Normally, mac_sdk_min is used to find an SDK that Xcode knows
1222 # about that is at least the specified version. In official builds,
1223 # the SDK must match mac_sdk_min exactly. If the SDK is installed
1224 # someplace that Xcode doesn't know about, set mac_sdk_path to the
1225 # path to the SDK; when set to a non-empty string, SDK detection
1226 # based on mac_sdk_min will be bypassed entirely.
1227 'mac_sdk_min%': '10.6',
1228 'mac_sdk_path%': '',
1229
1230 'mac_deployment_target%': '10.6',
1231 },
1232
1233 'mac_sdk_min': '<(mac_sdk_min)',
1234 'mac_sdk_path': '<(mac_sdk_path)',
1235 'mac_deployment_target': '<(mac_deployment_target)',
1236
[email protected]e1ece302011-09-15 03:58:111237 # Enable clang on mac by default!
1238 'clang%': 1,
[email protected]2c261532012-10-06 00:46:291239
[email protected]794fb4782011-12-14 19:10:561240 # Compile in Breakpad support by default so that it can be
1241 # tested, even if it is not enabled by default at runtime.
1242 'mac_breakpad_compiled_in%': 1,
[email protected]e14a9f92009-08-05 19:26:071243 'conditions': [
1244 # mac_product_name is set to the name of the .app bundle as it should
1245 # appear on disk. This duplicates data from
1246 # chrome/app/theme/chromium/BRANDING and
1247 # chrome/app/theme/google_chrome/BRANDING, but is necessary to get
1248 # these names into the build system.
1249 ['branding=="Chrome"', {
1250 'mac_product_name%': 'Google Chrome',
1251 }, { # else: branding!="Chrome"
1252 'mac_product_name%': 'Chromium',
1253 }],
1254
[email protected]e14a9f92009-08-05 19:26:071255 ['branding=="Chrome" and buildtype=="Official"', {
[email protected]2c261532012-10-06 00:46:291256 '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:561257 # Enable uploading crash dumps.
1258 'mac_breakpad_uploads%': 1,
1259 # Enable dumping symbols at build time for use by Mac Breakpad.
[email protected]e14a9f92009-08-05 19:26:071260 'mac_breakpad%': 1,
[email protected]794fb4782011-12-14 19:10:561261 # Enable Keystone auto-update support.
[email protected]e14a9f92009-08-05 19:26:071262 'mac_keystone%': 1,
1263 }, { # else: branding!="Chrome" or buildtype!="Official"
[email protected]2c261532012-10-06 00:46:291264 'mac_sdk%': '<!(python <(DEPTH)/build/mac/find_sdk.py <(mac_sdk_min))',
[email protected]794fb4782011-12-14 19:10:561265 'mac_breakpad_uploads%': 0,
[email protected]e14a9f92009-08-05 19:26:071266 'mac_breakpad%': 0,
1267 'mac_keystone%': 0,
1268 }],
1269 ],
1270 }], # OS=="mac"
[email protected]912c55c2009-07-31 23:33:551271 ['OS=="win"', {
1272 'conditions': [
[email protected]8974e042010-06-21 18:06:521273 ['component=="shared_library"', {
1274 'win_use_allocator_shim%': 0,
1275 }],
[email protected]fa0f16e2012-08-20 22:30:041276 ['component=="shared_library" and "<(GENERATOR)"=="ninja"', {
[email protected]6f390be2012-08-16 18:57:101277 # Only enabled by default for ninja because it's buggy in VS.
[email protected]fa0f16e2012-08-20 22:30:041278 # Not enabled for component=static_library because some targets
1279 # are too large and the toolchain fails due to the size of the
1280 # .obj files.
[email protected]6f390be2012-08-16 18:57:101281 'incremental_chrome_dll%': 1,
1282 }],
[email protected]10bb8c92009-08-07 21:16:031283 # Don't do incremental linking for large modules on 32-bit.
1284 ['MSVS_OS_BITS==32', {
1285 'msvs_large_module_debug_link_mode%': '1', # No
1286 },{
1287 'msvs_large_module_debug_link_mode%': '2', # Yes
1288 }],
[email protected]78764182013-01-23 20:32:511289 ['MSVS_VERSION=="2012e" or MSVS_VERSION=="2010e"', {
[email protected]3e2648a2011-03-21 20:58:501290 'msvs_express%': 1,
1291 'secure_atl%': 0,
1292 },{
1293 'msvs_express%': 0,
1294 'secure_atl%': 1,
1295 }],
[email protected]912c55c2009-07-31 23:33:551296 ],
[email protected]ef4fa4072009-12-04 22:46:501297 'nacl_win64_defines': [
1298 # This flag is used to minimize dependencies when building
1299 # Native Client loader for 64-bit Windows.
1300 'NACL_WIN64',
1301 ],
[email protected]912c55c2009-07-31 23:33:551302 }],
[email protected]bb6aba32011-01-07 19:04:431303
[email protected]a35aa362012-10-30 13:55:071304 ['os_posix==1 and chromeos==0 and OS!="android" and OS!="ios"', {
[email protected]8e553f492010-10-25 20:05:441305 'use_cups%': 1,
1306 }, {
1307 'use_cups%': 0,
1308 }],
[email protected]bb6aba32011-01-07 19:04:431309
[email protected]eb5f1672013-01-31 07:56:461310 # Native Client glibc toolchain is enabled
1311 # by default except on arm and mips.
1312 ['target_arch=="arm" or target_arch=="mipsel"', {
[email protected]2f7da672012-06-21 08:38:321313 'disable_glibc%': 1,
1314 }, {
1315 'disable_glibc%': 0,
1316 }],
1317
[email protected]712c3da2012-09-24 21:31:241318 # Disable SSE2 when building for ARM or MIPS.
1319 ['target_arch=="arm" or target_arch=="mipsel"', {
1320 'disable_sse2%': 1,
1321 }, {
1322 'disable_sse2%': '<(disable_sse2)',
1323 }],
1324
[email protected]19fe8f0b2010-12-07 07:27:271325 # Set the relative path from this file to the GYP file of the JPEG
1326 # library used by Chromium.
[email protected]d9113542012-07-18 17:11:281327 ['use_system_libjpeg==1 or use_libjpeg_turbo==0', {
1328 # Configuration for using the system libjeg is here.
[email protected]19fe8f0b2010-12-07 07:27:271329 'libjpeg_gyp_path': '../third_party/libjpeg/libjpeg.gyp',
[email protected]d9113542012-07-18 17:11:281330 }, {
1331 'libjpeg_gyp_path': '../third_party/libjpeg_turbo/libjpeg.gyp',
1332 }],
[email protected]bb6aba32011-01-07 19:04:431333
[email protected]abcc9ac2011-05-16 20:04:351334 # Options controlling the use of GConf (the classic GNOME configuration
1335 # system) and GIO, which contains GSettings (the new GNOME config system).
[email protected]1c6fe29302011-01-20 22:14:311336 ['chromeos==1', {
1337 'use_gconf%': 0,
[email protected]abcc9ac2011-05-16 20:04:351338 'use_gio%': 0,
[email protected]1c6fe29302011-01-20 22:14:311339 }, {
1340 'use_gconf%': 1,
[email protected]abcc9ac2011-05-16 20:04:351341 'use_gio%': 1,
[email protected]1c6fe29302011-01-20 22:14:311342 }],
1343
[email protected]4de39f82011-03-28 12:01:291344 # Set up -D and -E flags passed into grit.
[email protected]1660bffd2011-03-23 16:24:291345 ['branding=="Chrome"', {
1346 # TODO(mmoss) The .grd files look for _google_chrome, but for
1347 # consistency they should look for google_chrome_build like C++.
[email protected]4de39f82011-03-28 12:01:291348 'grit_defines': ['-D', '_google_chrome',
1349 '-E', 'CHROMIUM_BUILD=google_chrome'],
[email protected]1660bffd2011-03-23 16:24:291350 }, {
[email protected]4de39f82011-03-28 12:01:291351 'grit_defines': ['-D', '_chromium',
1352 '-E', 'CHROMIUM_BUILD=chromium'],
[email protected]1660bffd2011-03-23 16:24:291353 }],
[email protected]bb6aba32011-01-07 19:04:431354 ['chromeos==1', {
[email protected]d4d81e92012-06-04 20:10:131355 'grit_defines': ['-D', 'chromeos', '-D', 'scale_factors=2x'],
[email protected]bb6aba32011-01-07 19:04:431356 }],
1357 ['toolkit_views==1', {
1358 'grit_defines': ['-D', 'toolkit_views'],
1359 }],
[email protected]8dd791d2011-09-16 16:37:301360 ['use_aura==1', {
1361 'grit_defines': ['-D', 'use_aura'],
1362 }],
[email protected]ed329be2012-01-03 22:02:161363 ['use_ash==1', {
1364 'grit_defines': ['-D', 'use_ash'],
1365 }],
[email protected]c329adf82011-10-05 14:34:571366 ['use_nss==1', {
1367 'grit_defines': ['-D', 'use_nss'],
1368 }],
[email protected]e47c32032011-03-01 19:26:201369 ['file_manager_extension==1', {
1370 'grit_defines': ['-D', 'file_manager_extension'],
1371 }],
[email protected]9a425422011-01-11 00:53:181372 ['remoting==1', {
1373 'grit_defines': ['-D', 'remoting'],
1374 }],
[email protected]bb6aba32011-01-07 19:04:431375 ['use_titlecase_in_grd_files==1', {
1376 'grit_defines': ['-D', 'use_titlecase'],
1377 }],
[email protected]00dc155832011-02-01 18:51:191378 ['use_third_party_translations==1', {
1379 'grit_defines': ['-D', 'use_third_party_translations'],
[email protected]fb6c1022011-06-27 21:58:121380 'locales': [
[email protected]8581e1ba2011-08-22 23:27:161381 'ast', 'bs', 'ca@valencia', 'en-AU', 'eo', 'eu', 'gl', 'hy', 'ia',
1382 'ka', 'ku', 'kw', 'ms', 'ug'
[email protected]fb6c1022011-06-27 21:58:121383 ],
[email protected]00dc155832011-02-01 18:51:191384 }],
[email protected]da1c8d692011-09-20 20:35:011385 ['OS=="android"', {
1386 'grit_defines': ['-D', 'android'],
1387 }],
[email protected]d39e3862012-06-26 22:38:231388 ['OS=="mac"', {
1389 'grit_defines': ['-D', 'scale_factors=2x'],
1390 }],
[email protected]ad563d02012-10-03 10:37:031391 ['OS == "ios"', {
1392 'grit_defines': [
1393 # define for iOS specific resources.
1394 '-D', 'ios',
1395 # iOS uses a whitelist to filter resources.
1396 '-w', '<(DEPTH)/build/ios/grit_whitelist.txt'
1397 ],
[email protected]507066e2012-10-26 10:50:471398 # iOS uses pt instead of pt-BR.
1399 'locales': ['pt'],
1400 }, { # OS != "ios"
1401 'locales': ['pt-BR'],
[email protected]ad563d02012-10-03 10:37:031402 }],
[email protected]6a3cd37e2012-04-17 17:13:341403 ['enable_extensions==1', {
1404 'grit_defines': ['-D', 'enable_extensions'],
1405 }],
[email protected]658677f2012-06-09 06:04:021406 ['enable_printing==1', {
1407 'grit_defines': ['-D', 'enable_printing'],
1408 }],
[email protected]c2aad542012-07-31 20:40:331409 ['enable_themes==1', {
1410 'grit_defines': ['-D', 'enable_themes'],
1411 }],
[email protected]4ffe78a2012-10-04 20:55:151412 ['use_oem_wallpaper==1', {
1413 'grit_defines': ['-D', 'use_oem_wallpaper'],
1414 }],
[email protected]ef1dd5062012-12-17 06:41:331415 ['enable_app_list==1', {
1416 'grit_defines': ['-D', 'enable_app_list'],
1417 }],
[email protected]dc4e8b82012-11-15 03:58:161418 ['enable_settings_app==1', {
1419 'grit_defines': ['-D', 'enable_settings_app'],
1420 }],
[email protected]5411d8202013-01-30 01:32:151421 ['enable_google_now==1', {
1422 'grit_defines': ['-D', 'enable_google_now'],
1423 }],
[email protected]3bb37e62012-04-19 03:40:081424 ['clang_use_chrome_plugins==1 and OS!="win"', {
[email protected]890ebb72012-06-27 05:02:201425 'clang_chrome_plugins_flags': [
1426 '<!@(<(DEPTH)/tools/clang/scripts/plugin_flags.sh)'
[email protected]c872dc52012-05-19 06:36:311427 ],
[email protected]5d451ad2011-02-11 16:43:461428 }],
[email protected]cfa2e1102011-04-27 22:30:231429
[email protected]5ffb0a42012-01-27 09:36:111430 ['enable_web_intents_tag==1', {
1431 'grit_defines': ['-D', 'enable_web_intents_tag'],
[email protected]41ed4e82011-08-25 23:02:071432 }],
1433
[email protected]696de4e62012-11-21 21:18:541434 ['asan==1 and OS!="win"', {
[email protected]92799b632011-08-15 14:33:061435 'clang%': 1,
1436 }],
[email protected]f5d8c222012-08-29 17:47:021437 ['asan==1 and OS=="mac"', {
1438 # See http://crbug.com/145503.
1439 'component': "static_library",
[email protected]93064ee2013-02-11 19:25:091440 # TODO(glider): we do not strip ASan binaries until the dynamic ASan
1441 # runtime is fully adopted. See http://crbug.com/170629.
1442 'mac_strip_release': 0,
[email protected]f5d8c222012-08-29 17:47:021443 }],
[email protected]c9a829272012-07-04 07:51:121444 ['tsan==1', {
1445 'clang%': 1,
1446 }],
1447
[email protected]7ce58b22012-09-26 05:17:251448 ['OS=="linux" and clang_type_profiler==1', {
1449 'clang%': 1,
1450 'clang_use_chrome_plugins%': 0,
[email protected]b0c45722013-01-23 04:47:321451 'conditions': [
1452 ['host_arch=="x64"', {
1453 'make_clang_dir%': 'third_party/llvm-allocated-type/Linux_x64',
1454 }],
1455 ['host_arch=="ia32"', {
1456 # 32-bit Clang is unsupported. It may not build. Put your 32-bit
1457 # Clang in this directory at your own risk if needed for some
1458 # purpose (e.g. to compare 32-bit and 64-bit behavior like memory
1459 # usage). Any failure by this compiler should not close the tree.
1460 'make_clang_dir%': 'third_party/llvm-allocated-type/Linux_ia32',
1461 }],
1462 ],
[email protected]7ce58b22012-09-26 05:17:251463 }],
1464
[email protected]a9318c72012-03-01 01:29:471465 # On valgrind bots, override the optimizer settings so we don't inline too
1466 # much and make the stacks harder to figure out.
1467 #
1468 # TODO(rnk): Kill off variables that no one else uses and just implement
1469 # them under a build_for_tool== condition.
1470 ['build_for_tool=="memcheck" or build_for_tool=="tsan"', {
1471 # gcc flags
1472 'mac_debug_optimization': '1',
1473 'mac_release_optimization': '1',
1474 'release_optimize': '1',
1475 'no_gc_sections': 1,
1476 'debug_extra_cflags': '-g -fno-inline -fno-omit-frame-pointer '
1477 '-fno-builtin -fno-optimize-sibling-calls',
1478 'release_extra_cflags': '-g -fno-inline -fno-omit-frame-pointer '
1479 '-fno-builtin -fno-optimize-sibling-calls',
1480
1481 # MSVS flags for TSan on Pin and Windows.
1482 'win_debug_RuntimeChecks': '0',
1483 'win_debug_disable_iterator_debugging': '1',
1484 'win_debug_Optimization': '1',
1485 'win_debug_InlineFunctionExpansion': '0',
1486 'win_release_InlineFunctionExpansion': '0',
1487 'win_release_OmitFramePointers': '0',
1488
1489 'linux_use_tcmalloc': 1,
1490 'release_valgrind_build': 1,
1491 'werror': '',
1492 'component': 'static_library',
1493 'use_system_zlib': 0,
1494 }],
1495
1496 # Build tweaks for DrMemory.
1497 # TODO(rnk): Combine with tsan config to share the builder.
1498 # http://crbug.com/108155
1499 ['build_for_tool=="drmemory"', {
[email protected]a9318c72012-03-01 01:29:471500 # These runtime checks force initialization of stack vars which blocks
1501 # DrMemory's uninit detection.
1502 'win_debug_RuntimeChecks': '0',
1503 # Iterator debugging is slow.
1504 'win_debug_disable_iterator_debugging': '1',
1505 # Try to disable optimizations that mess up stacks in a release build.
[email protected]c13d00302012-10-18 15:45:161506 # DrM-i#1054 (http://code.google.com/p/drmemory/issues/detail?id=1054)
1507 # /O2 and /Ob0 (disable inline) cannot be used together because of a
1508 # compiler bug, so we use /Ob1 instead.
1509 'win_release_InlineFunctionExpansion': '1',
[email protected]a9318c72012-03-01 01:29:471510 'win_release_OmitFramePointers': '0',
[email protected]6bf3373d2012-08-15 22:27:501511 # Ditto for debug, to support bumping win_debug_Optimization.
1512 'win_debug_InlineFunctionExpansion': 0,
1513 'win_debug_OmitFramePointers': 0,
[email protected]a9318c72012-03-01 01:29:471514 # Keep the code under #ifndef NVALGRIND.
1515 'release_valgrind_build': 1,
1516 }],
[email protected]b6a5ac92012-10-29 18:17:221517
[email protected]f40a6912012-12-10 21:52:411518 # Enable RLZ on Win, Mac and ChromeOS.
1519 ['branding=="Chrome" and (OS=="win" or OS=="mac" or chromeos==1)', {
[email protected]b6a5ac92012-10-29 18:17:221520 'enable_rlz%': 1,
1521 }],
[email protected]912c55c2009-07-31 23:33:551522 ],
[email protected]a9318c72012-03-01 01:29:471523
[email protected]35958422011-09-28 02:03:591524 # List of default apps to install in new profiles. The first list contains
1525 # the source files as found in svn. The second list, used only for linux,
[email protected]20cc0bb72011-10-26 00:57:061526 # contains the destination location for each of the files. When a crx
1527 # is added or removed from the list, the chrome/browser/resources/
1528 # default_apps/external_extensions.json file must also be updated.
[email protected]35958422011-09-28 02:03:591529 'default_apps_list': [
1530 'browser/resources/default_apps/external_extensions.json',
1531 'browser/resources/default_apps/gmail.crx',
[email protected]20cc0bb72011-10-26 00:57:061532 'browser/resources/default_apps/search.crx',
[email protected]35958422011-09-28 02:03:591533 'browser/resources/default_apps/youtube.crx',
[email protected]c3875e22012-09-06 01:07:001534 'browser/resources/default_apps/drive.crx',
[email protected]40b38c932012-09-27 20:42:231535 'browser/resources/default_apps/docs.crx',
[email protected]35958422011-09-28 02:03:591536 ],
1537 'default_apps_list_linux_dest': [
1538 '<(PRODUCT_DIR)/default_apps/external_extensions.json',
1539 '<(PRODUCT_DIR)/default_apps/gmail.crx',
[email protected]20cc0bb72011-10-26 00:57:061540 '<(PRODUCT_DIR)/default_apps/search.crx',
[email protected]35958422011-09-28 02:03:591541 '<(PRODUCT_DIR)/default_apps/youtube.crx',
[email protected]c3875e22012-09-06 01:07:001542 '<(PRODUCT_DIR)/default_apps/drive.crx',
[email protected]40b38c932012-09-27 20:42:231543 '<(PRODUCT_DIR)/default_apps/docs.crx',
[email protected]35958422011-09-28 02:03:591544 ],
[email protected]2f80c312009-02-25 21:26:551545 },
1546 'target_defaults': {
[email protected]1c966092009-08-20 21:19:261547 'variables': {
[email protected]a6e22132010-02-10 20:43:181548 # The condition that operates on chromium_code is in a target_conditions
1549 # section, and will not have access to the default fallback value of
1550 # chromium_code at the top of this file, or to the chromium_code
1551 # variable placed at the root variables scope of .gyp files, because
1552 # those variables are not set at target scope. As a workaround,
1553 # if chromium_code is not set at target scope, define it in target scope
1554 # to contain whatever value it has during early variable expansion.
1555 # That's enough to make it available during target conditional
1556 # processing.
1557 'chromium_code%': '<(chromium_code)',
1558
[email protected]7e0d664a2009-12-03 21:07:471559 # See http://msdn.microsoft.com/en-us/library/aa652360(VS.71).aspx
1560 'win_release_Optimization%': '2', # 2 = /Os
1561 'win_debug_Optimization%': '0', # 0 = /Od
[email protected]626d2d22011-10-11 15:47:331562
1563 # See http://msdn.microsoft.com/en-us/library/2kxx5t2c(v=vs.80).aspx
[email protected]ef5c5f1b2011-12-17 02:16:241564 # Tri-state: blank is default, 1 on, 0 off
[email protected]65d61e62012-06-01 21:52:111565 'win_release_OmitFramePointers%': '0',
[email protected]ef5c5f1b2011-12-17 02:16:241566 # Tri-state: blank is default, 1 on, 0 off
1567 'win_debug_OmitFramePointers%': '',
[email protected]626d2d22011-10-11 15:47:331568
[email protected]6b0507b2010-05-07 07:41:211569 # See http://msdn.microsoft.com/en-us/library/8wtf2dfz(VS.71).aspx
1570 'win_debug_RuntimeChecks%': '3', # 3 = all checks enabled, 0 = off
[email protected]626d2d22011-10-11 15:47:331571
[email protected]6b0507b2010-05-07 07:41:211572 # See http://msdn.microsoft.com/en-us/library/47238hez(VS.71).aspx
[email protected]2ae6e022010-05-07 13:19:151573 'win_debug_InlineFunctionExpansion%': '', # empty = default, 0 = off,
1574 'win_release_InlineFunctionExpansion%': '2', # 1 = only __inline, 2 = max
[email protected]626d2d22011-10-11 15:47:331575
[email protected]fac10d12010-11-08 16:00:311576 # VS inserts quite a lot of extra checks to algorithms like
1577 # std::partial_sort in Debug build which make them O(N^2)
1578 # instead of O(N*logN). This is particularly slow under memory
1579 # tools like ThreadSanitizer so we want it to be disablable.
1580 # See http://msdn.microsoft.com/en-us/library/aa985982(v=VS.80).aspx
1581 'win_debug_disable_iterator_debugging%': '0',
[email protected]7e0d664a2009-12-03 21:07:471582
[email protected]ffd984b12009-09-11 19:37:001583 'release_extra_cflags%': '',
1584 'debug_extra_cflags%': '',
[email protected]8d726a42012-02-09 03:49:001585
1586 'release_valgrind_build%': '<(release_valgrind_build)',
[email protected]8974e042010-06-21 18:06:521587
[email protected]ef5c5f1b2011-12-17 02:16:241588 # the non-qualified versions are widely assumed to be *nix-only
1589 'win_release_extra_cflags%': '',
1590 'win_debug_extra_cflags%': '',
1591
[email protected]b1eb341c2011-11-09 18:46:071592 # TODO(thakis): Make this a blacklist instead, http://crbug.com/101600
1593 'enable_wexit_time_destructors%': '<(enable_wexit_time_destructors)',
1594
[email protected]ef3326702011-10-06 18:06:441595 # Only used by Windows build for now. Can be used to build into a
1596 # differet output directory, e.g., a build_dir_prefix of VS2010_ would
1597 # output files in src/build/VS2010_{Debug,Release}.
1598 'build_dir_prefix%': '',
1599
[email protected]9ac2db692012-06-08 01:01:571600 # Targets are by default not nacl untrusted code.
1601 'nacl_untrusted_build%': 0,
1602
[email protected]9c55d9d2012-11-15 23:28:441603 'pnacl_compile_flags': [
1604 # pnacl uses the clang compiler so we need to supress all the
1605 # same warnings as we do for clang.
1606 # TODO(sbc): Remove these if/when they are removed from the clang
1607 # build.
1608 '-Wno-unused-function',
1609 '-Wno-char-subscripts',
1610 '-Wno-c++11-extensions',
1611 '-Wno-unnamed-type-template-args',
1612 ],
1613
[email protected]8974e042010-06-21 18:06:521614 'conditions': [
1615 ['OS=="win" and component=="shared_library"', {
1616 # See http://msdn.microsoft.com/en-us/library/aa652367.aspx
[email protected]49e8e022012-03-16 15:22:161617 'win_release_RuntimeLibrary%': '2', # 2 = /MD (nondebug DLL)
1618 'win_debug_RuntimeLibrary%': '3', # 3 = /MDd (debug DLL)
[email protected]8974e042010-06-21 18:06:521619 }, {
1620 # See http://msdn.microsoft.com/en-us/library/aa652367.aspx
1621 'win_release_RuntimeLibrary%': '0', # 0 = /MT (nondebug static)
1622 'win_debug_RuntimeLibrary%': '1', # 1 = /MTd (debug static)
1623 }],
[email protected]1e013672012-06-29 22:12:201624 ['OS=="ios"', {
1625 # See http://gcc.gnu.org/onlinedocs/gcc-4.4.2/gcc/Optimize-Options.html
1626 'mac_release_optimization%': 's', # Use -Os unless overridden
1627 'mac_debug_optimization%': '0', # Use -O0 unless overridden
1628 }, {
1629 # See http://gcc.gnu.org/onlinedocs/gcc-4.4.2/gcc/Optimize-Options.html
1630 'mac_release_optimization%': '3', # Use -O3 unless overridden
1631 'mac_debug_optimization%': '0', # Use -O0 unless overridden
1632 }],
[email protected]8974e042010-06-21 18:06:521633 ],
[email protected]1c966092009-08-20 21:19:261634 },
[email protected]32aa8cc2009-03-04 21:36:391635 'conditions': [
[email protected]7ce58b22012-09-26 05:17:251636 ['OS=="linux" and linux_use_tcmalloc==1 and clang_type_profiler==1', {
1637 'cflags_cc!': ['-fno-rtti'],
1638 'cflags_cc+': [
1639 '-frtti',
1640 '-gline-tables-only',
1641 '-fintercept-allocation-functions',
1642 ],
1643 'defines': ['TYPE_PROFILING'],
1644 'dependencies': [
1645 '<(DEPTH)/base/allocator/allocator.gyp:type_profiler',
1646 ],
1647 }],
[email protected]b0c45722013-01-23 04:47:321648 ['OS=="linux" and clang==1 and host_arch=="ia32"', {
1649 # TODO(dmikurube): Remove -Wno-sentinel when Clang/LLVM is fixed.
1650 # See http://crbug.com/162818.
1651 'cflags+': ['-Wno-sentinel'],
1652 }],
[email protected]ff10b132012-02-29 22:53:301653 ['OS=="win" and "<(msbuild_toolset)"!=""', {
1654 'msbuild_toolset': '<(msbuild_toolset)',
1655 }],
[email protected]32aa8cc2009-03-04 21:36:391656 ['branding=="Chrome"', {
1657 'defines': ['GOOGLE_CHROME_BUILD'],
1658 }, { # else: branding!="Chrome"
1659 'defines': ['CHROMIUM_BUILD'],
1660 }],
[email protected]286d9a12012-05-30 16:20:381661 ['OS=="mac" and component=="shared_library"', {
1662 'xcode_settings': {
1663 'DYLIB_INSTALL_NAME_BASE': '@rpath',
1664 'LD_RUNPATH_SEARCH_PATHS': [
1665 # For unbundled binaries.
1666 '@loader_path/.',
1667 # For bundled binaries, to get back from Binary.app/Contents/MacOS.
1668 '@loader_path/../../..',
1669 ],
1670 },
1671 }],
[email protected]b6a5ac92012-10-29 18:17:221672 ['enable_rlz==1', {
[email protected]81d9b72d2012-03-26 22:29:171673 'defines': ['ENABLE_RLZ'],
1674 }],
[email protected]63e39a282011-07-13 20:41:281675 ['component=="shared_library"', {
1676 'defines': ['COMPONENT_BUILD'],
1677 }],
[email protected]06c756182010-04-27 18:31:311678 ['toolkit_views==1', {
[email protected]e6970232009-05-12 23:51:171679 'defines': ['TOOLKIT_VIEWS=1'],
1680 }],
[email protected]1ee7c56c2011-10-19 14:51:331681 ['ui_compositor_image_transport==1', {
[email protected]839d5172011-10-13 17:18:111682 'defines': ['UI_COMPOSITOR_IMAGE_TRANSPORT'],
1683 }],
[email protected]41423092011-08-25 15:39:581684 ['use_aura==1', {
1685 'defines': ['USE_AURA=1'],
[email protected]e599f0132011-08-24 19:03:351686 }],
[email protected]ed329be2012-01-03 22:02:161687 ['use_ash==1', {
1688 'defines': ['USE_ASH=1'],
1689 }],
[email protected]cb800562012-11-20 22:36:071690 ['use_default_render_theme==1', {
1691 'defines': ['USE_DEFAULT_RENDER_THEME=1'],
1692 }],
[email protected]e190d272012-08-30 17:36:441693 ['use_libjpeg_turbo==1', {
1694 'defines': ['USE_LIBJPEG_TURBO=1'],
1695 }],
[email protected]c329adf82011-10-05 14:34:571696 ['use_nss==1', {
1697 'defines': ['USE_NSS=1'],
1698 }],
[email protected]bd7b6fe2012-03-05 21:02:401699 ['enable_one_click_signin==1', {
1700 'defines': ['ENABLE_ONE_CLICK_SIGNIN'],
1701 }],
[email protected]a47aa892011-11-22 03:12:311702 ['toolkit_uses_gtk==1 and toolkit_views==0', {
1703 # TODO(erg): We are progressively sealing up use of deprecated features
1704 # in gtk in preparation for an eventual porting to gtk3.
1705 'defines': ['GTK_DISABLE_SINGLE_INCLUDES=1'],
1706 }],
[email protected]fdc5bed2010-01-09 01:16:571707 ['chromeos==1', {
[email protected]16779842009-07-08 23:45:291708 'defines': ['OS_CHROMEOS=1'],
[email protected]2b883b92009-06-02 22:57:501709 }],
[email protected]55d92492013-01-31 05:03:391710 ['google_tv==1', {
1711 'defines': ['GOOGLE_TV=1'],
1712 }],
[email protected]f56797b2011-09-25 00:04:351713 ['use_xi2_mt!=0', {
1714 'defines': ['USE_XI2_MT=<(use_xi2_mt)'],
1715 }],
[email protected]e47c32032011-03-01 19:26:201716 ['file_manager_extension==1', {
1717 'defines': ['FILE_MANAGER_EXTENSION=1'],
1718 }],
[email protected]7664ab32011-02-01 23:35:251719 ['profiling==1', {
1720 'defines': ['ENABLE_PROFILING=1'],
1721 }],
[email protected]93b373502011-08-16 19:06:221722 ['OS=="linux" and glibcxx_debug==1', {
1723 'defines': ['_GLIBCXX_DEBUG=1',],
[email protected]f6a45d92012-10-24 19:26:591724 'cflags_cc+': ['-g'],
[email protected]93b373502011-08-16 19:06:221725 }],
[email protected]542bf24a2010-06-11 23:08:171726 ['remoting==1', {
1727 'defines': ['ENABLE_REMOTING=1'],
[email protected]c0bac532010-06-11 00:39:001728 }],
[email protected]5b87e782012-02-09 18:19:321729 ['enable_webrtc==1', {
1730 'defines': ['ENABLE_WEBRTC=1'],
1731 }],
[email protected]d01120e62010-05-10 17:04:481732 ['proprietary_codecs==1', {
1733 'defines': ['USE_PROPRIETARY_CODECS'],
1734 }],
[email protected]67c125d2011-10-11 18:58:221735 ['enable_pepper_threading==1', {
1736 'defines': ['ENABLE_PEPPER_THREADING'],
1737 }],
[email protected]7ddea9802012-02-22 23:08:051738 ['enable_viewport==1', {
1739 'defines': ['ENABLE_VIEWPORT'],
1740 }],
[email protected]f31e2e52011-07-14 16:01:191741 ['configuration_policy==1', {
1742 'defines': ['ENABLE_CONFIGURATION_POLICY'],
1743 }],
[email protected]9eb100e2011-10-14 05:08:221744 ['input_speech==1', {
1745 'defines': ['ENABLE_INPUT_SPEECH'],
1746 }],
[email protected]7cce3232011-10-28 10:41:571747 ['notifications==1', {
1748 'defines': ['ENABLE_NOTIFICATIONS'],
1749 }],
[email protected]1efbaaa2012-04-24 02:43:241750 ['enable_hidpi==1', {
1751 'defines': ['ENABLE_HIDPI=1'],
1752 }],
[email protected]9c1949e2009-10-02 19:59:541753 ['fastbuild!=0', {
[email protected]7df38122012-11-05 23:54:431754 # Clang creates chubby debug information, which makes linking very
1755 # slow. For now, don't create debug information with clang. See
1756 # http://crbug.com/70000
[email protected]9c1949e2009-10-02 19:59:541757 'conditions': [
[email protected]7df38122012-11-05 23:54:431758 ['clang==1', {
1759 'conditions': [
1760 ['OS=="linux"', {
1761 'variables': {
1762 'debug_extra_cflags': '-g0',
1763 },
1764 }],
1765 # Android builds symbols on release by default, disable them.
1766 ['OS=="android"', {
1767 'variables': {
1768 'debug_extra_cflags': '-g0',
1769 'release_extra_cflags': '-g0',
1770 },
1771 }],
1772 ],
1773 }, { # else clang!=1
1774 'conditions': [
1775 # For Windows and Mac, we don't genererate debug information.
1776 ['OS=="win"', {
1777 'msvs_settings': {
1778 'VCLinkerTool': {
[email protected]6c97ee072013-01-28 10:45:311779 # This tells the linker to generate .pdbs, so that
1780 # we can get meaningful stack traces.
1781 'GenerateDebugInformation': 'true',
[email protected]7df38122012-11-05 23:54:431782 },
1783 'VCCLCompilerTool': {
[email protected]6c97ee072013-01-28 10:45:311784 # No debug info to be generated by compiler.
[email protected]7df38122012-11-05 23:54:431785 'DebugInformationFormat': '0',
1786 },
1787 },
1788 }],
1789 ['OS=="mac"', {
1790 'xcode_settings': {
1791 'GCC_GENERATE_DEBUGGING_SYMBOLS': 'NO',
1792 },
1793 }],
1794 ['OS=="linux"', {
1795 'variables': {
1796 'debug_extra_cflags': '-g1',
1797 },
1798 }],
1799 ['OS=="android"', {
1800 'variables': {
1801 'debug_extra_cflags': '-g1',
1802 'release_extra_cflags': '-g1',
1803 },
1804 }],
1805 ],
1806 }], # clang!=1
1807 ],
[email protected]9c1949e2009-10-02 19:59:541808 }], # fastbuild!=0
[email protected]20960e072011-09-20 20:59:011809 ['dcheck_always_on!=0', {
1810 'defines': ['DCHECK_ALWAYS_ON=1'],
1811 }], # dcheck_always_on!=0
[email protected]ad6d2c42009-09-15 20:13:381812 ['selinux==1', {
1813 'defines': ['CHROMIUM_SELINUX=1'],
1814 }],
[email protected]7e0d664a2009-12-03 21:07:471815 ['win_use_allocator_shim==0', {
1816 'conditions': [
1817 ['OS=="win"', {
1818 'defines': ['NO_TCMALLOC'],
1819 }],
1820 ],
1821 }],
[email protected]43f28f832010-02-03 02:28:481822 ['enable_gpu==1', {
[email protected]7477ea6f2009-12-22 23:28:151823 'defines': [
1824 'ENABLE_GPU=1',
1825 ],
1826 }],
[email protected]b1c2a5542010-10-08 12:44:401827 ['use_openssl==1', {
1828 'defines': [
1829 'USE_OPENSSL=1',
1830 ],
1831 }],
[email protected]ed154592010-04-29 00:18:501832 ['enable_eglimage==1', {
1833 'defines': [
1834 'ENABLE_EGLIMAGE=1',
1835 ],
1836 }],
[email protected]7d7564a12011-06-21 19:20:221837 ['use_skia==1', {
1838 'defines': [
1839 'USE_SKIA=1',
1840 ],
1841 }],
[email protected]696de4e62012-11-21 21:18:541842 ['asan==1 and OS=="win"', {
1843 # Since asan on windows uses Syzygy, we need /PROFILE turned on to
1844 # produce appropriate pdbs.
1845 'msvs_settings': {
1846 'VCLinkerTool': {
1847 'Profile': 'true',
1848 },
1849 },
[email protected]2ff7ef5f2012-12-14 00:40:251850 'defines': ['ADDRESS_SANITIZER'],
[email protected]696de4e62012-11-21 21:18:541851 }], # asan==1 and OS=="win"
[email protected]f5ecbba12009-04-03 04:35:181852 ['coverage!=0', {
1853 'conditions': [
[email protected]fc642ec2012-10-12 19:07:031854 ['OS=="mac" or OS=="ios"', {
[email protected]f5ecbba12009-04-03 04:35:181855 'xcode_settings': {
[email protected]ab2956372009-08-13 18:11:041856 'GCC_INSTRUMENT_PROGRAM_FLOW_ARCS': 'YES', # -fprofile-arcs
1857 'GCC_GENERATE_TEST_COVERAGE_FILES': 'YES', # -ftest-coverage
[email protected]5ae4f55e2009-04-13 23:19:471858 },
[email protected]fc642ec2012-10-12 19:07:031859 }],
1860 ['OS=="mac"', {
[email protected]e4fb84c2009-12-28 20:45:431861 # Add -lgcov for types executable, shared_library, and
[email protected]dc259ce52010-04-13 04:03:101862 # loadable_module; not for static_library.
[email protected]e4fb84c2009-12-28 20:45:431863 # This is a delayed conditional.
[email protected]f5ecbba12009-04-03 04:35:181864 'target_conditions': [
[email protected]e4fb84c2009-12-28 20:45:431865 ['_type!="static_library"', {
[email protected]f5ecbba12009-04-03 04:35:181866 'xcode_settings': { 'OTHER_LDFLAGS': [ '-lgcov' ] },
[email protected]5ae4f55e2009-04-13 23:19:471867 }],
1868 ],
1869 }],
[email protected]da1c8d692011-09-20 20:35:011870 ['OS=="linux" or OS=="android"', {
[email protected]f5ecbba12009-04-03 04:35:181871 'cflags': [ '-ftest-coverage',
1872 '-fprofile-arcs' ],
[email protected]7122ffd52009-04-30 23:19:001873 'link_settings': { 'libraries': [ '-lgcov' ] },
[email protected]f5ecbba12009-04-03 04:35:181874 }],
[email protected]e8f6ff42009-07-07 18:20:531875 ['OS=="win"', {
[email protected]0915c3b2012-11-22 17:24:071876 'variables': {
1877 # Disable incremental linking for all modules.
1878 # 0: inherit, 1: disabled, 2: enabled.
1879 'msvs_debug_link_incremental': '1',
1880 'msvs_large_module_debug_link_mode': '1',
[email protected]8ade58a62013-02-12 21:02:291881 # Disable RTC. Syzygy explicitly doesn't support RTC instrumented
1882 # binaries for now.
1883 'win_debug_RuntimeChecks': '0',
[email protected]0915c3b2012-11-22 17:24:071884 },
1885 'defines': [
1886 # Disable iterator debugging (huge speed boost without any
1887 # change in coverage results).
1888 '_HAS_ITERATOR_DEBUGGING=0',
1889 ],
[email protected]e8f6ff42009-07-07 18:20:531890 'msvs_settings': {
1891 'VCLinkerTool': {
[email protected]0915c3b2012-11-22 17:24:071892 # Enable profile information (necessary for coverage
1893 # instrumentation). This is incompatible with incremental
1894 # linking.
[email protected]e8f6ff42009-07-07 18:20:531895 'Profile': 'true',
1896 },
[email protected]e8f6ff42009-07-07 18:20:531897 }
1898 }], # OS==win
1899 ], # conditions for coverage
1900 }], # coverage!=0
[email protected]4e4d6042010-08-26 18:34:381901 ['OS=="win"', {
1902 'defines': [
1903 '__STD_C',
1904 '_CRT_SECURE_NO_DEPRECATE',
1905 '_SCL_SECURE_NO_DEPRECATE',
[email protected]2d0aa3242012-10-22 16:23:101906 # This define is required to pull in the new Win8 interfaces from
1907 # system headers like ShObjIdl.h.
1908 'NTDDI_VERSION=0x06020000',
[email protected]4e4d6042010-08-26 18:34:381909 ],
1910 'include_dirs': [
1911 '<(DEPTH)/third_party/wtl/include',
1912 ],
[email protected]9619e65d2012-05-23 19:06:521913 'conditions': [
1914 ['win_z7!=0', {
1915 'msvs_settings': {
[email protected]5146e0b2012-08-23 05:49:091916 # Generates debug info when win_z7=1
1917 # even if fastbuild=1 (that makes GenerateDebugInformation false).
1918 'VCLinkerTool': {
1919 'GenerateDebugInformation': 'true',
1920 },
[email protected]9619e65d2012-05-23 19:06:521921 'VCCLCompilerTool': {
1922 'DebugInformationFormat': '1',
1923 }
1924 }
1925 }],
[email protected]45a77072012-11-17 00:28:421926 ['"<(GENERATOR)"=="msvs"', {
1927 'msvs_settings': {
1928 'VCLinkerTool': {
1929 # Make the pdb name sane. Otherwise foo.exe and foo.dll both
1930 # have foo.pdb. The ninja generator already defaults to this and
1931 # can't handle the $(TargetPath) macro.
1932 'ProgramDatabaseFile': '$(TargetPath).pdb',
1933 }
1934 },
1935 }],
[email protected]9619e65d2012-05-23 19:06:521936 ], # win_z7!=0
[email protected]4e4d6042010-08-26 18:34:381937 }], # OS==win
[email protected]44879ed2012-04-06 01:11:021938 ['enable_task_manager==1', {
1939 'defines': [
1940 'ENABLE_TASK_MANAGER=1',
1941 ],
1942 }],
[email protected]41ed4e82011-08-25 23:02:071943 ['enable_web_intents==1', {
1944 'defines': [
[email protected]1f2d9ed2011-10-04 20:18:471945 'ENABLE_WEB_INTENTS=1',
[email protected]41ed4e82011-08-25 23:02:071946 ],
1947 }],
[email protected]6a3cd37e2012-04-17 17:13:341948 ['enable_extensions==1', {
1949 'defines': [
1950 'ENABLE_EXTENSIONS=1',
1951 ],
1952 }],
[email protected]13eb97d2012-01-05 01:07:121953 ['OS=="win" and branding=="Chrome"', {
1954 'defines': ['ENABLE_SWIFTSHADER'],
1955 }],
[email protected]407dfa632011-12-23 11:59:351956 ['enable_dart==1', {
1957 'defines': ['WEBKIT_USING_DART=1'],
1958 }],
[email protected]18e0f39b2012-01-17 16:47:341959 ['enable_plugin_installation==1', {
1960 'defines': ['ENABLE_PLUGIN_INSTALLATION=1'],
1961 }],
[email protected]6d17f6392012-12-05 05:24:541962 ['enable_plugins==1', {
1963 'defines': ['ENABLE_PLUGINS=1'],
1964 }],
[email protected]cdb756ef2012-04-05 18:34:531965 ['enable_session_service==1', {
1966 'defines': ['ENABLE_SESSION_SERVICE=1'],
1967 }],
[email protected]6b40bb582012-03-15 20:50:381968 ['enable_themes==1', {
1969 'defines': ['ENABLE_THEMES=1'],
1970 }],
[email protected]0acdd772012-04-05 22:53:001971 ['enable_background==1', {
1972 'defines': ['ENABLE_BACKGROUND=1'],
1973 }],
[email protected]2e22e2f2012-03-15 21:53:101974 ['enable_automation==1', {
1975 'defines': ['ENABLE_AUTOMATION=1'],
1976 }],
[email protected]6ee43a72012-12-07 22:44:401977 ['enable_google_now==1', {
1978 'defines': ['ENABLE_GOOGLE_NOW=1'],
1979 }],
[email protected]703369a2012-11-05 20:40:311980 ['enable_language_detection==1', {
1981 'defines': ['ENABLE_LANGUAGE_DETECTION=1'],
1982 }],
[email protected]658677f2012-06-09 06:04:021983 ['enable_printing==1', {
1984 'defines': ['ENABLE_PRINTING=1'],
1985 }],
[email protected]e6026962012-06-14 21:28:321986 ['enable_captive_portal_detection==1', {
1987 'defines': ['ENABLE_CAPTIVE_PORTAL_DETECTION=1'],
1988 }],
[email protected]dc4e8b82012-11-15 03:58:161989 ['enable_app_list==1', {
1990 'defines': ['ENABLE_APP_LIST=1'],
1991 }],
[email protected]9b5dbf72013-01-09 20:29:151992 ['enable_message_center==1', {
1993 'defines': ['ENABLE_MESSAGE_CENTER=1'],
1994 }],
[email protected]dc4e8b82012-11-15 03:58:161995 ['enable_settings_app==1', {
1996 'defines': ['ENABLE_SETTINGS_APP=1'],
1997 }],
[email protected]9bfe0ab2012-08-30 13:18:111998 ['disable_ftp_support==1', {
1999 'defines': ['DISABLE_FTP_SUPPORT=1'],
2000 }],
[email protected]0850e842013-01-19 03:44:312001 ['enable_managed_users==1', {
2002 'defines': ['ENABLE_MANAGED_USERS=1'],
2003 }],
[email protected]a6e22132010-02-10 20:43:182004 ], # conditions for 'target_defaults'
2005 'target_conditions': [
[email protected]b1eb341c2011-11-09 18:46:072006 ['enable_wexit_time_destructors==1', {
2007 'conditions': [
2008 [ 'clang==1', {
2009 'cflags': [
2010 '-Wexit-time-destructors',
2011 ],
2012 'xcode_settings': {
2013 'WARNING_CFLAGS': [
2014 '-Wexit-time-destructors',
2015 ],
2016 },
2017 }],
2018 ],
2019 }],
[email protected]c14d8e772010-02-09 22:06:152020 ['chromium_code==0', {
[email protected]d8543312010-02-10 17:43:282021 'conditions': [
[email protected]1e013672012-06-29 22:12:202022 [ 'os_posix==1 and OS!="mac" and OS!="ios"', {
[email protected]c0a6b272011-02-09 22:32:332023 # We don't want to get warnings from third-party code,
2024 # so remove any existing warning-enabling flags like -Wall.
[email protected]d8543312010-02-10 17:43:282025 'cflags!': [
2026 '-Wall',
2027 '-Wextra',
[email protected]d8543312010-02-10 17:43:282028 ],
[email protected]167ec822011-10-24 22:05:272029 'cflags_cc': [
[email protected]ec1d155be2011-02-08 22:19:002030 # Don't warn about hash_map in third-party code.
2031 '-Wno-deprecated',
[email protected]167ec822011-10-24 22:05:272032 ],
2033 'cflags': [
[email protected]c0a6b272011-02-09 22:32:332034 # Don't warn about printf format problems.
2035 # This is off by default in gcc but on in Ubuntu's gcc(!).
[email protected]ec392872011-02-10 22:38:222036 '-Wno-format',
[email protected]ec1d155be2011-02-08 22:19:002037 ],
[email protected]d16bd642011-07-25 23:59:182038 'cflags_cc!': [
2039 # TODO(fischman): remove this.
2040 # http://code.google.com/p/chromium/issues/detail?id=90453
2041 '-Wsign-compare',
2042 ]
[email protected]d8543312010-02-10 17:43:282043 }],
[email protected]82dd5eb32012-08-18 04:24:322044 # TODO: Fix all warnings on chromeos too.
2045 [ 'os_posix==1 and OS!="mac" and OS!="ios" and (clang!=1 or chromeos==1)', {
2046 'cflags!': [
2047 '-Werror',
2048 ],
2049 }],
[email protected]bc073c062012-01-13 06:28:032050 [ 'os_posix==1 and os_bsd!=1 and OS!="mac" and OS!="android"', {
[email protected]6e4451892011-07-27 10:32:112051 'cflags': [
2052 # Don't warn about ignoring the return value from e.g. close().
2053 # This is off by default in some gccs but on by default in others.
[email protected]bc073c062012-01-13 06:28:032054 # BSD systems do not support this option, since they are usually
2055 # using gcc 4.2.1, which does not have this flag yet.
[email protected]6e4451892011-07-27 10:32:112056 '-Wno-unused-result',
2057 ],
2058 }],
[email protected]d8543312010-02-10 17:43:282059 [ 'OS=="win"', {
2060 'defines': [
2061 '_CRT_SECURE_NO_DEPRECATE',
2062 '_CRT_NONSTDC_NO_WARNINGS',
2063 '_CRT_NONSTDC_NO_DEPRECATE',
2064 '_SCL_SECURE_NO_DEPRECATE',
2065 ],
2066 'msvs_disabled_warnings': [4800],
2067 'msvs_settings': {
2068 'VCCLCompilerTool': {
[email protected]942c3a60f2011-05-03 02:04:112069 'WarningLevel': '3',
[email protected]c54b41cb2012-08-24 20:58:242070 'WarnAsError': '<(win_third_party_warn_as_error)',
[email protected]d8543312010-02-10 17:43:282071 'Detect64BitPortabilityProblems': 'false',
2072 },
2073 },
[email protected]c54b41cb2012-08-24 20:58:242074 'conditions': [
2075 ['buildtype=="Official"', {
2076 'msvs_settings': {
2077 'VCCLCompilerTool': { 'WarnAsError': 'false' },
2078 }
2079 }],
2080 ],
[email protected]d8543312010-02-10 17:43:282081 }],
[email protected]0915c3b2012-11-22 17:24:072082 # TODO(darin): Unfortunately, some third_party code depends on base.
[email protected]ea47b6a2011-07-17 19:39:422083 [ 'OS=="win" and component=="shared_library"', {
2084 'msvs_disabled_warnings': [
2085 4251, # class 'std::xx' needs to have dll-interface.
2086 ],
2087 }],
[email protected]1e013672012-06-29 22:12:202088 [ 'OS=="mac" or OS=="ios"', {
[email protected]d8543312010-02-10 17:43:282089 'xcode_settings': {
[email protected]4c4c2e5332010-06-15 11:51:062090 'WARNING_CFLAGS!': ['-Wall', '-Wextra'],
[email protected]d8543312010-02-10 17:43:282091 },
[email protected]3a352c362012-05-08 19:45:492092 'conditions': [
2093 ['buildtype=="Official"', {
2094 'xcode_settings': {
2095 'GCC_TREAT_WARNINGS_AS_ERRORS': 'NO', # -Werror
2096 },
2097 }],
2098 ],
[email protected]d8543312010-02-10 17:43:282099 }],
[email protected]1e013672012-06-29 22:12:202100 [ 'OS=="ios"', {
2101 'xcode_settings': {
[email protected]7afca862012-07-11 15:11:222102 # TODO(ios): Fix remaining warnings in third-party code, then
2103 # remove this; the Mac cleanup didn't get everything that's
2104 # flagged in an iOS build.
2105 'GCC_TREAT_WARNINGS_AS_ERRORS': 'NO',
[email protected]1e013672012-06-29 22:12:202106 'RUN_CLANG_STATIC_ANALYZER': 'NO',
2107 },
2108 }],
[email protected]c14d8e772010-02-09 22:06:152109 ],
2110 }, {
[email protected]a5c598152012-01-27 04:55:132111 'includes': [
2112 # Rules for excluding e.g. foo_win.cc from the build on non-Windows.
2113 'filename_rules.gypi',
2114 ],
[email protected]41af4f82012-11-08 00:09:312115 # In Chromium code, we define __STDC_foo_MACROS in order to get the
[email protected]c14d8e772010-02-09 22:06:152116 # C99 macros on Mac and Linux.
2117 'defines': [
[email protected]41af4f82012-11-08 00:09:312118 '__STDC_CONSTANT_MACROS',
[email protected]c14d8e772010-02-09 22:06:152119 '__STDC_FORMAT_MACROS',
2120 ],
2121 'conditions': [
[email protected]c14d8e772010-02-09 22:06:152122 ['OS=="win"', {
[email protected]f55bd4862010-05-27 15:38:072123 # turn on warnings for signed/unsigned mismatch on chromium code.
2124 'msvs_settings': {
2125 'VCCLCompilerTool': {
2126 'AdditionalOptions': ['/we4389'],
2127 },
2128 },
[email protected]c14d8e772010-02-09 22:06:152129 }],
[email protected]63e39a282011-07-13 20:41:282130 ['OS=="win" and component=="shared_library"', {
2131 'msvs_disabled_warnings': [
2132 4251, # class 'std::xx' needs to have dll-interface.
2133 ],
2134 }],
[email protected]c14d8e772010-02-09 22:06:152135 ],
2136 }],
[email protected]a6e22132010-02-10 20:43:182137 ], # target_conditions for 'target_defaults'
[email protected]2f80c312009-02-25 21:26:552138 'default_configuration': 'Debug',
2139 'configurations': {
[email protected]5153767c2009-12-22 01:52:502140 # VCLinkerTool LinkIncremental values below:
2141 # 0 == default
2142 # 1 == /INCREMENTAL:NO
2143 # 2 == /INCREMENTAL
2144 # Debug links incremental, Release does not.
2145 #
[email protected]7b99801e2010-11-03 17:26:232146 # Abstract base configurations to cover common attributes.
[email protected]5153767c2009-12-22 01:52:502147 #
2148 'Common_Base': {
[email protected]bb05e452009-10-29 21:24:562149 'abstract': 1,
2150 'msvs_configuration_attributes': {
[email protected]534303c2011-09-28 00:02:512151 'OutputDirectory': '<(DEPTH)\\build\\<(build_dir_prefix)$(ConfigurationName)',
[email protected]bb05e452009-10-29 21:24:562152 'IntermediateDirectory': '$(OutDir)\\obj\\$(ProjectName)',
2153 'CharacterSet': '1',
2154 },
[email protected]f59e1302013-02-15 13:48:402155 # Add the default import libs.
2156 'msvs_settings':{
2157 'VCLinkerTool': {
2158 'AdditionalDependencies': [
2159 'kernel32.lib',
2160 'gdi32.lib',
2161 'winspool.lib',
2162 'comdlg32.lib',
2163 'advapi32.lib',
2164 'shell32.lib',
2165 'ole32.lib',
2166 'oleaut32.lib',
2167 'user32.lib',
2168 'uuid.lib',
2169 'odbc32.lib',
2170 'odbccp32.lib',
2171 ],
2172 },
2173 },
[email protected]5153767c2009-12-22 01:52:502174 },
2175 'x86_Base': {
2176 'abstract': 1,
[email protected]ef4fa4072009-12-04 22:46:502177 'msvs_settings': {
2178 'VCLinkerTool': {
2179 'TargetMachine': '1',
2180 },
2181 },
[email protected]2fa40782009-11-01 21:17:342182 'msvs_configuration_platform': 'Win32',
[email protected]bb05e452009-10-29 21:24:562183 },
[email protected]5153767c2009-12-22 01:52:502184 'x64_Base': {
2185 'abstract': 1,
2186 'msvs_configuration_platform': 'x64',
2187 'msvs_settings': {
2188 'VCLinkerTool': {
2189 'TargetMachine': '17', # x86 - 64
[email protected]5153767c2009-12-22 01:52:502190 'AdditionalLibraryDirectories!':
[email protected]1ab48032012-07-02 21:48:052191 ['<(windows_sdk_path)/Lib/win8/um/x86'],
[email protected]5153767c2009-12-22 01:52:502192 'AdditionalLibraryDirectories':
[email protected]1ab48032012-07-02 21:48:052193 ['<(windows_sdk_path)/Lib/win8/um/x64'],
[email protected]5153767c2009-12-22 01:52:502194 },
[email protected]d26b4418ab2010-03-24 22:06:352195 'VCLibrarianTool': {
[email protected]5153767c2009-12-22 01:52:502196 'AdditionalLibraryDirectories!':
[email protected]1ab48032012-07-02 21:48:052197 ['<(windows_sdk_path)/Lib/win8/um/x86'],
[email protected]5153767c2009-12-22 01:52:502198 'AdditionalLibraryDirectories':
[email protected]1ab48032012-07-02 21:48:052199 ['<(windows_sdk_path)/Lib/win8/um/x64'],
[email protected]5153767c2009-12-22 01:52:502200 },
2201 },
2202 'defines': [
2203 # Not sure if tcmalloc works on 64-bit Windows.
2204 'NO_TCMALLOC',
2205 ],
2206 },
2207 'Debug_Base': {
2208 'abstract': 1,
[email protected]14339762011-04-05 07:36:582209 'defines': [
2210 'DYNAMIC_ANNOTATIONS_ENABLED=1',
2211 'WTF_USE_DYNAMIC_ANNOTATIONS=1',
2212 ],
[email protected]1c966092009-08-20 21:19:262213 'xcode_settings': {
2214 'COPY_PHASE_STRIP': 'NO',
[email protected]d5d593a2009-08-28 23:23:292215 'GCC_OPTIMIZATION_LEVEL': '<(mac_debug_optimization)',
[email protected]a68c29a2011-07-01 16:23:492216 'OTHER_CFLAGS': [
[email protected]a68c29a2011-07-01 16:23:492217 '<@(debug_extra_cflags)',
2218 ],
[email protected]1c966092009-08-20 21:19:262219 },
[email protected]bb05e452009-10-29 21:24:562220 'msvs_settings': {
2221 'VCCLCompilerTool': {
[email protected]7e0d664a2009-12-03 21:07:472222 'Optimization': '<(win_debug_Optimization)',
[email protected]bb05e452009-10-29 21:24:562223 'PreprocessorDefinitions': ['_DEBUG'],
[email protected]6b0507b2010-05-07 07:41:212224 'BasicRuntimeChecks': '<(win_debug_RuntimeChecks)',
[email protected]7e0d664a2009-12-03 21:07:472225 'RuntimeLibrary': '<(win_debug_RuntimeLibrary)',
[email protected]2ae6e022010-05-07 13:19:152226 'conditions': [
2227 # According to MSVS, InlineFunctionExpansion=0 means
2228 # "default inlining", not "/Ob0".
2229 # Thus, we have to handle InlineFunctionExpansion==0 separately.
2230 ['win_debug_InlineFunctionExpansion==0', {
2231 'AdditionalOptions': ['/Ob0'],
2232 }],
2233 ['win_debug_InlineFunctionExpansion!=""', {
2234 'InlineFunctionExpansion':
2235 '<(win_debug_InlineFunctionExpansion)',
2236 }],
[email protected]fac10d12010-11-08 16:00:312237 ['win_debug_disable_iterator_debugging==1', {
2238 'PreprocessorDefinitions': ['_HAS_ITERATOR_DEBUGGING=0'],
2239 }],
[email protected]ef5c5f1b2011-12-17 02:16:242240
2241 # if win_debug_OmitFramePointers is blank, leave as default
2242 ['win_debug_OmitFramePointers==1', {
2243 'OmitFramePointers': 'true',
2244 }],
2245 ['win_debug_OmitFramePointers==0', {
2246 'OmitFramePointers': 'false',
2247 # The above is not sufficient (http://crbug.com/106711): it
2248 # simply eliminates an explicit "/Oy", but both /O2 and /Ox
2249 # perform FPO regardless, so we must explicitly disable.
2250 # We still want the false setting above to avoid having
2251 # "/Oy /Oy-" and warnings about overriding.
2252 'AdditionalOptions': ['/Oy-'],
2253 }],
[email protected]2ae6e022010-05-07 13:19:152254 ],
[email protected]ef5c5f1b2011-12-17 02:16:242255 'AdditionalOptions': [ '<@(win_debug_extra_cflags)', ],
[email protected]bb05e452009-10-29 21:24:562256 },
2257 'VCLinkerTool': {
2258 'LinkIncremental': '<(msvs_debug_link_incremental)',
[email protected]7cf23ce62012-01-13 02:43:332259 # ASLR makes debugging with windbg difficult because Chrome.exe and
2260 # Chrome.dll share the same base name. As result, windbg will
2261 # name the Chrome.dll module like chrome_<base address>, where
2262 # <base address> typically changes with each launch. This in turn
2263 # means that breakpoints in Chrome.dll don't stick from one launch
2264 # to the next. For this reason, we turn ASLR off in debug builds.
2265 # Note that this is a three-way bool, where 0 means to pick up
2266 # the default setting, 1 is off and 2 is on.
2267 'RandomizedBaseAddress': 1,
[email protected]bb05e452009-10-29 21:24:562268 },
2269 'VCResourceCompilerTool': {
2270 'PreprocessorDefinitions': ['_DEBUG'],
2271 },
2272 },
[email protected]2f80c312009-02-25 21:26:552273 'conditions': [
[email protected]78204c92012-09-14 04:42:552274 ['OS=="linux" or OS=="android"', {
[email protected]d8e3b122012-05-31 23:07:542275 'target_conditions': [
2276 ['_toolset=="target"', {
2277 'cflags': [
2278 '<@(debug_extra_cflags)',
2279 ],
2280 }],
[email protected]bb05e452009-10-29 21:24:562281 ],
[email protected]2f80c312009-02-25 21:26:552282 }],
[email protected]1e013672012-06-29 22:12:202283 # Disabled on iOS because it was causing a crash on startup.
2284 # TODO(michelea): investigate, create a reduced test and possibly
2285 # submit a radar.
2286 ['release_valgrind_build==0 and OS!="ios"', {
[email protected]56cca4e2011-07-01 21:33:352287 'xcode_settings': {
2288 'OTHER_CFLAGS': [
2289 '-fstack-protector-all', # Implies -fstack-protector
2290 ],
2291 },
2292 }],
[email protected]2f80c312009-02-25 21:26:552293 ],
2294 },
[email protected]5153767c2009-12-22 01:52:502295 'Release_Base': {
2296 'abstract': 1,
[email protected]2f80c312009-02-25 21:26:552297 'defines': [
2298 'NDEBUG',
2299 ],
[email protected]1c966092009-08-20 21:19:262300 'xcode_settings': {
2301 'DEAD_CODE_STRIPPING': 'YES', # -Wl,-dead_strip
2302 'GCC_OPTIMIZATION_LEVEL': '<(mac_release_optimization)',
[email protected]ffd984b12009-09-11 19:37:002303 'OTHER_CFLAGS': [ '<@(release_extra_cflags)', ],
[email protected]1c966092009-08-20 21:19:262304 },
[email protected]bb05e452009-10-29 21:24:562305 'msvs_settings': {
[email protected]7e0d664a2009-12-03 21:07:472306 'VCCLCompilerTool': {
[email protected]7e0d664a2009-12-03 21:07:472307 'RuntimeLibrary': '<(win_release_RuntimeLibrary)',
[email protected]2ae6e022010-05-07 13:19:152308 'conditions': [
[email protected]2212d272011-12-20 21:37:372309 # In official builds, each target will self-select
2310 # an optimization level.
2311 ['buildtype!="Official"', {
2312 'Optimization': '<(win_release_Optimization)',
2313 },
2314 ],
[email protected]2ae6e022010-05-07 13:19:152315 # According to MSVS, InlineFunctionExpansion=0 means
2316 # "default inlining", not "/Ob0".
2317 # Thus, we have to handle InlineFunctionExpansion==0 separately.
2318 ['win_release_InlineFunctionExpansion==0', {
2319 'AdditionalOptions': ['/Ob0'],
2320 }],
2321 ['win_release_InlineFunctionExpansion!=""', {
2322 'InlineFunctionExpansion':
2323 '<(win_release_InlineFunctionExpansion)',
2324 }],
[email protected]626d2d22011-10-11 15:47:332325
[email protected]ef5c5f1b2011-12-17 02:16:242326 # if win_release_OmitFramePointers is blank, leave as default
[email protected]626d2d22011-10-11 15:47:332327 ['win_release_OmitFramePointers==1', {
2328 'OmitFramePointers': 'true',
2329 }],
2330 ['win_release_OmitFramePointers==0', {
2331 'OmitFramePointers': 'false',
[email protected]ef5c5f1b2011-12-17 02:16:242332 # The above is not sufficient (http://crbug.com/106711): it
2333 # simply eliminates an explicit "/Oy", but both /O2 and /Ox
2334 # perform FPO regardless, so we must explicitly disable.
2335 # We still want the false setting above to avoid having
2336 # "/Oy /Oy-" and warnings about overriding.
2337 'AdditionalOptions': ['/Oy-'],
[email protected]626d2d22011-10-11 15:47:332338 }],
[email protected]2ae6e022010-05-07 13:19:152339 ],
[email protected]ef5c5f1b2011-12-17 02:16:242340 'AdditionalOptions': [ '<@(win_release_extra_cflags)', ],
[email protected]7e0d664a2009-12-03 21:07:472341 },
[email protected]bb05e452009-10-29 21:24:562342 'VCLinkerTool': {
[email protected]c059c612011-08-08 20:56:342343 # LinkIncremental is a tri-state boolean, where 0 means default
2344 # (i.e., inherit from parent solution), 1 means false, and
2345 # 2 means true.
[email protected]bb05e452009-10-29 21:24:562346 'LinkIncremental': '1',
[email protected]c059c612011-08-08 20:56:342347 # This corresponds to the /PROFILE flag which ensures the PDB
2348 # file contains FIXUP information (growing the PDB file by about
2349 # 5%) but does not otherwise alter the output binary. This
2350 # information is used by the Syzygy optimization tool when
2351 # decomposing the release image.
2352 'Profile': 'true',
[email protected]bb05e452009-10-29 21:24:562353 },
2354 },
[email protected]2f80c312009-02-25 21:26:552355 'conditions': [
[email protected]fd3fb3bf2012-05-23 22:15:162356 ['msvs_use_common_release', {
2357 'includes': ['release.gypi'],
2358 }],
[email protected]7bdd7d7c2012-11-01 10:36:162359 ['release_valgrind_build==0 and tsan==0', {
[email protected]14339762011-04-05 07:36:582360 'defines': [
2361 'NVALGRIND',
2362 'DYNAMIC_ANNOTATIONS_ENABLED=0',
2363 ],
[email protected]ee857512010-05-14 08:24:422364 }, {
[email protected]14339762011-04-05 07:36:582365 'defines': [
2366 'DYNAMIC_ANNOTATIONS_ENABLED=1',
2367 'WTF_USE_DYNAMIC_ANNOTATIONS=1',
2368 ],
[email protected]92822e82009-09-18 14:26:562369 }],
[email protected]7e0d664a2009-12-03 21:07:472370 ['win_use_allocator_shim==0', {
2371 'defines': ['NO_TCMALLOC'],
2372 }],
[email protected]37305ae2012-12-11 01:54:582373 ['os_posix==1 and chromium_code==1', {
2374 # Non-chromium code is not guaranteed to compile cleanly
2375 # with _FORTIFY_SOURCE. Also, fortified build may fail
2376 # when optimizations are disabled, so only do that for Release
2377 # build.
2378 'defines': [
2379 '_FORTIFY_SOURCE=2',
2380 ],
2381 }],
[email protected]7df38122012-11-05 23:54:432382 ['OS=="linux" or OS=="android"', {
[email protected]d8e3b122012-05-31 23:07:542383 'target_conditions': [
2384 ['_toolset=="target"', {
2385 'cflags': [
2386 '<@(release_extra_cflags)',
2387 ],
2388 }],
[email protected]bb05e452009-10-29 21:24:562389 ],
2390 }],
[email protected]2f80c312009-02-25 21:26:552391 ],
2392 },
[email protected]5153767c2009-12-22 01:52:502393 #
2394 # Concrete configurations
2395 #
2396 'Debug': {
2397 'inherit_from': ['Common_Base', 'x86_Base', 'Debug_Base'],
2398 },
2399 'Release': {
2400 'inherit_from': ['Common_Base', 'x86_Base', 'Release_Base'],
[email protected]5153767c2009-12-22 01:52:502401 },
[email protected]f926fa0a2009-08-04 22:50:132402 'conditions': [
2403 [ 'OS=="win"', {
2404 # TODO(bradnelson): add a gyp mechanism to make this more graceful.
[email protected]ef4fa4072009-12-04 22:46:502405 'Debug_x64': {
[email protected]5153767c2009-12-22 01:52:502406 'inherit_from': ['Common_Base', 'x64_Base', 'Debug_Base'],
[email protected]78263c12009-11-01 23:45:302407 },
2408 'Release_x64': {
[email protected]5153767c2009-12-22 01:52:502409 'inherit_from': ['Common_Base', 'x64_Base', 'Release_Base'],
[email protected]78263c12009-11-01 23:45:302410 },
[email protected]f926fa0a2009-08-04 22:50:132411 }],
2412 ],
[email protected]2f80c312009-02-25 21:26:552413 },
2414 },
2415 'conditions': [
[email protected]43539ec2012-11-20 22:35:252416 ['os_posix==1', {
2417 'target_defaults': {
[email protected]43539ec2012-11-20 22:35:252418 'ldflags': [
2419 '-Wl,-z,now',
2420 '-Wl,-z,relro',
2421 ],
[email protected]43539ec2012-11-20 22:35:252422 },
2423 }],
[email protected]d2ca75c2013-02-01 05:47:172424 ['os_posix==1 and chromeos==0', {
2425 # Chrome OS enables -fstack-protector-strong via its build wrapper,
2426 # and we want to avoid overriding this, so stack-protector is only
2427 # enabled when not building on Chrome OS.
2428 # TODO(phajdan.jr): Use -fstack-protector-strong when our gcc
2429 # supports it.
2430 'target_defaults': {
2431 'cflags': [
2432 '-fstack-protector',
2433 '--param=ssp-buffer-size=4',
2434 ],
2435 },
2436 }],
[email protected]1e013672012-06-29 22:12:202437 ['os_posix==1 and OS!="mac" and OS!="ios"', {
[email protected]9d384032009-03-20 23:13:262438 'target_defaults': {
[email protected]5315f2842009-04-28 00:43:272439 # Enable -Werror by default, but put it in a variable so it can
2440 # be disabled in ~/.gyp/include.gypi on the valgrind builders.
2441 'variables': {
[email protected]cbbb3472012-01-25 18:32:312442 'werror%': '-Werror',
[email protected]1e013672012-06-29 22:12:202443 'libraries_for_target%': '',
[email protected]5315f2842009-04-28 00:43:272444 },
[email protected]6863896f2012-01-25 17:51:362445 'defines': [
2446 '_FILE_OFFSET_BITS=64',
2447 ],
[email protected]9d384032009-03-20 23:13:262448 'cflags': [
[email protected]1bba09c2009-08-13 12:53:162449 '<(werror)', # See note above about the werror variable.
2450 '-pthread',
2451 '-fno-exceptions',
[email protected]ef8c3cf2012-01-24 04:37:292452 '-fno-strict-aliasing', # See http://crbug.com/32204
[email protected]1bba09c2009-08-13 12:53:162453 '-Wall',
[email protected]0fa17082010-03-26 00:48:052454 # TODO(evan): turn this back on once all the builds work.
2455 # '-Wextra',
[email protected]225c8f52010-02-05 22:23:202456 # Don't warn about unused function params. We use those everywhere.
2457 '-Wno-unused-parameter',
2458 # Don't warn about the "struct foo f = {0};" initialization pattern.
2459 '-Wno-missing-field-initializers',
[email protected]3df6e3a2010-01-21 20:23:122460 # Don't export any symbols (for example, to plugins we dlopen()).
2461 # Note: this is *required* to make some plugins work.
2462 '-fvisibility=hidden',
[email protected]7ca6ce12010-09-15 23:39:352463 '-pipe',
[email protected]8a2fcba2009-07-29 00:52:242464 ],
2465 'cflags_cc': [
[email protected]832d0212009-10-28 19:12:222466 '-fno-rtti',
[email protected]8a2fcba2009-07-29 00:52:242467 '-fno-threadsafe-statics',
[email protected]f5986c42009-11-17 18:39:362468 # Make inline functions have hidden visiblity by default.
2469 # Surprisingly, not covered by -fvisibility=hidden.
2470 '-fvisibility-inlines-hidden',
[email protected]554abd902011-07-25 04:03:172471 # GCC turns on -Wsign-compare for C++ under -Wall, but clang doesn't,
2472 # so we specify it explicitly.
2473 # TODO(fischman): remove this if http://llvm.org/PR10448 obsoletes it.
[email protected]d16bd642011-07-25 23:59:182474 # http://code.google.com/p/chromium/issues/detail?id=90453
[email protected]554abd902011-07-25 04:03:172475 '-Wsign-compare',
[email protected]9d384032009-03-20 23:13:262476 ],
[email protected]a6cf87e2009-04-03 04:07:382477 'ldflags': [
[email protected]138241f2010-03-30 23:53:102478 '-pthread', '-Wl,-z,noexecstack',
[email protected]9d384032009-03-20 23:13:262479 ],
[email protected]1e013672012-06-29 22:12:202480 'libraries' : [
2481 '<(libraries_for_target)',
2482 ],
[email protected]3aacaf952009-04-02 15:34:092483 'configurations': {
[email protected]5153767c2009-12-22 01:52:502484 'Debug_Base': {
[email protected]c5bdc032009-04-20 19:11:312485 'variables': {
2486 'debug_optimize%': '0',
2487 },
[email protected]3aacaf952009-04-02 15:34:092488 'defines': [
2489 '_DEBUG',
2490 ],
2491 'cflags': [
[email protected]95ad2032012-08-24 00:49:252492 '-O>(debug_optimize)',
[email protected]3aacaf952009-04-02 15:34:092493 '-g',
2494 ],
[email protected]da1c8d692011-09-20 20:35:012495 'conditions' : [
[email protected]fa9d4e262012-08-21 04:39:002496 ['OS=="android" and android_full_debug==0', {
[email protected]8a37e4502012-08-14 22:42:552497 # Some configurations are copied from Release_Base to reduce
2498 # the binary size.
2499 'variables': {
2500 'debug_optimize%': 's',
2501 },
[email protected]da1c8d692011-09-20 20:35:012502 'cflags': [
[email protected]8a37e4502012-08-14 22:42:552503 '-fomit-frame-pointer',
2504 '-fdata-sections',
2505 '-ffunction-sections',
[email protected]da1c8d692011-09-20 20:35:012506 ],
[email protected]8a37e4502012-08-14 22:42:552507 'ldflags': [
2508 '-Wl,-O1',
2509 '-Wl,--as-needed',
2510 '-Wl,--gc-sections',
2511 ],
[email protected]da1c8d692011-09-20 20:35:012512 }],
2513 ],
[email protected]5315f2842009-04-28 00:43:272514 },
[email protected]5153767c2009-12-22 01:52:502515 'Release_Base': {
[email protected]740e2de2009-07-21 11:41:012516 'variables': {
2517 'release_optimize%': '2',
[email protected]1dd529642010-05-15 01:02:512518 # Binaries become big and gold is unable to perform GC
2519 # and remove unused sections for some of test targets
2520 # on 32 bit platform.
2521 # (This is currently observed only in chromeos valgrind bots)
2522 # The following flag is to disable --gc-sections linker
2523 # option for these bots.
2524 'no_gc_sections%': 0,
[email protected]409dceef2011-05-10 19:49:122525
2526 # TODO(bradnelson): reexamine how this is done if we change the
2527 # expansion of configurations
2528 'release_valgrind_build%': 0,
[email protected]740e2de2009-07-21 11:41:012529 },
[email protected]3aacaf952009-04-02 15:34:092530 'cflags': [
[email protected]296ce7ce2012-08-02 19:41:182531 '-O<(release_optimize)',
[email protected]d8cc3a62009-04-08 18:29:532532 # Don't emit the GCC version ident directives, they just end up
2533 # in the .comment section taking up binary size.
2534 '-fno-ident',
2535 # Put data and code in their own sections, so that unused symbols
2536 # can be removed at link time with --gc-sections.
2537 '-fdata-sections',
2538 '-ffunction-sections',
[email protected]3aacaf952009-04-02 15:34:092539 ],
[email protected]c902f2c2010-08-06 20:04:182540 'ldflags': [
2541 # Specifically tell the linker to perform optimizations.
2542 # See http://lwn.net/Articles/192624/ .
2543 '-Wl,-O1',
[email protected]27c2e492010-08-06 22:55:222544 '-Wl,--as-needed',
[email protected]c902f2c2010-08-06 20:04:182545 ],
[email protected]1dd529642010-05-15 01:02:512546 'conditions' : [
2547 ['no_gc_sections==0', {
2548 'ldflags': [
2549 '-Wl,--gc-sections',
2550 ],
2551 }],
[email protected]da1c8d692011-09-20 20:35:012552 ['OS=="android"', {
[email protected]48de0fc2012-08-02 11:03:582553 'variables': {
2554 'release_optimize%': 's',
2555 },
[email protected]da1c8d692011-09-20 20:35:012556 'cflags': [
2557 '-fomit-frame-pointer',
2558 ],
2559 }],
[email protected]ecf7b6482010-10-13 09:15:202560 ['clang==1', {
2561 'cflags!': [
2562 '-fno-ident',
2563 ],
2564 }],
[email protected]7664ab32011-02-01 23:35:252565 ['profiling==1', {
2566 'cflags': [
2567 '-fno-omit-frame-pointer',
2568 '-g',
2569 ],
2570 }],
[email protected]8d726a42012-02-09 03:49:002571 ],
[email protected]3aacaf952009-04-02 15:34:092572 },
2573 },
[email protected]601b540222009-04-03 21:32:042574 'variants': {
2575 'coverage': {
2576 'cflags': ['-fprofile-arcs', '-ftest-coverage'],
2577 'ldflags': ['-fprofile-arcs'],
2578 },
2579 'profile': {
2580 'cflags': ['-pg', '-g'],
2581 'ldflags': ['-pg'],
2582 },
2583 'symbols': {
2584 'cflags': ['-g'],
2585 },
2586 },
[email protected]606116d22009-05-06 22:38:232587 'conditions': [
[email protected]04b482602011-09-14 02:36:212588 ['target_arch=="ia32"', {
2589 'target_conditions': [
2590 ['_toolset=="target"', {
2591 'asflags': [
2592 # Needed so that libs with .s files (e.g. libicudata.a)
2593 # are compatible with the general 32-bit-ness.
2594 '-32',
2595 ],
2596 # All floating-point computations on x87 happens in 80-bit
2597 # precision. Because the C and C++ language standards allow
2598 # the compiler to keep the floating-point values in higher
2599 # precision than what's specified in the source and doing so
2600 # is more efficient than constantly rounding up to 64-bit or
2601 # 32-bit precision as specified in the source, the compiler,
2602 # especially in the optimized mode, tries very hard to keep
2603 # values in x87 floating-point stack (in 80-bit precision)
2604 # as long as possible. This has important side effects, that
2605 # the real value used in computation may change depending on
2606 # how the compiler did the optimization - that is, the value
2607 # kept in 80-bit is different than the value rounded down to
2608 # 64-bit or 32-bit. There are possible compiler options to
2609 # make this behavior consistent (e.g. -ffloat-store would keep
2610 # all floating-values in the memory, thus force them to be
2611 # rounded to its original precision) but they have significant
2612 # runtime performance penalty.
2613 #
2614 # -mfpmath=sse -msse2 makes the compiler use SSE instructions
2615 # which keep floating-point values in SSE registers in its
2616 # native precision (32-bit for single precision, and 64-bit
2617 # for double precision values). This means the floating-point
2618 # value used during computation does not change depending on
2619 # how the compiler optimized the code, since the value is
2620 # always kept in its specified precision.
2621 'conditions': [
2622 ['branding=="Chromium" and disable_sse2==0', {
2623 'cflags': [
2624 '-march=pentium4',
2625 '-msse2',
2626 '-mfpmath=sse',
2627 ],
2628 }],
2629 # ChromeOS targets Pinetrail, which is sse3, but most of the
2630 # benefit comes from sse2 so this setting allows ChromeOS
2631 # to build on other CPUs. In the future -march=atom would
2632 # help but requires a newer compiler.
2633 ['chromeos==1 and disable_sse2==0', {
2634 'cflags': [
2635 '-msse2',
2636 ],
2637 }],
2638 # Install packages have started cropping up with
2639 # different headers between the 32-bit and 64-bit
2640 # versions, so we have to shadow those differences off
2641 # and make sure a 32-bit-on-64-bit build picks up the
2642 # right files.
[email protected]32594022012-05-10 03:22:282643 # For android build, use NDK headers instead of host headers
2644 ['host_arch!="ia32" and OS!="android"', {
[email protected]04b482602011-09-14 02:36:212645 'include_dirs+': [
2646 '/usr/include32',
2647 ],
2648 }],
2649 ],
2650 # -mmmx allows mmintrin.h to be used for mmx intrinsics.
2651 # video playback is mmx and sse2 optimized.
[email protected]ffde7932009-05-29 00:39:062652 'cflags': [
[email protected]04b482602011-09-14 02:36:212653 '-m32',
2654 '-mmmx',
2655 ],
2656 'ldflags': [
2657 '-m32',
[email protected]ffde7932009-05-29 00:39:062658 ],
2659 }],
[email protected]606116d22009-05-06 22:38:232660 ],
2661 }],
[email protected]3dda8a962009-08-10 18:58:072662 ['target_arch=="arm"', {
[email protected]77c1b29392009-12-04 06:21:292663 'target_conditions': [
2664 ['_toolset=="target"', {
2665 'cflags_cc': [
2666 # The codesourcery arm-2009q3 toolchain warns at that the ABI
2667 # has changed whenever it encounters a varargs function. This
2668 # silences those warnings, as they are not helpful and
2669 # clutter legitimate warnings.
2670 '-Wno-abi',
2671 ],
2672 'conditions': [
[email protected]da1c8d692011-09-20 20:35:012673 ['arm_thumb==1', {
[email protected]77c1b29392009-12-04 06:21:292674 'cflags': [
2675 '-mthumb',
[email protected]77c1b29392009-12-04 06:21:292676 ]
2677 }],
2678 ['armv7==1', {
[email protected]dc9711f2009-11-13 19:30:252679 'cflags': [
2680 '-march=armv7-a',
2681 '-mtune=cortex-a8',
[email protected]7fc96c82012-07-24 18:15:112682 '-mfloat-abi=<(arm_float_abi)',
[email protected]dc9711f2009-11-13 19:30:252683 ],
[email protected]eafc0b452010-02-26 21:53:432684 'conditions': [
2685 ['arm_neon==1', {
2686 'cflags': [ '-mfpu=neon', ],
2687 }, {
[email protected]53e0f642010-03-05 01:41:562688 'cflags': [ '-mfpu=<(arm_fpu)', ],
[email protected]220ea5932012-08-09 10:44:072689 }],
[email protected]eafc0b452010-02-26 21:53:432690 ],
[email protected]dc9711f2009-11-13 19:30:252691 }],
[email protected]da1c8d692011-09-20 20:35:012692 ['OS=="android"', {
[email protected]7b1112c2012-03-16 22:03:532693 # Most of the following flags are derived from what Android
2694 # uses by default when building for arm, reference for which
2695 # can be found in the following file in the Android NDK:
2696 # toolchains/arm-linux-androideabi-4.4.3/setup.mk
2697 'cflags': [
2698 # The tree-sra optimization (scalar replacement for
2699 # aggregates enabling subsequent optimizations) leads to
2700 # invalid code generation when using the Android NDK's
2701 # compiler (r5-r7). This can be verified using
2702 # TestWebKitAPI's WTF.Checked_int8_t test.
2703 '-fno-tree-sra',
[email protected]9cc13e42012-08-20 20:09:482704 '-fuse-ld=gold',
[email protected]7b1112c2012-03-16 22:03:532705 '-Wno-psabi',
2706 ],
[email protected]ad17e342012-07-17 20:45:482707 # Android now supports .relro sections properly.
2708 # NOTE: While these flags enable the generation of .relro
2709 # sections, the generated libraries can still be loaded on
2710 # older Android platform versions.
2711 'ldflags': [
2712 '-Wl,-z,relro',
2713 '-Wl,-z,now',
[email protected]9cc13e42012-08-20 20:09:482714 '-fuse-ld=gold',
[email protected]ad17e342012-07-17 20:45:482715 ],
[email protected]da1c8d692011-09-20 20:35:012716 'conditions': [
[email protected]94cdbf42012-12-11 19:49:222717 ['arm_thumb==1', {
[email protected]da1c8d692011-09-20 20:35:012718 # Android toolchain doesn't support -mimplicit-it=thumb
[email protected]94cdbf42012-12-11 19:49:222719 'cflags!': [ '-Wa,-mimplicit-it=thumb' ],
2720 'cflags': [ '-mthumb-interwork' ],
[email protected]da1c8d692011-09-20 20:35:012721 }],
2722 ['armv7==0', {
2723 # Flags suitable for Android emulator
2724 'cflags': [
2725 '-march=armv5te',
2726 '-mtune=xscale',
2727 '-msoft-float',
[email protected]6863896f2012-01-25 17:51:362728 ],
2729 'defines': [
2730 '__ARM_ARCH_5__',
2731 '__ARM_ARCH_5T__',
2732 '__ARM_ARCH_5E__',
2733 '__ARM_ARCH_5TE__',
[email protected]da1c8d692011-09-20 20:35:012734 ],
2735 }],
[email protected]4c48ef102012-11-29 22:00:382736 ['profiling==1', {
2737 'cflags': [
2738 '-marm', # Probably reduntant, but recommend by "perf" docs.
2739 '-mapcs-frame', # Seems required by -fno-omit-frame-pointer.
2740 ],
2741 }],
[email protected]220ea5932012-08-09 10:44:072742 ['clang==1', {
2743 'cflags!': [
2744 # Clang does not support the following options.
2745 '-mthumb-interwork',
2746 '-finline-limit=64',
2747 '-fno-tree-sra',
[email protected]9cc13e42012-08-20 20:09:482748 '-fuse-ld=gold',
[email protected]220ea5932012-08-09 10:44:072749 '-Wno-psabi',
2750 ],
2751 }],
[email protected]da1c8d692011-09-20 20:35:012752 ],
[email protected]3cf73842012-11-24 03:35:252753 'target_conditions': [
2754 # ndk-build copies .a's around the filesystem, breaking
2755 # relative paths in thin archives. Disable using thin
2756 # archives to avoid problems until one of these is fixed:
2757 # http://code.google.com/p/android/issues/detail?id=40302
2758 # http://code.google.com/p/android/issues/detail?id=40303
2759 ['_type=="static_library"', {
2760 'standalone_static_library': 1,
2761 }],
2762 ],
[email protected]da1c8d692011-09-20 20:35:012763 }],
[email protected]3dda8a962009-08-10 18:58:072764 ],
2765 }],
2766 ],
2767 }],
[email protected]2fb843b2010-08-12 02:11:082768 ['linux_fpic==1', {
[email protected]c76723a2010-01-25 23:10:582769 'cflags': [
2770 '-fPIC',
2771 ],
[email protected]d3f692b32011-12-14 19:04:352772 'ldflags': [
2773 '-fPIC',
2774 ],
[email protected]c76723a2010-01-25 23:10:582775 }],
[email protected]ee28c9f2009-09-04 01:53:012776 ['sysroot!=""', {
[email protected]fd36ce822009-10-28 20:13:572777 'target_conditions': [
2778 ['_toolset=="target"', {
2779 'cflags': [
2780 '--sysroot=<(sysroot)',
2781 ],
2782 'ldflags': [
2783 '--sysroot=<(sysroot)',
2784 ],
2785 }]]
[email protected]ee28c9f2009-09-04 01:53:012786 }],
[email protected]58680ce2010-09-18 00:09:152787 ['clang==1', {
[email protected]18ca15a2011-08-10 03:07:122788 'cflags': [
2789 '-Wheader-hygiene',
2790 # Clang spots more unused functions.
2791 '-Wno-unused-function',
2792 # Don't die on dtoa code that uses a char as an array index.
2793 '-Wno-char-subscripts',
[email protected]d6431722011-09-01 00:46:332794 # Especially needed for gtest macros using enum values from Mac
2795 # system headers.
2796 # TODO(pkasting): In C++11 this is legal, so this should be
2797 # removed when we change to that. (This is also why we don't
2798 # bother fixing all these cases today.)
[email protected]18ca15a2011-08-10 03:07:122799 '-Wno-unnamed-type-template-args',
[email protected]aae0e592012-11-15 00:25:532800 # This (rightfully) complains about 'override', which we use
[email protected]241109b52011-10-15 19:00:302801 # heavily.
2802 '-Wno-c++11-extensions',
[email protected]9242c7642012-01-29 09:02:102803
2804 # Warns on switches on enums that cover all enum values but
2805 # also contain a default: branch. Chrome is full of that.
2806 '-Wno-covered-switch-default',
[email protected]18ca15a2011-08-10 03:07:122807 ],
2808 'cflags!': [
2809 # Clang doesn't seem to know know this flag.
2810 '-mfpmath=sse',
2811 ],
[email protected]58680ce2010-09-18 00:09:152812 }],
[email protected]5d451ad2011-02-11 16:43:462813 ['clang==1 and clang_use_chrome_plugins==1', {
[email protected]d23720682011-08-11 00:16:262814 'cflags': [
[email protected]c872dc52012-05-19 06:36:312815 '<@(clang_chrome_plugins_flags)',
[email protected]d23720682011-08-11 00:16:262816 ],
[email protected]5d451ad2011-02-11 16:43:462817 }],
[email protected]4a9ac22e2011-12-02 03:41:532818 ['clang==1 and clang_load!=""', {
[email protected]d23720682011-08-11 00:16:262819 'cflags': [
2820 '-Xclang', '-load', '-Xclang', '<(clang_load)',
[email protected]4a9ac22e2011-12-02 03:41:532821 ],
2822 }],
2823 ['clang==1 and clang_add_plugin!=""', {
2824 'cflags': [
[email protected]d23720682011-08-11 00:16:262825 '-Xclang', '-add-plugin', '-Xclang', '<(clang_add_plugin)',
2826 ],
[email protected]5e781232011-01-28 02:57:592827 }],
[email protected]2616d45d2012-01-19 03:15:482828 ['clang==1 and "<(GENERATOR)"=="ninja"', {
2829 'cflags': [
2830 # See http://crbug.com/110262
2831 '-fcolor-diagnostics',
2832 ],
2833 }],
[email protected]92799b632011-08-15 14:33:062834 ['asan==1', {
[email protected]1ffc3b3962012-05-16 14:08:422835 'target_conditions': [
2836 ['_toolset=="target"', {
[email protected]cb770a4c2012-07-25 20:06:452837 'cflags': [
[email protected]48688df02012-11-27 21:04:562838 '-fsanitize=address',
[email protected]cb770a4c2012-07-25 20:06:452839 '-fno-omit-frame-pointer',
[email protected]48688df02012-11-27 21:04:562840 '-w', # http://crbug.com/162783
[email protected]73c15b32013-01-29 13:04:302841 '-gline-tables-only',
[email protected]cb770a4c2012-07-25 20:06:452842 ],
2843 'ldflags': [
[email protected]48688df02012-11-27 21:04:562844 '-fsanitize=address',
[email protected]cb770a4c2012-07-25 20:06:452845 ],
2846 'defines': [
2847 'ADDRESS_SANITIZER',
2848 ],
[email protected]1ffc3b3962012-05-16 14:08:422849 }],
[email protected]921c7b52011-11-25 10:34:352850 ],
[email protected]92799b632011-08-15 14:33:062851 }],
[email protected]c9a829272012-07-04 07:51:122852 ['tsan==1', {
2853 'target_conditions': [
2854 ['_toolset=="target"', {
[email protected]cb770a4c2012-07-25 20:06:452855 'cflags': [
[email protected]927a9d672012-11-09 11:28:202856 '-fsanitize=thread',
[email protected]cb770a4c2012-07-25 20:06:452857 '-fno-omit-frame-pointer',
[email protected]9d46a572013-01-23 10:38:292858 '-fPIC',
[email protected]927a9d672012-11-09 11:28:202859 '-mllvm', '-tsan-blacklist=<(tsan_blacklist)',
[email protected]cb770a4c2012-07-25 20:06:452860 ],
2861 'ldflags': [
[email protected]927a9d672012-11-09 11:28:202862 '-fsanitize=thread',
[email protected]cb770a4c2012-07-25 20:06:452863 ],
2864 'defines': [
2865 'THREAD_SANITIZER',
2866 'DYNAMIC_ANNOTATIONS_EXTERNAL_IMPL=1',
[email protected]7bdd7d7c2012-11-01 10:36:162867 'WTF_USE_DYNAMIC_ANNOTATIONS_NOIMPL=1',
[email protected]cb770a4c2012-07-25 20:06:452868 ],
2869 'target_conditions': [
2870 ['_type=="executable"', {
2871 'ldflags': [
[email protected]c9a829272012-07-04 07:51:122872 '-pie',
[email protected]cb770a4c2012-07-25 20:06:452873 ],
2874 }],
2875 ],
[email protected]c9a829272012-07-04 07:51:122876 }],
2877 ],
2878 }],
[email protected]8a48f3f2012-12-04 20:14:042879 ['order_profiling!=0 and (chromeos==1 or OS=="linux" or OS=="android")', {
[email protected]8a6abd12012-05-16 10:04:442880 'target_conditions' : [
2881 ['_toolset=="target"', {
2882 'cflags': [
2883 '-finstrument-functions',
[email protected]c2a8d2e2012-10-05 09:31:452884 # Allow mmx intrinsics to inline, so that the
2885 # compiler can expand the intrinsics.
2886 '-finstrument-functions-exclude-file-list=mmintrin.h',
[email protected]8a6abd12012-05-16 10:04:442887 ],
2888 }],
2889 ],
2890 }],
[email protected]cbd5fd52009-08-26 00:14:272891 ['linux_breakpad==1', {
[email protected]cbd5fd52009-08-26 00:14:272892 'defines': ['USE_LINUX_BREAKPAD'],
[email protected]ce4367d2013-01-15 16:13:102893 }],
2894 ['linux_dump_symbols==1', {
2895 'cflags': [ '-g' ],
[email protected]c50c8d72012-11-15 00:29:252896 'conditions': [
[email protected]791262fe2013-02-21 17:20:152897 ['target_arch=="ia32" and OS!="android"', {
[email protected]c50c8d72012-11-15 00:29:252898 'target_conditions': [
2899 ['_toolset=="target"', {
2900 'ldflags': [
2901 # Workaround for linker OOM. http://crbug.com/160253.
2902 '-Wl,--no-keep-files-mapped',
2903 ],
2904 }],
2905 ],
2906 }],
2907 ],
[email protected]cbd5fd52009-08-26 00:14:272908 }],
[email protected]d8b60602010-03-26 09:41:222909 ['linux_use_heapchecker==1', {
2910 'variables': {'linux_use_tcmalloc%': 1},
[email protected]cea4aec2012-01-24 12:26:402911 'defines': ['USE_HEAPCHECKER'],
[email protected]d8b60602010-03-26 09:41:222912 }],
[email protected]61a9b2d82010-02-26 00:31:082913 ['linux_use_tcmalloc==0', {
2914 'defines': ['NO_TCMALLOC'],
[email protected]01699e22009-11-11 19:24:242915 }],
[email protected]64e2d4a42010-08-27 10:13:212916 ['linux_keep_shadow_stacks==1', {
2917 'defines': ['KEEP_SHADOW_STACKS'],
[email protected]987a7422012-02-23 19:10:512918 'cflags': [
2919 '-finstrument-functions',
2920 # Allow mmx intrinsics to inline, so that the compiler can expand
2921 # the intrinsics.
2922 '-finstrument-functions-exclude-file-list=mmintrin.h',
2923 ],
[email protected]64e2d4a42010-08-27 10:13:212924 }],
[email protected]8d726a42012-02-09 03:49:002925 ['linux_use_gold_flags==1', {
[email protected]68d01e82012-12-08 03:36:322926 'ldflags': [
2927 # Experimentation found that using four linking threads
2928 # saved ~20% of link time.
2929 # https://groups.google.com/a/chromium.org/group/chromium-dev/browse_thread/thread/281527606915bb36
2930 '-Wl,--threads',
2931 '-Wl,--thread-count=4',
2932 ],
[email protected]8d726a42012-02-09 03:49:002933 'conditions': [
2934 ['release_valgrind_build==0', {
2935 'target_conditions': [
2936 ['_toolset=="target"', {
2937 'ldflags': [
2938 # There seems to be a conflict of --icf and -pie
2939 # in gold which can generate crashy binaries. As
2940 # a security measure, -pie takes precendence for
2941 # now.
2942 #'-Wl,--icf=safe',
2943 '-Wl,--icf=none',
2944 ],
2945 }],
2946 ],
2947 }],
2948 ],
2949 }],
[email protected]b07806c12012-02-03 22:44:592950 ['linux_use_gold_binary==1', {
2951 'variables': {
[email protected]516312d2012-02-28 05:17:262952 'conditions': [
2953 ['inside_chromium_build==1', {
2954 # We pass the path to gold to the compiler. gyp leaves
2955 # unspecified what the cwd is when running the compiler,
2956 # so the normal gyp path-munging fails us. This hack
2957 # gets the right path.
2958 'gold_path': '<(PRODUCT_DIR)/../../third_party/gold',
2959 }, {
2960 'gold_path': '<(PRODUCT_DIR)/../../Source/WebKit/chromium/third_party/gold',
2961 }]
2962 ]
[email protected]b07806c12012-02-03 22:44:592963 },
2964 'ldflags': [
2965 # Put our gold binary in the search path for the linker.
2966 '-B<(gold_path)',
2967 ],
2968 }],
[email protected]606116d22009-05-06 22:38:232969 ],
[email protected]9d384032009-03-20 23:13:262970 },
2971 }],
[email protected]c51e8d52009-12-11 20:04:062972 # FreeBSD-specific options; note that most FreeBSD options are set above,
2973 # with Linux.
2974 ['OS=="freebsd"', {
2975 'target_defaults': {
2976 'ldflags': [
2977 '-Wl,--no-keep-memory',
2978 ],
2979 },
2980 }],
[email protected]da1c8d692011-09-20 20:35:012981 # Android-specific options; note that most are set above with Linux.
2982 ['OS=="android"', {
2983 'variables': {
[email protected]25036722012-12-11 10:36:172984 # This is a unique identifier for a given build. It's used for
2985 # identifying various build artifacts corresponding to a particular
2986 # build of chrome (e.g. where to find archived symbols).
2987 'chrome_build_id%': '',
[email protected]da1c8d692011-09-20 20:35:012988 'conditions': [
[email protected]da1c8d692011-09-20 20:35:012989 # Use shared stlport library when system one used.
2990 # Figure this out early since it needs symbols from libgcc.a, so it
2991 # has to be before that in the set of libraries.
2992 ['use_system_stlport==1', {
2993 'android_stlport_library': 'stlport',
2994 }, {
[email protected]806b5232012-11-19 21:19:042995 'conditions': [
2996 ['component=="shared_library"', {
2997 'android_stlport_library': 'stlport_shared',
2998 }, {
2999 'android_stlport_library': 'stlport_static',
3000 }],
3001 ],
[email protected]da1c8d692011-09-20 20:35:013002 }],
3003 ],
3004
3005 # Placing this variable here prevents from forking libvpx, used
3006 # by remoting. Remoting is off, so it needn't built,
3007 # so forking it's deps seems like overkill.
3008 # But this variable need defined to properly run gyp.
3009 # A proper solution is to have an OS==android conditional
3010 # in third_party/libvpx/libvpx.gyp to define it.
3011 'libvpx_path': 'lib/linux/arm',
3012 },
3013 'target_defaults': {
[email protected]da1c8d692011-09-20 20:35:013014 'variables': {
3015 'release_extra_cflags%': '',
[email protected]8a37e4502012-08-14 22:42:553016 },
[email protected]da1c8d692011-09-20 20:35:013017
3018 'target_conditions': [
3019 # Settings for building device targets using Android's toolchain.
3020 # These are based on the setup.mk file from the Android NDK.
3021 #
3022 # The NDK Android executable link step looks as follows:
3023 # $LDFLAGS
3024 # $(TARGET_CRTBEGIN_DYNAMIC_O) <-- crtbegin.o
3025 # $(PRIVATE_OBJECTS) <-- The .o that we built
3026 # $(PRIVATE_STATIC_LIBRARIES) <-- The .a that we built
3027 # $(TARGET_LIBGCC) <-- libgcc.a
3028 # $(PRIVATE_SHARED_LIBRARIES) <-- The .so that we built
3029 # $(PRIVATE_LDLIBS) <-- System .so
3030 # $(TARGET_CRTEND_O) <-- crtend.o
3031 #
3032 # For now the above are approximated for executables by adding
3033 # crtbegin.o to the end of the ldflags and 'crtend.o' to the end
3034 # of 'libraries'.
3035 #
3036 # The NDK Android shared library link step looks as follows:
3037 # $LDFLAGS
3038 # $(PRIVATE_OBJECTS) <-- The .o that we built
3039 # -l,--whole-archive
3040 # $(PRIVATE_WHOLE_STATIC_LIBRARIES)
3041 # -l,--no-whole-archive
3042 # $(PRIVATE_STATIC_LIBRARIES) <-- The .a that we built
3043 # $(TARGET_LIBGCC) <-- libgcc.a
3044 # $(PRIVATE_SHARED_LIBRARIES) <-- The .so that we built
3045 # $(PRIVATE_LDLIBS) <-- System .so
3046 #
[email protected]ad17e342012-07-17 20:45:483047 # For now, assume that whole static libraries are not needed.
[email protected]da1c8d692011-09-20 20:35:013048 #
3049 # For both executables and shared libraries, add the proper
3050 # libgcc.a to the start of libraries which puts it in the
3051 # proper spot after .o and .a files get linked in.
3052 #
3053 # TODO: The proper thing to do longer-tem would be proper gyp
3054 # support for a custom link command line.
3055 ['_toolset=="target"', {
3056 'cflags!': [
3057 '-pthread', # Not supported by Android toolchain.
3058 ],
3059 'cflags': [
[email protected]da1c8d692011-09-20 20:35:013060 '-ffunction-sections',
3061 '-funwind-tables',
3062 '-g',
3063 '-fstack-protector',
3064 '-fno-short-enums',
3065 '-finline-limit=64',
3066 '-Wa,--noexecstack',
[email protected]da1c8d692011-09-20 20:35:013067 '<@(release_extra_cflags)',
[email protected]da1c8d692011-09-20 20:35:013068 ],
3069 'defines': [
3070 'ANDROID',
3071 '__GNU_SOURCE=1', # Necessary for clone()
3072 'USE_STLPORT=1',
3073 '_STLP_USE_PTR_SPECIALIZATIONS=1',
[email protected]25036722012-12-11 10:36:173074 'CHROME_BUILD_ID="<(chrome_build_id)"',
[email protected]da1c8d692011-09-20 20:35:013075 ],
3076 'ldflags!': [
3077 '-pthread', # Not supported by Android toolchain.
3078 ],
3079 'ldflags': [
3080 '-nostdlib',
3081 '-Wl,--no-undefined',
[email protected]da1c8d692011-09-20 20:35:013082 # Don't export symbols from statically linked libraries.
3083 '-Wl,--exclude-libs=ALL',
3084 ],
[email protected]a0e48b02011-11-22 07:53:013085 'libraries': [
3086 '-l<(android_stlport_library)',
3087 # Manually link the libgcc.a that the cross compiler uses.
[email protected]c0f76312012-08-16 13:52:043088 '<!(<(android_toolchain)/*-gcc -print-libgcc-file-name)',
[email protected]a0e48b02011-11-22 07:53:013089 '-lc',
3090 '-ldl',
3091 '-lstdc++',
3092 '-lm',
[email protected]da1c8d692011-09-20 20:35:013093 ],
3094 'conditions': [
[email protected]806b5232012-11-19 21:19:043095 ['component=="shared_library"', {
3096 'libraries': [
3097 '-lgnustl_shared',
3098 ],
[email protected]4d6f9d7db2012-11-21 16:27:473099 'ldflags!': [
3100 '-Wl,--exclude-libs=ALL',
3101 ],
[email protected]806b5232012-11-19 21:19:043102 }],
[email protected]220ea5932012-08-09 10:44:073103 ['clang==1', {
3104 'cflags': [
3105 # Work around incompatibilities between bionic and clang
3106 # headers.
3107 '-D__compiler_offsetof=__builtin_offsetof',
3108 '-Dnan=__builtin_nan',
3109 ],
3110 'conditions': [
3111 ['target_arch=="arm"', {
3112 'cflags': [
3113 '-target arm-linux-androideabi',
3114 '-mllvm -arm-enable-ehabi',
3115 ],
3116 'ldflags': [
3117 '-target arm-linux-androideabi',
3118 ],
3119 }],
3120 ['target_arch=="ia32"', {
3121 'cflags': [
3122 '-target x86-linux-androideabi',
3123 ],
3124 'ldflags': [
3125 '-target x86-linux-androideabi',
3126 ],
3127 }],
3128 ],
3129 }],
[email protected]ed70ed1862012-11-07 12:11:253130 ['asan==1', {
3131 'cflags': [
3132 # Android build relies on -Wl,--gc-sections removing
3133 # unreachable code. ASan instrumentation for globals inhibits
3134 # this and results in a library with unresolvable relocations.
3135 # TODO(eugenis): find a way to reenable this.
3136 '-mllvm -asan-globals=0',
3137 ],
3138 }],
[email protected]da1c8d692011-09-20 20:35:013139 ['android_build_type==0', {
[email protected]34baed112012-06-27 16:10:463140 'defines': [
[email protected]f5c7758a2012-07-25 16:17:573141 # The NDK has these things, but doesn't define the constants
3142 # to say that it does. Define them here instead.
3143 'HAVE_SYS_UIO_H',
3144 ],
3145 'cflags': [
3146 '--sysroot=<(android_ndk_sysroot)',
[email protected]34baed112012-06-27 16:10:463147 ],
[email protected]da1c8d692011-09-20 20:35:013148 'ldflags': [
[email protected]5baf7482011-12-13 16:00:523149 '--sysroot=<(android_ndk_sysroot)',
[email protected]da1c8d692011-09-20 20:35:013150 ],
3151 }],
[email protected]0d7291e2012-10-04 19:16:083152 ['android_build_type==1', {
3153 'include_dirs': [
3154 # OpenAL headers from the Android tree.
3155 '<(android_src)/frameworks/wilhelm/include',
3156 ],
3157 'cflags': [
[email protected]04882132012-11-21 12:40:453158 # Android predefines this as 1; undefine it here so Chromium
3159 # can redefine it later to be 2 for chromium code and unset
3160 # for third party code. This works because cflags are added
3161 # before defines.
3162 '-U_FORTIFY_SOURCE',
[email protected]53f93c92013-01-04 00:48:553163 # Disable any additional warnings enabled by the Android build system but which
3164 # chromium does not build cleanly with (when treating warning as errors).
[email protected]0d7291e2012-10-04 19:16:083165 # Things that are part of -Wextra:
[email protected]53f93c92013-01-04 00:48:553166 '-Wno-extra', # Enabled by -Wextra, but no specific flag
3167 '-Wno-ignored-qualifiers',
3168 '-Wno-type-limits',
[email protected]0d7291e2012-10-04 19:16:083169 # Other things unrelated to -Wextra:
[email protected]53f93c92013-01-04 00:48:553170 '-Wno-non-virtual-dtor',
3171 '-Wno-sign-promo',
[email protected]0d7291e2012-10-04 19:16:083172 ],
3173 'cflags_cc': [
3174 # Disabling c++0x-compat should be handled in WebKit, but
3175 # this currently doesn't work because gcc_version is not set
3176 # correctly when building with the Android build system.
3177 # TODO(torne): Fix this in WebKit.
3178 '-Wno-error=c++0x-compat',
3179 ],
3180 }],
3181 ['android_build_type==1 and chromium_code==0', {
3182 'cflags': [
3183 # There is a class of warning which:
3184 # 1) Android always enables and also treats as errors
3185 # 2) Chromium ignores in third party code
3186 # For now, I am leaving these warnings enabled but preventing
3187 # them from being treated as errors here.
[email protected]53f93c92013-01-04 00:48:553188 '-Wno-address',
3189 '-Wno-format-security',
3190 '-Wno-non-virtual-dtor',
3191 '-Wno-return-type',
3192 '-Wno-sequence-point',
[email protected]0d7291e2012-10-04 19:16:083193 ],
3194 }],
[email protected]febd3572012-05-03 09:17:453195 ['target_arch == "arm"', {
3196 'ldflags': [
3197 # Enable identical code folding to reduce size.
3198 '-Wl,--icf=safe',
3199 ],
3200 }],
[email protected]da1c8d692011-09-20 20:35:013201 # NOTE: The stlport header include paths below are specified in
3202 # cflags rather than include_dirs because they need to come
3203 # after include_dirs. Think of them like system headers, but
3204 # don't use '-isystem' because the arm-linux-androideabi-4.4.3
3205 # toolchain (circa Gingerbread) will exhibit strange errors.
3206 # The include ordering here is important; change with caution.
[email protected]f91ba812012-07-11 00:00:513207 ['use_system_stlport==1', {
3208 'cflags': [
3209 # For libstdc++/include, which is used by stlport.
3210 '-I<(android_src)/bionic',
3211 '-I<(android_src)/external/stlport/stlport',
3212 ],
3213 }, { # else: use_system_stlport!=1
[email protected]da1c8d692011-09-20 20:35:013214 'cflags': [
3215 '-I<(android_ndk_root)/sources/cxx-stl/stlport/stlport',
[email protected]7aa96b12012-12-11 04:29:483216 '-I<(android_ndk_root)/sources/cxx-stl/gnu-libstdc++/4.6/include',
[email protected]da1c8d692011-09-20 20:35:013217 ],
3218 'conditions': [
3219 ['target_arch=="arm" and armv7==1', {
3220 'ldflags': [
3221 '-L<(android_ndk_root)/sources/cxx-stl/stlport/libs/armeabi-v7a',
[email protected]806b5232012-11-19 21:19:043222 '-L<(android_ndk_root)/sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi-v7a',
[email protected]da1c8d692011-09-20 20:35:013223 ],
3224 }],
3225 ['target_arch=="arm" and armv7==0', {
3226 'ldflags': [
3227 '-L<(android_ndk_root)/sources/cxx-stl/stlport/libs/armeabi',
[email protected]806b5232012-11-19 21:19:043228 '-L<(android_ndk_root)/sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi',
[email protected]da1c8d692011-09-20 20:35:013229 ],
3230 }],
3231 ['target_arch=="ia32"', {
3232 'ldflags': [
3233 '-L<(android_ndk_root)/sources/cxx-stl/stlport/libs/x86',
[email protected]806b5232012-11-19 21:19:043234 '-L<(android_ndk_root)/sources/cxx-stl/gnu-libstdc++/4.6/libs/x86',
[email protected]da1c8d692011-09-20 20:35:013235 ],
3236 }],
3237 ],
3238 }],
3239 ['target_arch=="ia32"', {
3240 # The x86 toolchain currently has problems with stack-protector.
3241 'cflags!': [
3242 '-fstack-protector',
3243 ],
3244 'cflags': [
3245 '-fno-stack-protector',
3246 ],
3247 }],
3248 ],
3249 'target_conditions': [
3250 ['_type=="executable"', {
3251 'ldflags': [
3252 '-Bdynamic',
3253 '-Wl,-dynamic-linker,/system/bin/linker',
3254 '-Wl,--gc-sections',
3255 '-Wl,-z,nocopyreloc',
3256 # crtbegin_dynamic.o should be the last item in ldflags.
3257 '<(android_ndk_lib)/crtbegin_dynamic.o',
3258 ],
3259 'libraries': [
3260 # crtend_android.o needs to be the last item in libraries.
3261 # Do not add any libraries after this!
3262 '<(android_ndk_lib)/crtend_android.o',
3263 ],
[email protected]63a131fd2012-11-06 16:01:213264 'conditions': [
3265 ['asan==1', {
3266 'cflags': [
3267 '-fPIE',
3268 ],
3269 'ldflags': [
3270 '-pie',
3271 ],
3272 }],
3273 ],
[email protected]da1c8d692011-09-20 20:35:013274 }],
[email protected]f5c7758a2012-07-25 16:17:573275 ['_type=="shared_library" or _type=="loadable_module"', {
[email protected]da1c8d692011-09-20 20:35:013276 'ldflags': [
3277 '-Wl,-shared,-Bsymbolic',
[email protected]a08029b42012-04-25 03:18:463278 # crtbegin_so.o should be the last item in ldflags.
3279 '<(android_ndk_lib)/crtbegin_so.o',
[email protected]da1c8d692011-09-20 20:35:013280 ],
[email protected]a08029b42012-04-25 03:18:463281 'libraries': [
3282 # crtend_so.o needs to be the last item in libraries.
3283 # Do not add any libraries after this!
3284 '<(android_ndk_lib)/crtend_so.o',
3285 ],
[email protected]da1c8d692011-09-20 20:35:013286 }],
3287 ],
3288 }],
3289 # Settings for building host targets using the system toolchain.
3290 ['_toolset=="host"', {
[email protected]3984aaf2012-02-16 11:42:123291 'cflags!': [
3292 # Due to issues in Clang build system, using ASan on 32-bit
3293 # binaries on x86_64 host is problematic.
3294 # TODO(eugenis): re-enable.
[email protected]48688df02012-11-27 21:04:563295 '-fsanitize=address',
3296 '-w', # http://crbug.com/162783
[email protected]3984aaf2012-02-16 11:42:123297 ],
[email protected]da1c8d692011-09-20 20:35:013298 'ldflags!': [
[email protected]2e82fa52012-11-27 23:41:443299 '-fsanitize=address',
[email protected]da1c8d692011-09-20 20:35:013300 '-Wl,-z,noexecstack',
3301 '-Wl,--gc-sections',
3302 '-Wl,-O1',
3303 '-Wl,--as-needed',
3304 ],
[email protected]965b6b22011-09-29 16:07:283305 'sources/': [
3306 ['exclude', '_android(_unittest)?\\.cc$'],
3307 ['exclude', '(^|/)android/']
3308 ],
[email protected]da1c8d692011-09-20 20:35:013309 }],
3310 ],
3311 },
3312 }],
[email protected]93f21e42010-04-01 00:35:153313 ['OS=="solaris"', {
3314 'cflags!': ['-fvisibility=hidden'],
3315 'cflags_cc!': ['-fvisibility-inlines-hidden'],
3316 }],
[email protected]1e013672012-06-29 22:12:203317 ['OS=="mac" or OS=="ios"', {
[email protected]2f80c312009-02-25 21:26:553318 'target_defaults': {
[email protected]d92c7c012009-03-19 19:26:423319 'mac_bundle': 0,
[email protected]2f80c312009-02-25 21:26:553320 'xcode_settings': {
3321 'ALWAYS_SEARCH_USER_PATHS': 'NO',
[email protected]2429bb732012-10-19 00:24:243322 # Don't link in libarclite_macosx.a, see http://crbug.com/156530.
3323 'CLANG_LINK_OBJC_RUNTIME': 'NO', # -fno-objc-link-runtime
[email protected]ab2956372009-08-13 18:11:043324 'GCC_C_LANGUAGE_STANDARD': 'c99', # -std=c99
3325 'GCC_CW_ASM_SYNTAX': 'NO', # No -fasm-blocks
[email protected]ab2956372009-08-13 18:11:043326 'GCC_ENABLE_CPP_EXCEPTIONS': 'NO', # -fno-exceptions
3327 'GCC_ENABLE_CPP_RTTI': 'NO', # -fno-rtti
3328 'GCC_ENABLE_PASCAL_STRINGS': 'NO', # No -mpascal-strings
[email protected]3224dcd2009-09-16 17:31:253329 # GCC_INLINES_ARE_PRIVATE_EXTERN maps to -fvisibility-inlines-hidden
3330 'GCC_INLINES_ARE_PRIVATE_EXTERN': 'YES',
[email protected]ab2956372009-08-13 18:11:043331 'GCC_OBJC_CALL_CXX_CDTORS': 'YES', # -fobjc-call-cxx-cdtors
3332 'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES', # -fvisibility=hidden
3333 'GCC_THREADSAFE_STATICS': 'NO', # -fno-threadsafe-statics
3334 'GCC_TREAT_WARNINGS_AS_ERRORS': 'YES', # -Werror
[email protected]2f80c312009-02-25 21:26:553335 'GCC_VERSION': '4.2',
[email protected]ab2956372009-08-13 18:11:043336 'GCC_WARN_ABOUT_MISSING_NEWLINE': 'YES', # -Wnewline-eof
[email protected]2f80c312009-02-25 21:26:553337 'USE_HEADERMAP': 'NO',
[email protected]080e86f2010-06-21 15:19:043338 'WARNING_CFLAGS': [
3339 '-Wall',
3340 '-Wendif-labels',
3341 '-Wextra',
3342 # Don't warn about unused function parameters.
3343 '-Wno-unused-parameter',
3344 # Don't warn about the "struct foo f = {0};" initialization
3345 # pattern.
3346 '-Wno-missing-field-initializers',
3347 ],
[email protected]b3fb8092009-03-12 19:09:243348 'conditions': [
3349 ['chromium_mac_pch', {'GCC_PRECOMPILE_PREFIX_HEADER': 'YES'},
[email protected]9543af052009-09-15 22:42:593350 {'GCC_PRECOMPILE_PREFIX_HEADER': 'NO'}
3351 ],
[email protected]2936b8c2012-10-29 10:57:313352 # Note that the prebuilt Clang binaries should not be used for iOS
3353 # development except for ASan builds.
[email protected]66733172010-09-22 00:09:283354 ['clang==1', {
[email protected]34f40892011-09-06 21:53:303355 'CC': '$(SOURCE_ROOT)/<(clang_dir)/clang',
3356 'LDPLUSPLUS': '$(SOURCE_ROOT)/<(clang_dir)/clang++',
[email protected]a79fd882011-10-03 18:22:383357
[email protected]6c648f12011-12-24 07:50:433358 # Don't use -Wc++0x-extensions, which Xcode 4 enables by default
[email protected]aae0e592012-11-15 00:25:533359 # when building with clang. This warning is triggered when the
[email protected]6c648f12011-12-24 07:50:433360 # override keyword is used via the OVERRIDE macro from
3361 # base/compiler_specific.h.
3362 'CLANG_WARN_CXX0X_EXTENSIONS': 'NO',
[email protected]3e893e0c2012-11-16 16:58:443363 # Warn if automatic synthesis is triggered with
3364 # the -Wobjc-missing-property-synthesis flag.
[email protected]aae0e592012-11-15 00:25:533365 'CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS': 'YES',
[email protected]34f40892011-09-06 21:53:303366 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0',
[email protected]66733172010-09-22 00:09:283367 'WARNING_CFLAGS': [
[email protected]7f8d486f2011-04-05 19:49:073368 '-Wheader-hygiene',
[email protected]c67e8ca2012-12-04 16:01:523369
3370 # This warns on using ints as initializers for floats in
3371 # initializer lists (e.g. |int a = f(); CGSize s = { a, a };|),
3372 # which happens in several places in chrome code. Not sure if
3373 # this is worth fixing.
3374 '-Wno-c++11-narrowing',
3375
3376 # This warns about code like |"0x%08"NACL_PRIxPTR| -- with C++11
3377 # user-defined literals, this is now a string literal with a UD
3378 # suffix. However, this is used heavily in NaCl code, so disable
3379 # the warning for now.
3380 '-Wno-reserved-user-defined-literal',
3381
[email protected]66733172010-09-22 00:09:283382 # Don't die on dtoa code that uses a char as an array index.
3383 # This is required solely for base/third_party/dmg_fp/dtoa.cc.
3384 '-Wno-char-subscripts',
[email protected]25d3bb722010-11-22 14:31:453385 # Clang spots more unused functions.
3386 '-Wno-unused-function',
[email protected]9242c7642012-01-29 09:02:103387
3388 # Warns on switches on enums that cover all enum values but
3389 # also contain a default: branch. Chrome is full of that.
3390 '-Wno-covered-switch-default',
[email protected]66733172010-09-22 00:09:283391 ],
[email protected]c67e8ca2012-12-04 16:01:523392 'OTHER_CPLUSPLUSFLAGS': [
3393 # gnu++11 instead of c++11 so that __ANSI_C__ doesn't get
3394 # defined. (Else e.g. finite() in base/float_util.h needs to
3395 # be isfinite() which doesn't exist on the android bots.)
3396 # typeof() is also disabled in c++11 (but we could use
3397 # decltype() instead).
3398 # TODO(thakis): Use CLANG_CXX_LANGUAGE_STANDARD instead once all
3399 # bots use xcode 4 -- http://crbug.com/147515).
3400 # TODO(thakis): Eventually switch this to c++11 instead of
3401 # gnu++11 (once typeof can be removed, which is blocked on c++11
3402 # being available everywhere).
3403 '$(inherited)', '-std=gnu++11',
3404 ],
[email protected]66733172010-09-22 00:09:283405 }],
[email protected]5d451ad2011-02-11 16:43:463406 ['clang==1 and clang_use_chrome_plugins==1', {
3407 'OTHER_CFLAGS': [
[email protected]c872dc52012-05-19 06:36:313408 '<@(clang_chrome_plugins_flags)',
[email protected]5d451ad2011-02-11 16:43:463409 ],
3410 }],
[email protected]4a9ac22e2011-12-02 03:41:533411 ['clang==1 and clang_load!=""', {
[email protected]5e781232011-01-28 02:57:593412 'OTHER_CFLAGS': [
3413 '-Xclang', '-load', '-Xclang', '<(clang_load)',
[email protected]4a9ac22e2011-12-02 03:41:533414 ],
3415 }],
3416 ['clang==1 and clang_add_plugin!=""', {
3417 'OTHER_CFLAGS': [
[email protected]5e781232011-01-28 02:57:593418 '-Xclang', '-add-plugin', '-Xclang', '<(clang_add_plugin)',
3419 ],
3420 }],
[email protected]2616d45d2012-01-19 03:15:483421 ['clang==1 and "<(GENERATOR)"=="ninja"', {
3422 'OTHER_CFLAGS': [
3423 # See http://crbug.com/110262
3424 '-fcolor-diagnostics',
3425 ],
3426 }],
[email protected]b3fb8092009-03-12 19:09:243427 ],
[email protected]2f80c312009-02-25 21:26:553428 },
[email protected]34f40892011-09-06 21:53:303429 'conditions': [
3430 ['clang==1', {
3431 'variables': {
3432 'clang_dir': '../third_party/llvm-build/Release+Asserts/bin',
3433 },
3434 }],
[email protected]921c7b52011-11-25 10:34:353435 ['asan==1', {
3436 'xcode_settings': {
3437 'OTHER_CFLAGS': [
[email protected]48688df02012-11-27 21:04:563438 '-fsanitize=address',
3439 '-w', # http://crbug.com/162783
[email protected]921c7b52011-11-25 10:34:353440 ],
[email protected]921c7b52011-11-25 10:34:353441 },
3442 'defines': [
3443 'ADDRESS_SANITIZER',
3444 ],
3445 }],
[email protected]34f40892011-09-06 21:53:303446 ],
[email protected]2f80c312009-02-25 21:26:553447 'target_conditions': [
[email protected]2f80c312009-02-25 21:26:553448 ['_type!="static_library"', {
[email protected]5d7dc972009-04-16 15:30:463449 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-search_paths_first']},
[email protected]4281a4e2012-08-24 19:05:083450 'conditions': [
3451 ['asan==1', {
3452 'xcode_settings': {
3453 'OTHER_LDFLAGS': [
[email protected]2e82fa52012-11-27 23:41:443454 '-fsanitize=address',
[email protected]4281a4e2012-08-24 19:05:083455 ],
3456 },
3457 }],
3458 ],
[email protected]5d7dc972009-04-16 15:30:463459 }],
3460 ['_mac_bundle', {
3461 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-ObjC']},
[email protected]87fde4a2009-02-28 00:50:083462 }],
[email protected]2936b8c2012-10-29 10:57:313463 ], # target_conditions
3464 }, # target_defaults
3465 }], # OS=="mac" or OS=="ios"
3466 ['OS=="mac"', {
3467 'target_defaults': {
3468 'variables': {
3469 # These should end with %, but there seems to be a bug with % in
3470 # variables that are intended to be set to different values in
3471 # different targets, like these.
3472 'mac_pie': 1, # Most executables can be position-independent.
[email protected]2936b8c2012-10-29 10:57:313473 # Strip debugging symbols from the target.
3474 'mac_strip': '<(mac_strip_release)',
[email protected]970fd4e2012-12-19 11:09:373475 'conditions': [
3476 ['asan==1', {
3477 'conditions': [
3478 ['mac_want_real_dsym=="default"', {
[email protected]97ab1fa2012-12-24 10:50:353479 'mac_real_dsym': 1,
[email protected]970fd4e2012-12-19 11:09:373480 }, {
3481 'mac_real_dsym': '<(mac_want_real_dsym)'
3482 }],
3483 ],
3484 }, {
3485 'conditions': [
3486 ['mac_want_real_dsym=="default"', {
3487 'mac_real_dsym': 0, # Fake .dSYMs are fine in most cases.
3488 }, {
3489 'mac_real_dsym': '<(mac_want_real_dsym)'
3490 }],
3491 ],
3492 }],
3493 ],
[email protected]2936b8c2012-10-29 10:57:313494 },
3495 'xcode_settings': {
3496 'GCC_DYNAMIC_NO_PIC': 'NO', # No -mdynamic-no-pic
3497 # (Equivalent to -fPIC)
3498 # MACOSX_DEPLOYMENT_TARGET maps to -mmacosx-version-min
3499 'MACOSX_DEPLOYMENT_TARGET': '<(mac_deployment_target)',
3500 # Keep pch files below xcodebuild/.
3501 'SHARED_PRECOMPS_DIR': '$(CONFIGURATION_BUILD_DIR)/SharedPrecompiledHeaders',
3502 'OTHER_CFLAGS': [
3503 '-fno-strict-aliasing', # See http://crbug.com/32204
3504 ],
3505 },
3506 'target_conditions': [
[email protected]6303fed2011-08-11 01:12:103507 ['_type=="executable"', {
3508 'postbuilds': [
3509 {
3510 # Arranges for data (heap) pages to be protected against
[email protected]8c40f322011-08-24 03:33:363511 # code execution when running on Mac OS X 10.7 ("Lion"), and
3512 # ensures that the position-independent executable (PIE) bit
3513 # is set for ASLR when running on Mac OS X 10.5 ("Leopard").
[email protected]6303fed2011-08-11 01:12:103514 'variables': {
[email protected]8c40f322011-08-24 03:33:363515 # Define change_mach_o_flags in a variable ending in _path
3516 # so that GYP understands it's a path and performs proper
3517 # relativization during dict merging.
3518 'change_mach_o_flags_path':
3519 'mac/change_mach_o_flags_from_xcode.sh',
[email protected]162407f2011-09-08 15:33:173520 'change_mach_o_flags_options%': [
[email protected]081c0342011-08-24 14:59:133521 ],
3522 'target_conditions': [
[email protected]162407f2011-09-08 15:33:173523 ['mac_pie==0 or release_valgrind_build==1', {
3524 # Don't enable PIE if it's unwanted. It's unwanted if
3525 # the target specifies mac_pie=0 or if building for
3526 # Valgrind, because Valgrind doesn't understand slide.
3527 # See the similar mac_pie/release_valgrind_build check
3528 # below.
[email protected]081c0342011-08-24 14:59:133529 'change_mach_o_flags_options': [
[email protected]081c0342011-08-24 14:59:133530 '--no-pie',
3531 ],
3532 }],
3533 ],
[email protected]6303fed2011-08-11 01:12:103534 },
[email protected]8c40f322011-08-24 03:33:363535 'postbuild_name': 'Change Mach-O Flags',
3536 'action': [
3537 '<(change_mach_o_flags_path)',
[email protected]081c0342011-08-24 14:59:133538 '>@(change_mach_o_flags_options)',
[email protected]8c40f322011-08-24 03:33:363539 ],
[email protected]6303fed2011-08-11 01:12:103540 },
3541 ],
[email protected]5a5d97aa2011-09-02 15:34:003542 'conditions': [
3543 ['asan==1', {
3544 'variables': {
3545 'asan_saves_file': 'asan.saves',
3546 },
3547 'xcode_settings': {
[email protected]6a4cad02011-11-25 07:26:563548 'CHROMIUM_STRIP_SAVE_FILE': '<(asan_saves_file)',
[email protected]5a5d97aa2011-09-02 15:34:003549 },
3550 }],
3551 ],
[email protected]162407f2011-09-08 15:33:173552 'target_conditions': [
3553 ['mac_pie==1 and release_valgrind_build==0', {
3554 # Turn on position-independence (ASLR) for executables. When
3555 # PIE is on for the Chrome executables, the framework will
3556 # also be subject to ASLR.
3557 # Don't do this when building for Valgrind, because Valgrind
3558 # doesn't understand slide. TODO: Make Valgrind on Mac OS X
3559 # understand slide, and get rid of the Valgrind check.
3560 'xcode_settings': {
3561 'OTHER_LDFLAGS': [
3562 '-Wl,-pie', # Position-independent executable (MH_PIE)
3563 ],
3564 },
3565 }],
3566 ],
[email protected]6a0242bc2011-07-01 00:34:463567 }],
[email protected]9a5e72862010-09-02 16:16:583568 ['(_type=="executable" or _type=="shared_library" or \
3569 _type=="loadable_module") and mac_strip!=0', {
[email protected]24700642009-06-01 16:01:203570 'target_conditions': [
3571 ['mac_real_dsym == 1', {
3572 # To get a real .dSYM bundle produced by dsymutil, set the
3573 # debug information format to dwarf-with-dsym. Since
3574 # strip_from_xcode will not be used, set Xcode to do the
3575 # stripping as well.
3576 'configurations': {
[email protected]5153767c2009-12-22 01:52:503577 'Release_Base': {
[email protected]24700642009-06-01 16:01:203578 'xcode_settings': {
3579 'DEBUG_INFORMATION_FORMAT': 'dwarf-with-dsym',
3580 'DEPLOYMENT_POSTPROCESSING': 'YES',
3581 'STRIP_INSTALLED_PRODUCT': 'YES',
[email protected]e14a9f92009-08-05 19:26:073582 'target_conditions': [
[email protected]c2111422010-06-01 18:30:253583 ['_type=="shared_library" or _type=="loadable_module"', {
[email protected]e14a9f92009-08-05 19:26:073584 # The Xcode default is to strip debugging symbols
3585 # only (-S). Local symbols should be stripped as
3586 # well, which will be handled by -x. Xcode will
3587 # continue to insert -S when stripping even when
3588 # additional flags are added with STRIPFLAGS.
3589 'STRIPFLAGS': '-x',
[email protected]ed7e83692012-12-24 10:13:403590 }], # _type=="shared_library" or _type=="loadable_module"
3591 ['_type=="executable"', {
3592 'conditions': [
3593 ['asan==1', {
3594 'STRIPFLAGS': '-s $(CHROMIUM_STRIP_SAVE_FILE)',
3595 }]
3596 ],
3597 }], # _type=="executable" and asan==1
[email protected]e14a9f92009-08-05 19:26:073598 ], # target_conditions
3599 }, # xcode_settings
3600 }, # configuration "Release"
3601 }, # configurations
[email protected]24700642009-06-01 16:01:203602 }, { # mac_real_dsym != 1
3603 # To get a fast fake .dSYM bundle, use a post-build step to
3604 # produce the .dSYM and strip the executable. strip_from_xcode
3605 # only operates in the Release configuration.
3606 'postbuilds': [
3607 {
3608 'variables': {
3609 # Define strip_from_xcode in a variable ending in _path
3610 # so that gyp understands it's a path and performs proper
3611 # relativization during dict merging.
3612 'strip_from_xcode_path': 'mac/strip_from_xcode',
3613 },
3614 'postbuild_name': 'Strip If Needed',
3615 'action': ['<(strip_from_xcode_path)'],
3616 },
[email protected]e14a9f92009-08-05 19:26:073617 ], # postbuilds
3618 }], # mac_real_dsym
3619 ], # target_conditions
[email protected]9a5e72862010-09-02 16:16:583620 }], # (_type=="executable" or _type=="shared_library" or
3621 # _type=="loadable_module") and mac_strip!=0
[email protected]e14a9f92009-08-05 19:26:073622 ], # target_conditions
3623 }, # target_defaults
3624 }], # OS=="mac"
[email protected]1e013672012-06-29 22:12:203625 ['OS=="ios"', {
3626 'target_defaults': {
3627 'xcode_settings' : {
3628 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0',
3629
3630 # This next block is mostly common with the 'mac' section above,
3631 # but keying off (or setting) 'clang' isn't valid for iOS as it
3632 # also seems to mean using the custom build of clang.
3633
3634 # Don't use -Wc++0x-extensions, which Xcode 4 enables by default
[email protected]aae0e592012-11-15 00:25:533635 # when building with clang. This warning is triggered when the
[email protected]1e013672012-06-29 22:12:203636 # override keyword is used via the OVERRIDE macro from
3637 # base/compiler_specific.h.
3638 'CLANG_WARN_CXX0X_EXTENSIONS': 'NO',
[email protected]3e893e0c2012-11-16 16:58:443639 # Warn if automatic synthesis is triggered with
3640 # the -Wobjc-missing-property-synthesis flag.
[email protected]aae0e592012-11-15 00:25:533641 'CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS': 'YES',
[email protected]1e013672012-06-29 22:12:203642 'WARNING_CFLAGS': [
3643 '-Wheader-hygiene',
3644 # Don't die on dtoa code that uses a char as an array index.
3645 # This is required solely for base/third_party/dmg_fp/dtoa.cc.
3646 '-Wno-char-subscripts',
3647 # Clang spots more unused functions.
3648 '-Wno-unused-function',
3649 # See comments on this flag higher up in this file.
3650 '-Wno-unnamed-type-template-args',
[email protected]aae0e592012-11-15 00:25:533651 # This (rightfully) complains about 'override', which we use
[email protected]1e013672012-06-29 22:12:203652 # heavily.
3653 '-Wno-c++11-extensions',
3654 ],
3655 },
3656 'target_conditions': [
3657 ['_type=="executable"', {
3658 'configurations': {
3659 'Release_Base': {
3660 'xcode_settings': {
3661 'DEPLOYMENT_POSTPROCESSING': 'YES',
3662 'STRIP_INSTALLED_PRODUCT': 'YES',
3663 },
3664 },
[email protected]3c6aa862012-11-05 17:11:443665 'Debug_Base': {
3666 'xcode_settings': {
3667 # Remove dSYM to reduce build time.
3668 'DEBUG_INFORMATION_FORMAT': 'dwarf',
3669 },
3670 },
[email protected]1e013672012-06-29 22:12:203671 },
3672 'xcode_settings': {
3673 'conditions': [
3674 ['chromium_ios_signing', {
3675 # iOS SDK wants everything for device signed.
3676 'CODE_SIGN_IDENTITY[sdk=iphoneos*]': 'iPhone Developer',
3677 }, {
3678 'CODE_SIGNING_REQUIRED': 'NO',
3679 'CODE_SIGN_IDENTITY[sdk=iphoneos*]': '',
3680 }],
3681 ],
3682 },
3683 }],
3684 ], # target_conditions
3685 }, # target_defaults
3686 }], # OS=="ios"
[email protected]2f80c312009-02-25 21:26:553687 ['OS=="win"', {
3688 'target_defaults': {
3689 'defines': [
[email protected]8e345da2012-07-01 22:10:303690 '_WIN32_WINNT=0x0602',
3691 'WINVER=0x0602',
[email protected]2f80c312009-02-25 21:26:553692 'WIN32',
3693 '_WINDOWS',
[email protected]2f80c312009-02-25 21:26:553694 'NOMINMAX',
[email protected]e3116282011-08-13 00:52:283695 'PSAPI_VERSION=1',
[email protected]2f80c312009-02-25 21:26:553696 '_CRT_RAND_S',
3697 'CERT_CHAIN_PARA_HAS_EXTRA_FIELDS',
3698 'WIN32_LEAN_AND_MEAN',
[email protected]7a812dd62010-06-30 18:52:273699 '_ATL_NO_OPENGL',
[email protected]2f80c312009-02-25 21:26:553700 ],
[email protected]8974e042010-06-21 18:06:523701 'conditions': [
[email protected]2212d272011-12-20 21:37:373702 ['buildtype=="Official"', {
3703 # In official builds, targets can self-select an optimization
3704 # level by defining a variable named 'optimize', and setting it
3705 # to one of
3706 # - "size", optimizes for minimal code size - the default.
3707 # - "speed", optimizes for speed over code size.
3708 # - "max", whole program optimization and link-time code
3709 # generation. This is very expensive and should be used
3710 # sparingly.
3711 'variables': {
3712 'optimize%': 'size',
3713 },
3714 'target_conditions': [
3715 ['optimize=="size"', {
3716 'msvs_settings': {
3717 'VCCLCompilerTool': {
3718 # 1, optimizeMinSpace, Minimize Size (/O1)
3719 'Optimization': '1',
3720 # 2, favorSize - Favor small code (/Os)
3721 'FavorSizeOrSpeed': '2',
3722 },
3723 },
3724 },
3725 ],
3726 ['optimize=="speed"', {
3727 'msvs_settings': {
3728 'VCCLCompilerTool': {
3729 # 2, optimizeMaxSpeed, Maximize Speed (/O2)
3730 'Optimization': '2',
3731 # 1, favorSpeed - Favor fast code (/Ot)
3732 'FavorSizeOrSpeed': '1',
3733 },
3734 },
3735 },
3736 ],
3737 ['optimize=="max"', {
3738 'msvs_settings': {
3739 'VCCLCompilerTool': {
3740 # 2, optimizeMaxSpeed, Maximize Speed (/O2)
3741 'Optimization': '2',
3742 # 1, favorSpeed - Favor fast code (/Ot)
3743 'FavorSizeOrSpeed': '1',
3744 # This implies link time code generation.
3745 'WholeProgramOptimization': 'true',
3746 },
3747 },
3748 },
3749 ],
3750 ],
3751 },
3752 ],
[email protected]8974e042010-06-21 18:06:523753 ['component=="static_library"', {
3754 'defines': [
3755 '_HAS_EXCEPTIONS=0',
3756 ],
3757 }],
[email protected]3e2648a2011-03-21 20:58:503758 ['secure_atl', {
3759 'defines': [
3760 '_SECURE_ATL',
3761 ],
3762 }],
[email protected]54184ce72012-10-18 07:11:263763 ['msvs_express', {
3764 'configurations': {
3765 'x86_Base': {
3766 'msvs_settings': {
3767 'VCLinkerTool': {
3768 'AdditionalLibraryDirectories':
3769 ['<(windows_driver_kit_path)/lib/ATL/i386'],
3770 },
3771 'VCLibrarianTool': {
3772 'AdditionalLibraryDirectories':
3773 ['<(windows_driver_kit_path)/lib/ATL/i386'],
3774 },
3775 },
3776 },
3777 'x64_Base': {
3778 'msvs_settings': {
3779 'VCLibrarianTool': {
3780 'AdditionalLibraryDirectories':
3781 ['<(windows_driver_kit_path)/lib/ATL/amd64'],
3782 },
3783 'VCLinkerTool': {
3784 'AdditionalLibraryDirectories':
3785 ['<(windows_driver_kit_path)/lib/ATL/amd64'],
3786 },
3787 },
3788 },
3789 },
3790 'msvs_settings': {
3791 'VCLinkerTool': {
3792 # Explicitly required when using the ATL with express
3793 'AdditionalDependencies': ['atlthunk.lib'],
3794
3795 # ATL 8.0 included in WDK 7.1 makes the linker to generate
3796 # almost eight hundred LNK4254 and LNK4078 warnings:
3797 # - warning LNK4254: section 'ATL' (50000040) merged into
3798 # '.rdata' (40000040) with different attributes
3799 # - warning LNK4078: multiple 'ATL' sections found with
3800 # different attributes
3801 'AdditionalOptions': ['/ignore:4254', '/ignore:4078'],
3802 },
3803 },
3804 'msvs_system_include_dirs': [
3805 '<(windows_driver_kit_path)/inc/atl71',
3806 '<(windows_driver_kit_path)/inc/mfc42',
3807 ],
3808 }],
[email protected]8974e042010-06-21 18:06:523809 ],
[email protected]5b5ca7cb2009-07-20 23:00:203810 'msvs_system_include_dirs': [
[email protected]1ab48032012-07-02 21:48:053811 '<(windows_sdk_path)/Include/shared',
3812 '<(windows_sdk_path)/Include/um',
3813 '<(windows_sdk_path)/Include/winrt',
[email protected]2f80c312009-02-25 21:26:553814 '$(VSInstallDir)/VC/atlmfc/include',
3815 ],
[email protected]a8d99cef2009-08-26 20:47:493816 'msvs_cygwin_dirs': ['<(DEPTH)/third_party/cygwin'],
[email protected]942c3a60f2011-05-03 02:04:113817 'msvs_disabled_warnings': [4351, 4396, 4503, 4819,
3818 # TODO(maruel): These warnings are level 4. They will be slowly
3819 # removed as code is fixed.
3820 4100, 4121, 4125, 4127, 4130, 4131, 4189, 4201, 4238, 4244, 4245,
3821 4310, 4355, 4428, 4481, 4505, 4510, 4512, 4530, 4610, 4611, 4701,
3822 4702, 4706,
3823 ],
[email protected]2f80c312009-02-25 21:26:553824 'msvs_settings': {
3825 'VCCLCompilerTool': {
[email protected]e9b96bb2012-09-07 01:10:443826 'AdditionalOptions': ['/MP'],
[email protected]2f80c312009-02-25 21:26:553827 'MinimalRebuild': 'false',
[email protected]2f80c312009-02-25 21:26:553828 'BufferSecurityCheck': 'true',
3829 'EnableFunctionLevelLinking': 'true',
3830 'RuntimeTypeInfo': 'false',
[email protected]942c3a60f2011-05-03 02:04:113831 'WarningLevel': '4',
[email protected]2f80c312009-02-25 21:26:553832 'WarnAsError': 'true',
3833 'DebugInformationFormat': '3',
[email protected]3fef6e62009-07-31 19:58:583834 'conditions': [
[email protected]8974e042010-06-21 18:06:523835 ['component=="shared_library"', {
3836 'ExceptionHandling': '1', # /EHsc
3837 }, {
3838 'ExceptionHandling': '0',
3839 }],
[email protected]3fef6e62009-07-31 19:58:583840 ],
[email protected]2f80c312009-02-25 21:26:553841 },
3842 'VCLibrarianTool': {
[email protected]1f9471a2010-01-04 06:40:163843 'AdditionalOptions': ['/ignore:4221'],
[email protected]a78da50e2010-06-09 21:31:373844 'AdditionalLibraryDirectories': [
[email protected]1ab48032012-07-02 21:48:053845 '<(windows_sdk_path)/Lib/win8/um/x86',
[email protected]a78da50e2010-06-09 21:31:373846 ],
[email protected]2f80c312009-02-25 21:26:553847 },
3848 'VCLinkerTool': {
[email protected]2f80c312009-02-25 21:26:553849 'AdditionalDependencies': [
3850 'wininet.lib',
[email protected]b1d8c252011-01-13 20:27:503851 'dnsapi.lib',
[email protected]2f80c312009-02-25 21:26:553852 'version.lib',
3853 'msimg32.lib',
3854 'ws2_32.lib',
3855 'usp10.lib',
3856 'psapi.lib',
[email protected]96fd0032009-04-24 00:13:083857 'dbghelp.lib',
[email protected]dfdf7ee2011-04-28 18:51:483858 'winmm.lib',
3859 'shlwapi.lib',
[email protected]2f80c312009-02-25 21:26:553860 ],
[email protected]a78da50e2010-06-09 21:31:373861 'AdditionalLibraryDirectories': [
[email protected]1ab48032012-07-02 21:48:053862 '<(windows_sdk_path)/Lib/win8/um/x86',
[email protected]a78da50e2010-06-09 21:31:373863 ],
[email protected]2f80c312009-02-25 21:26:553864 'GenerateDebugInformation': 'true',
3865 'MapFileName': '$(OutDir)\\$(TargetName).map',
3866 'ImportLibrary': '$(OutDir)\\lib\\$(TargetName).lib',
[email protected]2f80c312009-02-25 21:26:553867 'FixedBaseAddress': '1',
[email protected]825ff8d2009-05-22 01:40:483868 # SubSystem values:
3869 # 0 == not set
3870 # 1 == /SUBSYSTEM:CONSOLE
3871 # 2 == /SUBSYSTEM:WINDOWS
3872 # Most of the executables we'll ever create are tests
3873 # and utilities with console output.
3874 'SubSystem': '1',
[email protected]2f80c312009-02-25 21:26:553875 },
3876 'VCMIDLTool': {
3877 'GenerateStublessProxies': 'true',
[email protected]279904d2012-03-31 00:03:093878 'TypeLibraryName': '$(InputName).tlb',
3879 'OutputDirectory': '$(IntDir)',
3880 'HeaderFileName': '$(InputName).h',
[email protected]4fdb3cc2012-04-07 01:49:333881 'DLLDataFileName': '$(InputName).dlldata.c',
[email protected]279904d2012-03-31 00:03:093882 'InterfaceIdentifierFileName': '$(InputName)_i.c',
3883 'ProxyFileName': '$(InputName)_p.c',
[email protected]2f80c312009-02-25 21:26:553884 },
3885 'VCResourceCompilerTool': {
3886 'Culture' : '1033',
[email protected]4d91cbc2010-05-07 20:41:383887 'AdditionalIncludeDirectories': [
3888 '<(DEPTH)',
3889 '<(SHARED_INTERMEDIATE_DIR)',
3890 ],
[email protected]2f80c312009-02-25 21:26:553891 },
3892 },
3893 },
3894 }],
[email protected]79e2336c2011-05-12 18:18:343895 ['disable_nacl==1', {
[email protected]d8c7cbcc2009-10-02 19:00:313896 'target_defaults': {
3897 'defines': [
3898 'DISABLE_NACL',
3899 ],
3900 },
3901 }],
[email protected]cfbf9bc2009-12-07 22:07:563902 ['OS=="win" and msvs_use_common_linker_extras', {
[email protected]48c7af72009-07-03 22:00:193903 'target_defaults': {
3904 'msvs_settings': {
3905 'VCLinkerTool': {
[email protected]48c7af72009-07-03 22:00:193906 'DelayLoadDLLs': [
3907 'dbghelp.dll',
3908 'dwmapi.dll',
[email protected]e15a4ce52012-01-04 20:11:013909 'shell32.dll',
[email protected]48c7af72009-07-03 22:00:193910 'uxtheme.dll',
3911 ],
3912 },
3913 },
[email protected]ef4fa4072009-12-04 22:46:503914 'configurations': {
[email protected]5153767c2009-12-22 01:52:503915 'x86_Base': {
[email protected]ef4fa4072009-12-04 22:46:503916 'msvs_settings': {
3917 'VCLinkerTool': {
[email protected]1f9471a2010-01-04 06:40:163918 'AdditionalOptions': [
3919 '/safeseh',
[email protected]7cf23ce62012-01-13 02:43:333920 '/dynamicbase',
[email protected]1f9471a2010-01-04 06:40:163921 '/ignore:4199',
3922 '/ignore:4221',
3923 '/nxcompat',
3924 ],
[email protected]ef4fa4072009-12-04 22:46:503925 },
3926 },
3927 },
[email protected]5153767c2009-12-22 01:52:503928 'x64_Base': {
[email protected]ef4fa4072009-12-04 22:46:503929 'msvs_settings': {
3930 'VCLinkerTool': {
[email protected]1f9471a2010-01-04 06:40:163931 'AdditionalOptions': [
[email protected]ef4fa4072009-12-04 22:46:503932 # safeseh is not compatible with x64
[email protected]7cf23ce62012-01-13 02:43:333933 '/dynamicbase',
[email protected]1f9471a2010-01-04 06:40:163934 '/ignore:4199',
3935 '/ignore:4221',
3936 '/nxcompat',
3937 ],
[email protected]ef4fa4072009-12-04 22:46:503938 },
3939 },
3940 },
3941 },
[email protected]48c7af72009-07-03 22:00:193942 },
3943 }],
[email protected]9821d0d2010-04-16 22:40:373944 ['enable_new_npdevice_api==1', {
3945 'target_defaults': {
3946 'defines': [
3947 'ENABLE_NEW_NPDEVICE_API',
3948 ],
3949 },
3950 }],
[email protected]220ea5932012-08-09 10:44:073951 ['clang==1', {
[email protected]f1faf212012-10-05 21:04:233952 'conditions': [
3953 ['OS=="android"', {
3954 # Android could use the goma with clang.
3955 'make_global_settings': [
3956 ['CC', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} ${CHROME_SRC}/<(make_clang_dir)/bin/clang)'],
3957 ['CXX', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} ${CHROME_SRC}/<(make_clang_dir)/bin/clang++)'],
3958 ['LINK', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} ${CHROME_SRC}/<(make_clang_dir)/bin/clang++)'],
3959 ['CC.host', '$(CC)'],
3960 ['CXX.host', '$(CXX)'],
3961 ['LINK.host', '$(LINK)'],
3962 ],
3963 }, {
3964 'make_global_settings': [
3965 ['CC', '<(make_clang_dir)/bin/clang'],
3966 ['CXX', '<(make_clang_dir)/bin/clang++'],
3967 ['LINK', '$(CXX)'],
3968 ['CC.host', '$(CC)'],
3969 ['CXX.host', '$(CXX)'],
3970 ['LINK.host', '$(LINK)'],
3971 ],
3972 }],
[email protected]34f40892011-09-06 21:53:303973 ],
3974 }],
[email protected]615fa6642012-08-14 19:17:073975 ['OS=="android" and clang==0', {
[email protected]d10e2cc2012-03-20 10:45:273976 # Hardcode the compiler names in the Makefile so that
3977 # it won't depend on the environment at make time.
[email protected]7fc96c82012-07-24 18:15:113978 'make_global_settings': [
[email protected]c0f76312012-08-16 13:52:043979 ['CC', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} <(android_toolchain)/*-gcc)'],
3980 ['CXX', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} <(android_toolchain)/*-g++)'],
3981 ['LINK', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} <(android_toolchain)/*-gcc)'],
[email protected]615fa6642012-08-14 19:17:073982 ['CC.host', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} <!(which gcc))'],
3983 ['CXX.host', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} <!(which g++))'],
3984 ['LINK.host', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} <!(which g++))'],
[email protected]d10e2cc2012-03-20 10:45:273985 ],
3986 }],
[email protected]eb5f1672013-01-31 07:56:463987 ['target_arch=="mipsel"', {
3988 'make_global_settings': [
3989 ['CC', '<(sysroot)/../bin/mipsel-linux-gnu-gcc'],
3990 ['CXX', '<(sysroot)/../bin/mipsel-linux-gnu-g++'],
3991 ['LINK', '$(CXX)'],
3992 ['CC.host', '<!(which gcc)'],
3993 ['CXX.host', '<!(which g++)'],
3994 ['LINK.host', '<!(which g++)'],
3995 ],
3996 }],
[email protected]2f80c312009-02-25 21:26:553997 ],
3998 'xcode_settings': {
[email protected]0c8ab452009-11-06 21:57:503999 # DON'T ADD ANYTHING NEW TO THIS BLOCK UNLESS YOU REALLY REALLY NEED IT!
4000 # This block adds *project-wide* configuration settings to each project
4001 # file. It's almost always wrong to put things here. Specify your
4002 # custom xcode_settings in target_defaults to add them to targets instead.
4003
[email protected]1e013672012-06-29 22:12:204004 'conditions': [
[email protected]fca3d812012-07-27 00:55:364005 # In an Xcode Project Info window, the "Base SDK for All Configurations"
4006 # setting sets the SDK on a project-wide basis. In order to get the
4007 # configured SDK to show properly in the Xcode UI, SDKROOT must be set
4008 # here at the project level.
[email protected]2c261532012-10-06 00:46:294009 ['OS=="mac"', {
[email protected]fca3d812012-07-27 00:55:364010 'conditions': [
[email protected]2c261532012-10-06 00:46:294011 ['mac_sdk_path==""', {
[email protected]fca3d812012-07-27 00:55:364012 'SDKROOT': 'macosx<(mac_sdk)', # -isysroot
[email protected]2c261532012-10-06 00:46:294013 }, {
4014 'SDKROOT': '<(mac_sdk_path)', # -isysroot
[email protected]fca3d812012-07-27 00:55:364015 }],
4016 ],
[email protected]2c261532012-10-06 00:46:294017 }],
4018 ['OS=="ios"', {
4019 'conditions': [
4020 ['ios_sdk_path==""', {
4021 'SDKROOT': 'iphoneos<(ios_sdk)', # -isysroot
4022 }, {
4023 'SDKROOT': '<(ios_sdk_path)', # -isysroot
4024 }],
4025 ],
[email protected]1e013672012-06-29 22:12:204026 }],
4027 ['OS=="ios"', {
[email protected]1e013672012-06-29 22:12:204028 'ARCHS': '$(ARCHS_UNIVERSAL_IPHONE_OS)',
[email protected]3c6aa862012-11-05 17:11:444029 # Just build armv7, until armv7s is correctly tested.
4030 'VALID_ARCHS': 'armv7 i386',
[email protected]1e013672012-06-29 22:12:204031 'IPHONEOS_DEPLOYMENT_TARGET': '<(ios_deployment_target)',
[email protected]1e013672012-06-29 22:12:204032 # Target both iPhone and iPad.
4033 'TARGETED_DEVICE_FAMILY': '1,2',
4034 }],
[email protected]f9335b42013-01-24 21:00:234035 ['target_arch=="x64"', {
4036 'ARCHS': [
4037 'x86_64'
4038 ],
4039 }],
[email protected]1e013672012-06-29 22:12:204040 ],
[email protected]0c8ab452009-11-06 21:57:504041
[email protected]2f80c312009-02-25 21:26:554042 # The Xcode generator will look for an xcode_settings section at the root
4043 # of each dict and use it to apply settings on a file-wide basis. Most
4044 # settings should not be here, they should be in target-specific
4045 # xcode_settings sections, or better yet, should use non-Xcode-specific
4046 # settings in target dicts. SYMROOT is a special case, because many other
4047 # Xcode variables depend on it, including variables such as
4048 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something
4049 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the
4050 # files to appear (when present) in the UI as actual files and not red
4051 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR,
4052 # and therefore SYMROOT, needs to be set at the project level.
[email protected]bfa24b962009-03-02 00:16:164053 'SYMROOT': '<(DEPTH)/xcodebuild',
[email protected]2f80c312009-02-25 21:26:554054 },
[email protected]ee28c9f2009-09-04 01:53:014055}