blob: c52c183a1354ae0ab73debbdb10e8bb600cf3086 [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]e72e55b2011-01-06 22:19:3016 # dict that operate on these variables (e.g., for setting 'toolkit_views',
17 # we need to have 'chromeos' already set).
[email protected]e14a9f92009-08-05 19:26:0718 'variables': {
[email protected]e72e55b2011-01-06 22:19:3019 'variables': {
[email protected]bb6aba32011-01-07 19:04:4320 'variables': {
21 # Whether we're building a ChromeOS build.
22 'chromeos%': 0,
[email protected]e72e55b2011-01-06 22:19:3023
[email protected]3fa441d2011-09-18 17:28:5024 # Whether we are using Views Toolkit
25 'toolkit_views%': 0,
26
[email protected]ed329be2012-01-03 22:02:1627 # Whether or not we are using the Aura windowing framework.
[email protected]41423092011-08-25 15:39:5828 'use_aura%': 0,
[email protected]1353a092012-01-13 03:34:2829
[email protected]ed329be2012-01-03 22:02:1630 # Whether or not we are building the Ash shell.
31 'use_ash%': 0,
[email protected]e0b85a52011-10-06 03:30:4232
33 # Use OpenSSL instead of NSS. Under development: see http://crbug.com/62803
34 'use_openssl%': 0,
[email protected]023d8242011-11-22 01:25:2735
36 # Disable Virtual keyboard support by default.
37 'use_virtual_keyboard%': 0,
[email protected]774e0612011-11-28 18:53:4838
[email protected]7ddea9802012-02-22 23:08:0539 # Disable viewport meta tag by default.
40 'enable_viewport%': 0,
[email protected]bb6aba32011-01-07 19:04:4341 },
42 # Copy conditionally-set variables out one scope.
43 'chromeos%': '<(chromeos)',
[email protected]41423092011-08-25 15:39:5844 'use_aura%': '<(use_aura)',
[email protected]ed329be2012-01-03 22:02:1645 'use_ash%': '<(use_ash)',
[email protected]e0b85a52011-10-06 03:30:4246 'use_openssl%': '<(use_openssl)',
[email protected]023d8242011-11-22 01:25:2747 'use_virtual_keyboard%': '<(use_virtual_keyboard)',
[email protected]7ddea9802012-02-22 23:08:0548 'enable_viewport%': '<(enable_viewport)',
[email protected]e72e55b2011-01-06 22:19:3049
[email protected]e72e55b2011-01-06 22:19:3050 # Compute the architecture that we're building on.
51 'conditions': [
[email protected]177cd082011-10-04 18:36:3852 [ 'OS=="win" or OS=="mac"', {
[email protected]c49ab0c2011-05-18 17:25:3753 'host_arch%': 'ia32',
54 }, {
[email protected]79e2336c2011-05-12 18:18:3455 # This handles the Unix platforms for which there is some support.
56 # Anything else gets passed through, which probably won't work very
57 # well; such hosts should pass an explicit target_arch to gyp.
[email protected]e72e55b2011-01-06 22:19:3058 'host_arch%':
[email protected]79e2336c2011-05-12 18:18:3459 '<!(uname -m | sed -e "s/i.86/ia32/;s/x86_64/x64/;s/amd64/x64/;s/arm.*/arm/;s/i86pc/ia32/")',
[email protected]e72e55b2011-01-06 22:19:3060 }],
[email protected]1353a092012-01-13 03:34:2861
[email protected]838a3cd2012-03-19 16:10:5562 # Chromeos implies ash.
[email protected]5f887612012-03-01 21:34:0663 ['chromeos==1', {
64 'use_ash%': 1,
[email protected]ed329be2012-01-03 22:02:1665 'use_aura%': 1,
66 }],
[email protected]bb6aba32011-01-07 19:04:4367
[email protected]5f887612012-03-01 21:34:0668 # For now, Windows *AND* Linux builds that |use_aura| should also
69 # imply using ash. This rule should be removed for the future when
70 # both Linux and Windows are using the aura windows without the ash
71 # interface.
72 ['use_aura==1 and ((OS=="linux" and chromeos==0) or OS=="win")', {
73 'use_ash%': 1,
74 }],
75
[email protected]ab2017e2012-02-07 01:54:5076 # Set default value of toolkit_views based on OS.
[email protected]6e00601b72012-03-19 15:40:3577 ['OS=="win" or chromeos==1 or use_aura==1', {
[email protected]bb6aba32011-01-07 19:04:4378 'toolkit_views%': 1,
79 }, {
80 'toolkit_views%': 0,
81 }],
[email protected]e72e55b2011-01-06 22:19:3082 ],
83 },
84
85 # Copy conditionally-set variables out one scope.
86 'chromeos%': '<(chromeos)',
[email protected]e72e55b2011-01-06 22:19:3087 'host_arch%': '<(host_arch)',
[email protected]bb6aba32011-01-07 19:04:4388 'toolkit_views%': '<(toolkit_views)',
[email protected]41423092011-08-25 15:39:5889 'use_aura%': '<(use_aura)',
[email protected]ed329be2012-01-03 22:02:1690 'use_ash%': '<(use_ash)',
[email protected]e0b85a52011-10-06 03:30:4291 'use_openssl%': '<(use_openssl)',
[email protected]023d8242011-11-22 01:25:2792 'use_virtual_keyboard%': '<(use_virtual_keyboard)',
[email protected]7ddea9802012-02-22 23:08:0593 'enable_viewport%': '<(enable_viewport)',
[email protected]023d8242011-11-22 01:25:2794
[email protected]8fb0ef02011-05-20 00:53:5095 # We used to provide a variable for changing how libraries were built.
96 # This variable remains until we can clean up all the users.
97 # This needs to be one nested variables dict in so that dependent
98 # gyp files can make use of it in their outer variables. (Yikes!)
99 # http://code.google.com/p/chromium/issues/detail?id=83308
100 'library%': 'static_library',
101
[email protected]e14a9f92009-08-05 19:26:07102 # Override branding to select the desired branding flavor.
103 'branding%': 'Chromium',
104
105 # Override buildtype to select the desired build flavor.
106 # Dev - everyday build for development/testing
107 # Official - release build (generally implies additional processing)
108 # TODO(mmoss) Once 'buildtype' is fully supported (e.g. Windows gyp
109 # conversion is done), some of the things which are now controlled by
110 # 'branding', such as symbol generation, will need to be refactored based
111 # on 'buildtype' (i.e. we don't care about saving symbols for non-Official
112 # builds).
113 'buildtype%': 'Dev',
[email protected]cbd5fd52009-08-26 00:14:27114
[email protected]e72e55b2011-01-06 22:19:30115 # Default architecture we're building for is the architecture we're
116 # building on.
117 'target_arch%': '<(host_arch)',
[email protected]b3f23ba2010-04-26 22:58:17118
[email protected]e72e55b2011-01-06 22:19:30119 # This variable tells WebCore.gyp and JavaScriptCore.gyp whether they are
120 # are built under a chromium full build (1) or a webkit.org chromium
121 # build (0).
122 'inside_chromium_build%': 1,
[email protected]8974e042010-06-21 18:06:52123
[email protected]e72e55b2011-01-06 22:19:30124 # Set to 1 to enable fast builds. It disables debug info for fastest
125 # compilation.
126 'fastbuild%': 0,
[email protected]93012ca2010-08-10 20:10:49127
[email protected]20960e072011-09-20 20:59:01128 # Set to 1 to enable dcheck in release without having to use the flag.
129 'dcheck_always_on%': 0,
130
[email protected]464750f2011-10-24 23:16:18131 # Disable file manager component extension by default.
[email protected]3d38d8e2011-04-16 20:48:51132 'file_manager_extension%': 0,
133
[email protected]5f16f8a2012-03-14 07:38:23134 # Disable WebUI TaskManager by default.
135 'webui_task_manager%': 0,
[email protected]8b2e9f392011-08-05 04:00:47136
[email protected]e72e55b2011-01-06 22:19:30137 # Python version.
[email protected]a43c5a02011-05-27 06:54:51138 'python_ver%': '2.6',
[email protected]b3f23ba2010-04-26 22:58:17139
[email protected]e72e55b2011-01-06 22:19:30140 # Set ARM-v7 compilation flags
141 'armv7%': 0,
142
143 # Set Neon compilation flags (only meaningful if armv7==1).
144 'arm_neon%': 1,
145
146 # The system root for cross-compiles. Default: none.
147 'sysroot%': '',
148
[email protected]945361a2011-09-30 04:38:43149 # The system libdir used for this ABI.
150 'system_libdir%': 'lib',
151
[email protected]e72e55b2011-01-06 22:19:30152 # On Linux, we build with sse2 for Chromium builds.
153 'disable_sse2%': 0,
154
155 # Use libjpeg-turbo as the JPEG codec used by Chromium.
[email protected]32e56e52011-02-28 02:28:03156 'use_libjpeg_turbo%': 1,
[email protected]e72e55b2011-01-06 22:19:30157
158 # Variable 'component' is for cases where we would like to build some
159 # components as dynamic shared libraries but still need variable
160 # 'library' for static libraries.
161 # By default, component is set to whatever library is set to and
162 # it can be overriden by the GYP command line or by ~/.gyp/include.gypi.
[email protected]5a547332011-05-19 23:18:53163 'component%': 'static_library',
[email protected]e72e55b2011-01-06 22:19:30164
[email protected]bb6aba32011-01-07 19:04:43165 # Set to select the Title Case versions of strings in GRD files.
166 'use_titlecase_in_grd_files%': 0,
[email protected]63692212010-09-16 00:22:21167
[email protected]98da0042011-02-02 00:10:27168 # Use translations provided by volunteers at launchpad.net. This
169 # currently only works on Linux.
[email protected]00dc155832011-02-01 18:51:19170 'use_third_party_translations%': 0,
171
[email protected]9a425422011-01-11 00:53:18172 # Remoting compilation is enabled by default. Set to 0 to disable.
173 'remoting%': 1,
174
[email protected]a026daa2011-04-20 15:49:51175 # P2P APIs are compiled in by default. Set to 0 to disable.
176 # Also note that this should be enabled for remoting to compile.
177 'p2p_apis%': 1,
178
[email protected]1ec68c42011-06-01 13:56:25179 # Configuration policy is enabled by default. Set to 0 to disable.
180 'configuration_policy%': 1,
181
[email protected]4b58e7d2011-07-11 10:22:56182 # Safe browsing is compiled in by default. Set to 0 to disable.
183 'safe_browsing%': 1,
184
[email protected]9eb100e2011-10-14 05:08:22185 # Speech input is compiled in by default. Set to 0 to disable.
186 'input_speech%': 1,
187
[email protected]7cce3232011-10-28 10:41:57188 # Notifications are compiled in by default. Set to 0 to disable.
189 'notifications%' : 1,
190
[email protected]5d451ad2011-02-11 16:43:46191 # If this is set, the clang plugins used on the buildbot will be used.
192 # Run tools/clang/scripts/update.sh to make sure they are compiled.
193 # This causes 'clang_chrome_plugins_flags' to be set.
194 # Has no effect if 'clang' is not set as well.
195 'clang_use_chrome_plugins%': 0,
196
[email protected]f36f3742011-11-21 13:12:14197 # Enable building with ASAN (Clang's -faddress-sanitizer option).
198 # -faddress-sanitizer only works with clang, but asan=1 implies clang=1
[email protected]92799b632011-08-15 14:33:06199 # See https://sites.google.com/a/chromium.org/dev/developers/testing/addresssanitizer
200 'asan%': 0,
[email protected]3cfa96a62012-02-28 07:27:58201 'asan_blacklist%': '<(PRODUCT_DIR)/../../third_party/asan/ignore.txt',
[email protected]92799b632011-08-15 14:33:06202
[email protected]00b0a7f2012-01-25 15:30:46203 # Use the provided profiled order file to link Chrome image with it.
204 # This makes Chrome faster by better using CPU cache when executing code.
205 # This is known as PGO (profile guided optimization).
206 # See https://sites.google.com/a/google.com/chrome-msk/dev/boot-speed-up-effort
207 'order_text_section%' : "",
208
[email protected]1ad5a7b2011-06-24 03:15:13209 # Set to 1 compile with -fPIC cflag on linux. This is a must for shared
210 # libraries on linux x86-64 and arm, plus ASLR.
211 'linux_fpic%': 1,
212
[email protected]bd7b6fe2012-03-05 21:02:40213 # Whether one-click signin is enabled or not.
214 'enable_one_click_signin%': 0,
215
[email protected]c6a1f94172011-07-05 02:35:00216 # Enable navigator.registerProtocolHandler and supporting UI.
217 'enable_register_protocol_handler%': 1,
218
[email protected]5ffb0a42012-01-27 09:36:11219 # Enable Web Intents support in WebKit, dispatching of intents,
220 # and extensions Web Intents support.
221 'enable_web_intents%': 1,
222
223 # Enable Web Intents web content registration via HTML element
224 # and WebUI managing such registrations.
225 'enable_web_intents_tag%': 0,
[email protected]62af76e2011-08-01 02:34:01226
[email protected]dda90ae2011-07-19 22:07:48227 # Webrtc compilation is enabled by default. Set to 0 to disable.
228 'enable_webrtc%': 1,
229
[email protected]67c125d2011-10-11 18:58:22230 # PPAPI by default does not support plugins making calls off the main
231 # thread. Set to 1 to turn on experimental support for out-of-process
232 # plugins to make call of the main thread.
233 'enable_pepper_threading%': 0,
234
[email protected]6b40bb582012-03-15 20:50:38235 # Enables theme support, which is enabled by default. Support for
236 # disabling depends on the platform.
237 'enable_themes%': 1,
238
[email protected]f56797b2011-09-25 00:04:35239 # XInput2 multitouch support is disabled by default (use_xi2_mt=0).
240 # Setting to non-zero value enables XI2 MT. When XI2 MT is enabled,
241 # the input value also defines the required XI2 minor minimum version.
242 # For example, use_xi2_mt=2 means XI2.2 or above version is required.
243 'use_xi2_mt%': 0,
244
[email protected]9061bee82012-01-16 11:45:17245 # Use of precompiled headers on Windows.
246 #
247 # This is on by default in VS 2010, but off by default for VS
248 # 2008 because of complications that it can cause with our
249 # trybots etc.
250 #
251 # This variable may be explicitly set to 1 (enabled) or 0
252 # (disabled) in ~/.gyp/include.gypi or via the GYP command line.
253 # This setting will override the default.
254 #
255 # Note that a setting of 1 is probably suitable for most or all
256 # Windows developers using VS 2008, since precompiled headers
257 # provide a build speedup of 20-25%. There are a couple of
258 # small workarounds you may need to use when using VS 2008 (but
259 # not 2010), see
260 # http://code.google.com/p/chromium/wiki/WindowsPrecompiledHeaders
261 # for details.
[email protected]d5cf9fb2011-09-27 00:15:16262 'chromium_win_pch%': 0,
263
[email protected]18e0f39b2012-01-17 16:47:34264 # Enable plug-in installation by default.
265 'enable_plugin_installation%': 1,
266
[email protected]62424a52012-03-18 03:09:50267 # Specifies whether to use canvas_skia.cc in place of platform
[email protected]4ddae4b2012-03-15 17:32:42268 # specific implementations of gfx::Canvas. Affects text drawing in the
[email protected]d18e50312012-01-25 17:49:35269 # Chrome UI.
270 # TODO(asvitkine): Enable this on all platforms and delete this flag.
271 # http://crbug.com/105550
[email protected]62424a52012-03-18 03:09:50272 'use_canvas_skia%': 0,
[email protected]d18e50312012-01-25 17:49:35273
[email protected]a9318c72012-03-01 01:29:47274 # Set to "tsan", "memcheck", or "drmemory" to configure the build to work
275 # with one of those tools.
276 'build_for_tool%': '',
277
[email protected]01971642012-03-07 14:39:56278 # Whether tests targets should be run, archived or just have the
279 # dependencies verified. All the tests targets have the '_run' suffix,
280 # e.g. base_unittests_run runs the target base_unittests. The test target
281 # always calls tools/isolate/isolate.py. See the script's --help for more
282 # information and the valid --mode values. Meant to be overriden with
283 # GYP_DEFINES.
284 'tests_run%': 'check',
285
[email protected]bb6aba32011-01-07 19:04:43286 'conditions': [
[email protected]33423fa2011-09-23 18:18:14287 # TODO(epoger): Figure out how to set use_skia=1 for Mac outside of
288 # the 'conditions' clause. Initial attempts resulted in chromium and
289 # webkit disagreeing on its setting.
[email protected]7d7564a12011-06-21 19:20:22290 ['OS=="mac"', {
[email protected]53c98db2012-03-14 16:02:21291 'use_skia%': 1,
[email protected]e4dbede82011-09-16 16:11:07292 # Mac uses clang by default, so turn on the plugin as well.
293 'clang_use_chrome_plugins%': 1,
[email protected]7d7564a12011-06-21 19:20:22294 }, {
295 'use_skia%': 1,
296 }],
297
[email protected]79e2336c2011-05-12 18:18:34298 # A flag for POSIX platforms
[email protected]c49ab0c2011-05-18 17:25:37299 ['OS=="win"', {
[email protected]79e2336c2011-05-12 18:18:34300 'os_posix%': 0,
[email protected]c49ab0c2011-05-18 17:25:37301 }, {
302 'os_posix%': 1,
[email protected]79e2336c2011-05-12 18:18:34303 }],
304
[email protected]df9167b2011-11-14 19:15:25305 # A flag for BSD platforms
306 ['OS=="freebsd" or OS=="openbsd"', {
307 'os_bsd%': 1,
308 }, {
309 'os_bsd%': 0,
310 }],
311
[email protected]c329adf82011-10-05 14:34:57312 # NSS usage.
[email protected]e0b85a52011-10-06 03:30:42313 ['(OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris") and use_openssl==0', {
[email protected]c329adf82011-10-05 14:34:57314 'use_nss%': 1,
315 }, {
316 'use_nss%': 0,
317 }],
[email protected]e0b85a52011-10-06 03:30:42318
[email protected]258dca42011-09-21 00:17:19319 # Flags to use X11 on non-Mac POSIX platforms
[email protected]da1c8d692011-09-20 20:35:01320 ['OS=="win" or OS=="mac" or OS=="android"', {
[email protected]258dca42011-09-21 00:17:19321 'use_glib%': 0,
[email protected]ab2017e2012-02-07 01:54:50322 'toolkit_uses_gtk%': 0,
[email protected]79e2336c2011-05-12 18:18:34323 'use_x11%': 0,
[email protected]c49ab0c2011-05-18 17:25:37324 }, {
[email protected]ab2017e2012-02-07 01:54:50325 # TODO(dnicoara) Wayland build should have these disabled, but
326 # currently GTK and X is too spread and it's hard to completely
327 # remove every dependency.
[email protected]258dca42011-09-21 00:17:19328 'use_glib%': 1,
[email protected]ab2017e2012-02-07 01:54:50329 'toolkit_uses_gtk%': 1,
[email protected]c49ab0c2011-05-18 17:25:37330 'use_x11%': 1,
[email protected]79e2336c2011-05-12 18:18:34331 }],
[email protected]efadeacf2011-10-27 19:01:00332 # We always use skia text rendering in Aura on Windows, since GDI
333 # doesn't agree with our BackingStore.
334 # TODO(beng): remove once skia text rendering is on by default.
335 ['use_aura==1 and OS=="win"', {
336 'enable_skia_text%': 1,
337 }],
[email protected]ab2017e2012-02-07 01:54:50338 ['use_aura==1 and OS!="win"', {
339 'toolkit_uses_gtk%': 0,
340 }],
[email protected]9edeb712011-09-20 21:20:33341
[email protected]63692212010-09-16 00:22:21342 # A flag to enable or disable our compile-time dependency
343 # on gnome-keyring. If that dependency is disabled, no gnome-keyring
344 # support will be available. This option is useful
[email protected]25bc66a22011-09-24 18:32:49345 # for Linux distributions and for Aura.
[email protected]ab2017e2012-02-07 01:54:50346 ['chromeos==1 or use_aura==1', {
[email protected]63692212010-09-16 00:22:21347 'use_gnome_keyring%': 0,
348 }, {
349 'use_gnome_keyring%': 1,
350 }],
[email protected]0afe5212010-10-01 18:56:11351
[email protected]bb6aba32011-01-07 19:04:43352 ['toolkit_views==0 or OS=="mac"', {
353 # GTK+ and Mac wants Title Case strings
354 'use_titlecase_in_grd_files%': 1,
355 }],
356
[email protected]1b4209f2011-01-07 00:25:40357 # Enable some hacks to support Flapper only on Chrome OS.
358 ['chromeos==1', {
359 'enable_flapper_hacks%': 1,
[email protected]3d38d8e2011-04-16 20:48:51360 }, {
[email protected]c5582412012-02-05 20:16:21361 'enable_flapper_hacks%': 0,
[email protected]ab2017e2012-02-07 01:54:50362 }],
363
[email protected]5f887612012-03-01 21:34:06364 # Enable file manager extension on Chrome OS.
365 ['chromeos==1', {
[email protected]ab2017e2012-02-07 01:54:50366 'file_manager_extension%': 1,
367 }, {
[email protected]3d38d8e2011-04-16 20:48:51368 'file_manager_extension%': 0,
369 }],
[email protected]7de46352011-09-12 15:39:19370
[email protected]5f16f8a2012-03-14 07:38:23371 # Enable WebUI TaskManager on Chrome OS or Aura.
372 ['chromeos==1 or use_aura==1', {
373 'webui_task_manager%': 1,
374 }],
375
[email protected]bd7b6fe2012-03-05 21:02:40376 # For now one-click signin is enabled only for windows since the UI
377 # is not yet complete for other platforms.
378 ['OS=="win"', {
379 'enable_one_click_signin%': 1,
380 }],
381
[email protected]da1c8d692011-09-20 20:35:01382 ['OS=="android"', {
383 'proprietary_codecs%': 1,
384 'enable_webrtc%': 0,
385 }],
[email protected]839d5172011-10-13 17:18:11386
387 # Use GPU accelerated cross process image transport by default
[email protected]023d8242011-11-22 01:25:27388 # on linux builds with the Aura window manager
[email protected]f83c6f7f2012-01-28 03:23:01389 ['use_aura==1 and OS=="linux"', {
[email protected]1ee7c56c2011-10-19 14:51:33390 'ui_compositor_image_transport%': 1,
[email protected]839d5172011-10-13 17:18:11391 }, {
[email protected]1ee7c56c2011-10-19 14:51:33392 'ui_compositor_image_transport%': 0,
[email protected]839d5172011-10-13 17:18:11393 }],
[email protected]9061bee82012-01-16 11:45:17394
395 # Turn precompiled headers on by default for VS 2010.
396 ['OS=="win" and MSVS_VERSION=="2010"', {
397 'chromium_win_pch%': 1
398 }],
[email protected]18e0f39b2012-01-17 16:47:34399
[email protected]ab2017e2012-02-07 01:54:50400 ['use_aura==1 or chromeos==1', {
[email protected]18e0f39b2012-01-17 16:47:34401 'enable_plugin_installation%': 0,
402 }, {
403 'enable_plugin_installation%': 1,
404 }],
[email protected]b07806c12012-02-03 22:44:59405
[email protected]8d726a42012-02-09 03:49:00406 # linux_use_gold_binary: whether to use the binary checked into
407 # third_party/gold.
[email protected]1d4ace782012-03-07 09:20:40408 ['OS=="linux"', {
[email protected]1e033482012-02-09 19:33:51409 'linux_use_gold_binary%': 1,
410 }, {
411 'linux_use_gold_binary%': 0,
412 }],
413
[email protected]be239492012-02-09 19:00:17414 # linux_use_gold_flags: whether to use build flags that rely on gold.
415 # On by default for x64 Linux. Temporarily off for ChromeOS as
416 # it failed on a buildbot.
[email protected]1d4ace782012-03-07 09:20:40417 ['OS=="linux" and chromeos==0', {
[email protected]be239492012-02-09 19:00:17418 'linux_use_gold_flags%': 1,
419 }, {
[email protected]8d726a42012-02-09 03:49:00420 'linux_use_gold_flags%': 0,
[email protected]b07806c12012-02-03 22:44:59421 }],
[email protected]2e22e2f2012-03-15 21:53:10422
423 # Enable automation on platforms other than Android.
424 ['OS=="android"', {
425 'enable_automation%': 0,
426 }, {
427 'enable_automation%': 1,
428 }],
[email protected]b3f23ba2010-04-26 22:58:17429 ],
[email protected]e14a9f92009-08-05 19:26:07430 },
431
[email protected]e72e55b2011-01-06 22:19:30432 # Copy conditionally-set variables out one scope.
[email protected]e14a9f92009-08-05 19:26:07433 'branding%': '<(branding)',
434 'buildtype%': '<(buildtype)',
[email protected]e0d00142009-09-18 22:10:27435 'target_arch%': '<(target_arch)',
[email protected]cf185b32010-01-12 04:29:59436 'host_arch%': '<(host_arch)',
[email protected]8fb0ef02011-05-20 00:53:50437 'library%': 'static_library',
[email protected]c153e5352009-09-22 12:37:44438 'toolkit_views%': '<(toolkit_views)',
[email protected]1ee7c56c2011-10-19 14:51:33439 'ui_compositor_image_transport%': '<(ui_compositor_image_transport)',
[email protected]41423092011-08-25 15:39:58440 'use_aura%': '<(use_aura)',
[email protected]ed329be2012-01-03 22:02:16441 'use_ash%': '<(use_ash)',
[email protected]e0b85a52011-10-06 03:30:42442 'use_openssl%': '<(use_openssl)',
[email protected]c329adf82011-10-05 14:34:57443 'use_nss%': '<(use_nss)',
[email protected]df9167b2011-11-14 19:15:25444 'os_bsd%': '<(os_bsd)',
[email protected]79e2336c2011-05-12 18:18:34445 'os_posix%': '<(os_posix)',
[email protected]258dca42011-09-21 00:17:19446 'use_glib%': '<(use_glib)',
[email protected]79e2336c2011-05-12 18:18:34447 'toolkit_uses_gtk%': '<(toolkit_uses_gtk)',
[email protected]7d7564a12011-06-21 19:20:22448 'use_skia%': '<(use_skia)',
[email protected]79e2336c2011-05-12 18:18:34449 'use_x11%': '<(use_x11)',
[email protected]63692212010-09-16 00:22:21450 'use_gnome_keyring%': '<(use_gnome_keyring)',
[email protected]0afe5212010-10-01 18:56:11451 'linux_fpic%': '<(linux_fpic)',
[email protected]1b4209f2011-01-07 00:25:40452 'enable_flapper_hacks%': '<(enable_flapper_hacks)',
[email protected]67c125d2011-10-11 18:58:22453 'enable_pepper_threading%': '<(enable_pepper_threading)',
[email protected]c153e5352009-09-22 12:37:44454 'chromeos%': '<(chromeos)',
[email protected]2cc81d32011-10-04 17:03:18455 'use_virtual_keyboard%': '<(use_virtual_keyboard)',
[email protected]7ddea9802012-02-22 23:08:05456 'enable_viewport%': '<(enable_viewport)',
[email protected]f56797b2011-09-25 00:04:35457 'use_xi2_mt%':'<(use_xi2_mt)',
[email protected]e47c32032011-03-01 19:26:20458 'file_manager_extension%': '<(file_manager_extension)',
[email protected]8b2e9f392011-08-05 04:00:47459 'webui_task_manager%': '<(webui_task_manager)',
[email protected]b2f030c2009-09-24 20:36:21460 'inside_chromium_build%': '<(inside_chromium_build)',
[email protected]9c1949e2009-10-02 19:59:54461 'fastbuild%': '<(fastbuild)',
[email protected]20960e072011-09-20 20:59:01462 'dcheck_always_on%': '<(dcheck_always_on)',
[email protected]a76fe1a2010-03-01 23:39:36463 'python_ver%': '<(python_ver)',
[email protected]eafc0b452010-02-26 21:53:43464 'armv7%': '<(armv7)',
465 'arm_neon%': '<(arm_neon)',
[email protected]4d83eb72010-03-04 16:42:23466 'sysroot%': '<(sysroot)',
[email protected]945361a2011-09-30 04:38:43467 'system_libdir%': '<(system_libdir)',
[email protected]ac120ff2010-04-28 02:14:22468 'disable_sse2%': '<(disable_sse2)',
[email protected]8974e042010-06-21 18:06:52469 'component%': '<(component)',
[email protected]bb6aba32011-01-07 19:04:43470 'use_titlecase_in_grd_files%': '<(use_titlecase_in_grd_files)',
[email protected]9e94cca2011-02-04 17:38:17471 'use_third_party_translations%': '<(use_third_party_translations)',
[email protected]9a425422011-01-11 00:53:18472 'remoting%': '<(remoting)',
[email protected]bd7b6fe2012-03-05 21:02:40473 'enable_one_click_signin%': '<(enable_one_click_signin)',
[email protected]dda90ae2011-07-19 22:07:48474 'enable_webrtc%': '<(enable_webrtc)',
[email protected]d5cf9fb2011-09-27 00:15:16475 'chromium_win_pch%': '<(chromium_win_pch)',
[email protected]a026daa2011-04-20 15:49:51476 'p2p_apis%': '<(p2p_apis)',
[email protected]1ec68c42011-06-01 13:56:25477 'configuration_policy%': '<(configuration_policy)',
[email protected]4b58e7d2011-07-11 10:22:56478 'safe_browsing%': '<(safe_browsing)',
[email protected]9eb100e2011-10-14 05:08:22479 'input_speech%': '<(input_speech)',
[email protected]7cce3232011-10-28 10:41:57480 'notifications%': '<(notifications)',
[email protected]5d451ad2011-02-11 16:43:46481 'clang_use_chrome_plugins%': '<(clang_use_chrome_plugins)',
[email protected]92799b632011-08-15 14:33:06482 'asan%': '<(asan)',
[email protected]3cfa96a62012-02-28 07:27:58483 'asan_blacklist%': '<(asan_blacklist)',
[email protected]00b0a7f2012-01-25 15:30:46484 'order_text_section%': '<(order_text_section)',
[email protected]365dd5b92011-05-26 01:30:56485 'enable_register_protocol_handler%': '<(enable_register_protocol_handler)',
[email protected]41ed4e82011-08-25 23:02:07486 'enable_web_intents%': '<(enable_web_intents)',
[email protected]5ffb0a42012-01-27 09:36:11487 'enable_web_intents_tag%': '<(enable_web_intents_tag)',
[email protected]18e0f39b2012-01-17 16:47:34488 'enable_plugin_installation%': '<(enable_plugin_installation)',
[email protected]6b40bb582012-03-15 20:50:38489 'enable_themes%': '<(enable_themes)',
[email protected]b07806c12012-02-03 22:44:59490 'linux_use_gold_binary%': '<(linux_use_gold_binary)',
[email protected]8d726a42012-02-09 03:49:00491 'linux_use_gold_flags%': '<(linux_use_gold_flags)',
[email protected]62424a52012-03-18 03:09:50492 'use_canvas_skia%': '<(use_canvas_skia)',
[email protected]01971642012-03-07 14:39:56493 'tests_run%': '<(tests_run)',
[email protected]2e22e2f2012-03-15 21:53:10494 'enable_automation%': '<(enable_automation)',
[email protected]01971642012-03-07 14:39:56495
[email protected]4076d2f2011-08-11 18:20:22496 # Whether to build for Wayland display server
497 'use_wayland%': 0,
[email protected]a22ebd812011-06-23 00:05:39498
[email protected]371e1092011-10-12 20:37:36499 # Use system yasm instead of bundled one.
500 'use_system_yasm%': 0,
501
[email protected]cd00bd862012-02-29 00:40:36502 # Default to enabled PIE; this is important for ASLR but we may need to be
503 # able to turn it off for various reasons.
504 'linux_disable_pie%': 0,
505
[email protected]caa95c82009-11-23 22:39:32506 # The release channel that this build targets. This is used to restrict
507 # channel-specific build options, like which installer packages to create.
508 # The default is 'all', which does no channel-specific filtering.
509 'channel%': 'all',
510
[email protected]b3fb8092009-03-12 19:09:24511 # Override chromium_mac_pch and set it to 0 to suppress the use of
512 # precompiled headers on the Mac. Prefix header injection may still be
513 # used, but prefix headers will not be precompiled. This is useful when
514 # using distcc to distribute a build to compile slaves that don't
515 # share the same compiler executable as the system driving the compilation,
516 # because precompiled headers rely on pointers into a specific compiler
517 # executable's image. Setting this to 0 is needed to use an experimental
518 # Linux-Mac cross compiler distcc farm.
519 'chromium_mac_pch%': 1,
520
[email protected]3224dcd2009-09-16 17:31:25521 # Mac OS X SDK and deployment target support.
522 # The SDK identifies the version of the system headers that will be used,
523 # and corresponds to the MAC_OS_X_VERSION_MAX_ALLOWED compile-time macro.
524 # "Maximum allowed" refers to the operating system version whose APIs are
525 # available in the headers.
526 # The deployment target identifies the minimum system version that the
527 # built products are expected to function on. It corresponds to the
528 # MAC_OS_X_VERSION_MIN_REQUIRED compile-time macro.
529 # To ensure these macros are available, #include <AvailabilityMacros.h>.
530 # Additional documentation on these macros is available at
531 # http://developer.apple.com/mac/library/technotes/tn2002/tn2064.html#SECTION3
532 # Chrome normally builds with the Mac OS X 10.5 SDK and sets the
533 # deployment target to 10.5. Other projects, such as O3D, may override
534 # these defaults.
535 'mac_sdk%': '10.5',
536 'mac_deployment_target%': '10.5',
[email protected]9543af052009-09-15 22:42:59537
[email protected]f5ecbba12009-04-03 04:35:18538 # Set to 1 to enable code coverage. In addition to build changes
539 # (e.g. extra CFLAGS), also creates a new target in the src/chrome
540 # project file called "coverage".
541 # Currently ignored on Windows.
542 'coverage%': 0,
[email protected]653bd5f032009-04-08 12:55:49543
[email protected]7477ea6f2009-12-22 23:28:15544 # Although base/allocator lets you select a heap library via an
[email protected]7e0d664a2009-12-03 21:07:47545 # environment variable, the libcmt shim it uses sometimes gets in
546 # the way. To disable it entirely, and switch to normal msvcrt, do e.g.
547 # 'win_use_allocator_shim': 0,
548 # 'win_release_RuntimeLibrary': 2
549 # to ~/.gyp/include.gypi, gclient runhooks --force, and do a release build.
[email protected]8974e042010-06-21 18:06:52550 'win_use_allocator_shim%': 1, # 1 = shim allocator via libcmt; 0 = msvcrt
[email protected]279cd4212009-09-11 22:32:11551
[email protected]95ff8082009-11-13 22:21:01552 # Whether usage of OpenMAX is enabled.
553 'enable_openmax%': 0,
554
[email protected]d01120e62010-05-10 17:04:48555 # Whether proprietary audio/video codecs are assumed to be included with
556 # this build (only meaningful if branding!=Chrome).
557 'proprietary_codecs%': 0,
558
[email protected]e5b2eaa2009-04-14 01:39:12559 # TODO(bradnelson): eliminate this when possible.
560 # To allow local gyp files to prevent release.vsprops from being included.
561 # Yes(1) means include release.vsprops.
562 # Once all vsprops settings are migrated into gyp, this can go away.
563 'msvs_use_common_release%': 1,
[email protected]606116d22009-05-06 22:38:23564
[email protected]cbd5fd52009-08-26 00:14:27565 # TODO(bradnelson): eliminate this when possible.
566 # To allow local gyp files to override additional linker options for msvs.
567 # Yes(1) means set use the common linker options.
[email protected]48c7af72009-07-03 22:00:19568 'msvs_use_common_linker_extras%': 1,
569
[email protected]1ffb6502009-06-02 07:46:24570 # TODO(sgk): eliminate this if possible.
571 # It would be nicer to support this via a setting in 'target_defaults'
572 # in chrome/app/locales/locales.gypi overriding the setting in the
573 # 'Debug' configuration in the 'target_defaults' dict below,
574 # but that doesn't work as we'd like.
575 'msvs_debug_link_incremental%': '2',
576
[email protected]1f790ef2011-01-11 20:45:36577 # Needed for some of the largest modules.
578 'msvs_debug_link_nonincremental%': '1',
579
[email protected]5ab8f482011-08-18 18:30:06580 # Turn on Use Library Dependency Inputs for linking chrome.dll on Windows
581 # to get incremental linking to be faster in debug builds.
[email protected]f1b6f9912011-09-30 16:37:51582 'incremental_chrome_dll%': '<!(python <(DEPTH)/tools/win/supalink/check_installed.py)',
[email protected]5ab8f482011-08-18 18:30:06583
[email protected]573136142009-07-15 22:48:37584 # This is the location of the sandbox binary. Chrome looks for this before
585 # running the zygote process. If found, and SUID, it will be used to
586 # sandbox the zygote process and, thus, all renderer processes.
587 'linux_sandbox_path%': '',
588
[email protected]ad6d2c42009-09-15 20:13:38589 # Set this to true to enable SELinux support.
590 'selinux%': 0,
[email protected]4c9cc6c2009-10-01 18:54:57591
[email protected]58680ce2010-09-18 00:09:15592 # Set this to true when building with Clang.
593 # See http://code.google.com/p/chromium/wiki/Clang for details.
[email protected]58680ce2010-09-18 00:09:15594 'clang%': 0,
[email protected]e4ddf332011-10-20 21:52:24595 'make_clang_dir%': 'third_party/llvm-build/Release+Asserts',
[email protected]58680ce2010-09-18 00:09:15596
[email protected]5e781232011-01-28 02:57:59597 # These two variables can be set in GYP_DEFINES while running
598 # |gclient runhooks| to let clang run a plugin in every compilation.
599 # Only has an effect if 'clang=1' is in GYP_DEFINES as well.
600 # Example:
[email protected]93120fe2011-02-03 20:46:42601 # 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:59602
603 'clang_load%': '',
604 'clang_add_plugin%': '',
605
[email protected]da1c8d692011-09-20 20:35:01606 # The default type of gtest.
607 'gtest_target_type%': 'executable',
608
[email protected]7664ab32011-02-01 23:35:25609 # Enable sampling based profiler.
610 # See http://google-perftools.googlecode.com/svn/trunk/doc/cpuprofile.html
611 'profiling%': '0',
612
[email protected]93b373502011-08-16 19:06:22613 # Enable strict glibc debug mode.
614 'glibcxx_debug%': 0,
615
[email protected]36532f332010-08-25 00:22:01616 # Override whether we should use Breakpad on Linux. I.e. for Chrome bot.
617 'linux_breakpad%': 0,
618 # And if we want to dump symbols for Breakpad-enabled builds.
619 'linux_dump_symbols%': 0,
620 # And if we want to strip the binary after dumping symbols.
[email protected]05cb6962009-10-01 23:29:03621 'linux_strip_binary%': 0,
[email protected]1d87c282010-09-15 22:24:49622 # Strip the test binaries needed for Linux reliability tests.
623 'linux_strip_reliability_tests%': 0,
[email protected]05cb6962009-10-01 23:29:03624
[email protected]46ce5b562010-06-16 18:39:53625 # Enable TCMalloc.
626 'linux_use_tcmalloc%': 1,
[email protected]01699e22009-11-11 19:24:24627
[email protected]39ca7de2010-04-16 08:04:03628 # Disable TCMalloc's debugallocation.
629 'linux_use_debugallocation%': 0,
630
[email protected]d8b60602010-03-26 09:41:22631 # Disable TCMalloc's heapchecker.
632 'linux_use_heapchecker%': 0,
633
[email protected]64e2d4a42010-08-27 10:13:21634 # Disable shadow stack keeping used by heapcheck to unwind the stacks
635 # better.
636 'linux_keep_shadow_stacks%': 0,
637
[email protected]556c5d72010-06-10 05:45:01638 # Set to 1 to link against libgnome-keyring instead of using dlopen().
639 'linux_link_gnome_keyring%': 0,
[email protected]abcc9ac2011-05-16 20:04:35640 # Set to 1 to link against gsettings APIs instead of using dlopen().
641 'linux_link_gsettings%': 0,
[email protected]556c5d72010-06-10 05:45:01642
[email protected]77c1b29392009-12-04 06:21:29643 # Set Thumb compilation flags.
644 'arm_thumb%': 0,
645
[email protected]53e0f642010-03-05 01:41:56646 # Set ARM fpu compilation flags (only meaningful if armv7==1 and
647 # arm_neon==0).
648 'arm_fpu%': 'vfpv3',
649
[email protected]9821d0d2010-04-16 22:40:37650 # Enable new NPDevice API.
651 'enable_new_npdevice_api%': 0,
[email protected]ed154592010-04-29 00:18:50652
653 # Enable EGLImage support in OpenMAX
[email protected]58023be2011-02-04 20:34:14654 'enable_eglimage%': 1,
[email protected]ed154592010-04-29 00:18:50655
[email protected]6f51b27e2010-06-22 20:43:53656 # Enable a variable used elsewhere throughout the GYP files to determine
657 # whether to compile in the sources for the GPU plugin / process.
658 'enable_gpu%': 1,
659
[email protected]e72e55b2011-01-06 22:19:30660 # .gyp files or targets should set chromium_code to 1 if they build
661 # Chromium-specific code, as opposed to external code. This variable is
662 # used to control such things as the set of warnings to enable, and
663 # whether warnings are treated as errors.
664 'chromium_code%': 0,
665
[email protected]8d726a42012-02-09 03:49:00666 'release_valgrind_build%': 0,
667
[email protected]b1eb341c2011-11-09 18:46:07668 # TODO(thakis): Make this a blacklist instead, http://crbug.com/101600
669 'enable_wexit_time_destructors%': 0,
670
[email protected]e72e55b2011-01-06 22:19:30671 # Set to 1 to compile with the built in pdf viewer.
672 'internal_pdf%': 0,
673
674 # This allows to use libcros from the current system, ie. /usr/lib/
675 # The cros_api will be pulled in as a static library, and all headers
676 # from the system include dirs.
[email protected]bb6aba32011-01-07 19:04:43677 'system_libcros%': 0,
[email protected]e72e55b2011-01-06 22:19:30678
[email protected]e72e55b2011-01-06 22:19:30679 # NOTE: When these end up in the Mac bundle, we need to replace '-' for '_'
680 # so Cocoa is happy (http://crbug.com/20441).
681 'locales': [
682 'am', 'ar', 'bg', 'bn', 'ca', 'cs', 'da', 'de', 'el', 'en-GB',
683 'en-US', 'es-419', 'es', 'et', 'fa', 'fi', 'fil', 'fr', 'gu', 'he',
684 'hi', 'hr', 'hu', 'id', 'it', 'ja', 'kn', 'ko', 'lt', 'lv',
[email protected]925f94eb2012-01-28 00:57:19685 'ml', 'mr', 'ms', 'nb', 'nl', 'pl', 'pt-BR', 'pt-PT', 'ro', 'ru',
[email protected]e72e55b2011-01-06 22:19:30686 'sk', 'sl', 'sr', 'sv', 'sw', 'ta', 'te', 'th', 'tr', 'uk',
687 'vi', 'zh-CN', 'zh-TW',
688 ],
689
[email protected]cc0322d2011-07-24 09:29:19690 # Pseudo locales are special locales which are used for testing and
691 # debugging. They don't get copied to the final app. For more info,
692 # check out https://sites.google.com/a/chromium.org/dev/Home/fake-bidi
693 'pseudo_locales': [
694 'fake-bidi',
695 ],
696
[email protected]bb6aba32011-01-07 19:04:43697 'grit_defines': [],
698
[email protected]bd3bd442011-03-28 07:58:51699 # If debug_devtools is set to 1, JavaScript files for DevTools are
700 # stored as is and loaded from disk. Otherwise, a concatenated file
701 # is stored in resources.pak. It is still possible to load JS files
702 # from disk by passing --debug-devtools cmdline switch.
703 'debug_devtools%': 0,
704
[email protected]464750f2011-10-24 23:16:18705 # The Java Bridge is not compiled in by default.
706 'java_bridge%': 0,
707
[email protected]33e1c372011-12-14 16:32:07708 # This flag is only used when disable_nacl==0 and disables all those
709 # subcomponents which would require the installation of a native_client
710 # untrusted toolchain.
711 'disable_nacl_untrusted%': 0,
712
[email protected]407dfa632011-12-23 11:59:35713 # Disable Dart by default.
714 'enable_dart%': 0,
715
[email protected]ff10b132012-02-29 22:53:30716 # The desired version of Windows SDK can be set in ~/.gyp/include.gypi.
717 'msbuild_toolset%': '',
718
[email protected]912c55c2009-07-31 23:33:55719 'conditions': [
[email protected]f0c4fce2011-10-20 18:16:11720 # Used to disable Native Client at compile time, for platforms where it
721 # isn't supported (ARM)
[email protected]33e1c372011-12-14 16:32:07722 ['target_arch=="arm" and chromeos == 1', {
[email protected]f0c4fce2011-10-20 18:16:11723 'disable_nacl%': 1,
724 }, {
725 'disable_nacl%': 0,
726 }],
[email protected]da1c8d692011-09-20 20:35:01727 ['os_posix==1 and OS!="mac" and OS!="android"', {
[email protected]242a9e62009-11-03 17:32:10728 # This will set gcc_version to XY if you are running gcc X.Y.*.
729 # This is used to tweak build flags for gcc 4.4.
730 'gcc_version%': '<!(python <(DEPTH)/build/compiler_version.py)',
[email protected]4d83eb72010-03-04 16:42:23731 # Figure out the python architecture to decide if we build pyauto.
[email protected]945361a2011-09-30 04:38:43732 '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:27733 'conditions': [
[email protected]2a77a9d2010-08-26 19:58:10734 ['branding=="Chrome"', {
[email protected]cbd5fd52009-08-26 00:14:27735 'linux_breakpad%': 1,
[email protected]cbd5fd52009-08-26 00:14:27736 }],
[email protected]4c9cc6c2009-10-01 18:54:57737 # All Chrome builds have breakpad symbols, but only process the
738 # symbols from official builds.
[email protected]c913cb82010-08-31 19:44:08739 ['(branding=="Chrome" and buildtype=="Official")', {
[email protected]4c9cc6c2009-10-01 18:54:57740 'linux_dump_symbols%': 1,
[email protected]4c9cc6c2009-10-01 18:54:57741 }],
[email protected]cbd5fd52009-08-26 00:14:27742 ],
[email protected]da1c8d692011-09-20 20:35:01743 }], # os_posix==1 and OS!="mac" and OS!="android"
744 ['OS=="android"', {
745 # Location of Android NDK.
746 'variables': {
747 'variables': {
748 'android_ndk_root%': '<!(/bin/echo -n $ANDROID_NDK_ROOT)',
749 'android_target_arch%': 'arm', # target_arch in android terms.
[email protected]bb6aba32011-01-07 19:04:43750
[email protected]da1c8d692011-09-20 20:35:01751 # Switch between different build types, currently only '0' is
752 # supported.
753 'android_build_type%': 0,
754 },
755 'android_ndk_root%': '<(android_ndk_root)',
756 'android_ndk_sysroot': '<(android_ndk_root)/platforms/android-9/arch-<(android_target_arch)',
757 'android_build_type%': '<(android_build_type)',
758 },
759 'android_ndk_root%': '<(android_ndk_root)',
760 'android_ndk_sysroot': '<(android_ndk_sysroot)',
761 'android_ndk_include': '<(android_ndk_sysroot)/usr/include',
762 'android_ndk_lib': '<(android_ndk_sysroot)/usr/lib',
763
764 # Uses Android's crash report system
765 'linux_breakpad%': 0,
766
767 # Always uses openssl.
768 'use_openssl%': 1,
769
770 'proprietary_codecs%': '<(proprietary_codecs)',
771 'safe_browsing%': 0,
772 'configuration_policy%': 0,
[email protected]9eb100e2011-10-14 05:08:22773 'input_speech%': 0,
[email protected]7e199322012-03-13 20:04:56774 'enable_web_intents%': 0,
[email protected]464750f2011-10-24 23:16:18775 'java_bridge%': 1,
[email protected]6b40bb582012-03-15 20:50:38776 # Android does not support themes.
777 'enable_themes%': 0,
[email protected]5fd2e842012-03-01 00:29:11778
779 # Set to 1 once we have a notification system for Android.
780 # http://crbug.com/115320
[email protected]7cce3232011-10-28 10:41:57781 'notifications%': 0,
[email protected]da1c8d692011-09-20 20:35:01782
783 # Builds the gtest targets as a shared_library.
784 # TODO(michaelbai): Use the fixed value 'shared_library' once it
785 # is fully supported.
786 'gtest_target_type%': '<(gtest_target_type)',
787
788 # Uses system APIs for decoding audio and video.
789 'use_libffmpeg%': '0',
790
791 # Always use the chromium skia. The use_system_harfbuzz needs to
792 # match use_system_skia.
793 'use_system_skia%': '0',
794 'use_system_harfbuzz%': '0',
795
796 # Use the system icu.
[email protected]965b6b22011-09-29 16:07:28797 'use_system_icu%': 0,
[email protected]da1c8d692011-09-20 20:35:01798
799 # Choose static link by build type.
800 'conditions': [
801 ['android_build_type==0', {
802 'static_link_system_icu%': 1,
803 }, {
804 'static_link_system_icu%': 0,
805 }],
806 ],
807 # Enable to use system sqlite.
808 'use_system_sqlite%': '<(android_build_type)',
[email protected]d5cf9fb2011-09-27 00:15:16809 # Enable to use system libjpeg.
[email protected]da1c8d692011-09-20 20:35:01810 'use_system_libjpeg%': '<(android_build_type)',
811 # Enable to use the system libexpat.
812 'use_system_libexpat%': '<(android_build_type)',
813 # Enable to use the system stlport, otherwise statically
814 # link the NDK one?
815 'use_system_stlport%': '<(android_build_type)',
816 # Copy it out one scope.
817 'android_build_type%': '<(android_build_type)',
818 }], # OS=="android"
[email protected]e14a9f92009-08-05 19:26:07819 ['OS=="mac"', {
[email protected]e1ece302011-09-15 03:58:11820 # Enable clang on mac by default!
821 'clang%': 1,
[email protected]794fb4782011-12-14 19:10:56822 # Compile in Breakpad support by default so that it can be
823 # tested, even if it is not enabled by default at runtime.
824 'mac_breakpad_compiled_in%': 1,
[email protected]e14a9f92009-08-05 19:26:07825 'conditions': [
826 # mac_product_name is set to the name of the .app bundle as it should
827 # appear on disk. This duplicates data from
828 # chrome/app/theme/chromium/BRANDING and
829 # chrome/app/theme/google_chrome/BRANDING, but is necessary to get
830 # these names into the build system.
831 ['branding=="Chrome"', {
832 'mac_product_name%': 'Google Chrome',
833 }, { # else: branding!="Chrome"
834 'mac_product_name%': 'Chromium',
835 }],
836
[email protected]e14a9f92009-08-05 19:26:07837 ['branding=="Chrome" and buildtype=="Official"', {
[email protected]794fb4782011-12-14 19:10:56838 # Enable uploading crash dumps.
839 'mac_breakpad_uploads%': 1,
840 # Enable dumping symbols at build time for use by Mac Breakpad.
[email protected]e14a9f92009-08-05 19:26:07841 'mac_breakpad%': 1,
[email protected]794fb4782011-12-14 19:10:56842 # Enable Keystone auto-update support.
[email protected]e14a9f92009-08-05 19:26:07843 'mac_keystone%': 1,
844 }, { # else: branding!="Chrome" or buildtype!="Official"
[email protected]794fb4782011-12-14 19:10:56845 'mac_breakpad_uploads%': 0,
[email protected]e14a9f92009-08-05 19:26:07846 'mac_breakpad%': 0,
847 'mac_keystone%': 0,
848 }],
849 ],
850 }], # OS=="mac"
[email protected]bb6aba32011-01-07 19:04:43851
[email protected]912c55c2009-07-31 23:33:55852 ['OS=="win"', {
853 'conditions': [
[email protected]8974e042010-06-21 18:06:52854 ['component=="shared_library"', {
855 'win_use_allocator_shim%': 0,
856 }],
[email protected]2212d272011-12-20 21:37:37857 # Whether to use multiple cores to compile with visual studio. This is
858 # optional because it sometimes causes corruption on VS 2005.
859 # It is on by default on VS 2008 and off on VS 2005.
[email protected]912c55c2009-07-31 23:33:55860 ['MSVS_VERSION=="2005"', {
[email protected]669795372009-08-14 17:51:13861 'msvs_multi_core_compile%': 0,
[email protected]912c55c2009-07-31 23:33:55862 },{
863 'msvs_multi_core_compile%': 1,
864 }],
[email protected]10bb8c92009-08-07 21:16:03865 # Don't do incremental linking for large modules on 32-bit.
866 ['MSVS_OS_BITS==32', {
867 'msvs_large_module_debug_link_mode%': '1', # No
868 },{
869 'msvs_large_module_debug_link_mode%': '2', # Yes
870 }],
[email protected]3e2648a2011-03-21 20:58:50871 ['MSVS_VERSION=="2010e" or MSVS_VERSION=="2008e" or MSVS_VERSION=="2005e"', {
872 'msvs_express%': 1,
873 'secure_atl%': 0,
874 },{
875 'msvs_express%': 0,
876 'secure_atl%': 1,
877 }],
[email protected]912c55c2009-07-31 23:33:55878 ],
[email protected]ef4fa4072009-12-04 22:46:50879 'nacl_win64_defines': [
880 # This flag is used to minimize dependencies when building
881 # Native Client loader for 64-bit Windows.
882 'NACL_WIN64',
883 ],
[email protected]912c55c2009-07-31 23:33:55884 }],
[email protected]bb6aba32011-01-07 19:04:43885
[email protected]79e2336c2011-05-12 18:18:34886 ['os_posix==1 and chromeos==0 and target_arch!="arm"', {
[email protected]8e553f492010-10-25 20:05:44887 'use_cups%': 1,
888 }, {
889 'use_cups%': 0,
890 }],
[email protected]bb6aba32011-01-07 19:04:43891
[email protected]19fe8f0b2010-12-07 07:27:27892 # Set the relative path from this file to the GYP file of the JPEG
893 # library used by Chromium.
894 ['use_libjpeg_turbo==1', {
895 'libjpeg_gyp_path': '../third_party/libjpeg_turbo/libjpeg.gyp',
896 }, {
897 'libjpeg_gyp_path': '../third_party/libjpeg/libjpeg.gyp',
898 }], # use_libjpeg_turbo==1
[email protected]bb6aba32011-01-07 19:04:43899
[email protected]abcc9ac2011-05-16 20:04:35900 # Options controlling the use of GConf (the classic GNOME configuration
901 # system) and GIO, which contains GSettings (the new GNOME config system).
[email protected]1c6fe29302011-01-20 22:14:31902 ['chromeos==1', {
903 'use_gconf%': 0,
[email protected]abcc9ac2011-05-16 20:04:35904 'use_gio%': 0,
[email protected]1c6fe29302011-01-20 22:14:31905 }, {
906 'use_gconf%': 1,
[email protected]abcc9ac2011-05-16 20:04:35907 'use_gio%': 1,
[email protected]1c6fe29302011-01-20 22:14:31908 }],
909
[email protected]4de39f82011-03-28 12:01:29910 # Set up -D and -E flags passed into grit.
[email protected]1660bffd2011-03-23 16:24:29911 ['branding=="Chrome"', {
912 # TODO(mmoss) The .grd files look for _google_chrome, but for
913 # consistency they should look for google_chrome_build like C++.
[email protected]4de39f82011-03-28 12:01:29914 'grit_defines': ['-D', '_google_chrome',
915 '-E', 'CHROMIUM_BUILD=google_chrome'],
[email protected]1660bffd2011-03-23 16:24:29916 }, {
[email protected]4de39f82011-03-28 12:01:29917 'grit_defines': ['-D', '_chromium',
918 '-E', 'CHROMIUM_BUILD=chromium'],
[email protected]1660bffd2011-03-23 16:24:29919 }],
[email protected]bb6aba32011-01-07 19:04:43920 ['chromeos==1', {
921 'grit_defines': ['-D', 'chromeos'],
922 }],
923 ['toolkit_views==1', {
924 'grit_defines': ['-D', 'toolkit_views'],
925 }],
[email protected]8dd791d2011-09-16 16:37:30926 ['use_aura==1', {
927 'grit_defines': ['-D', 'use_aura'],
928 }],
[email protected]ed329be2012-01-03 22:02:16929 ['use_ash==1', {
930 'grit_defines': ['-D', 'use_ash'],
931 }],
[email protected]c329adf82011-10-05 14:34:57932 ['use_nss==1', {
933 'grit_defines': ['-D', 'use_nss'],
934 }],
[email protected]2cc81d32011-10-04 17:03:18935 ['use_virtual_keyboard==1', {
936 'grit_defines': ['-D', 'use_virtual_keyboard'],
937 }],
[email protected]e47c32032011-03-01 19:26:20938 ['file_manager_extension==1', {
939 'grit_defines': ['-D', 'file_manager_extension'],
940 }],
[email protected]8b2e9f392011-08-05 04:00:47941 ['webui_task_manager==1', {
942 'grit_defines': ['-D', 'webui_task_manager'],
943 }],
[email protected]9a425422011-01-11 00:53:18944 ['remoting==1', {
945 'grit_defines': ['-D', 'remoting'],
946 }],
[email protected]bb6aba32011-01-07 19:04:43947 ['use_titlecase_in_grd_files==1', {
948 'grit_defines': ['-D', 'use_titlecase'],
949 }],
[email protected]00dc155832011-02-01 18:51:19950 ['use_third_party_translations==1', {
951 'grit_defines': ['-D', 'use_third_party_translations'],
[email protected]fb6c102e2011-06-27 21:58:12952 'locales': [
[email protected]8581e1ba2011-08-22 23:27:16953 'ast', 'bs', 'ca@valencia', 'en-AU', 'eo', 'eu', 'gl', 'hy', 'ia',
954 'ka', 'ku', 'kw', 'ms', 'ug'
[email protected]fb6c102e2011-06-27 21:58:12955 ],
[email protected]00dc155832011-02-01 18:51:19956 }],
[email protected]da1c8d692011-09-20 20:35:01957 ['OS=="android"', {
958 'grit_defines': ['-D', 'android'],
959 }],
[email protected]5d451ad2011-02-11 16:43:46960 ['clang_use_chrome_plugins==1', {
961 'clang_chrome_plugins_flags':
962 '<!(<(DEPTH)/tools/clang/scripts/plugin_flags.sh)',
963 }],
[email protected]cfa2e1102011-04-27 22:30:23964
[email protected]452da69e2011-05-24 02:36:05965 # Set use_ibus to 1 to enable ibus support.
[email protected]023d8242011-11-22 01:25:27966 ['use_virtual_keyboard==1 and chromeos==1', {
[email protected]cfa2e1102011-04-27 22:30:23967 'use_ibus%': 1,
968 }, {
969 'use_ibus%': 0,
[email protected]365dd5b92011-05-26 01:30:56970 }],
971
972 ['enable_register_protocol_handler==1', {
973 'grit_defines': ['-D', 'enable_register_protocol_handler'],
974 }],
[email protected]92799b632011-08-15 14:33:06975
[email protected]5ffb0a42012-01-27 09:36:11976 ['enable_web_intents_tag==1', {
977 'grit_defines': ['-D', 'enable_web_intents_tag'],
[email protected]41ed4e82011-08-25 23:02:07978 }],
979
[email protected]92799b632011-08-15 14:33:06980 ['asan==1', {
981 'clang%': 1,
[email protected]5dc6aaac2011-10-12 16:55:20982 # Do not use Chrome plugins for Clang. The Clang version in
983 # third_party/asan may be different from the default one.
984 'clang_use_chrome_plugins%': 0,
[email protected]92799b632011-08-15 14:33:06985 }],
[email protected]a9318c72012-03-01 01:29:47986
987 # On valgrind bots, override the optimizer settings so we don't inline too
988 # much and make the stacks harder to figure out.
989 #
990 # TODO(rnk): Kill off variables that no one else uses and just implement
991 # them under a build_for_tool== condition.
992 ['build_for_tool=="memcheck" or build_for_tool=="tsan"', {
993 # gcc flags
994 'mac_debug_optimization': '1',
995 'mac_release_optimization': '1',
996 'release_optimize': '1',
997 'no_gc_sections': 1,
998 'debug_extra_cflags': '-g -fno-inline -fno-omit-frame-pointer '
999 '-fno-builtin -fno-optimize-sibling-calls',
1000 'release_extra_cflags': '-g -fno-inline -fno-omit-frame-pointer '
1001 '-fno-builtin -fno-optimize-sibling-calls',
1002
1003 # MSVS flags for TSan on Pin and Windows.
1004 'win_debug_RuntimeChecks': '0',
1005 'win_debug_disable_iterator_debugging': '1',
1006 'win_debug_Optimization': '1',
1007 'win_debug_InlineFunctionExpansion': '0',
1008 'win_release_InlineFunctionExpansion': '0',
1009 'win_release_OmitFramePointers': '0',
1010
1011 'linux_use_tcmalloc': 1,
1012 'release_valgrind_build': 1,
1013 'werror': '',
1014 'component': 'static_library',
1015 'use_system_zlib': 0,
1016 }],
1017
1018 # Build tweaks for DrMemory.
1019 # TODO(rnk): Combine with tsan config to share the builder.
1020 # http://crbug.com/108155
1021 ['build_for_tool=="drmemory"', {
1022 # DrMemory can't handle the debug CRT dll, so build static.
1023 'component': 'static_library',
1024 # These runtime checks force initialization of stack vars which blocks
1025 # DrMemory's uninit detection.
1026 'win_debug_RuntimeChecks': '0',
1027 # Iterator debugging is slow.
1028 'win_debug_disable_iterator_debugging': '1',
1029 # Try to disable optimizations that mess up stacks in a release build.
1030 'win_release_InlineFunctionExpansion': '0',
1031 'win_release_OmitFramePointers': '0',
1032 # Keep the code under #ifndef NVALGRIND.
1033 'release_valgrind_build': 1,
1034 }],
[email protected]912c55c2009-07-31 23:33:551035 ],
[email protected]a9318c72012-03-01 01:29:471036
[email protected]35958422011-09-28 02:03:591037 # List of default apps to install in new profiles. The first list contains
1038 # the source files as found in svn. The second list, used only for linux,
[email protected]20cc0bb72011-10-26 00:57:061039 # contains the destination location for each of the files. When a crx
1040 # is added or removed from the list, the chrome/browser/resources/
1041 # default_apps/external_extensions.json file must also be updated.
[email protected]35958422011-09-28 02:03:591042 'default_apps_list': [
1043 'browser/resources/default_apps/external_extensions.json',
1044 'browser/resources/default_apps/gmail.crx',
[email protected]20cc0bb72011-10-26 00:57:061045 'browser/resources/default_apps/search.crx',
[email protected]35958422011-09-28 02:03:591046 'browser/resources/default_apps/youtube.crx',
1047 ],
1048 'default_apps_list_linux_dest': [
1049 '<(PRODUCT_DIR)/default_apps/external_extensions.json',
1050 '<(PRODUCT_DIR)/default_apps/gmail.crx',
[email protected]20cc0bb72011-10-26 00:57:061051 '<(PRODUCT_DIR)/default_apps/search.crx',
[email protected]35958422011-09-28 02:03:591052 '<(PRODUCT_DIR)/default_apps/youtube.crx',
1053 ],
[email protected]2f80c312009-02-25 21:26:551054 },
1055 'target_defaults': {
[email protected]1c966092009-08-20 21:19:261056 'variables': {
[email protected]a6e22132010-02-10 20:43:181057 # The condition that operates on chromium_code is in a target_conditions
1058 # section, and will not have access to the default fallback value of
1059 # chromium_code at the top of this file, or to the chromium_code
1060 # variable placed at the root variables scope of .gyp files, because
1061 # those variables are not set at target scope. As a workaround,
1062 # if chromium_code is not set at target scope, define it in target scope
1063 # to contain whatever value it has during early variable expansion.
1064 # That's enough to make it available during target conditional
1065 # processing.
1066 'chromium_code%': '<(chromium_code)',
1067
[email protected]7e0d664a2009-12-03 21:07:471068 # See http://gcc.gnu.org/onlinedocs/gcc-4.4.2/gcc/Optimize-Options.html
[email protected]d5d593a2009-08-28 23:23:291069 'mac_release_optimization%': '3', # Use -O3 unless overridden
[email protected]ffd984b12009-09-11 19:37:001070 'mac_debug_optimization%': '0', # Use -O0 unless overridden
[email protected]626d2d22011-10-11 15:47:331071
[email protected]7e0d664a2009-12-03 21:07:471072 # See http://msdn.microsoft.com/en-us/library/aa652360(VS.71).aspx
1073 'win_release_Optimization%': '2', # 2 = /Os
1074 'win_debug_Optimization%': '0', # 0 = /Od
[email protected]626d2d22011-10-11 15:47:331075
1076 # See http://msdn.microsoft.com/en-us/library/2kxx5t2c(v=vs.80).aspx
[email protected]ef5c5f1b2011-12-17 02:16:241077 # Tri-state: blank is default, 1 on, 0 off
[email protected]7cf23ce62012-01-13 02:43:331078 'win_release_OmitFramePointers%': '1',
[email protected]ef5c5f1b2011-12-17 02:16:241079 # Tri-state: blank is default, 1 on, 0 off
1080 'win_debug_OmitFramePointers%': '',
[email protected]626d2d22011-10-11 15:47:331081
[email protected]6b0507b2010-05-07 07:41:211082 # See http://msdn.microsoft.com/en-us/library/8wtf2dfz(VS.71).aspx
1083 'win_debug_RuntimeChecks%': '3', # 3 = all checks enabled, 0 = off
[email protected]626d2d22011-10-11 15:47:331084
[email protected]6b0507b2010-05-07 07:41:211085 # See http://msdn.microsoft.com/en-us/library/47238hez(VS.71).aspx
[email protected]2ae6e022010-05-07 13:19:151086 'win_debug_InlineFunctionExpansion%': '', # empty = default, 0 = off,
1087 'win_release_InlineFunctionExpansion%': '2', # 1 = only __inline, 2 = max
[email protected]626d2d22011-10-11 15:47:331088
[email protected]fac10d12010-11-08 16:00:311089 # VS inserts quite a lot of extra checks to algorithms like
1090 # std::partial_sort in Debug build which make them O(N^2)
1091 # instead of O(N*logN). This is particularly slow under memory
1092 # tools like ThreadSanitizer so we want it to be disablable.
1093 # See http://msdn.microsoft.com/en-us/library/aa985982(v=VS.80).aspx
1094 'win_debug_disable_iterator_debugging%': '0',
[email protected]7e0d664a2009-12-03 21:07:471095
[email protected]ffd984b12009-09-11 19:37:001096 'release_extra_cflags%': '',
1097 'debug_extra_cflags%': '',
[email protected]8d726a42012-02-09 03:49:001098
1099 'release_valgrind_build%': '<(release_valgrind_build)',
[email protected]8974e042010-06-21 18:06:521100
[email protected]ef5c5f1b2011-12-17 02:16:241101 # the non-qualified versions are widely assumed to be *nix-only
1102 'win_release_extra_cflags%': '',
1103 'win_debug_extra_cflags%': '',
1104
[email protected]b1eb341c2011-11-09 18:46:071105 # TODO(thakis): Make this a blacklist instead, http://crbug.com/101600
1106 'enable_wexit_time_destructors%': '<(enable_wexit_time_destructors)',
1107
[email protected]ef3326702011-10-06 18:06:441108 # Only used by Windows build for now. Can be used to build into a
1109 # differet output directory, e.g., a build_dir_prefix of VS2010_ would
1110 # output files in src/build/VS2010_{Debug,Release}.
1111 'build_dir_prefix%': '',
1112
[email protected]8974e042010-06-21 18:06:521113 'conditions': [
1114 ['OS=="win" and component=="shared_library"', {
1115 # See http://msdn.microsoft.com/en-us/library/aa652367.aspx
[email protected]49e8e022012-03-16 15:22:161116 'win_release_RuntimeLibrary%': '2', # 2 = /MD (nondebug DLL)
1117 'win_debug_RuntimeLibrary%': '3', # 3 = /MDd (debug DLL)
[email protected]8974e042010-06-21 18:06:521118 }, {
1119 # See http://msdn.microsoft.com/en-us/library/aa652367.aspx
1120 'win_release_RuntimeLibrary%': '0', # 0 = /MT (nondebug static)
1121 'win_debug_RuntimeLibrary%': '1', # 1 = /MTd (debug static)
1122 }],
1123 ],
[email protected]1c966092009-08-20 21:19:261124 },
[email protected]32aa8cc2009-03-04 21:36:391125 'conditions': [
[email protected]ff10b132012-02-29 22:53:301126 ['OS=="win" and "<(msbuild_toolset)"!=""', {
1127 'msbuild_toolset': '<(msbuild_toolset)',
1128 }],
[email protected]32aa8cc2009-03-04 21:36:391129 ['branding=="Chrome"', {
1130 'defines': ['GOOGLE_CHROME_BUILD'],
1131 }, { # else: branding!="Chrome"
1132 'defines': ['CHROMIUM_BUILD'],
1133 }],
[email protected]63e39a282011-07-13 20:41:281134 ['component=="shared_library"', {
1135 'defines': ['COMPONENT_BUILD'],
1136 }],
[email protected]5cba9ff72011-11-16 21:55:181137 ['component=="shared_library" and incremental_chrome_dll==1', {
1138 # TODO(dpranke): We can't incrementally link chrome when
1139 # content is being built as a DLL because chrome links in
1140 # webkit_glue and webkit_glue depends on symbols defined in
1141 # content. We can remove this when we fix glue.
1142 # See http://code.google.com/p/chromium/issues/detail?id=98755 .
1143 'defines': ['COMPILE_CONTENT_STATICALLY'],
1144 }],
[email protected]06c756182010-04-27 18:31:311145 ['toolkit_views==1', {
[email protected]e6970232009-05-12 23:51:171146 'defines': ['TOOLKIT_VIEWS=1'],
1147 }],
[email protected]1ee7c56c2011-10-19 14:51:331148 ['ui_compositor_image_transport==1', {
[email protected]839d5172011-10-13 17:18:111149 'defines': ['UI_COMPOSITOR_IMAGE_TRANSPORT'],
1150 }],
[email protected]41423092011-08-25 15:39:581151 ['use_aura==1', {
1152 'defines': ['USE_AURA=1'],
[email protected]e599f0132011-08-24 19:03:351153 }],
[email protected]ed329be2012-01-03 22:02:161154 ['use_ash==1', {
1155 'defines': ['USE_ASH=1'],
1156 }],
[email protected]c329adf82011-10-05 14:34:571157 ['use_nss==1', {
1158 'defines': ['USE_NSS=1'],
1159 }],
[email protected]bd7b6fe2012-03-05 21:02:401160 ['enable_one_click_signin==1', {
1161 'defines': ['ENABLE_ONE_CLICK_SIGNIN'],
1162 }],
[email protected]9d43e372011-09-22 19:39:521163 ['toolkit_uses_gtk==1', {
1164 'defines': ['TOOLKIT_USES_GTK=1'],
1165 }],
[email protected]a47aa892011-11-22 03:12:311166 ['toolkit_uses_gtk==1 and toolkit_views==0', {
1167 # TODO(erg): We are progressively sealing up use of deprecated features
1168 # in gtk in preparation for an eventual porting to gtk3.
1169 'defines': ['GTK_DISABLE_SINGLE_INCLUDES=1'],
1170 }],
[email protected]fdc5bed2010-01-09 01:16:571171 ['chromeos==1', {
[email protected]16779842009-07-08 23:45:291172 'defines': ['OS_CHROMEOS=1'],
[email protected]2b883b92009-06-02 22:57:501173 }],
[email protected]2cc81d32011-10-04 17:03:181174 ['use_virtual_keyboard==1', {
1175 'defines': ['USE_VIRTUAL_KEYBOARD=1'],
1176 }],
[email protected]f56797b2011-09-25 00:04:351177 ['use_xi2_mt!=0', {
1178 'defines': ['USE_XI2_MT=<(use_xi2_mt)'],
1179 }],
[email protected]236754a2011-07-28 17:38:231180 ['use_wayland==1', {
1181 'defines': ['USE_WAYLAND=1', 'WL_EGL_PLATFORM=1'],
1182 }],
[email protected]e47c32032011-03-01 19:26:201183 ['file_manager_extension==1', {
1184 'defines': ['FILE_MANAGER_EXTENSION=1'],
1185 }],
[email protected]8b2e9f392011-08-05 04:00:471186 ['webui_task_manager==1', {
1187 'defines': ['WEBUI_TASK_MANAGER=1'],
1188 }],
[email protected]7664ab32011-02-01 23:35:251189 ['profiling==1', {
1190 'defines': ['ENABLE_PROFILING=1'],
1191 }],
[email protected]93b373502011-08-16 19:06:221192 ['OS=="linux" and glibcxx_debug==1', {
1193 'defines': ['_GLIBCXX_DEBUG=1',],
1194 'cflags_cc!': ['-fno-rtti'],
1195 'cflags_cc+': ['-frtti', '-g'],
1196 }],
[email protected]542bf24a2010-06-11 23:08:171197 ['remoting==1', {
1198 'defines': ['ENABLE_REMOTING=1'],
[email protected]c0bac532010-06-11 00:39:001199 }],
[email protected]5b87e782012-02-09 18:19:321200 ['enable_webrtc==1', {
1201 'defines': ['ENABLE_WEBRTC=1'],
1202 }],
[email protected]a026daa2011-04-20 15:49:511203 ['p2p_apis==1', {
1204 'defines': ['ENABLE_P2P_APIS=1'],
1205 }],
[email protected]d01120e62010-05-10 17:04:481206 ['proprietary_codecs==1', {
1207 'defines': ['USE_PROPRIETARY_CODECS'],
1208 }],
[email protected]1b4209f2011-01-07 00:25:401209 ['enable_flapper_hacks==1', {
1210 'defines': ['ENABLE_FLAPPER_HACKS=1'],
1211 }],
[email protected]67c125d2011-10-11 18:58:221212 ['enable_pepper_threading==1', {
1213 'defines': ['ENABLE_PEPPER_THREADING'],
1214 }],
[email protected]7ddea9802012-02-22 23:08:051215 ['enable_viewport==1', {
1216 'defines': ['ENABLE_VIEWPORT'],
1217 }],
[email protected]f31e2e52011-07-14 16:01:191218 ['configuration_policy==1', {
1219 'defines': ['ENABLE_CONFIGURATION_POLICY'],
1220 }],
[email protected]9eb100e2011-10-14 05:08:221221 ['input_speech==1', {
1222 'defines': ['ENABLE_INPUT_SPEECH'],
1223 }],
[email protected]7cce3232011-10-28 10:41:571224 ['notifications==1', {
1225 'defines': ['ENABLE_NOTIFICATIONS'],
1226 }],
[email protected]9c1949e2009-10-02 19:59:541227 ['fastbuild!=0', {
[email protected]5834f4392011-09-13 20:06:171228
[email protected]9c1949e2009-10-02 19:59:541229 'conditions': [
[email protected]da4d4ea2011-09-22 20:23:141230 # For Windows and Mac, we don't genererate debug information.
1231 ['OS=="win" or OS=="mac"', {
[email protected]9c1949e2009-10-02 19:59:541232 'msvs_settings': {
1233 'VCLinkerTool': {
1234 'GenerateDebugInformation': 'false',
1235 },
1236 'VCCLCompilerTool': {
1237 'DebugInformationFormat': '0',
1238 }
[email protected]da4d4ea2011-09-22 20:23:141239 },
1240 'xcode_settings': {
1241 'GCC_GENERATE_DEBUGGING_SYMBOLS': 'NO',
1242 },
[email protected]1cc2fa72010-07-03 08:49:241243 }, { # else: OS != "win", generate less debug information.
1244 'variables': {
1245 'debug_extra_cflags': '-g1',
1246 },
[email protected]37c84192010-04-14 21:37:401247 }],
[email protected]aecc4d12011-01-19 05:32:331248 # Clang creates chubby debug information, which makes linking very
1249 # slow. For now, don't create debug information with clang. See
1250 # http://crbug.com/70000
1251 ['OS=="linux" and clang==1', {
1252 'variables': {
1253 'debug_extra_cflags': '-g0',
1254 },
1255 }],
[email protected]9c1949e2009-10-02 19:59:541256 ], # conditions for fastbuild.
1257 }], # fastbuild!=0
[email protected]20960e072011-09-20 20:59:011258 ['dcheck_always_on!=0', {
1259 'defines': ['DCHECK_ALWAYS_ON=1'],
1260 }], # dcheck_always_on!=0
[email protected]ad6d2c42009-09-15 20:13:381261 ['selinux==1', {
1262 'defines': ['CHROMIUM_SELINUX=1'],
1263 }],
[email protected]7e0d664a2009-12-03 21:07:471264 ['win_use_allocator_shim==0', {
1265 'conditions': [
1266 ['OS=="win"', {
1267 'defines': ['NO_TCMALLOC'],
1268 }],
1269 ],
1270 }],
[email protected]43f28f832010-02-03 02:28:481271 ['enable_gpu==1', {
[email protected]7477ea6f2009-12-22 23:28:151272 'defines': [
1273 'ENABLE_GPU=1',
1274 ],
1275 }],
[email protected]b1c2a5542010-10-08 12:44:401276 ['use_openssl==1', {
1277 'defines': [
1278 'USE_OPENSSL=1',
1279 ],
1280 }],
[email protected]ed154592010-04-29 00:18:501281 ['enable_eglimage==1', {
1282 'defines': [
1283 'ENABLE_EGLIMAGE=1',
1284 ],
1285 }],
[email protected]7d7564a12011-06-21 19:20:221286 ['use_skia==1', {
1287 'defines': [
1288 'USE_SKIA=1',
1289 ],
1290 }],
[email protected]f5ecbba12009-04-03 04:35:181291 ['coverage!=0', {
1292 'conditions': [
1293 ['OS=="mac"', {
1294 'xcode_settings': {
[email protected]ab2956372009-08-13 18:11:041295 'GCC_INSTRUMENT_PROGRAM_FLOW_ARCS': 'YES', # -fprofile-arcs
1296 'GCC_GENERATE_TEST_COVERAGE_FILES': 'YES', # -ftest-coverage
[email protected]5ae4f55e2009-04-13 23:19:471297 },
[email protected]e4fb84c2009-12-28 20:45:431298 # Add -lgcov for types executable, shared_library, and
[email protected]dc259ce52010-04-13 04:03:101299 # loadable_module; not for static_library.
[email protected]e4fb84c2009-12-28 20:45:431300 # This is a delayed conditional.
[email protected]f5ecbba12009-04-03 04:35:181301 'target_conditions': [
[email protected]e4fb84c2009-12-28 20:45:431302 ['_type!="static_library"', {
[email protected]f5ecbba12009-04-03 04:35:181303 'xcode_settings': { 'OTHER_LDFLAGS': [ '-lgcov' ] },
[email protected]5ae4f55e2009-04-13 23:19:471304 }],
1305 ],
1306 }],
[email protected]da1c8d692011-09-20 20:35:011307 ['OS=="linux" or OS=="android"', {
[email protected]f5ecbba12009-04-03 04:35:181308 'cflags': [ '-ftest-coverage',
1309 '-fprofile-arcs' ],
[email protected]7122ffd52009-04-30 23:19:001310 'link_settings': { 'libraries': [ '-lgcov' ] },
[email protected]f5ecbba12009-04-03 04:35:181311 }],
[email protected]e8f6ff42009-07-07 18:20:531312 # Finally, for Windows, we simply turn on profiling.
1313 ['OS=="win"', {
1314 'msvs_settings': {
1315 'VCLinkerTool': {
1316 'Profile': 'true',
1317 },
[email protected]10bb8c92009-08-07 21:16:031318 'VCCLCompilerTool': {
[email protected]e8f6ff42009-07-07 18:20:531319 # /Z7, not /Zi, so coverage is happyb
1320 'DebugInformationFormat': '1',
[email protected]1f9471a2010-01-04 06:40:161321 'AdditionalOptions': ['/Yd'],
[email protected]e8f6ff42009-07-07 18:20:531322 }
1323 }
1324 }], # OS==win
1325 ], # conditions for coverage
1326 }], # coverage!=0
[email protected]4e4d6042010-08-26 18:34:381327 ['OS=="win"', {
1328 'defines': [
1329 '__STD_C',
1330 '_CRT_SECURE_NO_DEPRECATE',
1331 '_SCL_SECURE_NO_DEPRECATE',
1332 ],
1333 'include_dirs': [
1334 '<(DEPTH)/third_party/wtl/include',
1335 ],
1336 }], # OS==win
[email protected]365dd5b92011-05-26 01:30:561337 ['enable_register_protocol_handler==1', {
1338 'defines': [
[email protected]06bba4fb2011-06-09 05:17:191339 'ENABLE_REGISTER_PROTOCOL_HANDLER=1',
[email protected]365dd5b92011-05-26 01:30:561340 ],
1341 }],
[email protected]41ed4e82011-08-25 23:02:071342 ['enable_web_intents==1', {
1343 'defines': [
[email protected]1f2d9ed2011-10-04 20:18:471344 'ENABLE_WEB_INTENTS=1',
[email protected]41ed4e82011-08-25 23:02:071345 ],
1346 }],
[email protected]13eb97d2012-01-05 01:07:121347 ['OS=="win" and branding=="Chrome"', {
1348 'defines': ['ENABLE_SWIFTSHADER'],
1349 }],
[email protected]407dfa632011-12-23 11:59:351350 ['enable_dart==1', {
1351 'defines': ['WEBKIT_USING_DART=1'],
1352 }],
[email protected]18e0f39b2012-01-17 16:47:341353 ['enable_plugin_installation==1', {
1354 'defines': ['ENABLE_PLUGIN_INSTALLATION=1'],
1355 }],
[email protected]6b40bb582012-03-15 20:50:381356 ['enable_themes==1', {
1357 'defines': ['ENABLE_THEMES=1'],
1358 }],
[email protected]2e22e2f2012-03-15 21:53:101359 ['enable_automation==1', {
1360 'defines': ['ENABLE_AUTOMATION=1'],
1361 }],
[email protected]a6e22132010-02-10 20:43:181362 ], # conditions for 'target_defaults'
1363 'target_conditions': [
[email protected]b1eb341c2011-11-09 18:46:071364 ['enable_wexit_time_destructors==1', {
1365 'conditions': [
1366 [ 'clang==1', {
1367 'cflags': [
1368 '-Wexit-time-destructors',
1369 ],
1370 'xcode_settings': {
1371 'WARNING_CFLAGS': [
1372 '-Wexit-time-destructors',
1373 ],
1374 },
1375 }],
1376 ],
1377 }],
[email protected]c14d8e772010-02-09 22:06:151378 ['chromium_code==0', {
[email protected]d8543312010-02-10 17:43:281379 'conditions': [
[email protected]79e2336c2011-05-12 18:18:341380 [ 'os_posix==1 and OS!="mac"', {
[email protected]c0a6b272011-02-09 22:32:331381 # We don't want to get warnings from third-party code,
1382 # so remove any existing warning-enabling flags like -Wall.
[email protected]d8543312010-02-10 17:43:281383 'cflags!': [
1384 '-Wall',
1385 '-Wextra',
1386 '-Werror',
1387 ],
[email protected]167ec822011-10-24 22:05:271388 'cflags_cc': [
[email protected]ec1d155be2011-02-08 22:19:001389 # Don't warn about hash_map in third-party code.
1390 '-Wno-deprecated',
[email protected]167ec822011-10-24 22:05:271391 ],
1392 'cflags': [
[email protected]c0a6b272011-02-09 22:32:331393 # Don't warn about printf format problems.
1394 # This is off by default in gcc but on in Ubuntu's gcc(!).
[email protected]ec392872011-02-10 22:38:221395 '-Wno-format',
[email protected]ec1d155be2011-02-08 22:19:001396 ],
[email protected]d16bd642011-07-25 23:59:181397 'cflags_cc!': [
1398 # TODO(fischman): remove this.
1399 # http://code.google.com/p/chromium/issues/detail?id=90453
1400 '-Wsign-compare',
1401 ]
[email protected]d8543312010-02-10 17:43:281402 }],
[email protected]bc073c062012-01-13 06:28:031403 [ 'os_posix==1 and os_bsd!=1 and OS!="mac" and OS!="android"', {
[email protected]6e4451892011-07-27 10:32:111404 'cflags': [
1405 # Don't warn about ignoring the return value from e.g. close().
1406 # This is off by default in some gccs but on by default in others.
[email protected]bc073c062012-01-13 06:28:031407 # BSD systems do not support this option, since they are usually
1408 # using gcc 4.2.1, which does not have this flag yet.
[email protected]6e4451892011-07-27 10:32:111409 '-Wno-unused-result',
1410 ],
1411 }],
[email protected]d8543312010-02-10 17:43:281412 [ 'OS=="win"', {
1413 'defines': [
1414 '_CRT_SECURE_NO_DEPRECATE',
1415 '_CRT_NONSTDC_NO_WARNINGS',
1416 '_CRT_NONSTDC_NO_DEPRECATE',
1417 '_SCL_SECURE_NO_DEPRECATE',
1418 ],
1419 'msvs_disabled_warnings': [4800],
1420 'msvs_settings': {
1421 'VCCLCompilerTool': {
[email protected]942c3a60f2011-05-03 02:04:111422 'WarningLevel': '3',
1423 'WarnAsError': 'false', # TODO(maruel): Enable it.
[email protected]d8543312010-02-10 17:43:281424 'Detect64BitPortabilityProblems': 'false',
1425 },
1426 },
1427 }],
[email protected]ea47b6a2011-07-17 19:39:421428 # TODO(darin): Unfortunately, some third_party code depends on base/
1429 [ 'OS=="win" and component=="shared_library"', {
1430 'msvs_disabled_warnings': [
1431 4251, # class 'std::xx' needs to have dll-interface.
1432 ],
1433 }],
[email protected]d8543312010-02-10 17:43:281434 [ 'OS=="mac"', {
1435 'xcode_settings': {
1436 'GCC_TREAT_WARNINGS_AS_ERRORS': 'NO',
[email protected]4c4c2e5332010-06-15 11:51:061437 'WARNING_CFLAGS!': ['-Wall', '-Wextra'],
[email protected]d8543312010-02-10 17:43:281438 },
1439 }],
[email protected]c14d8e772010-02-09 22:06:151440 ],
1441 }, {
[email protected]a5c598152012-01-27 04:55:131442 'includes': [
1443 # Rules for excluding e.g. foo_win.cc from the build on non-Windows.
1444 'filename_rules.gypi',
1445 ],
[email protected]c14d8e772010-02-09 22:06:151446 # In Chromium code, we define __STDC_FORMAT_MACROS in order to get the
1447 # C99 macros on Mac and Linux.
1448 'defines': [
1449 '__STDC_FORMAT_MACROS',
1450 ],
1451 'conditions': [
[email protected]c14d8e772010-02-09 22:06:151452 ['OS=="win"', {
[email protected]f55bd4862010-05-27 15:38:071453 # turn on warnings for signed/unsigned mismatch on chromium code.
1454 'msvs_settings': {
1455 'VCCLCompilerTool': {
1456 'AdditionalOptions': ['/we4389'],
1457 },
1458 },
[email protected]c14d8e772010-02-09 22:06:151459 }],
[email protected]63e39a282011-07-13 20:41:281460 ['OS=="win" and component=="shared_library"', {
1461 'msvs_disabled_warnings': [
1462 4251, # class 'std::xx' needs to have dll-interface.
1463 ],
1464 }],
[email protected]c14d8e772010-02-09 22:06:151465 ],
1466 }],
[email protected]a6e22132010-02-10 20:43:181467 ], # target_conditions for 'target_defaults'
[email protected]2f80c312009-02-25 21:26:551468 'default_configuration': 'Debug',
1469 'configurations': {
[email protected]5153767c2009-12-22 01:52:501470 # VCLinkerTool LinkIncremental values below:
1471 # 0 == default
1472 # 1 == /INCREMENTAL:NO
1473 # 2 == /INCREMENTAL
1474 # Debug links incremental, Release does not.
1475 #
[email protected]7b99801e2010-11-03 17:26:231476 # Abstract base configurations to cover common attributes.
[email protected]5153767c2009-12-22 01:52:501477 #
1478 'Common_Base': {
[email protected]bb05e452009-10-29 21:24:561479 'abstract': 1,
1480 'msvs_configuration_attributes': {
[email protected]534303c2011-09-28 00:02:511481 'OutputDirectory': '<(DEPTH)\\build\\<(build_dir_prefix)$(ConfigurationName)',
[email protected]bb05e452009-10-29 21:24:561482 'IntermediateDirectory': '$(OutDir)\\obj\\$(ProjectName)',
1483 'CharacterSet': '1',
1484 },
[email protected]5153767c2009-12-22 01:52:501485 },
1486 'x86_Base': {
1487 'abstract': 1,
[email protected]ef4fa4072009-12-04 22:46:501488 'msvs_settings': {
1489 'VCLinkerTool': {
1490 'TargetMachine': '1',
1491 },
1492 },
[email protected]2fa40782009-11-01 21:17:341493 'msvs_configuration_platform': 'Win32',
[email protected]bb05e452009-10-29 21:24:561494 },
[email protected]5153767c2009-12-22 01:52:501495 'x64_Base': {
1496 'abstract': 1,
1497 'msvs_configuration_platform': 'x64',
1498 'msvs_settings': {
1499 'VCLinkerTool': {
1500 'TargetMachine': '17', # x86 - 64
[email protected]5153767c2009-12-22 01:52:501501 'AdditionalLibraryDirectories!':
1502 ['<(DEPTH)/third_party/platformsdk_win7/files/Lib'],
1503 'AdditionalLibraryDirectories':
1504 ['<(DEPTH)/third_party/platformsdk_win7/files/Lib/x64'],
1505 },
[email protected]d26b4418ab2010-03-24 22:06:351506 'VCLibrarianTool': {
[email protected]5153767c2009-12-22 01:52:501507 'AdditionalLibraryDirectories!':
1508 ['<(DEPTH)/third_party/platformsdk_win7/files/Lib'],
1509 'AdditionalLibraryDirectories':
1510 ['<(DEPTH)/third_party/platformsdk_win7/files/Lib/x64'],
1511 },
1512 },
1513 'defines': [
1514 # Not sure if tcmalloc works on 64-bit Windows.
1515 'NO_TCMALLOC',
1516 ],
1517 },
1518 'Debug_Base': {
1519 'abstract': 1,
[email protected]14339762011-04-05 07:36:581520 'defines': [
1521 'DYNAMIC_ANNOTATIONS_ENABLED=1',
1522 'WTF_USE_DYNAMIC_ANNOTATIONS=1',
1523 ],
[email protected]1c966092009-08-20 21:19:261524 'xcode_settings': {
1525 'COPY_PHASE_STRIP': 'NO',
[email protected]d5d593a2009-08-28 23:23:291526 'GCC_OPTIMIZATION_LEVEL': '<(mac_debug_optimization)',
[email protected]a68c29a2011-07-01 16:23:491527 'OTHER_CFLAGS': [
[email protected]a68c29a2011-07-01 16:23:491528 '<@(debug_extra_cflags)',
1529 ],
[email protected]1c966092009-08-20 21:19:261530 },
[email protected]bb05e452009-10-29 21:24:561531 'msvs_settings': {
1532 'VCCLCompilerTool': {
[email protected]7e0d664a2009-12-03 21:07:471533 'Optimization': '<(win_debug_Optimization)',
[email protected]bb05e452009-10-29 21:24:561534 'PreprocessorDefinitions': ['_DEBUG'],
[email protected]6b0507b2010-05-07 07:41:211535 'BasicRuntimeChecks': '<(win_debug_RuntimeChecks)',
[email protected]7e0d664a2009-12-03 21:07:471536 'RuntimeLibrary': '<(win_debug_RuntimeLibrary)',
[email protected]2ae6e022010-05-07 13:19:151537 'conditions': [
1538 # According to MSVS, InlineFunctionExpansion=0 means
1539 # "default inlining", not "/Ob0".
1540 # Thus, we have to handle InlineFunctionExpansion==0 separately.
1541 ['win_debug_InlineFunctionExpansion==0', {
1542 'AdditionalOptions': ['/Ob0'],
1543 }],
1544 ['win_debug_InlineFunctionExpansion!=""', {
1545 'InlineFunctionExpansion':
1546 '<(win_debug_InlineFunctionExpansion)',
1547 }],
[email protected]fac10d12010-11-08 16:00:311548 ['win_debug_disable_iterator_debugging==1', {
1549 'PreprocessorDefinitions': ['_HAS_ITERATOR_DEBUGGING=0'],
1550 }],
[email protected]ef5c5f1b2011-12-17 02:16:241551
1552 # if win_debug_OmitFramePointers is blank, leave as default
1553 ['win_debug_OmitFramePointers==1', {
1554 'OmitFramePointers': 'true',
1555 }],
1556 ['win_debug_OmitFramePointers==0', {
1557 'OmitFramePointers': 'false',
1558 # The above is not sufficient (http://crbug.com/106711): it
1559 # simply eliminates an explicit "/Oy", but both /O2 and /Ox
1560 # perform FPO regardless, so we must explicitly disable.
1561 # We still want the false setting above to avoid having
1562 # "/Oy /Oy-" and warnings about overriding.
1563 'AdditionalOptions': ['/Oy-'],
1564 }],
[email protected]2ae6e022010-05-07 13:19:151565 ],
[email protected]ef5c5f1b2011-12-17 02:16:241566 'AdditionalOptions': [ '<@(win_debug_extra_cflags)', ],
[email protected]bb05e452009-10-29 21:24:561567 },
1568 'VCLinkerTool': {
1569 'LinkIncremental': '<(msvs_debug_link_incremental)',
[email protected]7cf23ce62012-01-13 02:43:331570 # ASLR makes debugging with windbg difficult because Chrome.exe and
1571 # Chrome.dll share the same base name. As result, windbg will
1572 # name the Chrome.dll module like chrome_<base address>, where
1573 # <base address> typically changes with each launch. This in turn
1574 # means that breakpoints in Chrome.dll don't stick from one launch
1575 # to the next. For this reason, we turn ASLR off in debug builds.
1576 # Note that this is a three-way bool, where 0 means to pick up
1577 # the default setting, 1 is off and 2 is on.
1578 'RandomizedBaseAddress': 1,
[email protected]bb05e452009-10-29 21:24:561579 },
1580 'VCResourceCompilerTool': {
1581 'PreprocessorDefinitions': ['_DEBUG'],
1582 },
1583 },
[email protected]2f80c312009-02-25 21:26:551584 'conditions': [
[email protected]bb05e452009-10-29 21:24:561585 ['OS=="linux"', {
1586 'cflags': [
1587 '<@(debug_extra_cflags)',
1588 ],
[email protected]2f80c312009-02-25 21:26:551589 }],
[email protected]56cca4e2011-07-01 21:33:351590 ['release_valgrind_build==0', {
1591 'xcode_settings': {
1592 'OTHER_CFLAGS': [
1593 '-fstack-protector-all', # Implies -fstack-protector
1594 ],
1595 },
1596 }],
[email protected]2f80c312009-02-25 21:26:551597 ],
1598 },
[email protected]5153767c2009-12-22 01:52:501599 'Release_Base': {
1600 'abstract': 1,
[email protected]2f80c312009-02-25 21:26:551601 'defines': [
1602 'NDEBUG',
1603 ],
[email protected]1c966092009-08-20 21:19:261604 'xcode_settings': {
1605 'DEAD_CODE_STRIPPING': 'YES', # -Wl,-dead_strip
1606 'GCC_OPTIMIZATION_LEVEL': '<(mac_release_optimization)',
[email protected]ffd984b12009-09-11 19:37:001607 'OTHER_CFLAGS': [ '<@(release_extra_cflags)', ],
[email protected]1c966092009-08-20 21:19:261608 },
[email protected]bb05e452009-10-29 21:24:561609 'msvs_settings': {
[email protected]7e0d664a2009-12-03 21:07:471610 'VCCLCompilerTool': {
[email protected]7e0d664a2009-12-03 21:07:471611 'RuntimeLibrary': '<(win_release_RuntimeLibrary)',
[email protected]2ae6e022010-05-07 13:19:151612 'conditions': [
[email protected]2212d272011-12-20 21:37:371613 # In official builds, each target will self-select
1614 # an optimization level.
1615 ['buildtype!="Official"', {
1616 'Optimization': '<(win_release_Optimization)',
1617 },
1618 ],
[email protected]2ae6e022010-05-07 13:19:151619 # According to MSVS, InlineFunctionExpansion=0 means
1620 # "default inlining", not "/Ob0".
1621 # Thus, we have to handle InlineFunctionExpansion==0 separately.
1622 ['win_release_InlineFunctionExpansion==0', {
1623 'AdditionalOptions': ['/Ob0'],
1624 }],
1625 ['win_release_InlineFunctionExpansion!=""', {
1626 'InlineFunctionExpansion':
1627 '<(win_release_InlineFunctionExpansion)',
1628 }],
[email protected]626d2d22011-10-11 15:47:331629
[email protected]ef5c5f1b2011-12-17 02:16:241630 # if win_release_OmitFramePointers is blank, leave as default
[email protected]626d2d22011-10-11 15:47:331631 ['win_release_OmitFramePointers==1', {
1632 'OmitFramePointers': 'true',
1633 }],
1634 ['win_release_OmitFramePointers==0', {
1635 'OmitFramePointers': 'false',
[email protected]ef5c5f1b2011-12-17 02:16:241636 # The above is not sufficient (http://crbug.com/106711): it
1637 # simply eliminates an explicit "/Oy", but both /O2 and /Ox
1638 # perform FPO regardless, so we must explicitly disable.
1639 # We still want the false setting above to avoid having
1640 # "/Oy /Oy-" and warnings about overriding.
1641 'AdditionalOptions': ['/Oy-'],
[email protected]626d2d22011-10-11 15:47:331642 }],
[email protected]2ae6e022010-05-07 13:19:151643 ],
[email protected]ef5c5f1b2011-12-17 02:16:241644 'AdditionalOptions': [ '<@(win_release_extra_cflags)', ],
[email protected]7e0d664a2009-12-03 21:07:471645 },
[email protected]bb05e452009-10-29 21:24:561646 'VCLinkerTool': {
[email protected]c059c612011-08-08 20:56:341647 # LinkIncremental is a tri-state boolean, where 0 means default
1648 # (i.e., inherit from parent solution), 1 means false, and
1649 # 2 means true.
[email protected]bb05e452009-10-29 21:24:561650 'LinkIncremental': '1',
[email protected]c059c612011-08-08 20:56:341651 # This corresponds to the /PROFILE flag which ensures the PDB
1652 # file contains FIXUP information (growing the PDB file by about
1653 # 5%) but does not otherwise alter the output binary. This
1654 # information is used by the Syzygy optimization tool when
1655 # decomposing the release image.
1656 'Profile': 'true',
[email protected]bb05e452009-10-29 21:24:561657 },
1658 },
[email protected]2f80c312009-02-25 21:26:551659 'conditions': [
[email protected]92822e82009-09-18 14:26:561660 ['release_valgrind_build==0', {
[email protected]14339762011-04-05 07:36:581661 'defines': [
1662 'NVALGRIND',
1663 'DYNAMIC_ANNOTATIONS_ENABLED=0',
1664 ],
[email protected]ee857512010-05-14 08:24:421665 }, {
[email protected]14339762011-04-05 07:36:581666 'defines': [
1667 'DYNAMIC_ANNOTATIONS_ENABLED=1',
1668 'WTF_USE_DYNAMIC_ANNOTATIONS=1',
1669 ],
[email protected]92822e82009-09-18 14:26:561670 }],
[email protected]7e0d664a2009-12-03 21:07:471671 ['win_use_allocator_shim==0', {
1672 'defines': ['NO_TCMALLOC'],
1673 }],
[email protected]bb05e452009-10-29 21:24:561674 ['OS=="linux"', {
1675 'cflags': [
[email protected]ffd984b12009-09-11 19:37:001676 '<@(release_extra_cflags)',
[email protected]bb05e452009-10-29 21:24:561677 ],
1678 }],
[email protected]2f80c312009-02-25 21:26:551679 ],
1680 },
[email protected]5153767c2009-12-22 01:52:501681 #
1682 # Concrete configurations
1683 #
1684 'Debug': {
1685 'inherit_from': ['Common_Base', 'x86_Base', 'Debug_Base'],
1686 },
1687 'Release': {
1688 'inherit_from': ['Common_Base', 'x86_Base', 'Release_Base'],
1689 'conditions': [
1690 ['msvs_use_common_release', {
[email protected]1f9471a2010-01-04 06:40:161691 'includes': ['release.gypi'],
[email protected]5153767c2009-12-22 01:52:501692 }],
1693 ]
1694 },
[email protected]f926fa0a2009-08-04 22:50:131695 'conditions': [
1696 [ 'OS=="win"', {
1697 # TODO(bradnelson): add a gyp mechanism to make this more graceful.
[email protected]ef4fa4072009-12-04 22:46:501698 'Debug_x64': {
[email protected]5153767c2009-12-22 01:52:501699 'inherit_from': ['Common_Base', 'x64_Base', 'Debug_Base'],
[email protected]78263c12009-11-01 23:45:301700 },
1701 'Release_x64': {
[email protected]5153767c2009-12-22 01:52:501702 'inherit_from': ['Common_Base', 'x64_Base', 'Release_Base'],
[email protected]78263c12009-11-01 23:45:301703 },
[email protected]f926fa0a2009-08-04 22:50:131704 }],
1705 ],
[email protected]2f80c312009-02-25 21:26:551706 },
1707 },
1708 'conditions': [
[email protected]79e2336c2011-05-12 18:18:341709 ['os_posix==1 and OS!="mac"', {
[email protected]9d384032009-03-20 23:13:261710 'target_defaults': {
[email protected]5315f2842009-04-28 00:43:271711 # Enable -Werror by default, but put it in a variable so it can
1712 # be disabled in ~/.gyp/include.gypi on the valgrind builders.
1713 'variables': {
[email protected]cbbb3472012-01-25 18:32:311714 'werror%': '-Werror',
[email protected]5315f2842009-04-28 00:43:271715 },
[email protected]6863896f2012-01-25 17:51:361716 'defines': [
1717 '_FILE_OFFSET_BITS=64',
1718 ],
[email protected]9d384032009-03-20 23:13:261719 'cflags': [
[email protected]1bba09c2009-08-13 12:53:161720 '<(werror)', # See note above about the werror variable.
1721 '-pthread',
1722 '-fno-exceptions',
[email protected]ef8c3cf2012-01-24 04:37:291723 '-fno-strict-aliasing', # See http://crbug.com/32204
[email protected]1bba09c2009-08-13 12:53:161724 '-Wall',
[email protected]0fa17082010-03-26 00:48:051725 # TODO(evan): turn this back on once all the builds work.
1726 # '-Wextra',
[email protected]225c8f52010-02-05 22:23:201727 # Don't warn about unused function params. We use those everywhere.
1728 '-Wno-unused-parameter',
1729 # Don't warn about the "struct foo f = {0};" initialization pattern.
1730 '-Wno-missing-field-initializers',
[email protected]3df6e3a2010-01-21 20:23:121731 # Don't export any symbols (for example, to plugins we dlopen()).
1732 # Note: this is *required* to make some plugins work.
1733 '-fvisibility=hidden',
[email protected]7ca6ce12010-09-15 23:39:351734 '-pipe',
[email protected]8a2fcba2009-07-29 00:52:241735 ],
1736 'cflags_cc': [
[email protected]832d0212009-10-28 19:12:221737 '-fno-rtti',
[email protected]8a2fcba2009-07-29 00:52:241738 '-fno-threadsafe-statics',
[email protected]f5986c42009-11-17 18:39:361739 # Make inline functions have hidden visiblity by default.
1740 # Surprisingly, not covered by -fvisibility=hidden.
1741 '-fvisibility-inlines-hidden',
[email protected]554abd902011-07-25 04:03:171742 # GCC turns on -Wsign-compare for C++ under -Wall, but clang doesn't,
1743 # so we specify it explicitly.
1744 # TODO(fischman): remove this if http://llvm.org/PR10448 obsoletes it.
[email protected]d16bd642011-07-25 23:59:181745 # http://code.google.com/p/chromium/issues/detail?id=90453
[email protected]554abd902011-07-25 04:03:171746 '-Wsign-compare',
[email protected]9d384032009-03-20 23:13:261747 ],
[email protected]a6cf87e2009-04-03 04:07:381748 'ldflags': [
[email protected]138241f2010-03-30 23:53:101749 '-pthread', '-Wl,-z,noexecstack',
[email protected]9d384032009-03-20 23:13:261750 ],
[email protected]3aacaf952009-04-02 15:34:091751 'configurations': {
[email protected]5153767c2009-12-22 01:52:501752 'Debug_Base': {
[email protected]c5bdc032009-04-20 19:11:311753 'variables': {
1754 'debug_optimize%': '0',
1755 },
[email protected]3aacaf952009-04-02 15:34:091756 'defines': [
1757 '_DEBUG',
1758 ],
1759 'cflags': [
[email protected]9cb5cc702011-02-01 19:56:041760 '-O>(debug_optimize)',
[email protected]3aacaf952009-04-02 15:34:091761 '-g',
1762 ],
[email protected]da1c8d692011-09-20 20:35:011763 'conditions' : [
1764 ['OS=="android"', {
1765 'cflags': [
1766 '-fno-omit-frame-pointer',
1767 ],
1768 }],
1769 ],
1770 'target_conditions' : [
1771 ['_toolset=="target"', {
1772 'conditions': [
1773 ['OS=="android" and debug_optimize==0', {
1774 'cflags': [
1775 '-mlong-calls', # Needed when compiling with -O0
1776 ],
1777 }],
1778 ['arm_thumb==1', {
1779 'cflags': [
1780 '-marm',
1781 ],
1782 }],
1783 ],
1784 }],
1785 ],
[email protected]5315f2842009-04-28 00:43:271786 },
[email protected]5153767c2009-12-22 01:52:501787 'Release_Base': {
[email protected]740e2de2009-07-21 11:41:011788 'variables': {
1789 'release_optimize%': '2',
[email protected]1dd529642010-05-15 01:02:511790 # Binaries become big and gold is unable to perform GC
1791 # and remove unused sections for some of test targets
1792 # on 32 bit platform.
1793 # (This is currently observed only in chromeos valgrind bots)
1794 # The following flag is to disable --gc-sections linker
1795 # option for these bots.
1796 'no_gc_sections%': 0,
[email protected]409dceef2011-05-10 19:49:121797
1798 # TODO(bradnelson): reexamine how this is done if we change the
1799 # expansion of configurations
1800 'release_valgrind_build%': 0,
[email protected]740e2de2009-07-21 11:41:011801 },
[email protected]3aacaf952009-04-02 15:34:091802 'cflags': [
[email protected]9cb5cc702011-02-01 19:56:041803 '-O>(release_optimize)',
[email protected]d8cc3a62009-04-08 18:29:531804 # Don't emit the GCC version ident directives, they just end up
1805 # in the .comment section taking up binary size.
1806 '-fno-ident',
1807 # Put data and code in their own sections, so that unused symbols
1808 # can be removed at link time with --gc-sections.
1809 '-fdata-sections',
1810 '-ffunction-sections',
[email protected]3aacaf952009-04-02 15:34:091811 ],
[email protected]c902f2cba2010-08-06 20:04:181812 'ldflags': [
1813 # Specifically tell the linker to perform optimizations.
1814 # See http://lwn.net/Articles/192624/ .
1815 '-Wl,-O1',
[email protected]27c2e492010-08-06 22:55:221816 '-Wl,--as-needed',
[email protected]c902f2cba2010-08-06 20:04:181817 ],
[email protected]1dd529642010-05-15 01:02:511818 'conditions' : [
1819 ['no_gc_sections==0', {
1820 'ldflags': [
1821 '-Wl,--gc-sections',
1822 ],
1823 }],
[email protected]da1c8d692011-09-20 20:35:011824 ['OS=="android"', {
1825 'cflags': [
1826 '-fomit-frame-pointer',
1827 ],
1828 }],
[email protected]ecf7b6482010-10-13 09:15:201829 ['clang==1', {
1830 'cflags!': [
1831 '-fno-ident',
1832 ],
1833 }],
[email protected]7664ab32011-02-01 23:35:251834 ['profiling==1', {
1835 'cflags': [
1836 '-fno-omit-frame-pointer',
1837 '-g',
1838 ],
1839 }],
[email protected]8d726a42012-02-09 03:49:001840 ],
[email protected]3aacaf952009-04-02 15:34:091841 },
1842 },
[email protected]601b540222009-04-03 21:32:041843 'variants': {
1844 'coverage': {
1845 'cflags': ['-fprofile-arcs', '-ftest-coverage'],
1846 'ldflags': ['-fprofile-arcs'],
1847 },
1848 'profile': {
1849 'cflags': ['-pg', '-g'],
1850 'ldflags': ['-pg'],
1851 },
1852 'symbols': {
1853 'cflags': ['-g'],
1854 },
1855 },
[email protected]606116d22009-05-06 22:38:231856 'conditions': [
[email protected]04b482602011-09-14 02:36:211857 ['target_arch=="ia32"', {
1858 'target_conditions': [
1859 ['_toolset=="target"', {
1860 'asflags': [
1861 # Needed so that libs with .s files (e.g. libicudata.a)
1862 # are compatible with the general 32-bit-ness.
1863 '-32',
1864 ],
1865 # All floating-point computations on x87 happens in 80-bit
1866 # precision. Because the C and C++ language standards allow
1867 # the compiler to keep the floating-point values in higher
1868 # precision than what's specified in the source and doing so
1869 # is more efficient than constantly rounding up to 64-bit or
1870 # 32-bit precision as specified in the source, the compiler,
1871 # especially in the optimized mode, tries very hard to keep
1872 # values in x87 floating-point stack (in 80-bit precision)
1873 # as long as possible. This has important side effects, that
1874 # the real value used in computation may change depending on
1875 # how the compiler did the optimization - that is, the value
1876 # kept in 80-bit is different than the value rounded down to
1877 # 64-bit or 32-bit. There are possible compiler options to
1878 # make this behavior consistent (e.g. -ffloat-store would keep
1879 # all floating-values in the memory, thus force them to be
1880 # rounded to its original precision) but they have significant
1881 # runtime performance penalty.
1882 #
1883 # -mfpmath=sse -msse2 makes the compiler use SSE instructions
1884 # which keep floating-point values in SSE registers in its
1885 # native precision (32-bit for single precision, and 64-bit
1886 # for double precision values). This means the floating-point
1887 # value used during computation does not change depending on
1888 # how the compiler optimized the code, since the value is
1889 # always kept in its specified precision.
1890 'conditions': [
1891 ['branding=="Chromium" and disable_sse2==0', {
1892 'cflags': [
1893 '-march=pentium4',
1894 '-msse2',
1895 '-mfpmath=sse',
1896 ],
1897 }],
1898 # ChromeOS targets Pinetrail, which is sse3, but most of the
1899 # benefit comes from sse2 so this setting allows ChromeOS
1900 # to build on other CPUs. In the future -march=atom would
1901 # help but requires a newer compiler.
1902 ['chromeos==1 and disable_sse2==0', {
1903 'cflags': [
1904 '-msse2',
1905 ],
1906 }],
1907 # Install packages have started cropping up with
1908 # different headers between the 32-bit and 64-bit
1909 # versions, so we have to shadow those differences off
1910 # and make sure a 32-bit-on-64-bit build picks up the
1911 # right files.
1912 ['host_arch!="ia32"', {
1913 'include_dirs+': [
1914 '/usr/include32',
1915 ],
1916 }],
1917 ],
1918 # -mmmx allows mmintrin.h to be used for mmx intrinsics.
1919 # video playback is mmx and sse2 optimized.
[email protected]ffde7932009-05-29 00:39:061920 'cflags': [
[email protected]04b482602011-09-14 02:36:211921 '-m32',
1922 '-mmmx',
1923 ],
1924 'ldflags': [
1925 '-m32',
[email protected]ffde7932009-05-29 00:39:061926 ],
1927 }],
[email protected]606116d22009-05-06 22:38:231928 ],
1929 }],
[email protected]3dda8a962009-08-10 18:58:071930 ['target_arch=="arm"', {
[email protected]77c1b29392009-12-04 06:21:291931 'target_conditions': [
1932 ['_toolset=="target"', {
1933 'cflags_cc': [
1934 # The codesourcery arm-2009q3 toolchain warns at that the ABI
1935 # has changed whenever it encounters a varargs function. This
1936 # silences those warnings, as they are not helpful and
1937 # clutter legitimate warnings.
1938 '-Wno-abi',
1939 ],
1940 'conditions': [
[email protected]da1c8d692011-09-20 20:35:011941 ['arm_thumb==1', {
[email protected]77c1b29392009-12-04 06:21:291942 'cflags': [
1943 '-mthumb',
[email protected]77c1b29392009-12-04 06:21:291944 ]
1945 }],
1946 ['armv7==1', {
[email protected]dc9711f2009-11-13 19:30:251947 'cflags': [
1948 '-march=armv7-a',
1949 '-mtune=cortex-a8',
[email protected]dc9711f2009-11-13 19:30:251950 '-mfloat-abi=softfp',
1951 ],
[email protected]eafc0b452010-02-26 21:53:431952 'conditions': [
1953 ['arm_neon==1', {
1954 'cflags': [ '-mfpu=neon', ],
1955 }, {
[email protected]53e0f642010-03-05 01:41:561956 'cflags': [ '-mfpu=<(arm_fpu)', ],
[email protected]eafc0b452010-02-26 21:53:431957 }]
1958 ],
[email protected]dc9711f2009-11-13 19:30:251959 }],
[email protected]da1c8d692011-09-20 20:35:011960 ['OS=="android"', {
[email protected]7b1112c2012-03-16 22:03:531961 # Most of the following flags are derived from what Android
1962 # uses by default when building for arm, reference for which
1963 # can be found in the following file in the Android NDK:
1964 # toolchains/arm-linux-androideabi-4.4.3/setup.mk
1965 'cflags': [
1966 # The tree-sra optimization (scalar replacement for
1967 # aggregates enabling subsequent optimizations) leads to
1968 # invalid code generation when using the Android NDK's
1969 # compiler (r5-r7). This can be verified using
1970 # TestWebKitAPI's WTF.Checked_int8_t test.
1971 '-fno-tree-sra',
1972 '-Wno-psabi',
1973 ],
[email protected]da1c8d692011-09-20 20:35:011974 'conditions': [
1975 ['arm_thumb == 1', {
1976 # Android toolchain doesn't support -mimplicit-it=thumb
1977 'cflags!': [ '-Wa,-mimplicit-it=thumb', ],
1978 'cflags': [ '-mthumb-interwork', ],
1979 }],
1980 ['armv7==0', {
1981 # Flags suitable for Android emulator
1982 'cflags': [
1983 '-march=armv5te',
1984 '-mtune=xscale',
1985 '-msoft-float',
[email protected]6863896f2012-01-25 17:51:361986 ],
1987 'defines': [
1988 '__ARM_ARCH_5__',
1989 '__ARM_ARCH_5T__',
1990 '__ARM_ARCH_5E__',
1991 '__ARM_ARCH_5TE__',
[email protected]da1c8d692011-09-20 20:35:011992 ],
1993 }],
1994 ],
1995 }],
[email protected]3dda8a962009-08-10 18:58:071996 ],
1997 }],
1998 ],
1999 }],
[email protected]2fb843b2010-08-12 02:11:082000 ['linux_fpic==1', {
[email protected]c76723a2010-01-25 23:10:582001 'cflags': [
2002 '-fPIC',
2003 ],
[email protected]d3f692b32011-12-14 19:04:352004 'ldflags': [
2005 '-fPIC',
2006 ],
[email protected]c76723a2010-01-25 23:10:582007 }],
[email protected]ee28c9f2009-09-04 01:53:012008 ['sysroot!=""', {
[email protected]fd36ce822009-10-28 20:13:572009 'target_conditions': [
2010 ['_toolset=="target"', {
2011 'cflags': [
2012 '--sysroot=<(sysroot)',
2013 ],
2014 'ldflags': [
2015 '--sysroot=<(sysroot)',
2016 ],
2017 }]]
[email protected]ee28c9f2009-09-04 01:53:012018 }],
[email protected]58680ce2010-09-18 00:09:152019 ['clang==1', {
[email protected]18ca15a2011-08-10 03:07:122020 'cflags': [
2021 '-Wheader-hygiene',
2022 # Clang spots more unused functions.
2023 '-Wno-unused-function',
2024 # Don't die on dtoa code that uses a char as an array index.
2025 '-Wno-char-subscripts',
[email protected]d6431722011-09-01 00:46:332026 # Especially needed for gtest macros using enum values from Mac
2027 # system headers.
2028 # TODO(pkasting): In C++11 this is legal, so this should be
2029 # removed when we change to that. (This is also why we don't
2030 # bother fixing all these cases today.)
[email protected]18ca15a2011-08-10 03:07:122031 '-Wno-unnamed-type-template-args',
[email protected]241109b52011-10-15 19:00:302032 # WebKit uses nullptr in a legit way, other that that this warning
2033 # doesn't fire.
2034 '-Wno-c++11-compat',
2035 # This (rightyfully) complains about 'override', which we use
2036 # heavily.
2037 '-Wno-c++11-extensions',
[email protected]9242c7642012-01-29 09:02:102038
2039 # Warns on switches on enums that cover all enum values but
2040 # also contain a default: branch. Chrome is full of that.
2041 '-Wno-covered-switch-default',
2042
2043 # TODO(thakis): Reenable once this no longer complains about
2044 # Invalid() in gmocks's gmock-internal-utils.h
2045 # http://crbug.com/111806
2046 '-Wno-null-dereference',
[email protected]18ca15a2011-08-10 03:07:122047 ],
2048 'cflags!': [
2049 # Clang doesn't seem to know know this flag.
2050 '-mfpmath=sse',
2051 ],
[email protected]58680ce2010-09-18 00:09:152052 }],
[email protected]5d451ad2011-02-11 16:43:462053 ['clang==1 and clang_use_chrome_plugins==1', {
[email protected]d23720682011-08-11 00:16:262054 'cflags': [
2055 '<(clang_chrome_plugins_flags)',
2056 ],
[email protected]5d451ad2011-02-11 16:43:462057 }],
[email protected]4a9ac22e2011-12-02 03:41:532058 ['clang==1 and clang_load!=""', {
[email protected]d23720682011-08-11 00:16:262059 'cflags': [
2060 '-Xclang', '-load', '-Xclang', '<(clang_load)',
[email protected]4a9ac22e2011-12-02 03:41:532061 ],
2062 }],
2063 ['clang==1 and clang_add_plugin!=""', {
2064 'cflags': [
[email protected]d23720682011-08-11 00:16:262065 '-Xclang', '-add-plugin', '-Xclang', '<(clang_add_plugin)',
2066 ],
[email protected]5e781232011-01-28 02:57:592067 }],
[email protected]2616d45d2012-01-19 03:15:482068 ['clang==1 and "<(GENERATOR)"=="ninja"', {
2069 'cflags': [
2070 # See http://crbug.com/110262
2071 '-fcolor-diagnostics',
2072 ],
2073 }],
[email protected]92799b632011-08-15 14:33:062074 ['asan==1', {
[email protected]92799b632011-08-15 14:33:062075 'cflags': [
[email protected]6a4cad02011-11-25 07:26:562076 '-faddress-sanitizer',
[email protected]0ac773032011-12-21 17:37:082077 '-fno-omit-frame-pointer',
[email protected]74a26d72011-09-29 17:29:032078 '-w',
[email protected]3cfa96a62012-02-28 07:27:582079 '-mllvm', '-asan-blacklist=<(asan_blacklist)',
[email protected]92799b632011-08-15 14:33:062080 ],
2081 'ldflags': [
[email protected]6a4cad02011-11-25 07:26:562082 '-faddress-sanitizer',
[email protected]92799b632011-08-15 14:33:062083 ],
[email protected]921c7b52011-11-25 10:34:352084 'defines': [
2085 'ADDRESS_SANITIZER',
2086 ],
[email protected]92799b632011-08-15 14:33:062087 }],
[email protected]cbd5fd52009-08-26 00:14:272088 ['linux_breakpad==1', {
[email protected]c87efd42010-08-26 18:28:172089 'cflags': [ '-g' ],
[email protected]cbd5fd52009-08-26 00:14:272090 'defines': ['USE_LINUX_BREAKPAD'],
2091 }],
[email protected]d8b60602010-03-26 09:41:222092 ['linux_use_heapchecker==1', {
2093 'variables': {'linux_use_tcmalloc%': 1},
[email protected]cea4aec2012-01-24 12:26:402094 'defines': ['USE_HEAPCHECKER'],
[email protected]d8b60602010-03-26 09:41:222095 }],
[email protected]61a9b2d82010-02-26 00:31:082096 ['linux_use_tcmalloc==0', {
2097 'defines': ['NO_TCMALLOC'],
[email protected]01699e22009-11-11 19:24:242098 }],
[email protected]64e2d4a42010-08-27 10:13:212099 ['linux_keep_shadow_stacks==1', {
2100 'defines': ['KEEP_SHADOW_STACKS'],
[email protected]987a74202012-02-23 19:10:512101 'cflags': [
2102 '-finstrument-functions',
2103 # Allow mmx intrinsics to inline, so that the compiler can expand
2104 # the intrinsics.
2105 '-finstrument-functions-exclude-file-list=mmintrin.h',
2106 ],
[email protected]64e2d4a42010-08-27 10:13:212107 }],
[email protected]8d726a42012-02-09 03:49:002108 ['linux_use_gold_flags==1', {
[email protected]be239492012-02-09 19:00:172109 'ldflags': [
2110 # Experimentation found that using four linking threads
2111 # saved ~20% of link time.
2112 # https://groups.google.com/a/chromium.org/group/chromium-dev/browse_thread/thread/281527606915bb36
2113 '-Wl,--threads',
2114 '-Wl,--thread-count=4',
2115 ],
[email protected]8d726a42012-02-09 03:49:002116 'conditions': [
2117 ['release_valgrind_build==0', {
2118 'target_conditions': [
2119 ['_toolset=="target"', {
2120 'ldflags': [
2121 # There seems to be a conflict of --icf and -pie
2122 # in gold which can generate crashy binaries. As
2123 # a security measure, -pie takes precendence for
2124 # now.
2125 #'-Wl,--icf=safe',
2126 '-Wl,--icf=none',
2127 ],
2128 }],
2129 ],
2130 }],
2131 ],
2132 }],
[email protected]b07806c12012-02-03 22:44:592133 ['linux_use_gold_binary==1', {
2134 'variables': {
[email protected]516312d2012-02-28 05:17:262135 'conditions': [
2136 ['inside_chromium_build==1', {
2137 # We pass the path to gold to the compiler. gyp leaves
2138 # unspecified what the cwd is when running the compiler,
2139 # so the normal gyp path-munging fails us. This hack
2140 # gets the right path.
2141 'gold_path': '<(PRODUCT_DIR)/../../third_party/gold',
2142 }, {
2143 'gold_path': '<(PRODUCT_DIR)/../../Source/WebKit/chromium/third_party/gold',
2144 }]
2145 ]
[email protected]b07806c12012-02-03 22:44:592146 },
2147 'ldflags': [
2148 # Put our gold binary in the search path for the linker.
2149 '-B<(gold_path)',
2150 ],
2151 }],
[email protected]606116d22009-05-06 22:38:232152 ],
[email protected]9d384032009-03-20 23:13:262153 },
2154 }],
[email protected]c51e8d52009-12-11 20:04:062155 # FreeBSD-specific options; note that most FreeBSD options are set above,
2156 # with Linux.
2157 ['OS=="freebsd"', {
2158 'target_defaults': {
2159 'ldflags': [
2160 '-Wl,--no-keep-memory',
2161 ],
2162 },
2163 }],
[email protected]da1c8d692011-09-20 20:35:012164 # Android-specific options; note that most are set above with Linux.
2165 ['OS=="android"', {
2166 'variables': {
2167 'android_target_arch%': 'arm', # target_arch in android terms.
2168 'conditions': [
2169 # Android uses x86 instead of ia32 for their target_arch designation.
2170 ['target_arch=="ia32"', {
2171 'android_target_arch%': 'x86',
2172 }],
2173 # Use shared stlport library when system one used.
2174 # Figure this out early since it needs symbols from libgcc.a, so it
2175 # has to be before that in the set of libraries.
2176 ['use_system_stlport==1', {
2177 'android_stlport_library': 'stlport',
2178 }, {
2179 'android_stlport_library': 'stlport_static',
2180 }],
2181 ],
2182
2183 # Placing this variable here prevents from forking libvpx, used
2184 # by remoting. Remoting is off, so it needn't built,
2185 # so forking it's deps seems like overkill.
2186 # But this variable need defined to properly run gyp.
2187 # A proper solution is to have an OS==android conditional
2188 # in third_party/libvpx/libvpx.gyp to define it.
2189 'libvpx_path': 'lib/linux/arm',
2190 },
2191 'target_defaults': {
2192 # Build a Release build by default to match Android build behavior.
2193 # This is typical with Android because Debug builds tend to be much
2194 # larger and run very slowly on constrained devices. It is still
2195 # possible to do a Debug build by specifying BUILDTYPE=Debug on the
2196 # 'make' command line.
2197 'default_configuration': 'Release',
2198
2199 'variables': {
2200 'release_extra_cflags%': '',
2201 },
2202
2203 'target_conditions': [
2204 # Settings for building device targets using Android's toolchain.
2205 # These are based on the setup.mk file from the Android NDK.
2206 #
2207 # The NDK Android executable link step looks as follows:
2208 # $LDFLAGS
2209 # $(TARGET_CRTBEGIN_DYNAMIC_O) <-- crtbegin.o
2210 # $(PRIVATE_OBJECTS) <-- The .o that we built
2211 # $(PRIVATE_STATIC_LIBRARIES) <-- The .a that we built
2212 # $(TARGET_LIBGCC) <-- libgcc.a
2213 # $(PRIVATE_SHARED_LIBRARIES) <-- The .so that we built
2214 # $(PRIVATE_LDLIBS) <-- System .so
2215 # $(TARGET_CRTEND_O) <-- crtend.o
2216 #
2217 # For now the above are approximated for executables by adding
2218 # crtbegin.o to the end of the ldflags and 'crtend.o' to the end
2219 # of 'libraries'.
2220 #
2221 # The NDK Android shared library link step looks as follows:
2222 # $LDFLAGS
2223 # $(PRIVATE_OBJECTS) <-- The .o that we built
2224 # -l,--whole-archive
2225 # $(PRIVATE_WHOLE_STATIC_LIBRARIES)
2226 # -l,--no-whole-archive
2227 # $(PRIVATE_STATIC_LIBRARIES) <-- The .a that we built
2228 # $(TARGET_LIBGCC) <-- libgcc.a
2229 # $(PRIVATE_SHARED_LIBRARIES) <-- The .so that we built
2230 # $(PRIVATE_LDLIBS) <-- System .so
2231 #
2232 # For now, assume not need any whole static libs.
2233 #
2234 # For both executables and shared libraries, add the proper
2235 # libgcc.a to the start of libraries which puts it in the
2236 # proper spot after .o and .a files get linked in.
2237 #
2238 # TODO: The proper thing to do longer-tem would be proper gyp
2239 # support for a custom link command line.
2240 ['_toolset=="target"', {
2241 'cflags!': [
2242 '-pthread', # Not supported by Android toolchain.
2243 ],
2244 'cflags': [
2245 '-U__linux__', # Don't allow toolchain to claim -D__linux__
2246 '-ffunction-sections',
2247 '-funwind-tables',
2248 '-g',
2249 '-fstack-protector',
2250 '-fno-short-enums',
2251 '-finline-limit=64',
2252 '-Wa,--noexecstack',
2253 '-Wno-error=non-virtual-dtor', # TODO(michaelbai): Fix warnings.
2254 '<@(release_extra_cflags)',
2255 # Note: This include is in cflags to ensure that it comes after
2256 # all of the includes.
2257 '-I<(android_ndk_include)',
2258 ],
2259 'defines': [
2260 'ANDROID',
2261 '__GNU_SOURCE=1', # Necessary for clone()
2262 'USE_STLPORT=1',
2263 '_STLP_USE_PTR_SPECIALIZATIONS=1',
2264 'HAVE_OFF64_T',
2265 'HAVE_SYS_UIO_H',
2266 'ANDROID_BINSIZE_HACK', # Enable temporary hacks to reduce binsize.
2267 ],
2268 'ldflags!': [
2269 '-pthread', # Not supported by Android toolchain.
2270 ],
2271 'ldflags': [
2272 '-nostdlib',
2273 '-Wl,--no-undefined',
2274 '-Wl,--icf=safe', # Enable identical code folding to reduce size
2275 # Don't export symbols from statically linked libraries.
2276 '-Wl,--exclude-libs=ALL',
2277 ],
[email protected]a0e48b02011-11-22 07:53:012278 'libraries': [
2279 '-l<(android_stlport_library)',
2280 # Manually link the libgcc.a that the cross compiler uses.
2281 '<!($CROSS_CC -print-libgcc-file-name)',
2282 '-lc',
2283 '-ldl',
2284 '-lstdc++',
2285 '-lm',
[email protected]da1c8d692011-09-20 20:35:012286 ],
2287 'conditions': [
2288 ['android_build_type==0', {
2289 'ldflags': [
[email protected]5baf7482011-12-13 16:00:522290 '--sysroot=<(android_ndk_sysroot)',
[email protected]da1c8d692011-09-20 20:35:012291 ],
2292 }],
2293 # NOTE: The stlport header include paths below are specified in
2294 # cflags rather than include_dirs because they need to come
2295 # after include_dirs. Think of them like system headers, but
2296 # don't use '-isystem' because the arm-linux-androideabi-4.4.3
2297 # toolchain (circa Gingerbread) will exhibit strange errors.
2298 # The include ordering here is important; change with caution.
2299 ['use_system_stlport==0', {
2300 'cflags': [
2301 '-I<(android_ndk_root)/sources/cxx-stl/stlport/stlport',
2302 ],
2303 'conditions': [
2304 ['target_arch=="arm" and armv7==1', {
2305 'ldflags': [
2306 '-L<(android_ndk_root)/sources/cxx-stl/stlport/libs/armeabi-v7a',
2307 ],
2308 }],
2309 ['target_arch=="arm" and armv7==0', {
2310 'ldflags': [
2311 '-L<(android_ndk_root)/sources/cxx-stl/stlport/libs/armeabi',
2312 ],
2313 }],
2314 ['target_arch=="ia32"', {
2315 'ldflags': [
2316 '-L<(android_ndk_root)/sources/cxx-stl/stlport/libs/x86',
2317 ],
2318 }],
2319 ],
2320 }],
2321 ['target_arch=="ia32"', {
2322 # The x86 toolchain currently has problems with stack-protector.
2323 'cflags!': [
2324 '-fstack-protector',
2325 ],
2326 'cflags': [
2327 '-fno-stack-protector',
2328 ],
2329 }],
2330 ],
2331 'target_conditions': [
2332 ['_type=="executable"', {
2333 'ldflags': [
2334 '-Bdynamic',
2335 '-Wl,-dynamic-linker,/system/bin/linker',
2336 '-Wl,--gc-sections',
2337 '-Wl,-z,nocopyreloc',
2338 # crtbegin_dynamic.o should be the last item in ldflags.
2339 '<(android_ndk_lib)/crtbegin_dynamic.o',
2340 ],
2341 'libraries': [
2342 # crtend_android.o needs to be the last item in libraries.
2343 # Do not add any libraries after this!
2344 '<(android_ndk_lib)/crtend_android.o',
2345 ],
2346 }],
2347 ['_type=="shared_library"', {
2348 'ldflags': [
2349 '-Wl,-shared,-Bsymbolic',
2350 ],
2351 }],
2352 ],
2353 }],
2354 # Settings for building host targets using the system toolchain.
2355 ['_toolset=="host"', {
[email protected]3984aaf2012-02-16 11:42:122356 'cflags!': [
2357 # Due to issues in Clang build system, using ASan on 32-bit
2358 # binaries on x86_64 host is problematic.
2359 # TODO(eugenis): re-enable.
2360 '-faddress-sanitizer',
2361 ],
[email protected]da1c8d692011-09-20 20:35:012362 'ldflags!': [
[email protected]3984aaf2012-02-16 11:42:122363 '-faddress-sanitizer',
[email protected]da1c8d692011-09-20 20:35:012364 '-Wl,-z,noexecstack',
2365 '-Wl,--gc-sections',
2366 '-Wl,-O1',
2367 '-Wl,--as-needed',
2368 ],
[email protected]965b6b22011-09-29 16:07:282369 'sources/': [
2370 ['exclude', '_android(_unittest)?\\.cc$'],
2371 ['exclude', '(^|/)android/']
2372 ],
[email protected]da1c8d692011-09-20 20:35:012373 }],
2374 ],
2375 },
2376 }],
[email protected]93f21e42010-04-01 00:35:152377 ['OS=="solaris"', {
2378 'cflags!': ['-fvisibility=hidden'],
2379 'cflags_cc!': ['-fvisibility-inlines-hidden'],
2380 }],
[email protected]2f80c312009-02-25 21:26:552381 ['OS=="mac"', {
2382 'target_defaults': {
[email protected]24700642009-06-01 16:01:202383 'variables': {
[email protected]162407f2011-09-08 15:33:172384 # These should end with %, but there seems to be a bug with % in
2385 # variables that are intended to be set to different values in
2386 # different targets, like these.
2387 'mac_pie': 1, # Most executables can be position-independent.
[email protected]24700642009-06-01 16:01:202388 'mac_real_dsym': 0, # Fake .dSYMs are fine in most cases.
[email protected]177cd082011-10-04 18:36:382389 'mac_strip': 1, # Strip debugging symbols from the target.
[email protected]24700642009-06-01 16:01:202390 },
[email protected]d92c7c012009-03-19 19:26:422391 'mac_bundle': 0,
[email protected]2f80c312009-02-25 21:26:552392 'xcode_settings': {
2393 'ALWAYS_SEARCH_USER_PATHS': 'NO',
[email protected]ab2956372009-08-13 18:11:042394 'GCC_C_LANGUAGE_STANDARD': 'c99', # -std=c99
2395 'GCC_CW_ASM_SYNTAX': 'NO', # No -fasm-blocks
2396 'GCC_DYNAMIC_NO_PIC': 'NO', # No -mdynamic-no-pic
2397 # (Equivalent to -fPIC)
2398 'GCC_ENABLE_CPP_EXCEPTIONS': 'NO', # -fno-exceptions
2399 'GCC_ENABLE_CPP_RTTI': 'NO', # -fno-rtti
2400 'GCC_ENABLE_PASCAL_STRINGS': 'NO', # No -mpascal-strings
[email protected]3224dcd2009-09-16 17:31:252401 # GCC_INLINES_ARE_PRIVATE_EXTERN maps to -fvisibility-inlines-hidden
2402 'GCC_INLINES_ARE_PRIVATE_EXTERN': 'YES',
[email protected]ab2956372009-08-13 18:11:042403 'GCC_OBJC_CALL_CXX_CDTORS': 'YES', # -fobjc-call-cxx-cdtors
2404 'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES', # -fvisibility=hidden
2405 'GCC_THREADSAFE_STATICS': 'NO', # -fno-threadsafe-statics
2406 'GCC_TREAT_WARNINGS_AS_ERRORS': 'YES', # -Werror
[email protected]2f80c312009-02-25 21:26:552407 'GCC_VERSION': '4.2',
[email protected]ab2956372009-08-13 18:11:042408 'GCC_WARN_ABOUT_MISSING_NEWLINE': 'YES', # -Wnewline-eof
[email protected]3224dcd2009-09-16 17:31:252409 # MACOSX_DEPLOYMENT_TARGET maps to -mmacosx-version-min
2410 'MACOSX_DEPLOYMENT_TARGET': '<(mac_deployment_target)',
[email protected]e1ece302011-09-15 03:58:112411 # Keep pch files below xcodebuild/.
2412 'SHARED_PRECOMPS_DIR': '$(CONFIGURATION_BUILD_DIR)/SharedPrecompiledHeaders',
[email protected]2f80c312009-02-25 21:26:552413 'USE_HEADERMAP': 'NO',
[email protected]57e94022011-05-04 15:33:192414 'OTHER_CFLAGS': [
2415 '-fno-strict-aliasing', # See http://crbug.com/32204
2416 ],
[email protected]080e86f2010-06-21 15:19:042417 'WARNING_CFLAGS': [
2418 '-Wall',
2419 '-Wendif-labels',
2420 '-Wextra',
2421 # Don't warn about unused function parameters.
2422 '-Wno-unused-parameter',
2423 # Don't warn about the "struct foo f = {0};" initialization
2424 # pattern.
2425 '-Wno-missing-field-initializers',
2426 ],
[email protected]b3fb8092009-03-12 19:09:242427 'conditions': [
2428 ['chromium_mac_pch', {'GCC_PRECOMPILE_PREFIX_HEADER': 'YES'},
[email protected]9543af052009-09-15 22:42:592429 {'GCC_PRECOMPILE_PREFIX_HEADER': 'NO'}
2430 ],
[email protected]66733172010-09-22 00:09:282431 ['clang==1', {
[email protected]34f40892011-09-06 21:53:302432 'CC': '$(SOURCE_ROOT)/<(clang_dir)/clang',
2433 'LDPLUSPLUS': '$(SOURCE_ROOT)/<(clang_dir)/clang++',
[email protected]a79fd882011-10-03 18:22:382434
[email protected]6c648f12011-12-24 07:50:432435 # Don't use -Wc++0x-extensions, which Xcode 4 enables by default
2436 # when buliding with clang. This warning is triggered when the
2437 # override keyword is used via the OVERRIDE macro from
2438 # base/compiler_specific.h.
2439 'CLANG_WARN_CXX0X_EXTENSIONS': 'NO',
[email protected]a79fd882011-10-03 18:22:382440
[email protected]34f40892011-09-06 21:53:302441 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0',
[email protected]66733172010-09-22 00:09:282442 'WARNING_CFLAGS': [
[email protected]7f8d486f2011-04-05 19:49:072443 '-Wheader-hygiene',
[email protected]66733172010-09-22 00:09:282444 # Don't die on dtoa code that uses a char as an array index.
2445 # This is required solely for base/third_party/dmg_fp/dtoa.cc.
2446 '-Wno-char-subscripts',
[email protected]25d3bb722010-11-22 14:31:452447 # Clang spots more unused functions.
2448 '-Wno-unused-function',
[email protected]d6431722011-09-01 00:46:332449 # See comments on this flag higher up in this file.
[email protected]0fa0fbc2010-10-12 04:32:052450 '-Wno-unnamed-type-template-args',
[email protected]241109b52011-10-15 19:00:302451 # WebKit uses nullptr in a legit way, other that that this
2452 # warning doesn't fire.
2453 '-Wno-c++0x-compat',
2454 # This (rightyfully) complains about 'override', which we use
2455 # heavily.
2456 '-Wno-c++11-extensions',
[email protected]9242c7642012-01-29 09:02:102457
2458 # Warns on switches on enums that cover all enum values but
2459 # also contain a default: branch. Chrome is full of that.
2460 '-Wno-covered-switch-default',
2461
2462 # TODO(thakis): Reenable once this no longer complains about
2463 # Invalid() in gmock's gmock-internal-utils.h
2464 # http://crbug.com/111806
2465 '-Wno-null-dereference',
[email protected]66733172010-09-22 00:09:282466 ],
2467 }],
[email protected]5d451ad2011-02-11 16:43:462468 ['clang==1 and clang_use_chrome_plugins==1', {
2469 'OTHER_CFLAGS': [
2470 '<(clang_chrome_plugins_flags)',
2471 ],
2472 }],
[email protected]4a9ac22e2011-12-02 03:41:532473 ['clang==1 and clang_load!=""', {
[email protected]5e781232011-01-28 02:57:592474 'OTHER_CFLAGS': [
2475 '-Xclang', '-load', '-Xclang', '<(clang_load)',
[email protected]4a9ac22e2011-12-02 03:41:532476 ],
2477 }],
2478 ['clang==1 and clang_add_plugin!=""', {
2479 'OTHER_CFLAGS': [
[email protected]5e781232011-01-28 02:57:592480 '-Xclang', '-add-plugin', '-Xclang', '<(clang_add_plugin)',
2481 ],
2482 }],
[email protected]2616d45d2012-01-19 03:15:482483 ['clang==1 and "<(GENERATOR)"=="ninja"', {
2484 'OTHER_CFLAGS': [
2485 # See http://crbug.com/110262
2486 '-fcolor-diagnostics',
2487 ],
2488 }],
[email protected]b3fb8092009-03-12 19:09:242489 ],
[email protected]2f80c312009-02-25 21:26:552490 },
[email protected]34f40892011-09-06 21:53:302491 'conditions': [
2492 ['clang==1', {
2493 'variables': {
2494 'clang_dir': '../third_party/llvm-build/Release+Asserts/bin',
2495 },
2496 }],
[email protected]921c7b52011-11-25 10:34:352497 ['asan==1', {
2498 'xcode_settings': {
2499 'OTHER_CFLAGS': [
[email protected]921c7b52011-11-25 10:34:352500 '-faddress-sanitizer',
2501 '-w',
[email protected]3cfa96a62012-02-28 07:27:582502 '-mllvm', '-asan-blacklist=<(asan_blacklist)',
[email protected]921c7b52011-11-25 10:34:352503 ],
2504 'OTHER_LDFLAGS': [
[email protected]921c7b52011-11-25 10:34:352505 '-faddress-sanitizer',
2506 # The symbols below are referenced in the ASan runtime
[email protected]2212d272011-12-20 21:37:372507 # library (compiled on OS X 10.6), but may be unavailable
[email protected]921c7b52011-11-25 10:34:352508 # on the prior OS X versions. Because Chromium is currently
2509 # targeting 10.5.0, we need to explicitly mark these
2510 # symbols as dynamic_lookup.
2511 '-Wl,-U,_malloc_default_purgeable_zone',
2512 '-Wl,-U,_malloc_zone_memalign',
2513 '-Wl,-U,_dispatch_sync_f',
2514 '-Wl,-U,_dispatch_async_f',
2515 '-Wl,-U,_dispatch_barrier_async_f',
2516 '-Wl,-U,_dispatch_group_async_f',
2517 '-Wl,-U,_dispatch_after_f',
2518 ],
2519 },
2520 'defines': [
2521 'ADDRESS_SANITIZER',
2522 ],
2523 }],
[email protected]34f40892011-09-06 21:53:302524 ],
[email protected]2f80c312009-02-25 21:26:552525 'target_conditions': [
[email protected]2f80c312009-02-25 21:26:552526 ['_type!="static_library"', {
[email protected]5d7dc972009-04-16 15:30:462527 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-search_paths_first']},
2528 }],
2529 ['_mac_bundle', {
2530 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-ObjC']},
[email protected]87fde4a2009-02-28 00:50:082531 }],
[email protected]6303fed2011-08-11 01:12:102532 ['_type=="executable"', {
2533 'postbuilds': [
2534 {
2535 # Arranges for data (heap) pages to be protected against
[email protected]8c40f322011-08-24 03:33:362536 # code execution when running on Mac OS X 10.7 ("Lion"), and
2537 # ensures that the position-independent executable (PIE) bit
2538 # is set for ASLR when running on Mac OS X 10.5 ("Leopard").
[email protected]6303fed2011-08-11 01:12:102539 'variables': {
[email protected]8c40f322011-08-24 03:33:362540 # Define change_mach_o_flags in a variable ending in _path
2541 # so that GYP understands it's a path and performs proper
2542 # relativization during dict merging.
2543 'change_mach_o_flags_path':
2544 'mac/change_mach_o_flags_from_xcode.sh',
[email protected]162407f2011-09-08 15:33:172545 'change_mach_o_flags_options%': [
[email protected]081c0342011-08-24 14:59:132546 ],
2547 'target_conditions': [
[email protected]162407f2011-09-08 15:33:172548 ['mac_pie==0 or release_valgrind_build==1', {
2549 # Don't enable PIE if it's unwanted. It's unwanted if
2550 # the target specifies mac_pie=0 or if building for
2551 # Valgrind, because Valgrind doesn't understand slide.
2552 # See the similar mac_pie/release_valgrind_build check
2553 # below.
[email protected]081c0342011-08-24 14:59:132554 'change_mach_o_flags_options': [
[email protected]081c0342011-08-24 14:59:132555 '--no-pie',
2556 ],
2557 }],
2558 ],
[email protected]6303fed2011-08-11 01:12:102559 },
[email protected]8c40f322011-08-24 03:33:362560 'postbuild_name': 'Change Mach-O Flags',
2561 'action': [
2562 '<(change_mach_o_flags_path)',
[email protected]081c0342011-08-24 14:59:132563 '>@(change_mach_o_flags_options)',
[email protected]8c40f322011-08-24 03:33:362564 ],
[email protected]6303fed2011-08-11 01:12:102565 },
2566 ],
[email protected]5a5d97aa2011-09-02 15:34:002567 'conditions': [
2568 ['asan==1', {
2569 'variables': {
2570 'asan_saves_file': 'asan.saves',
2571 },
2572 'xcode_settings': {
[email protected]6a4cad02011-11-25 07:26:562573 'CHROMIUM_STRIP_SAVE_FILE': '<(asan_saves_file)',
[email protected]5a5d97aa2011-09-02 15:34:002574 },
2575 }],
2576 ],
[email protected]162407f2011-09-08 15:33:172577 'target_conditions': [
2578 ['mac_pie==1 and release_valgrind_build==0', {
2579 # Turn on position-independence (ASLR) for executables. When
2580 # PIE is on for the Chrome executables, the framework will
2581 # also be subject to ASLR.
2582 # Don't do this when building for Valgrind, because Valgrind
2583 # doesn't understand slide. TODO: Make Valgrind on Mac OS X
2584 # understand slide, and get rid of the Valgrind check.
2585 'xcode_settings': {
2586 'OTHER_LDFLAGS': [
2587 '-Wl,-pie', # Position-independent executable (MH_PIE)
2588 ],
2589 },
2590 }],
2591 ],
[email protected]6a0242bc2011-07-01 00:34:462592 }],
[email protected]9a5e72862010-09-02 16:16:582593 ['(_type=="executable" or _type=="shared_library" or \
2594 _type=="loadable_module") and mac_strip!=0', {
[email protected]24700642009-06-01 16:01:202595 'target_conditions': [
2596 ['mac_real_dsym == 1', {
2597 # To get a real .dSYM bundle produced by dsymutil, set the
2598 # debug information format to dwarf-with-dsym. Since
2599 # strip_from_xcode will not be used, set Xcode to do the
2600 # stripping as well.
2601 'configurations': {
[email protected]5153767c2009-12-22 01:52:502602 'Release_Base': {
[email protected]24700642009-06-01 16:01:202603 'xcode_settings': {
2604 'DEBUG_INFORMATION_FORMAT': 'dwarf-with-dsym',
2605 'DEPLOYMENT_POSTPROCESSING': 'YES',
2606 'STRIP_INSTALLED_PRODUCT': 'YES',
[email protected]e14a9f92009-08-05 19:26:072607 'target_conditions': [
[email protected]c2111422010-06-01 18:30:252608 ['_type=="shared_library" or _type=="loadable_module"', {
[email protected]e14a9f92009-08-05 19:26:072609 # The Xcode default is to strip debugging symbols
2610 # only (-S). Local symbols should be stripped as
2611 # well, which will be handled by -x. Xcode will
2612 # continue to insert -S when stripping even when
2613 # additional flags are added with STRIPFLAGS.
2614 'STRIPFLAGS': '-x',
[email protected]c2111422010-06-01 18:30:252615 }], # _type=="shared_library" or _type=="loadable_module"'
[email protected]e14a9f92009-08-05 19:26:072616 ], # target_conditions
2617 }, # xcode_settings
2618 }, # configuration "Release"
2619 }, # configurations
[email protected]24700642009-06-01 16:01:202620 }, { # mac_real_dsym != 1
2621 # To get a fast fake .dSYM bundle, use a post-build step to
2622 # produce the .dSYM and strip the executable. strip_from_xcode
2623 # only operates in the Release configuration.
2624 'postbuilds': [
2625 {
2626 'variables': {
2627 # Define strip_from_xcode in a variable ending in _path
2628 # so that gyp understands it's a path and performs proper
2629 # relativization during dict merging.
2630 'strip_from_xcode_path': 'mac/strip_from_xcode',
2631 },
2632 'postbuild_name': 'Strip If Needed',
2633 'action': ['<(strip_from_xcode_path)'],
2634 },
[email protected]e14a9f92009-08-05 19:26:072635 ], # postbuilds
2636 }], # mac_real_dsym
2637 ], # target_conditions
[email protected]9a5e72862010-09-02 16:16:582638 }], # (_type=="executable" or _type=="shared_library" or
2639 # _type=="loadable_module") and mac_strip!=0
[email protected]e14a9f92009-08-05 19:26:072640 ], # target_conditions
2641 }, # target_defaults
2642 }], # OS=="mac"
[email protected]2f80c312009-02-25 21:26:552643 ['OS=="win"', {
2644 'target_defaults': {
2645 'defines': [
[email protected]a89e0942011-09-26 16:06:472646 '_WIN32_WINNT=0x0601',
2647 'WINVER=0x0601',
[email protected]2f80c312009-02-25 21:26:552648 'WIN32',
2649 '_WINDOWS',
[email protected]2f80c312009-02-25 21:26:552650 'NOMINMAX',
[email protected]e3116282011-08-13 00:52:282651 'PSAPI_VERSION=1',
[email protected]2f80c312009-02-25 21:26:552652 '_CRT_RAND_S',
2653 'CERT_CHAIN_PARA_HAS_EXTRA_FIELDS',
2654 'WIN32_LEAN_AND_MEAN',
[email protected]7a812dd62010-06-30 18:52:272655 '_ATL_NO_OPENGL',
[email protected]adfb98c2009-06-23 20:08:452656 '_HAS_TR1=0',
[email protected]2f80c312009-02-25 21:26:552657 ],
[email protected]8974e042010-06-21 18:06:522658 'conditions': [
[email protected]2212d272011-12-20 21:37:372659 ['buildtype=="Official"', {
2660 # In official builds, targets can self-select an optimization
2661 # level by defining a variable named 'optimize', and setting it
2662 # to one of
2663 # - "size", optimizes for minimal code size - the default.
2664 # - "speed", optimizes for speed over code size.
2665 # - "max", whole program optimization and link-time code
2666 # generation. This is very expensive and should be used
2667 # sparingly.
2668 'variables': {
2669 'optimize%': 'size',
2670 },
2671 'target_conditions': [
2672 ['optimize=="size"', {
2673 'msvs_settings': {
2674 'VCCLCompilerTool': {
2675 # 1, optimizeMinSpace, Minimize Size (/O1)
2676 'Optimization': '1',
2677 # 2, favorSize - Favor small code (/Os)
2678 'FavorSizeOrSpeed': '2',
2679 },
2680 },
2681 },
2682 ],
2683 ['optimize=="speed"', {
2684 'msvs_settings': {
2685 'VCCLCompilerTool': {
2686 # 2, optimizeMaxSpeed, Maximize Speed (/O2)
2687 'Optimization': '2',
2688 # 1, favorSpeed - Favor fast code (/Ot)
2689 'FavorSizeOrSpeed': '1',
2690 },
2691 },
2692 },
2693 ],
2694 ['optimize=="max"', {
2695 'msvs_settings': {
2696 'VCCLCompilerTool': {
2697 # 2, optimizeMaxSpeed, Maximize Speed (/O2)
2698 'Optimization': '2',
2699 # 1, favorSpeed - Favor fast code (/Ot)
2700 'FavorSizeOrSpeed': '1',
2701 # This implies link time code generation.
2702 'WholeProgramOptimization': 'true',
2703 },
2704 },
2705 },
2706 ],
2707 ],
2708 },
2709 ],
[email protected]8974e042010-06-21 18:06:522710 ['component=="static_library"', {
2711 'defines': [
2712 '_HAS_EXCEPTIONS=0',
2713 ],
2714 }],
[email protected]3e2648a2011-03-21 20:58:502715 ['secure_atl', {
2716 'defines': [
2717 '_SECURE_ATL',
2718 ],
2719 }],
[email protected]8974e042010-06-21 18:06:522720 ],
[email protected]5b5ca7cb2009-07-20 23:00:202721 'msvs_system_include_dirs': [
[email protected]a78da50e2010-06-09 21:31:372722 '<(DEPTH)/third_party/directxsdk/files/Include',
[email protected]58e56142011-11-24 00:57:542723 '<(DEPTH)/third_party/platformsdk_win7/files/Include',
[email protected]2f80c312009-02-25 21:26:552724 '$(VSInstallDir)/VC/atlmfc/include',
2725 ],
[email protected]a8d99cef2009-08-26 20:47:492726 'msvs_cygwin_dirs': ['<(DEPTH)/third_party/cygwin'],
[email protected]942c3a60f2011-05-03 02:04:112727 'msvs_disabled_warnings': [4351, 4396, 4503, 4819,
2728 # TODO(maruel): These warnings are level 4. They will be slowly
2729 # removed as code is fixed.
2730 4100, 4121, 4125, 4127, 4130, 4131, 4189, 4201, 4238, 4244, 4245,
2731 4310, 4355, 4428, 4481, 4505, 4510, 4512, 4530, 4610, 4611, 4701,
2732 4702, 4706,
2733 ],
[email protected]2f80c312009-02-25 21:26:552734 'msvs_settings': {
2735 'VCCLCompilerTool': {
2736 'MinimalRebuild': 'false',
[email protected]2f80c312009-02-25 21:26:552737 'BufferSecurityCheck': 'true',
2738 'EnableFunctionLevelLinking': 'true',
2739 'RuntimeTypeInfo': 'false',
[email protected]942c3a60f2011-05-03 02:04:112740 'WarningLevel': '4',
[email protected]2f80c312009-02-25 21:26:552741 'WarnAsError': 'true',
2742 'DebugInformationFormat': '3',
[email protected]3fef6e62009-07-31 19:58:582743 'conditions': [
[email protected]3e2648a2011-03-21 20:58:502744 ['msvs_multi_core_compile', {
[email protected]1f9471a2010-01-04 06:40:162745 'AdditionalOptions': ['/MP'],
[email protected]912c55c2009-07-31 23:33:552746 }],
[email protected]3e2648a2011-03-21 20:58:502747 ['MSVS_VERSION=="2005e"', {
2748 'AdditionalOptions': ['/w44068'], # Unknown pragma to 4 (ATL)
2749 }],
[email protected]8974e042010-06-21 18:06:522750 ['component=="shared_library"', {
2751 'ExceptionHandling': '1', # /EHsc
2752 }, {
2753 'ExceptionHandling': '0',
2754 }],
[email protected]3fef6e62009-07-31 19:58:582755 ],
[email protected]2f80c312009-02-25 21:26:552756 },
2757 'VCLibrarianTool': {
[email protected]1f9471a2010-01-04 06:40:162758 'AdditionalOptions': ['/ignore:4221'],
[email protected]a78da50e2010-06-09 21:31:372759 'AdditionalLibraryDirectories': [
[email protected]a78da50e2010-06-09 21:31:372760 '<(DEPTH)/third_party/directxsdk/files/Lib/x86',
[email protected]58e56142011-11-24 00:57:542761 '<(DEPTH)/third_party/platformsdk_win7/files/Lib',
[email protected]a78da50e2010-06-09 21:31:372762 ],
[email protected]2f80c312009-02-25 21:26:552763 },
2764 'VCLinkerTool': {
[email protected]2f80c312009-02-25 21:26:552765 'AdditionalDependencies': [
2766 'wininet.lib',
[email protected]b1d8c252011-01-13 20:27:502767 'dnsapi.lib',
[email protected]2f80c312009-02-25 21:26:552768 'version.lib',
2769 'msimg32.lib',
2770 'ws2_32.lib',
2771 'usp10.lib',
2772 'psapi.lib',
[email protected]96fd0032009-04-24 00:13:082773 'dbghelp.lib',
[email protected]dfdf7ee2011-04-28 18:51:482774 'winmm.lib',
2775 'shlwapi.lib',
[email protected]2f80c312009-02-25 21:26:552776 ],
[email protected]4de39f82011-03-28 12:01:292777 'conditions': [
[email protected]3e2648a2011-03-21 20:58:502778 ['msvs_express', {
2779 # Explicitly required when using the ATL with express
2780 'AdditionalDependencies': [
2781 'atlthunk.lib',
2782 ],
2783 }],
2784 ['MSVS_VERSION=="2005e"', {
2785 # Non-express versions link automatically to these
2786 'AdditionalDependencies': [
2787 'advapi32.lib',
2788 'comdlg32.lib',
2789 'ole32.lib',
2790 'shell32.lib',
2791 'user32.lib',
2792 'winspool.lib',
2793 ],
2794 }],
2795 ],
[email protected]a78da50e2010-06-09 21:31:372796 'AdditionalLibraryDirectories': [
[email protected]a78da50e2010-06-09 21:31:372797 '<(DEPTH)/third_party/directxsdk/files/Lib/x86',
[email protected]58e56142011-11-24 00:57:542798 '<(DEPTH)/third_party/platformsdk_win7/files/Lib',
[email protected]a78da50e2010-06-09 21:31:372799 ],
[email protected]2f80c312009-02-25 21:26:552800 'GenerateDebugInformation': 'true',
2801 'MapFileName': '$(OutDir)\\$(TargetName).map',
2802 'ImportLibrary': '$(OutDir)\\lib\\$(TargetName).lib',
[email protected]2f80c312009-02-25 21:26:552803 'FixedBaseAddress': '1',
[email protected]825ff8d2009-05-22 01:40:482804 # SubSystem values:
2805 # 0 == not set
2806 # 1 == /SUBSYSTEM:CONSOLE
2807 # 2 == /SUBSYSTEM:WINDOWS
2808 # Most of the executables we'll ever create are tests
2809 # and utilities with console output.
2810 'SubSystem': '1',
[email protected]2f80c312009-02-25 21:26:552811 },
2812 'VCMIDLTool': {
2813 'GenerateStublessProxies': 'true',
2814 'TypeLibraryName': '$(InputName).tlb',
2815 'OutputDirectory': '$(IntDir)',
2816 'HeaderFileName': '$(InputName).h',
2817 'DLLDataFileName': 'dlldata.c',
2818 'InterfaceIdentifierFileName': '$(InputName)_i.c',
2819 'ProxyFileName': '$(InputName)_p.c',
2820 },
2821 'VCResourceCompilerTool': {
2822 'Culture' : '1033',
[email protected]4d91cbc2010-05-07 20:41:382823 'AdditionalIncludeDirectories': [
2824 '<(DEPTH)',
2825 '<(SHARED_INTERMEDIATE_DIR)',
2826 ],
[email protected]2f80c312009-02-25 21:26:552827 },
2828 },
2829 },
2830 }],
[email protected]79e2336c2011-05-12 18:18:342831 ['disable_nacl==1', {
[email protected]d8c7cbcc2009-10-02 19:00:312832 'target_defaults': {
2833 'defines': [
2834 'DISABLE_NACL',
2835 ],
2836 },
2837 }],
[email protected]cfbf9bc2009-12-07 22:07:562838 ['OS=="win" and msvs_use_common_linker_extras', {
[email protected]48c7af72009-07-03 22:00:192839 'target_defaults': {
2840 'msvs_settings': {
2841 'VCLinkerTool': {
[email protected]48c7af72009-07-03 22:00:192842 'DelayLoadDLLs': [
2843 'dbghelp.dll',
2844 'dwmapi.dll',
[email protected]e15a4ce52012-01-04 20:11:012845 'shell32.dll',
[email protected]48c7af72009-07-03 22:00:192846 'uxtheme.dll',
2847 ],
2848 },
2849 },
[email protected]ef4fa4072009-12-04 22:46:502850 'configurations': {
[email protected]5153767c2009-12-22 01:52:502851 'x86_Base': {
[email protected]ef4fa4072009-12-04 22:46:502852 'msvs_settings': {
2853 'VCLinkerTool': {
[email protected]1f9471a2010-01-04 06:40:162854 'AdditionalOptions': [
2855 '/safeseh',
[email protected]7cf23ce62012-01-13 02:43:332856 '/dynamicbase',
[email protected]1f9471a2010-01-04 06:40:162857 '/ignore:4199',
2858 '/ignore:4221',
2859 '/nxcompat',
2860 ],
[email protected]ef4fa4072009-12-04 22:46:502861 },
2862 },
2863 },
[email protected]5153767c2009-12-22 01:52:502864 'x64_Base': {
[email protected]ef4fa4072009-12-04 22:46:502865 'msvs_settings': {
2866 'VCLinkerTool': {
[email protected]1f9471a2010-01-04 06:40:162867 'AdditionalOptions': [
[email protected]ef4fa4072009-12-04 22:46:502868 # safeseh is not compatible with x64
[email protected]7cf23ce62012-01-13 02:43:332869 '/dynamicbase',
[email protected]1f9471a2010-01-04 06:40:162870 '/ignore:4199',
2871 '/ignore:4221',
2872 '/nxcompat',
2873 ],
[email protected]ef4fa4072009-12-04 22:46:502874 },
2875 },
2876 },
2877 },
[email protected]48c7af72009-07-03 22:00:192878 },
2879 }],
[email protected]9821d0d2010-04-16 22:40:372880 ['enable_new_npdevice_api==1', {
2881 'target_defaults': {
2882 'defines': [
2883 'ENABLE_NEW_NPDEVICE_API',
2884 ],
2885 },
2886 }],
[email protected]34f40892011-09-06 21:53:302887 ['clang==1', {
2888 'make_global_settings': [
[email protected]e4ddf332011-10-20 21:52:242889 ['CC', '<(make_clang_dir)/bin/clang'],
2890 ['CXX', '<(make_clang_dir)/bin/clang++'],
[email protected]60550c82011-09-06 23:51:072891 ['LINK', '$(CXX)'],
[email protected]34f40892011-09-06 21:53:302892 ['CC.host', '$(CC)'],
2893 ['CXX.host', '$(CXX)'],
2894 ['LINK.host', '$(LINK)'],
2895 ],
2896 }],
[email protected]2f80c312009-02-25 21:26:552897 ],
2898 'xcode_settings': {
[email protected]0c8ab452009-11-06 21:57:502899 # DON'T ADD ANYTHING NEW TO THIS BLOCK UNLESS YOU REALLY REALLY NEED IT!
2900 # This block adds *project-wide* configuration settings to each project
2901 # file. It's almost always wrong to put things here. Specify your
2902 # custom xcode_settings in target_defaults to add them to targets instead.
2903
2904 # In an Xcode Project Info window, the "Base SDK for All Configurations"
2905 # setting sets the SDK on a project-wide basis. In order to get the
2906 # configured SDK to show properly in the Xcode UI, SDKROOT must be set
2907 # here at the project level.
2908 'SDKROOT': 'macosx<(mac_sdk)', # -isysroot
2909
[email protected]2f80c312009-02-25 21:26:552910 # The Xcode generator will look for an xcode_settings section at the root
2911 # of each dict and use it to apply settings on a file-wide basis. Most
2912 # settings should not be here, they should be in target-specific
2913 # xcode_settings sections, or better yet, should use non-Xcode-specific
2914 # settings in target dicts. SYMROOT is a special case, because many other
2915 # Xcode variables depend on it, including variables such as
2916 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something
2917 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the
2918 # files to appear (when present) in the UI as actual files and not red
2919 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR,
2920 # and therefore SYMROOT, needs to be set at the project level.
[email protected]bfa24b962009-03-02 00:16:162921 'SYMROOT': '<(DEPTH)/xcodebuild',
[email protected]2f80c312009-02-25 21:26:552922 },
[email protected]ee28c9f2009-09-04 01:53:012923}