blob: d2666c4ccff3b0c84f2810aaa53ab9e9c7baf408 [file] [log] [blame]
[email protected]cfa2e1102011-04-27 22:30:231# Copyright (c) 2011 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]1b546692011-06-30 18:22:3027 # Whether the Views toolkit can use its Pure form when available
28 # or if it must only use GTK (the default at the moment).
29 # This is an intermediate step until all of Views is 'Pure',
30 # at which point we plan to remove those switches.
[email protected]fd88a8842011-09-13 02:50:2231 # This turns on the USE_ONLY_PURE_VIEWS macro.
32 'use_only_pure_views%': 0,
[email protected]1b546692011-06-30 18:22:3033
[email protected]bb6aba32011-01-07 19:04:4334 # Disable touch support by default.
35 'touchui%': 0,
[email protected]9c8a1982011-05-24 23:08:5836
[email protected]5de10b5d2011-09-19 18:49:4737 # Disable webui dialog replacements for native dialogs by default.
38 # TODO(flackr): Change this to a runtime flag triggered by
39 # --pure-views so that these dialogs can be easily tested.
40 'webui_dialogs%': 0,
41
[email protected]9c8a1982011-05-24 23:08:5842 # Whether the compositor is enabled on views.
43 'views_compositor%': 0,
[email protected]7de46352011-09-12 15:39:1944
[email protected]e599f0132011-08-24 19:03:3545 # Whether or not we are building with the Aura window manager.
[email protected]41423092011-08-25 15:39:5846 'use_aura%': 0,
[email protected]bb6aba32011-01-07 19:04:4347 },
48 # Copy conditionally-set variables out one scope.
49 'chromeos%': '<(chromeos)',
[email protected]fd88a8842011-09-13 02:50:2250 'use_only_pure_views%': '<(use_only_pure_views)',
[email protected]bb6aba32011-01-07 19:04:4351 'touchui%': '<(touchui)',
[email protected]5de10b5d2011-09-19 18:49:4752 'webui_dialogs%': '<(webui_dialogs)',
[email protected]9c8a1982011-05-24 23:08:5853 'views_compositor%': '<(views_compositor)',
[email protected]41423092011-08-25 15:39:5854 'use_aura%': '<(use_aura)',
[email protected]e72e55b2011-01-06 22:19:3055
[email protected]e72e55b2011-01-06 22:19:3056 # Compute the architecture that we're building on.
57 'conditions': [
[email protected]c49ab0c2011-05-18 17:25:3758 [ 'OS=="win" or OS=="mac"', {
59 'host_arch%': 'ia32',
60 }, {
[email protected]79e2336c2011-05-12 18:18:3461 # This handles the Unix platforms for which there is some support.
62 # Anything else gets passed through, which probably won't work very
63 # well; such hosts should pass an explicit target_arch to gyp.
[email protected]e72e55b2011-01-06 22:19:3064 'host_arch%':
[email protected]79e2336c2011-05-12 18:18:3465 '<!(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:3066 }],
[email protected]bb6aba32011-01-07 19:04:4367
[email protected]fd88a8842011-09-13 02:50:2268 # Set default value of toolkit_views on for Windows, Chrome OS,
69 # Touch and PureView.
[email protected]3fa441d2011-09-18 17:28:5070 ['OS=="win" or chromeos==1 or touchui==1 or use_only_pure_views==1 or use_aura==1', {
[email protected]bb6aba32011-01-07 19:04:4371 'toolkit_views%': 1,
72 }, {
73 'toolkit_views%': 0,
74 }],
[email protected]1b546692011-06-30 18:22:3075
[email protected]3fa441d2011-09-18 17:28:5076 # Views are always Pure in Touch and Aura case.
77 ['touchui==1 or use_aura==1', {
[email protected]fd88a8842011-09-13 02:50:2278 'use_only_pure_views%': 1,
[email protected]1b546692011-06-30 18:22:3079 }, {
[email protected]fd88a8842011-09-13 02:50:2280 'use_only_pure_views%': 0,
[email protected]1b546692011-06-30 18:22:3081 }],
[email protected]8ebc9b42011-07-14 15:22:1882
[email protected]5de10b5d2011-09-19 18:49:4783 # Use WebUI dialogs in TouchUI and PureView builds.
84 ['touchui==1 or use_only_pure_views==1 or use_aura==1', {
85 'webui_dialogs%': 1,
86 }],
87
[email protected]e599f0132011-08-24 19:03:3588 # Use the views compositor when using the Aura window manager.
[email protected]41423092011-08-25 15:39:5889 ['use_aura==1', {
[email protected]e599f0132011-08-24 19:03:3590 'views_compositor%': 1,
91 }],
[email protected]e72e55b2011-01-06 22:19:3092 ],
93 },
94
95 # Copy conditionally-set variables out one scope.
96 'chromeos%': '<(chromeos)',
97 'touchui%': '<(touchui)',
[email protected]5de10b5d2011-09-19 18:49:4798 'webui_dialogs%': '<(webui_dialogs)',
[email protected]e72e55b2011-01-06 22:19:3099 'host_arch%': '<(host_arch)',
[email protected]bb6aba32011-01-07 19:04:43100 'toolkit_views%': '<(toolkit_views)',
[email protected]fd88a8842011-09-13 02:50:22101 'use_only_pure_views%': '<(use_only_pure_views)',
[email protected]9c8a1982011-05-24 23:08:58102 'views_compositor%': '<(views_compositor)',
[email protected]41423092011-08-25 15:39:58103 'use_aura%': '<(use_aura)',
[email protected]e72e55b2011-01-06 22:19:30104
[email protected]8fb0ef02011-05-20 00:53:50105 # We used to provide a variable for changing how libraries were built.
106 # This variable remains until we can clean up all the users.
107 # This needs to be one nested variables dict in so that dependent
108 # gyp files can make use of it in their outer variables. (Yikes!)
109 # http://code.google.com/p/chromium/issues/detail?id=83308
110 'library%': 'static_library',
111
[email protected]e14a9f92009-08-05 19:26:07112 # Override branding to select the desired branding flavor.
113 'branding%': 'Chromium',
114
115 # Override buildtype to select the desired build flavor.
116 # Dev - everyday build for development/testing
117 # Official - release build (generally implies additional processing)
118 # TODO(mmoss) Once 'buildtype' is fully supported (e.g. Windows gyp
119 # conversion is done), some of the things which are now controlled by
120 # 'branding', such as symbol generation, will need to be refactored based
121 # on 'buildtype' (i.e. we don't care about saving symbols for non-Official
122 # builds).
123 'buildtype%': 'Dev',
[email protected]cbd5fd52009-08-26 00:14:27124
[email protected]e72e55b2011-01-06 22:19:30125 # Default architecture we're building for is the architecture we're
126 # building on.
127 'target_arch%': '<(host_arch)',
[email protected]b3f23ba2010-04-26 22:58:17128
[email protected]e72e55b2011-01-06 22:19:30129 # This variable tells WebCore.gyp and JavaScriptCore.gyp whether they are
130 # are built under a chromium full build (1) or a webkit.org chromium
131 # build (0).
132 'inside_chromium_build%': 1,
[email protected]8974e042010-06-21 18:06:52133
[email protected]e72e55b2011-01-06 22:19:30134 # Set to 1 to enable fast builds. It disables debug info for fastest
135 # compilation.
136 'fastbuild%': 0,
[email protected]93012ca2010-08-10 20:10:49137
[email protected]20960e072011-09-20 20:59:01138 # Set to 1 to enable dcheck in release without having to use the flag.
139 'dcheck_always_on%': 0,
140
[email protected]3d38d8e2011-04-16 20:48:51141 # Disable file manager component extension by default.
142 'file_manager_extension%': 0,
143
[email protected]8b2e9f392011-08-05 04:00:47144 # Disable WebUI TaskManager by default.
145 'webui_task_manager%': 0,
146
[email protected]e72e55b2011-01-06 22:19:30147 # Python version.
[email protected]a43c5a02011-05-27 06:54:51148 'python_ver%': '2.6',
[email protected]b3f23ba2010-04-26 22:58:17149
[email protected]e72e55b2011-01-06 22:19:30150 # Set ARM-v7 compilation flags
151 'armv7%': 0,
152
153 # Set Neon compilation flags (only meaningful if armv7==1).
154 'arm_neon%': 1,
155
156 # The system root for cross-compiles. Default: none.
157 'sysroot%': '',
158
159 # On Linux, we build with sse2 for Chromium builds.
160 'disable_sse2%': 0,
161
162 # Use libjpeg-turbo as the JPEG codec used by Chromium.
[email protected]32e56e52011-02-28 02:28:03163 'use_libjpeg_turbo%': 1,
[email protected]e72e55b2011-01-06 22:19:30164
165 # Variable 'component' is for cases where we would like to build some
166 # components as dynamic shared libraries but still need variable
167 # 'library' for static libraries.
168 # By default, component is set to whatever library is set to and
169 # it can be overriden by the GYP command line or by ~/.gyp/include.gypi.
[email protected]5a547332011-05-19 23:18:53170 'component%': 'static_library',
[email protected]e72e55b2011-01-06 22:19:30171
[email protected]bb6aba32011-01-07 19:04:43172 # Set to select the Title Case versions of strings in GRD files.
173 'use_titlecase_in_grd_files%': 0,
[email protected]63692212010-09-16 00:22:21174
[email protected]98da0042011-02-02 00:10:27175 # Use translations provided by volunteers at launchpad.net. This
176 # currently only works on Linux.
[email protected]00dc155832011-02-01 18:51:19177 'use_third_party_translations%': 0,
178
[email protected]9a425422011-01-11 00:53:18179 # Remoting compilation is enabled by default. Set to 0 to disable.
180 'remoting%': 1,
181
[email protected]5834f4392011-09-13 20:06:17182 # Threaded compositing
183 'use_threaded_compositing%': 0,
184
[email protected]a026daa2011-04-20 15:49:51185 # P2P APIs are compiled in by default. Set to 0 to disable.
186 # Also note that this should be enabled for remoting to compile.
187 'p2p_apis%': 1,
188
[email protected]1ec68c42011-06-01 13:56:25189 # Configuration policy is enabled by default. Set to 0 to disable.
190 'configuration_policy%': 1,
191
[email protected]4b58e7d2011-07-11 10:22:56192 # Safe browsing is compiled in by default. Set to 0 to disable.
193 'safe_browsing%': 1,
194
[email protected]5d451ad2011-02-11 16:43:46195 # If this is set, the clang plugins used on the buildbot will be used.
196 # Run tools/clang/scripts/update.sh to make sure they are compiled.
197 # This causes 'clang_chrome_plugins_flags' to be set.
198 # Has no effect if 'clang' is not set as well.
199 'clang_use_chrome_plugins%': 0,
200
[email protected]92799b632011-08-15 14:33:06201 # Enable building with ASAN (Clang's -fasan option).
202 # -fasan only works with clang, but asan=1 implies clang=1
203 # See https://sites.google.com/a/chromium.org/dev/developers/testing/addresssanitizer
204 'asan%': 0,
205
[email protected]1ad5a7b2011-06-24 03:15:13206 # Set to 1 compile with -fPIC cflag on linux. This is a must for shared
207 # libraries on linux x86-64 and arm, plus ASLR.
208 'linux_fpic%': 1,
209
[email protected]c6a1f94172011-07-05 02:35:00210 # Enable navigator.registerProtocolHandler and supporting UI.
211 'enable_register_protocol_handler%': 1,
212
[email protected]62af76e2011-08-01 02:34:01213 # Enable Web Intents and supporting UI.
214 'enable_web_intents%': 0,
215
[email protected]32877d302011-07-07 17:57:49216 # Smooth scrolling is disabled by default.
217 'enable_smooth_scrolling%': 0,
218
[email protected]dda90ae2011-07-19 22:07:48219 # Webrtc compilation is enabled by default. Set to 0 to disable.
220 'enable_webrtc%': 1,
221
[email protected]bb6aba32011-01-07 19:04:43222 'conditions': [
[email protected]7d7564a12011-06-21 19:20:22223 ['OS=="mac"', {
224 'use_skia%': 0,
[email protected]e4dbede82011-09-16 16:11:07225 # Mac uses clang by default, so turn on the plugin as well.
226 'clang_use_chrome_plugins%': 1,
[email protected]7d7564a12011-06-21 19:20:22227 }, {
228 'use_skia%': 1,
229 }],
230
[email protected]79e2336c2011-05-12 18:18:34231 # A flag for POSIX platforms
[email protected]c49ab0c2011-05-18 17:25:37232 ['OS=="win"', {
[email protected]79e2336c2011-05-12 18:18:34233 'os_posix%': 0,
[email protected]c49ab0c2011-05-18 17:25:37234 }, {
235 'os_posix%': 1,
[email protected]79e2336c2011-05-12 18:18:34236 }],
237
[email protected]9edeb712011-09-20 21:20:33238 # Flag to use X11 on non-Mac POSIX platforms
[email protected]da1c8d692011-09-20 20:35:01239 ['OS=="win" or OS=="mac" or OS=="android"', {
[email protected]79e2336c2011-05-12 18:18:34240 'use_x11%': 0,
[email protected]c49ab0c2011-05-18 17:25:37241 }, {
[email protected]c49ab0c2011-05-18 17:25:37242 'use_x11%': 1,
[email protected]79e2336c2011-05-12 18:18:34243 }],
244
[email protected]9edeb712011-09-20 21:20:33245 # Flag to use Gtk on non-Aura and non-Mac POSIX platforms
246 ['OS=="win" or OS=="mac" or OS=="android" or use_aura==1', {
247 'toolkit_uses_gtk%': 0,
248 }, {
249 'toolkit_uses_gtk%': 1,
250 }],
251
[email protected]63692212010-09-16 00:22:21252 # A flag to enable or disable our compile-time dependency
253 # on gnome-keyring. If that dependency is disabled, no gnome-keyring
254 # support will be available. This option is useful
255 # for Linux distributions.
256 ['chromeos==1', {
257 'use_gnome_keyring%': 0,
258 }, {
259 'use_gnome_keyring%': 1,
260 }],
[email protected]0afe5212010-10-01 18:56:11261
[email protected]bb6aba32011-01-07 19:04:43262 ['toolkit_views==0 or OS=="mac"', {
263 # GTK+ and Mac wants Title Case strings
264 'use_titlecase_in_grd_files%': 1,
265 }],
266
[email protected]1b4209f2011-01-07 00:25:40267 # Enable some hacks to support Flapper only on Chrome OS.
268 ['chromeos==1', {
269 'enable_flapper_hacks%': 1,
270 }, {
271 'enable_flapper_hacks%': 0,
272 }],
[email protected]3d38d8e2011-04-16 20:48:51273
274 # Enable file manager extension by default on Chrome OS.
275 ['chromeos==1', {
276 'file_manager_extension%': 1,
277 }, {
278 'file_manager_extension%': 0,
279 }],
[email protected]7de46352011-09-12 15:39:19280
[email protected]fd88a8842011-09-13 02:50:22281 # Enable WebUI TaskManager only on Chrome OS, Touch or PureView.
[email protected]3fa441d2011-09-18 17:28:50282 ['chromeos==1 or touchui==1 or use_only_pure_views==1 or use_aura==1', {
[email protected]8b2e9f392011-08-05 04:00:47283 'webui_task_manager%': 1,
284 }, {
285 'webui_task_manager%': 0,
286 }],
287
[email protected]da1c8d692011-09-20 20:35:01288 ['OS=="android"', {
289 'proprietary_codecs%': 1,
290 'enable_webrtc%': 0,
291 }],
292
[email protected]554b7062011-09-03 03:09:40293 # Enable smooth scrolling for Mac, Win, Linux and ChromeOS
294 ['OS=="linux" or OS=="mac" or OS=="win"', {
[email protected]32877d302011-07-07 17:57:49295 'enable_smooth_scrolling%': 1,
296 }, {
297 'enable_smooth_scrolling%': 0,
298 }],
[email protected]b3f23ba2010-04-26 22:58:17299 ],
[email protected]e14a9f92009-08-05 19:26:07300 },
301
[email protected]e72e55b2011-01-06 22:19:30302 # Copy conditionally-set variables out one scope.
[email protected]e14a9f92009-08-05 19:26:07303 'branding%': '<(branding)',
304 'buildtype%': '<(buildtype)',
[email protected]e0d00142009-09-18 22:10:27305 'target_arch%': '<(target_arch)',
[email protected]cf185b32010-01-12 04:29:59306 'host_arch%': '<(host_arch)',
[email protected]8fb0ef02011-05-20 00:53:50307 'library%': 'static_library',
[email protected]c153e5352009-09-22 12:37:44308 'toolkit_views%': '<(toolkit_views)',
[email protected]fd88a8842011-09-13 02:50:22309 'use_only_pure_views%': '<(use_only_pure_views)',
[email protected]9c8a1982011-05-24 23:08:58310 'views_compositor%': '<(views_compositor)',
[email protected]41423092011-08-25 15:39:58311 'use_aura%': '<(use_aura)',
[email protected]79e2336c2011-05-12 18:18:34312 'os_posix%': '<(os_posix)',
313 'toolkit_uses_gtk%': '<(toolkit_uses_gtk)',
[email protected]7d7564a12011-06-21 19:20:22314 'use_skia%': '<(use_skia)',
[email protected]79e2336c2011-05-12 18:18:34315 'use_x11%': '<(use_x11)',
[email protected]63692212010-09-16 00:22:21316 'use_gnome_keyring%': '<(use_gnome_keyring)',
[email protected]0afe5212010-10-01 18:56:11317 'linux_fpic%': '<(linux_fpic)',
[email protected]1b4209f2011-01-07 00:25:40318 'enable_flapper_hacks%': '<(enable_flapper_hacks)',
[email protected]c153e5352009-09-22 12:37:44319 'chromeos%': '<(chromeos)',
[email protected]93012ca2010-08-10 20:10:49320 'touchui%': '<(touchui)',
[email protected]5de10b5d2011-09-19 18:49:47321 'webui_dialogs%': '<(webui_dialogs)',
[email protected]e47c32032011-03-01 19:26:20322 'file_manager_extension%': '<(file_manager_extension)',
[email protected]8b2e9f392011-08-05 04:00:47323 'webui_task_manager%': '<(webui_task_manager)',
[email protected]b2f030c2009-09-24 20:36:21324 'inside_chromium_build%': '<(inside_chromium_build)',
[email protected]9c1949e2009-10-02 19:59:54325 'fastbuild%': '<(fastbuild)',
[email protected]20960e072011-09-20 20:59:01326 'dcheck_always_on%': '<(dcheck_always_on)',
[email protected]a76fe1a2010-03-01 23:39:36327 'python_ver%': '<(python_ver)',
[email protected]eafc0b452010-02-26 21:53:43328 'armv7%': '<(armv7)',
329 'arm_neon%': '<(arm_neon)',
[email protected]4d83eb72010-03-04 16:42:23330 'sysroot%': '<(sysroot)',
[email protected]ac120ff2010-04-28 02:14:22331 'disable_sse2%': '<(disable_sse2)',
[email protected]8974e042010-06-21 18:06:52332 'component%': '<(component)',
[email protected]bb6aba32011-01-07 19:04:43333 'use_titlecase_in_grd_files%': '<(use_titlecase_in_grd_files)',
[email protected]9e94cca2011-02-04 17:38:17334 'use_third_party_translations%': '<(use_third_party_translations)',
[email protected]9a425422011-01-11 00:53:18335 'remoting%': '<(remoting)',
[email protected]5834f4392011-09-13 20:06:17336 'use_threaded_compositing%': '<(use_threaded_compositing)',
[email protected]dda90ae2011-07-19 22:07:48337 'enable_webrtc%': '<(enable_webrtc)',
[email protected]a026daa2011-04-20 15:49:51338 'p2p_apis%': '<(p2p_apis)',
[email protected]1ec68c42011-06-01 13:56:25339 'configuration_policy%': '<(configuration_policy)',
[email protected]4b58e7d2011-07-11 10:22:56340 'safe_browsing%': '<(safe_browsing)',
[email protected]5d451ad2011-02-11 16:43:46341 'clang_use_chrome_plugins%': '<(clang_use_chrome_plugins)',
[email protected]92799b632011-08-15 14:33:06342 'asan%': '<(asan)',
[email protected]365dd5b92011-05-26 01:30:56343 'enable_register_protocol_handler%': '<(enable_register_protocol_handler)',
[email protected]32877d302011-07-07 17:57:49344 'enable_smooth_scrolling%': '<(enable_smooth_scrolling)',
[email protected]41ed4e82011-08-25 23:02:07345 'enable_web_intents%': '<(enable_web_intents)',
[email protected]4076d2f2011-08-11 18:20:22346 # Whether to build for Wayland display server
347 'use_wayland%': 0,
[email protected]a22ebd812011-06-23 00:05:39348
[email protected]caa95c82009-11-23 22:39:32349 # The release channel that this build targets. This is used to restrict
350 # channel-specific build options, like which installer packages to create.
351 # The default is 'all', which does no channel-specific filtering.
352 'channel%': 'all',
353
[email protected]b3fb8092009-03-12 19:09:24354 # Override chromium_mac_pch and set it to 0 to suppress the use of
355 # precompiled headers on the Mac. Prefix header injection may still be
356 # used, but prefix headers will not be precompiled. This is useful when
357 # using distcc to distribute a build to compile slaves that don't
358 # share the same compiler executable as the system driving the compilation,
359 # because precompiled headers rely on pointers into a specific compiler
360 # executable's image. Setting this to 0 is needed to use an experimental
361 # Linux-Mac cross compiler distcc farm.
362 'chromium_mac_pch%': 1,
363
[email protected]3224dcd2009-09-16 17:31:25364 # Mac OS X SDK and deployment target support.
365 # The SDK identifies the version of the system headers that will be used,
366 # and corresponds to the MAC_OS_X_VERSION_MAX_ALLOWED compile-time macro.
367 # "Maximum allowed" refers to the operating system version whose APIs are
368 # available in the headers.
369 # The deployment target identifies the minimum system version that the
370 # built products are expected to function on. It corresponds to the
371 # MAC_OS_X_VERSION_MIN_REQUIRED compile-time macro.
372 # To ensure these macros are available, #include <AvailabilityMacros.h>.
373 # Additional documentation on these macros is available at
374 # http://developer.apple.com/mac/library/technotes/tn2002/tn2064.html#SECTION3
375 # Chrome normally builds with the Mac OS X 10.5 SDK and sets the
376 # deployment target to 10.5. Other projects, such as O3D, may override
377 # these defaults.
378 'mac_sdk%': '10.5',
379 'mac_deployment_target%': '10.5',
[email protected]9543af052009-09-15 22:42:59380
[email protected]f5ecbba12009-04-03 04:35:18381 # Set to 1 to enable code coverage. In addition to build changes
382 # (e.g. extra CFLAGS), also creates a new target in the src/chrome
383 # project file called "coverage".
384 # Currently ignored on Windows.
385 'coverage%': 0,
[email protected]653bd5f032009-04-08 12:55:49386
[email protected]7477ea6f2009-12-22 23:28:15387 # Although base/allocator lets you select a heap library via an
[email protected]7e0d664a2009-12-03 21:07:47388 # environment variable, the libcmt shim it uses sometimes gets in
389 # the way. To disable it entirely, and switch to normal msvcrt, do e.g.
390 # 'win_use_allocator_shim': 0,
391 # 'win_release_RuntimeLibrary': 2
392 # to ~/.gyp/include.gypi, gclient runhooks --force, and do a release build.
[email protected]8974e042010-06-21 18:06:52393 'win_use_allocator_shim%': 1, # 1 = shim allocator via libcmt; 0 = msvcrt
[email protected]279cd4212009-09-11 22:32:11394
[email protected]95ff8082009-11-13 22:21:01395 # Whether usage of OpenMAX is enabled.
396 'enable_openmax%': 0,
397
[email protected]d01120e62010-05-10 17:04:48398 # Whether proprietary audio/video codecs are assumed to be included with
399 # this build (only meaningful if branding!=Chrome).
400 'proprietary_codecs%': 0,
401
[email protected]e5b2eaa2009-04-14 01:39:12402 # TODO(bradnelson): eliminate this when possible.
403 # To allow local gyp files to prevent release.vsprops from being included.
404 # Yes(1) means include release.vsprops.
405 # Once all vsprops settings are migrated into gyp, this can go away.
406 'msvs_use_common_release%': 1,
[email protected]606116d22009-05-06 22:38:23407
[email protected]cbd5fd52009-08-26 00:14:27408 # TODO(bradnelson): eliminate this when possible.
409 # To allow local gyp files to override additional linker options for msvs.
410 # Yes(1) means set use the common linker options.
[email protected]48c7af72009-07-03 22:00:19411 'msvs_use_common_linker_extras%': 1,
412
[email protected]1ffb6502009-06-02 07:46:24413 # TODO(sgk): eliminate this if possible.
414 # It would be nicer to support this via a setting in 'target_defaults'
415 # in chrome/app/locales/locales.gypi overriding the setting in the
416 # 'Debug' configuration in the 'target_defaults' dict below,
417 # but that doesn't work as we'd like.
418 'msvs_debug_link_incremental%': '2',
419
[email protected]1f790ef2011-01-11 20:45:36420 # Needed for some of the largest modules.
421 'msvs_debug_link_nonincremental%': '1',
422
[email protected]5ab8f482011-08-18 18:30:06423 # Turn on Use Library Dependency Inputs for linking chrome.dll on Windows
424 # to get incremental linking to be faster in debug builds.
425 'incremental_chrome_dll%': 0,
426
[email protected]573136142009-07-15 22:48:37427 # This is the location of the sandbox binary. Chrome looks for this before
428 # running the zygote process. If found, and SUID, it will be used to
429 # sandbox the zygote process and, thus, all renderer processes.
430 'linux_sandbox_path%': '',
431
[email protected]ad6d2c42009-09-15 20:13:38432 # Set this to true to enable SELinux support.
433 'selinux%': 0,
[email protected]4c9cc6c2009-10-01 18:54:57434
[email protected]58680ce2010-09-18 00:09:15435 # Set this to true when building with Clang.
436 # See http://code.google.com/p/chromium/wiki/Clang for details.
437 # TODO: eventually clang should behave identically to gcc, and this
438 # won't be necessary.
439 'clang%': 0,
440
[email protected]5e781232011-01-28 02:57:59441 # These two variables can be set in GYP_DEFINES while running
442 # |gclient runhooks| to let clang run a plugin in every compilation.
443 # Only has an effect if 'clang=1' is in GYP_DEFINES as well.
444 # Example:
[email protected]93120fe2011-02-03 20:46:42445 # 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:59446
447 'clang_load%': '',
448 'clang_add_plugin%': '',
449
[email protected]da1c8d692011-09-20 20:35:01450 # The default type of gtest.
451 'gtest_target_type%': 'executable',
452
[email protected]7664ab32011-02-01 23:35:25453 # Enable sampling based profiler.
454 # See http://google-perftools.googlecode.com/svn/trunk/doc/cpuprofile.html
455 'profiling%': '0',
456
[email protected]93b373502011-08-16 19:06:22457 # Enable strict glibc debug mode.
458 'glibcxx_debug%': 0,
459
[email protected]36532f332010-08-25 00:22:01460 # Override whether we should use Breakpad on Linux. I.e. for Chrome bot.
461 'linux_breakpad%': 0,
462 # And if we want to dump symbols for Breakpad-enabled builds.
463 'linux_dump_symbols%': 0,
464 # And if we want to strip the binary after dumping symbols.
[email protected]05cb6962009-10-01 23:29:03465 'linux_strip_binary%': 0,
[email protected]1d87c282010-09-15 22:24:49466 # Strip the test binaries needed for Linux reliability tests.
467 'linux_strip_reliability_tests%': 0,
[email protected]05cb6962009-10-01 23:29:03468
[email protected]46ce5b562010-06-16 18:39:53469 # Enable TCMalloc.
470 'linux_use_tcmalloc%': 1,
[email protected]01699e22009-11-11 19:24:24471
[email protected]39ca7de2010-04-16 08:04:03472 # Disable TCMalloc's debugallocation.
473 'linux_use_debugallocation%': 0,
474
[email protected]d8b60602010-03-26 09:41:22475 # Disable TCMalloc's heapchecker.
476 'linux_use_heapchecker%': 0,
477
[email protected]64e2d4a42010-08-27 10:13:21478 # Disable shadow stack keeping used by heapcheck to unwind the stacks
479 # better.
480 'linux_keep_shadow_stacks%': 0,
481
[email protected]556c5d72010-06-10 05:45:01482 # Set to 1 to link against libgnome-keyring instead of using dlopen().
483 'linux_link_gnome_keyring%': 0,
[email protected]abcc9ac2011-05-16 20:04:35484 # Set to 1 to link against gsettings APIs instead of using dlopen().
485 'linux_link_gsettings%': 0,
[email protected]556c5d72010-06-10 05:45:01486
[email protected]d8c7cbcc2009-10-02 19:00:31487 # Used to disable Native Client at compile time, for platforms where it
488 # isn't supported
489 'disable_nacl%': 0,
490
[email protected]77c1b29392009-12-04 06:21:29491 # Set Thumb compilation flags.
492 'arm_thumb%': 0,
493
[email protected]53e0f642010-03-05 01:41:56494 # Set ARM fpu compilation flags (only meaningful if armv7==1 and
495 # arm_neon==0).
496 'arm_fpu%': 'vfpv3',
497
[email protected]9821d0d2010-04-16 22:40:37498 # Enable new NPDevice API.
499 'enable_new_npdevice_api%': 0,
[email protected]ed154592010-04-29 00:18:50500
501 # Enable EGLImage support in OpenMAX
[email protected]58023be2011-02-04 20:34:14502 'enable_eglimage%': 1,
[email protected]ed154592010-04-29 00:18:50503
[email protected]6f51b27e2010-06-22 20:43:53504 # Enable a variable used elsewhere throughout the GYP files to determine
505 # whether to compile in the sources for the GPU plugin / process.
506 'enable_gpu%': 1,
507
[email protected]32e1dee2010-12-09 18:36:24508 # Use OpenSSL instead of NSS. Under development: see http://crbug.com/62803
[email protected]d518cd92010-09-29 12:27:44509 'use_openssl%': 0,
510
[email protected]e72e55b2011-01-06 22:19:30511 # .gyp files or targets should set chromium_code to 1 if they build
512 # Chromium-specific code, as opposed to external code. This variable is
513 # used to control such things as the set of warnings to enable, and
514 # whether warnings are treated as errors.
515 'chromium_code%': 0,
516
517 # Set to 1 to compile with the built in pdf viewer.
518 'internal_pdf%': 0,
519
520 # This allows to use libcros from the current system, ie. /usr/lib/
521 # The cros_api will be pulled in as a static library, and all headers
522 # from the system include dirs.
[email protected]bb6aba32011-01-07 19:04:43523 'system_libcros%': 0,
[email protected]e72e55b2011-01-06 22:19:30524
[email protected]e72e55b2011-01-06 22:19:30525 # NOTE: When these end up in the Mac bundle, we need to replace '-' for '_'
526 # so Cocoa is happy (http://crbug.com/20441).
527 'locales': [
528 'am', 'ar', 'bg', 'bn', 'ca', 'cs', 'da', 'de', 'el', 'en-GB',
529 'en-US', 'es-419', 'es', 'et', 'fa', 'fi', 'fil', 'fr', 'gu', 'he',
530 'hi', 'hr', 'hu', 'id', 'it', 'ja', 'kn', 'ko', 'lt', 'lv',
531 'ml', 'mr', 'nb', 'nl', 'pl', 'pt-BR', 'pt-PT', 'ro', 'ru',
532 'sk', 'sl', 'sr', 'sv', 'sw', 'ta', 'te', 'th', 'tr', 'uk',
533 'vi', 'zh-CN', 'zh-TW',
534 ],
535
[email protected]cc0322d2011-07-24 09:29:19536 # Pseudo locales are special locales which are used for testing and
537 # debugging. They don't get copied to the final app. For more info,
538 # check out https://sites.google.com/a/chromium.org/dev/Home/fake-bidi
539 'pseudo_locales': [
540 'fake-bidi',
541 ],
542
[email protected]bb6aba32011-01-07 19:04:43543 'grit_defines': [],
544
[email protected]29c2daea2011-01-05 20:38:50545 # Use Harfbuzz-NG instead of Harfbuzz.
546 # Under development: http://crbug.com/68551
547 'use_harfbuzz_ng%': 0,
548
[email protected]bd3bd442011-03-28 07:58:51549 # If debug_devtools is set to 1, JavaScript files for DevTools are
550 # stored as is and loaded from disk. Otherwise, a concatenated file
551 # is stored in resources.pak. It is still possible to load JS files
552 # from disk by passing --debug-devtools cmdline switch.
553 'debug_devtools%': 0,
554
[email protected]be8a9272011-02-10 22:06:07555 # Point to ICU directory.
556 'icu_src_dir': '../third_party/icu',
557
[email protected]912c55c2009-07-31 23:33:55558 'conditions': [
[email protected]da1c8d692011-09-20 20:35:01559 ['os_posix==1 and OS!="mac" and OS!="android"', {
[email protected]242a9e62009-11-03 17:32:10560 # This will set gcc_version to XY if you are running gcc X.Y.*.
561 # This is used to tweak build flags for gcc 4.4.
562 'gcc_version%': '<!(python <(DEPTH)/build/compiler_version.py)',
[email protected]4d83eb72010-03-04 16:42:23563 # Figure out the python architecture to decide if we build pyauto.
[email protected]efd68462010-03-04 17:07:54564 'python_arch%': '<!(<(DEPTH)/build/linux/python_arch.sh <(sysroot)/usr/lib/libpython<(python_ver).so.1.0)',
[email protected]cbd5fd52009-08-26 00:14:27565 'conditions': [
[email protected]2a77a9d2010-08-26 19:58:10566 ['branding=="Chrome"', {
[email protected]cbd5fd52009-08-26 00:14:27567 'linux_breakpad%': 1,
[email protected]cbd5fd52009-08-26 00:14:27568 }],
[email protected]4c9cc6c2009-10-01 18:54:57569 # All Chrome builds have breakpad symbols, but only process the
570 # symbols from official builds.
[email protected]c913cb82010-08-31 19:44:08571 ['(branding=="Chrome" and buildtype=="Official")', {
[email protected]4c9cc6c2009-10-01 18:54:57572 'linux_dump_symbols%': 1,
[email protected]4c9cc6c2009-10-01 18:54:57573 }],
[email protected]cbd5fd52009-08-26 00:14:27574 ],
[email protected]da1c8d692011-09-20 20:35:01575 }], # os_posix==1 and OS!="mac" and OS!="android"
576 ['OS=="android"', {
577 # Location of Android NDK.
578 'variables': {
579 'variables': {
580 'android_ndk_root%': '<!(/bin/echo -n $ANDROID_NDK_ROOT)',
581 'android_target_arch%': 'arm', # target_arch in android terms.
[email protected]bb6aba32011-01-07 19:04:43582
[email protected]da1c8d692011-09-20 20:35:01583 # Switch between different build types, currently only '0' is
584 # supported.
585 'android_build_type%': 0,
586 },
587 'android_ndk_root%': '<(android_ndk_root)',
588 'android_ndk_sysroot': '<(android_ndk_root)/platforms/android-9/arch-<(android_target_arch)',
589 'android_build_type%': '<(android_build_type)',
590 },
591 'android_ndk_root%': '<(android_ndk_root)',
592 'android_ndk_sysroot': '<(android_ndk_sysroot)',
593 'android_ndk_include': '<(android_ndk_sysroot)/usr/include',
594 'android_ndk_lib': '<(android_ndk_sysroot)/usr/lib',
595
596 # Uses Android's crash report system
597 'linux_breakpad%': 0,
598
599 # Always uses openssl.
600 'use_openssl%': 1,
601
602 'proprietary_codecs%': '<(proprietary_codecs)',
603 'safe_browsing%': 0,
604 'configuration_policy%': 0,
605
606 # Builds the gtest targets as a shared_library.
607 # TODO(michaelbai): Use the fixed value 'shared_library' once it
608 # is fully supported.
609 'gtest_target_type%': '<(gtest_target_type)',
610
611 # Uses system APIs for decoding audio and video.
612 'use_libffmpeg%': '0',
613
614 # Always use the chromium skia. The use_system_harfbuzz needs to
615 # match use_system_skia.
616 'use_system_skia%': '0',
617 'use_system_harfbuzz%': '0',
618
619 # Use the system icu.
620 'use_system_icu%': 1,
621
622 # Choose static link by build type.
623 'conditions': [
624 ['android_build_type==0', {
625 'static_link_system_icu%': 1,
626 }, {
627 'static_link_system_icu%': 0,
628 }],
629 ],
630 # Enable to use system sqlite.
631 'use_system_sqlite%': '<(android_build_type)',
632 # Enable to use system libjpeg.
633 'use_system_libjpeg%': '<(android_build_type)',
634 # Enable to use the system libexpat.
635 'use_system_libexpat%': '<(android_build_type)',
636 # Enable to use the system stlport, otherwise statically
637 # link the NDK one?
638 'use_system_stlport%': '<(android_build_type)',
639 # Copy it out one scope.
640 'android_build_type%': '<(android_build_type)',
641 }], # OS=="android"
[email protected]e14a9f92009-08-05 19:26:07642 ['OS=="mac"', {
[email protected]e1ece302011-09-15 03:58:11643 # Enable clang on mac by default!
644 'clang%': 1,
[email protected]e14a9f92009-08-05 19:26:07645 'conditions': [
646 # mac_product_name is set to the name of the .app bundle as it should
647 # appear on disk. This duplicates data from
648 # chrome/app/theme/chromium/BRANDING and
649 # chrome/app/theme/google_chrome/BRANDING, but is necessary to get
650 # these names into the build system.
651 ['branding=="Chrome"', {
652 'mac_product_name%': 'Google Chrome',
653 }, { # else: branding!="Chrome"
654 'mac_product_name%': 'Chromium',
655 }],
656
657 # Feature variables for enabling Mac Breakpad and Keystone auto-update
658 # support. Both features are on by default in official builds with
659 # Chrome branding.
660 ['branding=="Chrome" and buildtype=="Official"', {
661 'mac_breakpad%': 1,
662 'mac_keystone%': 1,
663 }, { # else: branding!="Chrome" or buildtype!="Official"
664 'mac_breakpad%': 0,
665 'mac_keystone%': 0,
666 }],
667 ],
668 }], # OS=="mac"
[email protected]bb6aba32011-01-07 19:04:43669
[email protected]912c55c2009-07-31 23:33:55670 # Whether to use multiple cores to compile with visual studio. This is
671 # optional because it sometimes causes corruption on VS 2005.
672 # It is on by default on VS 2008 and off on VS 2005.
673 ['OS=="win"', {
674 'conditions': [
[email protected]8974e042010-06-21 18:06:52675 ['component=="shared_library"', {
676 'win_use_allocator_shim%': 0,
677 }],
[email protected]912c55c2009-07-31 23:33:55678 ['MSVS_VERSION=="2005"', {
[email protected]669795372009-08-14 17:51:13679 'msvs_multi_core_compile%': 0,
[email protected]912c55c2009-07-31 23:33:55680 },{
681 'msvs_multi_core_compile%': 1,
682 }],
[email protected]10bb8c92009-08-07 21:16:03683 # Don't do incremental linking for large modules on 32-bit.
684 ['MSVS_OS_BITS==32', {
685 'msvs_large_module_debug_link_mode%': '1', # No
686 },{
687 'msvs_large_module_debug_link_mode%': '2', # Yes
688 }],
[email protected]3e2648a2011-03-21 20:58:50689 ['MSVS_VERSION=="2010e" or MSVS_VERSION=="2008e" or MSVS_VERSION=="2005e"', {
690 'msvs_express%': 1,
691 'secure_atl%': 0,
692 },{
693 'msvs_express%': 0,
694 'secure_atl%': 1,
695 }],
[email protected]912c55c2009-07-31 23:33:55696 ],
[email protected]ef4fa4072009-12-04 22:46:50697 'nacl_win64_defines': [
698 # This flag is used to minimize dependencies when building
699 # Native Client loader for 64-bit Windows.
700 'NACL_WIN64',
701 ],
[email protected]912c55c2009-07-31 23:33:55702 }],
[email protected]bb6aba32011-01-07 19:04:43703
[email protected]79e2336c2011-05-12 18:18:34704 ['os_posix==1 and chromeos==0 and target_arch!="arm"', {
[email protected]8e553f492010-10-25 20:05:44705 'use_cups%': 1,
706 }, {
707 'use_cups%': 0,
708 }],
[email protected]bb6aba32011-01-07 19:04:43709
[email protected]19fe8f0b2010-12-07 07:27:27710 # Set the relative path from this file to the GYP file of the JPEG
711 # library used by Chromium.
712 ['use_libjpeg_turbo==1', {
713 'libjpeg_gyp_path': '../third_party/libjpeg_turbo/libjpeg.gyp',
714 }, {
715 'libjpeg_gyp_path': '../third_party/libjpeg/libjpeg.gyp',
716 }], # use_libjpeg_turbo==1
[email protected]bb6aba32011-01-07 19:04:43717
[email protected]abcc9ac2011-05-16 20:04:35718 # Options controlling the use of GConf (the classic GNOME configuration
719 # system) and GIO, which contains GSettings (the new GNOME config system).
[email protected]1c6fe29302011-01-20 22:14:31720 ['chromeos==1', {
721 'use_gconf%': 0,
[email protected]abcc9ac2011-05-16 20:04:35722 'use_gio%': 0,
[email protected]1c6fe29302011-01-20 22:14:31723 }, {
724 'use_gconf%': 1,
[email protected]abcc9ac2011-05-16 20:04:35725 'use_gio%': 1,
[email protected]1c6fe29302011-01-20 22:14:31726 }],
727
[email protected]4de39f82011-03-28 12:01:29728 # Set up -D and -E flags passed into grit.
[email protected]1660bffd2011-03-23 16:24:29729 ['branding=="Chrome"', {
730 # TODO(mmoss) The .grd files look for _google_chrome, but for
731 # consistency they should look for google_chrome_build like C++.
[email protected]4de39f82011-03-28 12:01:29732 'grit_defines': ['-D', '_google_chrome',
733 '-E', 'CHROMIUM_BUILD=google_chrome'],
[email protected]1660bffd2011-03-23 16:24:29734 }, {
[email protected]4de39f82011-03-28 12:01:29735 'grit_defines': ['-D', '_chromium',
736 '-E', 'CHROMIUM_BUILD=chromium'],
[email protected]1660bffd2011-03-23 16:24:29737 }],
[email protected]bb6aba32011-01-07 19:04:43738 ['chromeos==1', {
739 'grit_defines': ['-D', 'chromeos'],
740 }],
741 ['toolkit_views==1', {
742 'grit_defines': ['-D', 'toolkit_views'],
743 }],
[email protected]fd88a8842011-09-13 02:50:22744 ['use_only_pure_views==1', {
745 'grit_defines': ['-D', 'use_only_pure_views'],
[email protected]1b546692011-06-30 18:22:30746 }],
[email protected]8dd791d2011-09-16 16:37:30747 ['use_aura==1', {
748 'grit_defines': ['-D', 'use_aura'],
749 }],
[email protected]bb6aba32011-01-07 19:04:43750 ['touchui==1', {
751 'grit_defines': ['-D', 'touchui'],
752 }],
[email protected]5de10b5d2011-09-19 18:49:47753 ['webui_dialogs==1', {
754 'grit_defines': ['-D', 'webui_dialogs'],
755 }],
[email protected]e47c32032011-03-01 19:26:20756 ['file_manager_extension==1', {
757 'grit_defines': ['-D', 'file_manager_extension'],
758 }],
[email protected]8b2e9f392011-08-05 04:00:47759 ['webui_task_manager==1', {
760 'grit_defines': ['-D', 'webui_task_manager'],
761 }],
[email protected]9a425422011-01-11 00:53:18762 ['remoting==1', {
763 'grit_defines': ['-D', 'remoting'],
764 }],
[email protected]bb6aba32011-01-07 19:04:43765 ['use_titlecase_in_grd_files==1', {
766 'grit_defines': ['-D', 'use_titlecase'],
767 }],
[email protected]00dc155832011-02-01 18:51:19768 ['use_third_party_translations==1', {
769 'grit_defines': ['-D', 'use_third_party_translations'],
[email protected]fb6c102e2011-06-27 21:58:12770 'locales': [
[email protected]8581e1ba2011-08-22 23:27:16771 'ast', 'bs', 'ca@valencia', 'en-AU', 'eo', 'eu', 'gl', 'hy', 'ia',
772 'ka', 'ku', 'kw', 'ms', 'ug'
[email protected]fb6c102e2011-06-27 21:58:12773 ],
[email protected]00dc155832011-02-01 18:51:19774 }],
[email protected]da1c8d692011-09-20 20:35:01775 ['OS=="android"', {
776 'grit_defines': ['-D', 'android'],
777 }],
[email protected]5d451ad2011-02-11 16:43:46778 ['clang_use_chrome_plugins==1', {
779 'clang_chrome_plugins_flags':
780 '<!(<(DEPTH)/tools/clang/scripts/plugin_flags.sh)',
781 }],
[email protected]cfa2e1102011-04-27 22:30:23782
[email protected]452da69e2011-05-24 02:36:05783 # Set use_ibus to 1 to enable ibus support.
[email protected]cfa2e1102011-04-27 22:30:23784 ['touchui==1 and chromeos==1', {
785 'use_ibus%': 1,
786 }, {
787 'use_ibus%': 0,
[email protected]365dd5b92011-05-26 01:30:56788 }],
789
790 ['enable_register_protocol_handler==1', {
791 'grit_defines': ['-D', 'enable_register_protocol_handler'],
792 }],
[email protected]92799b632011-08-15 14:33:06793
[email protected]41ed4e82011-08-25 23:02:07794 ['enable_web_intents==1', {
795 'grit_defines': ['-D', 'enable_web_intents'],
796 }],
797
[email protected]92799b632011-08-15 14:33:06798 ['asan==1', {
799 'clang%': 1,
800 }],
[email protected]912c55c2009-07-31 23:33:55801 ],
[email protected]2f80c312009-02-25 21:26:55802 },
803 'target_defaults': {
[email protected]1c966092009-08-20 21:19:26804 'variables': {
[email protected]a6e22132010-02-10 20:43:18805 # The condition that operates on chromium_code is in a target_conditions
806 # section, and will not have access to the default fallback value of
807 # chromium_code at the top of this file, or to the chromium_code
808 # variable placed at the root variables scope of .gyp files, because
809 # those variables are not set at target scope. As a workaround,
810 # if chromium_code is not set at target scope, define it in target scope
811 # to contain whatever value it has during early variable expansion.
812 # That's enough to make it available during target conditional
813 # processing.
814 'chromium_code%': '<(chromium_code)',
815
[email protected]7e0d664a2009-12-03 21:07:47816 # See http://gcc.gnu.org/onlinedocs/gcc-4.4.2/gcc/Optimize-Options.html
[email protected]d5d593a2009-08-28 23:23:29817 'mac_release_optimization%': '3', # Use -O3 unless overridden
[email protected]ffd984b12009-09-11 19:37:00818 'mac_debug_optimization%': '0', # Use -O0 unless overridden
[email protected]7e0d664a2009-12-03 21:07:47819 # See http://msdn.microsoft.com/en-us/library/aa652360(VS.71).aspx
820 'win_release_Optimization%': '2', # 2 = /Os
821 'win_debug_Optimization%': '0', # 0 = /Od
[email protected]6b0507b2010-05-07 07:41:21822 # See http://msdn.microsoft.com/en-us/library/8wtf2dfz(VS.71).aspx
823 'win_debug_RuntimeChecks%': '3', # 3 = all checks enabled, 0 = off
824 # See http://msdn.microsoft.com/en-us/library/47238hez(VS.71).aspx
[email protected]2ae6e022010-05-07 13:19:15825 'win_debug_InlineFunctionExpansion%': '', # empty = default, 0 = off,
826 'win_release_InlineFunctionExpansion%': '2', # 1 = only __inline, 2 = max
[email protected]fac10d12010-11-08 16:00:31827 # VS inserts quite a lot of extra checks to algorithms like
828 # std::partial_sort in Debug build which make them O(N^2)
829 # instead of O(N*logN). This is particularly slow under memory
830 # tools like ThreadSanitizer so we want it to be disablable.
831 # See http://msdn.microsoft.com/en-us/library/aa985982(v=VS.80).aspx
832 'win_debug_disable_iterator_debugging%': '0',
[email protected]7e0d664a2009-12-03 21:07:47833
[email protected]ffd984b12009-09-11 19:37:00834 'release_extra_cflags%': '',
835 'debug_extra_cflags%': '',
[email protected]92822e82009-09-18 14:26:56836 'release_valgrind_build%': 0,
[email protected]8974e042010-06-21 18:06:52837
838 'conditions': [
839 ['OS=="win" and component=="shared_library"', {
840 # See http://msdn.microsoft.com/en-us/library/aa652367.aspx
841 'win_release_RuntimeLibrary%': '2', # 2 = /MT (nondebug DLL)
842 'win_debug_RuntimeLibrary%': '3', # 3 = /MTd (debug DLL)
843 }, {
844 # See http://msdn.microsoft.com/en-us/library/aa652367.aspx
845 'win_release_RuntimeLibrary%': '0', # 0 = /MT (nondebug static)
846 'win_debug_RuntimeLibrary%': '1', # 1 = /MTd (debug static)
847 }],
848 ],
[email protected]1c966092009-08-20 21:19:26849 },
[email protected]32aa8cc2009-03-04 21:36:39850 'conditions': [
851 ['branding=="Chrome"', {
852 'defines': ['GOOGLE_CHROME_BUILD'],
853 }, { # else: branding!="Chrome"
854 'defines': ['CHROMIUM_BUILD'],
855 }],
[email protected]63e39a282011-07-13 20:41:28856 ['component=="shared_library"', {
857 'defines': ['COMPONENT_BUILD'],
858 }],
[email protected]06c756182010-04-27 18:31:31859 ['toolkit_views==1', {
[email protected]e6970232009-05-12 23:51:17860 'defines': ['TOOLKIT_VIEWS=1'],
861 }],
[email protected]fd88a8842011-09-13 02:50:22862 ['use_only_pure_views==1', {
863 'defines': ['USE_ONLY_PURE_VIEWS=1'],
[email protected]1b546692011-06-30 18:22:30864 }],
[email protected]9c8a1982011-05-24 23:08:58865 ['views_compositor==1', {
[email protected]c3870f42011-06-10 16:43:27866 'defines': ['VIEWS_COMPOSITOR=1'],
[email protected]9c8a1982011-05-24 23:08:58867 }],
[email protected]41423092011-08-25 15:39:58868 ['use_aura==1', {
869 'defines': ['USE_AURA=1'],
[email protected]e599f0132011-08-24 19:03:35870 }],
[email protected]fdc5bed2010-01-09 01:16:57871 ['chromeos==1', {
[email protected]16779842009-07-08 23:45:29872 'defines': ['OS_CHROMEOS=1'],
[email protected]2b883b92009-06-02 22:57:50873 }],
[email protected]0094fbe2010-07-15 21:51:43874 ['touchui==1', {
875 'defines': ['TOUCH_UI=1'],
876 }],
[email protected]236754a2011-07-28 17:38:23877 ['use_wayland==1', {
878 'defines': ['USE_WAYLAND=1', 'WL_EGL_PLATFORM=1'],
879 }],
[email protected]e47c32032011-03-01 19:26:20880 ['file_manager_extension==1', {
881 'defines': ['FILE_MANAGER_EXTENSION=1'],
882 }],
[email protected]8b2e9f392011-08-05 04:00:47883 ['webui_task_manager==1', {
884 'defines': ['WEBUI_TASK_MANAGER=1'],
885 }],
[email protected]7664ab32011-02-01 23:35:25886 ['profiling==1', {
887 'defines': ['ENABLE_PROFILING=1'],
888 }],
[email protected]93b373502011-08-16 19:06:22889 ['OS=="linux" and glibcxx_debug==1', {
890 'defines': ['_GLIBCXX_DEBUG=1',],
891 'cflags_cc!': ['-fno-rtti'],
892 'cflags_cc+': ['-frtti', '-g'],
893 }],
[email protected]542bf24a2010-06-11 23:08:17894 ['remoting==1', {
895 'defines': ['ENABLE_REMOTING=1'],
[email protected]c0bac532010-06-11 00:39:00896 }],
[email protected]5834f4392011-09-13 20:06:17897 ['use_threaded_compositing==1', {
898 'defines': ['WTF_USE_THREADED_COMPOSITING'],
899 }],
[email protected]a026daa2011-04-20 15:49:51900 ['p2p_apis==1', {
901 'defines': ['ENABLE_P2P_APIS=1'],
902 }],
[email protected]d01120e62010-05-10 17:04:48903 ['proprietary_codecs==1', {
904 'defines': ['USE_PROPRIETARY_CODECS'],
905 }],
[email protected]1b4209f2011-01-07 00:25:40906 ['enable_flapper_hacks==1', {
907 'defines': ['ENABLE_FLAPPER_HACKS=1'],
908 }],
[email protected]f31e2e52011-07-14 16:01:19909 ['configuration_policy==1', {
910 'defines': ['ENABLE_CONFIGURATION_POLICY'],
911 }],
[email protected]9c1949e2009-10-02 19:59:54912 ['fastbuild!=0', {
[email protected]5834f4392011-09-13 20:06:17913
[email protected]9c1949e2009-10-02 19:59:54914 'conditions': [
[email protected]1cc2fa72010-07-03 08:49:24915 # For Windows, we don't genererate debug information.
[email protected]9c1949e2009-10-02 19:59:54916 ['OS=="win"', {
917 'msvs_settings': {
918 'VCLinkerTool': {
919 'GenerateDebugInformation': 'false',
920 },
921 'VCCLCompilerTool': {
922 'DebugInformationFormat': '0',
923 }
924 }
[email protected]1cc2fa72010-07-03 08:49:24925 }, { # else: OS != "win", generate less debug information.
926 'variables': {
927 'debug_extra_cflags': '-g1',
928 },
[email protected]37c84192010-04-14 21:37:40929 }],
[email protected]aecc4d12011-01-19 05:32:33930 # Clang creates chubby debug information, which makes linking very
931 # slow. For now, don't create debug information with clang. See
932 # http://crbug.com/70000
933 ['OS=="linux" and clang==1', {
934 'variables': {
935 'debug_extra_cflags': '-g0',
936 },
937 }],
[email protected]9c1949e2009-10-02 19:59:54938 ], # conditions for fastbuild.
939 }], # fastbuild!=0
[email protected]20960e072011-09-20 20:59:01940 ['dcheck_always_on!=0', {
941 'defines': ['DCHECK_ALWAYS_ON=1'],
942 }], # dcheck_always_on!=0
[email protected]ad6d2c42009-09-15 20:13:38943 ['selinux==1', {
944 'defines': ['CHROMIUM_SELINUX=1'],
945 }],
[email protected]7e0d664a2009-12-03 21:07:47946 ['win_use_allocator_shim==0', {
947 'conditions': [
948 ['OS=="win"', {
949 'defines': ['NO_TCMALLOC'],
950 }],
951 ],
952 }],
[email protected]43f28f832010-02-03 02:28:48953 ['enable_gpu==1', {
[email protected]7477ea6f2009-12-22 23:28:15954 'defines': [
955 'ENABLE_GPU=1',
956 ],
957 }],
[email protected]b1c2a5542010-10-08 12:44:40958 ['use_openssl==1', {
959 'defines': [
960 'USE_OPENSSL=1',
961 ],
962 }],
[email protected]ed154592010-04-29 00:18:50963 ['enable_eglimage==1', {
964 'defines': [
965 'ENABLE_EGLIMAGE=1',
966 ],
967 }],
[email protected]7d7564a12011-06-21 19:20:22968 ['use_skia==1', {
969 'defines': [
970 'USE_SKIA=1',
971 ],
972 }],
[email protected]f5ecbba12009-04-03 04:35:18973 ['coverage!=0', {
974 'conditions': [
975 ['OS=="mac"', {
976 'xcode_settings': {
[email protected]ab2956372009-08-13 18:11:04977 'GCC_INSTRUMENT_PROGRAM_FLOW_ARCS': 'YES', # -fprofile-arcs
978 'GCC_GENERATE_TEST_COVERAGE_FILES': 'YES', # -ftest-coverage
[email protected]5ae4f55e2009-04-13 23:19:47979 },
[email protected]e4fb84c2009-12-28 20:45:43980 # Add -lgcov for types executable, shared_library, and
[email protected]dc259ce52010-04-13 04:03:10981 # loadable_module; not for static_library.
[email protected]e4fb84c2009-12-28 20:45:43982 # This is a delayed conditional.
[email protected]f5ecbba12009-04-03 04:35:18983 'target_conditions': [
[email protected]e4fb84c2009-12-28 20:45:43984 ['_type!="static_library"', {
[email protected]f5ecbba12009-04-03 04:35:18985 'xcode_settings': { 'OTHER_LDFLAGS': [ '-lgcov' ] },
[email protected]5ae4f55e2009-04-13 23:19:47986 }],
987 ],
988 }],
[email protected]da1c8d692011-09-20 20:35:01989 ['OS=="linux" or OS=="android"', {
[email protected]f5ecbba12009-04-03 04:35:18990 'cflags': [ '-ftest-coverage',
991 '-fprofile-arcs' ],
[email protected]7122ffd52009-04-30 23:19:00992 'link_settings': { 'libraries': [ '-lgcov' ] },
[email protected]f5ecbba12009-04-03 04:35:18993 }],
[email protected]e8f6ff42009-07-07 18:20:53994 # Finally, for Windows, we simply turn on profiling.
995 ['OS=="win"', {
996 'msvs_settings': {
997 'VCLinkerTool': {
998 'Profile': 'true',
999 },
[email protected]10bb8c92009-08-07 21:16:031000 'VCCLCompilerTool': {
[email protected]e8f6ff42009-07-07 18:20:531001 # /Z7, not /Zi, so coverage is happyb
1002 'DebugInformationFormat': '1',
[email protected]1f9471a2010-01-04 06:40:161003 'AdditionalOptions': ['/Yd'],
[email protected]e8f6ff42009-07-07 18:20:531004 }
1005 }
1006 }], # OS==win
1007 ], # conditions for coverage
1008 }], # coverage!=0
[email protected]4e4d6042010-08-26 18:34:381009 ['OS=="win"', {
1010 'defines': [
1011 '__STD_C',
1012 '_CRT_SECURE_NO_DEPRECATE',
1013 '_SCL_SECURE_NO_DEPRECATE',
1014 ],
1015 'include_dirs': [
1016 '<(DEPTH)/third_party/wtl/include',
1017 ],
1018 }], # OS==win
[email protected]365dd5b92011-05-26 01:30:561019 ['enable_register_protocol_handler==1', {
1020 'defines': [
[email protected]06bba4fb2011-06-09 05:17:191021 'ENABLE_REGISTER_PROTOCOL_HANDLER=1',
[email protected]365dd5b92011-05-26 01:30:561022 ],
1023 }],
[email protected]41ed4e82011-08-25 23:02:071024 ['enable_web_intents==1', {
1025 'defines': [
1026 'ENABLE_INTENTS=1',
1027 ],
1028 }],
[email protected]a6e22132010-02-10 20:43:181029 ], # conditions for 'target_defaults'
1030 'target_conditions': [
[email protected]c14d8e772010-02-09 22:06:151031 ['chromium_code==0', {
[email protected]d8543312010-02-10 17:43:281032 'conditions': [
[email protected]79e2336c2011-05-12 18:18:341033 [ 'os_posix==1 and OS!="mac"', {
[email protected]c0a6b272011-02-09 22:32:331034 # We don't want to get warnings from third-party code,
1035 # so remove any existing warning-enabling flags like -Wall.
[email protected]d8543312010-02-10 17:43:281036 'cflags!': [
1037 '-Wall',
1038 '-Wextra',
1039 '-Werror',
1040 ],
[email protected]ec1d155be2011-02-08 22:19:001041 'cflags': [
1042 # Don't warn about hash_map in third-party code.
1043 '-Wno-deprecated',
[email protected]c0a6b272011-02-09 22:32:331044 # Don't warn about printf format problems.
1045 # This is off by default in gcc but on in Ubuntu's gcc(!).
[email protected]ec392872011-02-10 22:38:221046 '-Wno-format',
[email protected]ec1d155be2011-02-08 22:19:001047 ],
[email protected]d16bd642011-07-25 23:59:181048 'cflags_cc!': [
1049 # TODO(fischman): remove this.
1050 # http://code.google.com/p/chromium/issues/detail?id=90453
1051 '-Wsign-compare',
1052 ]
[email protected]d8543312010-02-10 17:43:281053 }],
[email protected]6e4451892011-07-27 10:32:111054 [ 'os_posix==1 and OS!="mac" and chromeos==0', {
1055 'cflags': [
1056 # Don't warn about ignoring the return value from e.g. close().
1057 # This is off by default in some gccs but on by default in others.
1058 # Currently this option is not set for Chrome OS build because
1059 # the current version of gcc (4.3.4) used for building Chrome in
1060 # Chrome OS chroot doesn't support this option.
1061 # TODO(mazda): remove the conditional for Chrome OS when gcc
1062 # version is upgraded.
1063 '-Wno-unused-result',
1064 ],
1065 }],
[email protected]d8543312010-02-10 17:43:281066 [ 'OS=="win"', {
1067 'defines': [
1068 '_CRT_SECURE_NO_DEPRECATE',
1069 '_CRT_NONSTDC_NO_WARNINGS',
1070 '_CRT_NONSTDC_NO_DEPRECATE',
1071 '_SCL_SECURE_NO_DEPRECATE',
1072 ],
1073 'msvs_disabled_warnings': [4800],
1074 'msvs_settings': {
1075 'VCCLCompilerTool': {
[email protected]942c3a60f2011-05-03 02:04:111076 'WarningLevel': '3',
1077 'WarnAsError': 'false', # TODO(maruel): Enable it.
[email protected]d8543312010-02-10 17:43:281078 'Detect64BitPortabilityProblems': 'false',
1079 },
1080 },
1081 }],
[email protected]ea47b6a2011-07-17 19:39:421082 # TODO(darin): Unfortunately, some third_party code depends on base/
1083 [ 'OS=="win" and component=="shared_library"', {
1084 'msvs_disabled_warnings': [
1085 4251, # class 'std::xx' needs to have dll-interface.
1086 ],
1087 }],
[email protected]d8543312010-02-10 17:43:281088 [ 'OS=="mac"', {
1089 'xcode_settings': {
1090 'GCC_TREAT_WARNINGS_AS_ERRORS': 'NO',
[email protected]4c4c2e5332010-06-15 11:51:061091 'WARNING_CFLAGS!': ['-Wall', '-Wextra'],
[email protected]d8543312010-02-10 17:43:281092 },
1093 }],
[email protected]c14d8e772010-02-09 22:06:151094 ],
1095 }, {
1096 # In Chromium code, we define __STDC_FORMAT_MACROS in order to get the
1097 # C99 macros on Mac and Linux.
1098 'defines': [
1099 '__STDC_FORMAT_MACROS',
1100 ],
1101 'conditions': [
1102 ['OS!="win"', {
[email protected]40519592010-11-16 15:23:301103 'sources/': [ ['exclude', '_win(_unittest)?\\.(h|cc)$'],
[email protected]a316ca532010-11-15 14:08:161104 ['exclude', '(^|/)win/'],
[email protected]40519592010-11-16 15:23:301105 ['exclude', '(^|/)win_[^/]*\\.(h|cc)$'] ],
[email protected]c14d8e772010-02-09 22:06:151106 }],
1107 ['OS!="mac"', {
[email protected]40519592010-11-16 15:23:301108 'sources/': [ ['exclude', '_(cocoa|mac)(_unittest)?\\.(h|cc)$'],
[email protected]a316ca532010-11-15 14:08:161109 ['exclude', '(^|/)(cocoa|mac)/'],
1110 ['exclude', '\\.mm?$' ] ],
[email protected]c14d8e772010-02-09 22:06:151111 }],
[email protected]79e2336c2011-05-12 18:18:341112 ['toolkit_uses_gtk!=1', {
[email protected]c14d8e772010-02-09 22:06:151113 'sources/': [
[email protected]40519592010-11-16 15:23:301114 ['exclude', '_(chromeos|gtk|x|x11|xdg)(_unittest)?\\.(h|cc)$'],
[email protected]a316ca532010-11-15 14:08:161115 ['exclude', '(^|/)gtk/'],
[email protected]40519592010-11-16 15:23:301116 ['exclude', '(^|/)(gtk|x11)_[^/]*\\.(h|cc)$'],
[email protected]18cff3d2010-02-17 18:03:131117 ],
1118 }],
[email protected]f1b2cd02011-08-10 16:50:441119 ['use_wayland!=1', {
1120 'sources/': [
1121 ['exclude', '_(wayland)(_unittest)?\\.(h|cc)$'],
1122 ['exclude', '(^|/)wayland/'],
1123 ['exclude', '(^|/)(wayland)_[^/]*\\.(h|cc)$'],
1124 ],
1125 }],
[email protected]18cff3d2010-02-17 18:03:131126 ['OS!="linux"', {
1127 'sources/': [
[email protected]40519592010-11-16 15:23:301128 ['exclude', '_linux(_unittest)?\\.(h|cc)$'],
[email protected]a316ca532010-11-15 14:08:161129 ['exclude', '(^|/)linux/'],
[email protected]18cff3d2010-02-17 18:03:131130 ],
[email protected]c14d8e772010-02-09 22:06:151131 }],
[email protected]f98d7b92011-09-09 10:17:351132 ['OS!="android"', {
1133 'sources/': [
1134 ['exclude', '_android(_unittest)?\\.cc$'],
1135 ['exclude', '(^|/)android/'],
1136 ],
1137 }],
[email protected]c14d8e772010-02-09 22:06:151138 # We use "POSIX" to refer to all non-Windows operating systems.
1139 ['OS=="win"', {
[email protected]40519592010-11-16 15:23:301140 'sources/': [ ['exclude', '_posix\\.(h|cc)$'] ],
[email protected]f55bd4862010-05-27 15:38:071141 # turn on warnings for signed/unsigned mismatch on chromium code.
1142 'msvs_settings': {
1143 'VCCLCompilerTool': {
1144 'AdditionalOptions': ['/we4389'],
1145 },
1146 },
[email protected]c14d8e772010-02-09 22:06:151147 }],
[email protected]63e39a282011-07-13 20:41:281148 ['OS=="win" and component=="shared_library"', {
1149 'msvs_disabled_warnings': [
1150 4251, # class 'std::xx' needs to have dll-interface.
1151 ],
1152 }],
[email protected]c14d8e772010-02-09 22:06:151153 ['chromeos!=1', {
[email protected]40519592010-11-16 15:23:301154 'sources/': [ ['exclude', '_chromeos\\.(h|cc)$'] ]
[email protected]c14d8e772010-02-09 22:06:151155 }],
[email protected]06c756182010-04-27 18:31:311156 ['toolkit_views==0', {
[email protected]40519592010-11-16 15:23:301157 'sources/': [ ['exclude', '_views\\.(h|cc)$'] ]
[email protected]c14d8e772010-02-09 22:06:151158 }],
[email protected]41423092011-08-25 15:39:581159 ['use_aura==0', {
1160 'sources/': [ ['exclude', '_aura\\.(h|cc)$'] ]
1161 }],
[email protected]c14d8e772010-02-09 22:06:151162 ],
1163 }],
[email protected]a6e22132010-02-10 20:43:181164 ], # target_conditions for 'target_defaults'
[email protected]2f80c312009-02-25 21:26:551165 'default_configuration': 'Debug',
1166 'configurations': {
[email protected]5153767c2009-12-22 01:52:501167 # VCLinkerTool LinkIncremental values below:
1168 # 0 == default
1169 # 1 == /INCREMENTAL:NO
1170 # 2 == /INCREMENTAL
1171 # Debug links incremental, Release does not.
1172 #
[email protected]7b99801e2010-11-03 17:26:231173 # Abstract base configurations to cover common attributes.
[email protected]5153767c2009-12-22 01:52:501174 #
1175 'Common_Base': {
[email protected]bb05e452009-10-29 21:24:561176 'abstract': 1,
1177 'msvs_configuration_attributes': {
1178 'OutputDirectory': '$(SolutionDir)$(ConfigurationName)',
1179 'IntermediateDirectory': '$(OutDir)\\obj\\$(ProjectName)',
1180 'CharacterSet': '1',
1181 },
[email protected]5153767c2009-12-22 01:52:501182 },
1183 'x86_Base': {
1184 'abstract': 1,
[email protected]ef4fa4072009-12-04 22:46:501185 'msvs_settings': {
1186 'VCLinkerTool': {
1187 'TargetMachine': '1',
1188 },
1189 },
[email protected]2fa40782009-11-01 21:17:341190 'msvs_configuration_platform': 'Win32',
[email protected]bb05e452009-10-29 21:24:561191 },
[email protected]5153767c2009-12-22 01:52:501192 'x64_Base': {
1193 'abstract': 1,
1194 'msvs_configuration_platform': 'x64',
1195 'msvs_settings': {
1196 'VCLinkerTool': {
1197 'TargetMachine': '17', # x86 - 64
[email protected]5153767c2009-12-22 01:52:501198 'AdditionalLibraryDirectories!':
1199 ['<(DEPTH)/third_party/platformsdk_win7/files/Lib'],
1200 'AdditionalLibraryDirectories':
1201 ['<(DEPTH)/third_party/platformsdk_win7/files/Lib/x64'],
1202 },
[email protected]d26b4418ab2010-03-24 22:06:351203 'VCLibrarianTool': {
[email protected]5153767c2009-12-22 01:52:501204 'AdditionalLibraryDirectories!':
1205 ['<(DEPTH)/third_party/platformsdk_win7/files/Lib'],
1206 'AdditionalLibraryDirectories':
1207 ['<(DEPTH)/third_party/platformsdk_win7/files/Lib/x64'],
1208 },
1209 },
1210 'defines': [
1211 # Not sure if tcmalloc works on 64-bit Windows.
1212 'NO_TCMALLOC',
1213 ],
1214 },
1215 'Debug_Base': {
1216 'abstract': 1,
[email protected]14339762011-04-05 07:36:581217 'defines': [
1218 'DYNAMIC_ANNOTATIONS_ENABLED=1',
1219 'WTF_USE_DYNAMIC_ANNOTATIONS=1',
1220 ],
[email protected]1c966092009-08-20 21:19:261221 'xcode_settings': {
1222 'COPY_PHASE_STRIP': 'NO',
[email protected]d5d593a2009-08-28 23:23:291223 'GCC_OPTIMIZATION_LEVEL': '<(mac_debug_optimization)',
[email protected]a68c29a2011-07-01 16:23:491224 'OTHER_CFLAGS': [
[email protected]a68c29a2011-07-01 16:23:491225 '<@(debug_extra_cflags)',
1226 ],
[email protected]1c966092009-08-20 21:19:261227 },
[email protected]bb05e452009-10-29 21:24:561228 'msvs_settings': {
1229 'VCCLCompilerTool': {
[email protected]7e0d664a2009-12-03 21:07:471230 'Optimization': '<(win_debug_Optimization)',
[email protected]bb05e452009-10-29 21:24:561231 'PreprocessorDefinitions': ['_DEBUG'],
[email protected]6b0507b2010-05-07 07:41:211232 'BasicRuntimeChecks': '<(win_debug_RuntimeChecks)',
[email protected]7e0d664a2009-12-03 21:07:471233 'RuntimeLibrary': '<(win_debug_RuntimeLibrary)',
[email protected]2ae6e022010-05-07 13:19:151234 'conditions': [
1235 # According to MSVS, InlineFunctionExpansion=0 means
1236 # "default inlining", not "/Ob0".
1237 # Thus, we have to handle InlineFunctionExpansion==0 separately.
1238 ['win_debug_InlineFunctionExpansion==0', {
1239 'AdditionalOptions': ['/Ob0'],
1240 }],
1241 ['win_debug_InlineFunctionExpansion!=""', {
1242 'InlineFunctionExpansion':
1243 '<(win_debug_InlineFunctionExpansion)',
1244 }],
[email protected]fac10d12010-11-08 16:00:311245 ['win_debug_disable_iterator_debugging==1', {
1246 'PreprocessorDefinitions': ['_HAS_ITERATOR_DEBUGGING=0'],
1247 }],
[email protected]2ae6e022010-05-07 13:19:151248 ],
[email protected]bb05e452009-10-29 21:24:561249 },
1250 'VCLinkerTool': {
1251 'LinkIncremental': '<(msvs_debug_link_incremental)',
[email protected]646f6b42011-07-14 13:57:021252 # ASLR makes debugging with windbg difficult because Chrome.exe and
1253 # Chrome.dll share the same base name. As result, windbg will
1254 # name the Chrome.dll module like chrome_<base address>, where
1255 # <base address> typically changes with each launch. This in turn
1256 # means that breakpoints in Chrome.dll don't stick from one launch
1257 # to the next. For this reason, we turn ASLR off in debug builds.
1258 # Note that this is a three-way bool, where 0 means to pick up
1259 # the default setting, 1 is off and 2 is on.
1260 'RandomizedBaseAddress': 1,
[email protected]bb05e452009-10-29 21:24:561261 },
1262 'VCResourceCompilerTool': {
1263 'PreprocessorDefinitions': ['_DEBUG'],
1264 },
1265 },
[email protected]2f80c312009-02-25 21:26:551266 'conditions': [
[email protected]bb05e452009-10-29 21:24:561267 ['OS=="linux"', {
1268 'cflags': [
1269 '<@(debug_extra_cflags)',
1270 ],
[email protected]2f80c312009-02-25 21:26:551271 }],
[email protected]56cca4e2011-07-01 21:33:351272 ['release_valgrind_build==0', {
1273 'xcode_settings': {
1274 'OTHER_CFLAGS': [
1275 '-fstack-protector-all', # Implies -fstack-protector
1276 ],
1277 },
1278 }],
[email protected]2f80c312009-02-25 21:26:551279 ],
1280 },
[email protected]5153767c2009-12-22 01:52:501281 'Release_Base': {
1282 'abstract': 1,
[email protected]2f80c312009-02-25 21:26:551283 'defines': [
1284 'NDEBUG',
1285 ],
[email protected]1c966092009-08-20 21:19:261286 'xcode_settings': {
1287 'DEAD_CODE_STRIPPING': 'YES', # -Wl,-dead_strip
1288 'GCC_OPTIMIZATION_LEVEL': '<(mac_release_optimization)',
[email protected]ffd984b12009-09-11 19:37:001289 'OTHER_CFLAGS': [ '<@(release_extra_cflags)', ],
[email protected]1c966092009-08-20 21:19:261290 },
[email protected]bb05e452009-10-29 21:24:561291 'msvs_settings': {
[email protected]7e0d664a2009-12-03 21:07:471292 'VCCLCompilerTool': {
1293 'Optimization': '<(win_release_Optimization)',
1294 'RuntimeLibrary': '<(win_release_RuntimeLibrary)',
[email protected]2ae6e022010-05-07 13:19:151295 'conditions': [
1296 # According to MSVS, InlineFunctionExpansion=0 means
1297 # "default inlining", not "/Ob0".
1298 # Thus, we have to handle InlineFunctionExpansion==0 separately.
1299 ['win_release_InlineFunctionExpansion==0', {
1300 'AdditionalOptions': ['/Ob0'],
1301 }],
1302 ['win_release_InlineFunctionExpansion!=""', {
1303 'InlineFunctionExpansion':
1304 '<(win_release_InlineFunctionExpansion)',
1305 }],
1306 ],
[email protected]7e0d664a2009-12-03 21:07:471307 },
[email protected]bb05e452009-10-29 21:24:561308 'VCLinkerTool': {
[email protected]c059c612011-08-08 20:56:341309 # LinkIncremental is a tri-state boolean, where 0 means default
1310 # (i.e., inherit from parent solution), 1 means false, and
1311 # 2 means true.
[email protected]bb05e452009-10-29 21:24:561312 'LinkIncremental': '1',
[email protected]c059c612011-08-08 20:56:341313 # This corresponds to the /PROFILE flag which ensures the PDB
1314 # file contains FIXUP information (growing the PDB file by about
1315 # 5%) but does not otherwise alter the output binary. This
1316 # information is used by the Syzygy optimization tool when
1317 # decomposing the release image.
1318 'Profile': 'true',
[email protected]bb05e452009-10-29 21:24:561319 },
1320 },
[email protected]2f80c312009-02-25 21:26:551321 'conditions': [
[email protected]92822e82009-09-18 14:26:561322 ['release_valgrind_build==0', {
[email protected]14339762011-04-05 07:36:581323 'defines': [
1324 'NVALGRIND',
1325 'DYNAMIC_ANNOTATIONS_ENABLED=0',
1326 ],
[email protected]ee857512010-05-14 08:24:421327 }, {
[email protected]14339762011-04-05 07:36:581328 'defines': [
1329 'DYNAMIC_ANNOTATIONS_ENABLED=1',
1330 'WTF_USE_DYNAMIC_ANNOTATIONS=1',
1331 ],
[email protected]92822e82009-09-18 14:26:561332 }],
[email protected]7e0d664a2009-12-03 21:07:471333 ['win_use_allocator_shim==0', {
1334 'defines': ['NO_TCMALLOC'],
1335 }],
[email protected]bb05e452009-10-29 21:24:561336 ['OS=="linux"', {
1337 'cflags': [
[email protected]ffd984b12009-09-11 19:37:001338 '<@(release_extra_cflags)',
[email protected]bb05e452009-10-29 21:24:561339 ],
1340 }],
[email protected]2f80c312009-02-25 21:26:551341 ],
1342 },
[email protected]5153767c2009-12-22 01:52:501343 #
1344 # Concrete configurations
1345 #
1346 'Debug': {
1347 'inherit_from': ['Common_Base', 'x86_Base', 'Debug_Base'],
1348 },
1349 'Release': {
1350 'inherit_from': ['Common_Base', 'x86_Base', 'Release_Base'],
1351 'conditions': [
1352 ['msvs_use_common_release', {
[email protected]1f9471a2010-01-04 06:40:161353 'includes': ['release.gypi'],
[email protected]5153767c2009-12-22 01:52:501354 }],
1355 ]
1356 },
[email protected]f926fa0a2009-08-04 22:50:131357 'conditions': [
1358 [ 'OS=="win"', {
1359 # TODO(bradnelson): add a gyp mechanism to make this more graceful.
[email protected]ef4fa4072009-12-04 22:46:501360 'Debug_x64': {
[email protected]5153767c2009-12-22 01:52:501361 'inherit_from': ['Common_Base', 'x64_Base', 'Debug_Base'],
[email protected]78263c12009-11-01 23:45:301362 },
1363 'Release_x64': {
[email protected]5153767c2009-12-22 01:52:501364 'inherit_from': ['Common_Base', 'x64_Base', 'Release_Base'],
[email protected]78263c12009-11-01 23:45:301365 },
[email protected]f926fa0a2009-08-04 22:50:131366 }],
1367 ],
[email protected]2f80c312009-02-25 21:26:551368 },
1369 },
1370 'conditions': [
[email protected]79e2336c2011-05-12 18:18:341371 ['os_posix==1 and OS!="mac"', {
[email protected]9d384032009-03-20 23:13:261372 'target_defaults': {
[email protected]5315f2842009-04-28 00:43:271373 # Enable -Werror by default, but put it in a variable so it can
1374 # be disabled in ~/.gyp/include.gypi on the valgrind builders.
1375 'variables': {
[email protected]57e94022011-05-04 15:33:191376 # Use -fno-strict-aliasing, see http://crbug.com/32204
[email protected]ecf52cb82010-01-13 19:25:421377 'no_strict_aliasing%': 1,
[email protected]79e2336c2011-05-12 18:18:341378 'conditions': [
1379 ['OS=="linux"', {
1380 'werror%': '-Werror',
1381 }, { # turn off -Werror on other Unices
1382 'werror%': '',
1383 }],
[email protected]47deeb62009-12-17 14:49:391384 ],
[email protected]5315f2842009-04-28 00:43:271385 },
[email protected]9d384032009-03-20 23:13:261386 'cflags': [
[email protected]1bba09c2009-08-13 12:53:161387 '<(werror)', # See note above about the werror variable.
1388 '-pthread',
1389 '-fno-exceptions',
1390 '-Wall',
[email protected]0fa17082010-03-26 00:48:051391 # TODO(evan): turn this back on once all the builds work.
1392 # '-Wextra',
[email protected]225c8f52010-02-05 22:23:201393 # Don't warn about unused function params. We use those everywhere.
1394 '-Wno-unused-parameter',
1395 # Don't warn about the "struct foo f = {0};" initialization pattern.
1396 '-Wno-missing-field-initializers',
[email protected]1bba09c2009-08-13 12:53:161397 '-D_FILE_OFFSET_BITS=64',
[email protected]3df6e3a2010-01-21 20:23:121398 # Don't export any symbols (for example, to plugins we dlopen()).
1399 # Note: this is *required* to make some plugins work.
1400 '-fvisibility=hidden',
[email protected]7ca6ce12010-09-15 23:39:351401 '-pipe',
[email protected]8a2fcba2009-07-29 00:52:241402 ],
1403 'cflags_cc': [
[email protected]832d0212009-10-28 19:12:221404 '-fno-rtti',
[email protected]8a2fcba2009-07-29 00:52:241405 '-fno-threadsafe-statics',
[email protected]f5986c42009-11-17 18:39:361406 # Make inline functions have hidden visiblity by default.
1407 # Surprisingly, not covered by -fvisibility=hidden.
1408 '-fvisibility-inlines-hidden',
[email protected]554abd902011-07-25 04:03:171409 # GCC turns on -Wsign-compare for C++ under -Wall, but clang doesn't,
1410 # so we specify it explicitly.
1411 # TODO(fischman): remove this if http://llvm.org/PR10448 obsoletes it.
[email protected]d16bd642011-07-25 23:59:181412 # http://code.google.com/p/chromium/issues/detail?id=90453
[email protected]554abd902011-07-25 04:03:171413 '-Wsign-compare',
[email protected]9d384032009-03-20 23:13:261414 ],
[email protected]a6cf87e2009-04-03 04:07:381415 'ldflags': [
[email protected]138241f2010-03-30 23:53:101416 '-pthread', '-Wl,-z,noexecstack',
[email protected]9d384032009-03-20 23:13:261417 ],
[email protected]3aacaf952009-04-02 15:34:091418 'configurations': {
[email protected]5153767c2009-12-22 01:52:501419 'Debug_Base': {
[email protected]c5bdc032009-04-20 19:11:311420 'variables': {
1421 'debug_optimize%': '0',
1422 },
[email protected]3aacaf952009-04-02 15:34:091423 'defines': [
1424 '_DEBUG',
1425 ],
1426 'cflags': [
[email protected]9cb5cc702011-02-01 19:56:041427 '-O>(debug_optimize)',
[email protected]3aacaf952009-04-02 15:34:091428 '-g',
1429 ],
[email protected]da1c8d692011-09-20 20:35:011430 'conditions' : [
1431 ['OS=="android"', {
1432 'cflags': [
1433 '-fno-omit-frame-pointer',
1434 ],
1435 }],
1436 ],
1437 'target_conditions' : [
1438 ['_toolset=="target"', {
1439 'conditions': [
1440 ['OS=="android" and debug_optimize==0', {
1441 'cflags': [
1442 '-mlong-calls', # Needed when compiling with -O0
1443 ],
1444 }],
1445 ['arm_thumb==1', {
1446 'cflags': [
1447 '-marm',
1448 ],
1449 }],
1450 ],
1451 }],
1452 ],
[email protected]5315f2842009-04-28 00:43:271453 },
[email protected]5153767c2009-12-22 01:52:501454 'Release_Base': {
[email protected]740e2de2009-07-21 11:41:011455 'variables': {
1456 'release_optimize%': '2',
[email protected]1dd529642010-05-15 01:02:511457 # Binaries become big and gold is unable to perform GC
1458 # and remove unused sections for some of test targets
1459 # on 32 bit platform.
1460 # (This is currently observed only in chromeos valgrind bots)
1461 # The following flag is to disable --gc-sections linker
1462 # option for these bots.
1463 'no_gc_sections%': 0,
[email protected]409dceef2011-05-10 19:49:121464
1465 # TODO(bradnelson): reexamine how this is done if we change the
1466 # expansion of configurations
1467 'release_valgrind_build%': 0,
[email protected]740e2de2009-07-21 11:41:011468 },
[email protected]3aacaf952009-04-02 15:34:091469 'cflags': [
[email protected]9cb5cc702011-02-01 19:56:041470 '-O>(release_optimize)',
[email protected]d8cc3a62009-04-08 18:29:531471 # Don't emit the GCC version ident directives, they just end up
1472 # in the .comment section taking up binary size.
1473 '-fno-ident',
1474 # Put data and code in their own sections, so that unused symbols
1475 # can be removed at link time with --gc-sections.
1476 '-fdata-sections',
1477 '-ffunction-sections',
[email protected]3aacaf952009-04-02 15:34:091478 ],
[email protected]c902f2cba2010-08-06 20:04:181479 'ldflags': [
1480 # Specifically tell the linker to perform optimizations.
1481 # See http://lwn.net/Articles/192624/ .
1482 '-Wl,-O1',
[email protected]27c2e492010-08-06 22:55:221483 '-Wl,--as-needed',
[email protected]c902f2cba2010-08-06 20:04:181484 ],
[email protected]1dd529642010-05-15 01:02:511485 'conditions' : [
1486 ['no_gc_sections==0', {
1487 'ldflags': [
1488 '-Wl,--gc-sections',
1489 ],
1490 }],
[email protected]da1c8d692011-09-20 20:35:011491 ['OS=="android"', {
1492 'cflags': [
1493 '-fomit-frame-pointer',
1494 ],
1495 }],
[email protected]ecf7b6482010-10-13 09:15:201496 ['clang==1', {
1497 'cflags!': [
1498 '-fno-ident',
1499 ],
1500 }],
[email protected]7664ab32011-02-01 23:35:251501 ['profiling==1', {
1502 'cflags': [
1503 '-fno-omit-frame-pointer',
1504 '-g',
1505 ],
1506 }],
[email protected]c75f33e42011-05-04 18:11:521507 # At gyp time, we test the linker for ICF support; this flag
1508 # is then provided to us by gyp. (Currently only gold supports
1509 # an --icf flag.)
[email protected]16d71b0d2011-06-22 00:43:531510 # There seems to be a conflict of --icf and -pie in gold which
1511 # can generate crashy binaries. As a security measure, -pie
1512 # takes precendence for now.
[email protected]409dceef2011-05-10 19:49:121513 ['LINKER_SUPPORTS_ICF==1 and release_valgrind_build==0', {
[email protected]f2fcf4df72011-06-03 20:05:461514 'target_conditions': [
1515 ['_toolset=="target"', {
1516 'ldflags': [
[email protected]16d71b0d2011-06-22 00:43:531517 #'-Wl,--icf=safe',
1518 '-Wl,--icf=none',
[email protected]f2fcf4df72011-06-03 20:05:461519 ]
1520 }]
[email protected]c75f33e42011-05-04 18:11:521521 ]
1522 }],
[email protected]1dd529642010-05-15 01:02:511523 ]
[email protected]3aacaf952009-04-02 15:34:091524 },
1525 },
[email protected]601b540222009-04-03 21:32:041526 'variants': {
1527 'coverage': {
1528 'cflags': ['-fprofile-arcs', '-ftest-coverage'],
1529 'ldflags': ['-fprofile-arcs'],
1530 },
1531 'profile': {
1532 'cflags': ['-pg', '-g'],
1533 'ldflags': ['-pg'],
1534 },
1535 'symbols': {
1536 'cflags': ['-g'],
1537 },
1538 },
[email protected]606116d22009-05-06 22:38:231539 'conditions': [
[email protected]04b482602011-09-14 02:36:211540 ['target_arch=="ia32"', {
1541 'target_conditions': [
1542 ['_toolset=="target"', {
1543 'asflags': [
1544 # Needed so that libs with .s files (e.g. libicudata.a)
1545 # are compatible with the general 32-bit-ness.
1546 '-32',
1547 ],
1548 # All floating-point computations on x87 happens in 80-bit
1549 # precision. Because the C and C++ language standards allow
1550 # the compiler to keep the floating-point values in higher
1551 # precision than what's specified in the source and doing so
1552 # is more efficient than constantly rounding up to 64-bit or
1553 # 32-bit precision as specified in the source, the compiler,
1554 # especially in the optimized mode, tries very hard to keep
1555 # values in x87 floating-point stack (in 80-bit precision)
1556 # as long as possible. This has important side effects, that
1557 # the real value used in computation may change depending on
1558 # how the compiler did the optimization - that is, the value
1559 # kept in 80-bit is different than the value rounded down to
1560 # 64-bit or 32-bit. There are possible compiler options to
1561 # make this behavior consistent (e.g. -ffloat-store would keep
1562 # all floating-values in the memory, thus force them to be
1563 # rounded to its original precision) but they have significant
1564 # runtime performance penalty.
1565 #
1566 # -mfpmath=sse -msse2 makes the compiler use SSE instructions
1567 # which keep floating-point values in SSE registers in its
1568 # native precision (32-bit for single precision, and 64-bit
1569 # for double precision values). This means the floating-point
1570 # value used during computation does not change depending on
1571 # how the compiler optimized the code, since the value is
1572 # always kept in its specified precision.
1573 'conditions': [
1574 ['branding=="Chromium" and disable_sse2==0', {
1575 'cflags': [
1576 '-march=pentium4',
1577 '-msse2',
1578 '-mfpmath=sse',
1579 ],
1580 }],
1581 # ChromeOS targets Pinetrail, which is sse3, but most of the
1582 # benefit comes from sse2 so this setting allows ChromeOS
1583 # to build on other CPUs. In the future -march=atom would
1584 # help but requires a newer compiler.
1585 ['chromeos==1 and disable_sse2==0', {
1586 'cflags': [
1587 '-msse2',
1588 ],
1589 }],
1590 # Install packages have started cropping up with
1591 # different headers between the 32-bit and 64-bit
1592 # versions, so we have to shadow those differences off
1593 # and make sure a 32-bit-on-64-bit build picks up the
1594 # right files.
1595 ['host_arch!="ia32"', {
1596 'include_dirs+': [
1597 '/usr/include32',
1598 ],
1599 }],
1600 ],
1601 # -mmmx allows mmintrin.h to be used for mmx intrinsics.
1602 # video playback is mmx and sse2 optimized.
[email protected]ffde7932009-05-29 00:39:061603 'cflags': [
[email protected]04b482602011-09-14 02:36:211604 '-m32',
1605 '-mmmx',
1606 ],
1607 'ldflags': [
1608 '-m32',
[email protected]ffde7932009-05-29 00:39:061609 ],
1610 }],
[email protected]606116d22009-05-06 22:38:231611 ],
1612 }],
[email protected]3dda8a962009-08-10 18:58:071613 ['target_arch=="arm"', {
[email protected]77c1b29392009-12-04 06:21:291614 'target_conditions': [
1615 ['_toolset=="target"', {
1616 'cflags_cc': [
1617 # The codesourcery arm-2009q3 toolchain warns at that the ABI
1618 # has changed whenever it encounters a varargs function. This
1619 # silences those warnings, as they are not helpful and
1620 # clutter legitimate warnings.
1621 '-Wno-abi',
1622 ],
1623 'conditions': [
[email protected]da1c8d692011-09-20 20:35:011624 ['arm_thumb==1', {
[email protected]77c1b29392009-12-04 06:21:291625 'cflags': [
1626 '-mthumb',
[email protected]77c1b29392009-12-04 06:21:291627 ]
1628 }],
1629 ['armv7==1', {
[email protected]dc9711f2009-11-13 19:30:251630 'cflags': [
1631 '-march=armv7-a',
1632 '-mtune=cortex-a8',
[email protected]dc9711f2009-11-13 19:30:251633 '-mfloat-abi=softfp',
1634 ],
[email protected]eafc0b452010-02-26 21:53:431635 'conditions': [
1636 ['arm_neon==1', {
1637 'cflags': [ '-mfpu=neon', ],
1638 }, {
[email protected]53e0f642010-03-05 01:41:561639 'cflags': [ '-mfpu=<(arm_fpu)', ],
[email protected]eafc0b452010-02-26 21:53:431640 }]
1641 ],
[email protected]dc9711f2009-11-13 19:30:251642 }],
[email protected]da1c8d692011-09-20 20:35:011643 ['OS=="android"', {
1644 # The following flags are derived from what Android uses
1645 # by default when building for arm.
1646 'cflags': [ '-Wno-psabi', ],
1647 'conditions': [
1648 ['arm_thumb == 1', {
1649 # Android toolchain doesn't support -mimplicit-it=thumb
1650 'cflags!': [ '-Wa,-mimplicit-it=thumb', ],
1651 'cflags': [ '-mthumb-interwork', ],
1652 }],
1653 ['armv7==0', {
1654 # Flags suitable for Android emulator
1655 'cflags': [
1656 '-march=armv5te',
1657 '-mtune=xscale',
1658 '-msoft-float',
1659 '-D__ARM_ARCH_5__',
1660 '-D__ARM_ARCH_5T__',
1661 '-D__ARM_ARCH_5E__',
1662 '-D__ARM_ARCH_5TE__',
1663 ],
1664 }],
1665 ],
1666 }],
[email protected]3dda8a962009-08-10 18:58:071667 ],
1668 }],
1669 ],
1670 }],
[email protected]2fb843b2010-08-12 02:11:081671 ['linux_fpic==1', {
[email protected]c76723a2010-01-25 23:10:581672 'cflags': [
1673 '-fPIC',
1674 ],
1675 }],
[email protected]ee28c9f2009-09-04 01:53:011676 ['sysroot!=""', {
[email protected]fd36ce822009-10-28 20:13:571677 'target_conditions': [
1678 ['_toolset=="target"', {
1679 'cflags': [
1680 '--sysroot=<(sysroot)',
1681 ],
1682 'ldflags': [
1683 '--sysroot=<(sysroot)',
1684 ],
1685 }]]
[email protected]ee28c9f2009-09-04 01:53:011686 }],
[email protected]58680ce2010-09-18 00:09:151687 ['clang==1', {
[email protected]18ca15a2011-08-10 03:07:121688 'cflags': [
1689 '-Wheader-hygiene',
1690 # Clang spots more unused functions.
1691 '-Wno-unused-function',
1692 # Don't die on dtoa code that uses a char as an array index.
1693 '-Wno-char-subscripts',
[email protected]d6431722011-09-01 00:46:331694 # Especially needed for gtest macros using enum values from Mac
1695 # system headers.
1696 # TODO(pkasting): In C++11 this is legal, so this should be
1697 # removed when we change to that. (This is also why we don't
1698 # bother fixing all these cases today.)
[email protected]18ca15a2011-08-10 03:07:121699 '-Wno-unnamed-type-template-args',
1700 ],
1701 'cflags!': [
1702 # Clang doesn't seem to know know this flag.
1703 '-mfpmath=sse',
1704 ],
[email protected]58680ce2010-09-18 00:09:151705 }],
[email protected]5d451ad2011-02-11 16:43:461706 ['clang==1 and clang_use_chrome_plugins==1', {
[email protected]d23720682011-08-11 00:16:261707 'cflags': [
1708 '<(clang_chrome_plugins_flags)',
1709 ],
[email protected]5d451ad2011-02-11 16:43:461710 }],
[email protected]5e781232011-01-28 02:57:591711 ['clang==1 and clang_load!="" and clang_add_plugin!=""', {
[email protected]d23720682011-08-11 00:16:261712 'cflags': [
1713 '-Xclang', '-load', '-Xclang', '<(clang_load)',
1714 '-Xclang', '-add-plugin', '-Xclang', '<(clang_add_plugin)',
1715 ],
[email protected]5e781232011-01-28 02:57:591716 }],
[email protected]92799b632011-08-15 14:33:061717 ['asan==1', {
1718 # Only in the linux section for now, since ASAN doesn't
1719 # work on Mac yet.
1720 'cflags': [
1721 '-fasan -w',
1722 ],
1723 'ldflags': [
1724 '-fasan',
1725 ],
1726 }],
[email protected]cc4219a2009-08-14 05:30:521727 ['no_strict_aliasing==1', {
1728 'cflags': [
1729 '-fno-strict-aliasing',
1730 ],
1731 }],
[email protected]cbd5fd52009-08-26 00:14:271732 ['linux_breakpad==1', {
[email protected]c87efd42010-08-26 18:28:171733 'cflags': [ '-g' ],
[email protected]cbd5fd52009-08-26 00:14:271734 'defines': ['USE_LINUX_BREAKPAD'],
1735 }],
[email protected]d8b60602010-03-26 09:41:221736 ['linux_use_heapchecker==1', {
1737 'variables': {'linux_use_tcmalloc%': 1},
1738 }],
[email protected]61a9b2d82010-02-26 00:31:081739 ['linux_use_tcmalloc==0', {
1740 'defines': ['NO_TCMALLOC'],
[email protected]01699e22009-11-11 19:24:241741 }],
[email protected]d8b60602010-03-26 09:41:221742 ['linux_use_heapchecker==0', {
1743 'defines': ['NO_HEAPCHECKER'],
1744 }],
[email protected]64e2d4a42010-08-27 10:13:211745 ['linux_keep_shadow_stacks==1', {
1746 'defines': ['KEEP_SHADOW_STACKS'],
1747 'cflags': ['-finstrument-functions'],
1748 }],
[email protected]606116d22009-05-06 22:38:231749 ],
[email protected]9d384032009-03-20 23:13:261750 },
1751 }],
[email protected]c51e8d52009-12-11 20:04:061752 # FreeBSD-specific options; note that most FreeBSD options are set above,
1753 # with Linux.
1754 ['OS=="freebsd"', {
1755 'target_defaults': {
1756 'ldflags': [
1757 '-Wl,--no-keep-memory',
1758 ],
1759 },
1760 }],
[email protected]da1c8d692011-09-20 20:35:011761 # Android-specific options; note that most are set above with Linux.
1762 ['OS=="android"', {
1763 'variables': {
1764 'android_target_arch%': 'arm', # target_arch in android terms.
1765 'conditions': [
1766 # Android uses x86 instead of ia32 for their target_arch designation.
1767 ['target_arch=="ia32"', {
1768 'android_target_arch%': 'x86',
1769 }],
1770 # Use shared stlport library when system one used.
1771 # Figure this out early since it needs symbols from libgcc.a, so it
1772 # has to be before that in the set of libraries.
1773 ['use_system_stlport==1', {
1774 'android_stlport_library': 'stlport',
1775 }, {
1776 'android_stlport_library': 'stlport_static',
1777 }],
1778 ],
1779
1780 # Placing this variable here prevents from forking libvpx, used
1781 # by remoting. Remoting is off, so it needn't built,
1782 # so forking it's deps seems like overkill.
1783 # But this variable need defined to properly run gyp.
1784 # A proper solution is to have an OS==android conditional
1785 # in third_party/libvpx/libvpx.gyp to define it.
1786 'libvpx_path': 'lib/linux/arm',
1787 },
1788 'target_defaults': {
1789 # Build a Release build by default to match Android build behavior.
1790 # This is typical with Android because Debug builds tend to be much
1791 # larger and run very slowly on constrained devices. It is still
1792 # possible to do a Debug build by specifying BUILDTYPE=Debug on the
1793 # 'make' command line.
1794 'default_configuration': 'Release',
1795
1796 'variables': {
1797 'release_extra_cflags%': '',
1798 },
1799
1800 'target_conditions': [
1801 # Settings for building device targets using Android's toolchain.
1802 # These are based on the setup.mk file from the Android NDK.
1803 #
1804 # The NDK Android executable link step looks as follows:
1805 # $LDFLAGS
1806 # $(TARGET_CRTBEGIN_DYNAMIC_O) <-- crtbegin.o
1807 # $(PRIVATE_OBJECTS) <-- The .o that we built
1808 # $(PRIVATE_STATIC_LIBRARIES) <-- The .a that we built
1809 # $(TARGET_LIBGCC) <-- libgcc.a
1810 # $(PRIVATE_SHARED_LIBRARIES) <-- The .so that we built
1811 # $(PRIVATE_LDLIBS) <-- System .so
1812 # $(TARGET_CRTEND_O) <-- crtend.o
1813 #
1814 # For now the above are approximated for executables by adding
1815 # crtbegin.o to the end of the ldflags and 'crtend.o' to the end
1816 # of 'libraries'.
1817 #
1818 # The NDK Android shared library link step looks as follows:
1819 # $LDFLAGS
1820 # $(PRIVATE_OBJECTS) <-- The .o that we built
1821 # -l,--whole-archive
1822 # $(PRIVATE_WHOLE_STATIC_LIBRARIES)
1823 # -l,--no-whole-archive
1824 # $(PRIVATE_STATIC_LIBRARIES) <-- The .a that we built
1825 # $(TARGET_LIBGCC) <-- libgcc.a
1826 # $(PRIVATE_SHARED_LIBRARIES) <-- The .so that we built
1827 # $(PRIVATE_LDLIBS) <-- System .so
1828 #
1829 # For now, assume not need any whole static libs.
1830 #
1831 # For both executables and shared libraries, add the proper
1832 # libgcc.a to the start of libraries which puts it in the
1833 # proper spot after .o and .a files get linked in.
1834 #
1835 # TODO: The proper thing to do longer-tem would be proper gyp
1836 # support for a custom link command line.
1837 ['_toolset=="target"', {
1838 'cflags!': [
1839 '-pthread', # Not supported by Android toolchain.
1840 ],
1841 'cflags': [
1842 '-U__linux__', # Don't allow toolchain to claim -D__linux__
1843 '-ffunction-sections',
1844 '-funwind-tables',
1845 '-g',
1846 '-fstack-protector',
1847 '-fno-short-enums',
1848 '-finline-limit=64',
1849 '-Wa,--noexecstack',
1850 '-Wno-error=non-virtual-dtor', # TODO(michaelbai): Fix warnings.
1851 '<@(release_extra_cflags)',
1852 # Note: This include is in cflags to ensure that it comes after
1853 # all of the includes.
1854 '-I<(android_ndk_include)',
1855 ],
1856 'defines': [
1857 'ANDROID',
1858 '__GNU_SOURCE=1', # Necessary for clone()
1859 'USE_STLPORT=1',
1860 '_STLP_USE_PTR_SPECIALIZATIONS=1',
1861 'HAVE_OFF64_T',
1862 'HAVE_SYS_UIO_H',
1863 'ANDROID_BINSIZE_HACK', # Enable temporary hacks to reduce binsize.
1864 ],
1865 'ldflags!': [
1866 '-pthread', # Not supported by Android toolchain.
1867 ],
1868 'ldflags': [
1869 '-nostdlib',
1870 '-Wl,--no-undefined',
1871 '-Wl,--icf=safe', # Enable identical code folding to reduce size
1872 # Don't export symbols from statically linked libraries.
1873 '-Wl,--exclude-libs=ALL',
1874 ],
1875 'libraries!': [
1876 '-lrt', # librt is built into Bionic.
1877 # Not supported by Android toolchain.
1878 # Where do these come from? Can't find references in
1879 # any Chromium gyp or gypi file. Maybe they come from
1880 # gyp itself?
1881 '-lpthread', '-lnss3', '-lnssutil3', '-lsmime3', '-lplds4', '-lplc4', '-lnspr4',
1882 ],
1883 'libraries': [
1884 '-l<(android_stlport_library)',
1885 # Manually link the libgcc.a that the cross compiler uses.
1886 '<!($CROSS_CC -print-libgcc-file-name)',
1887 '-lc',
1888 '-ldl',
1889 '-lstdc++',
1890 '-lm',
1891 ],
1892 'conditions': [
1893 ['android_build_type==0', {
1894 'ldflags': [
1895 '-Wl,-rpath-link=<(android_ndk_lib)',
1896 '-L<(android_ndk_lib)',
1897 ],
1898 }],
1899 # NOTE: The stlport header include paths below are specified in
1900 # cflags rather than include_dirs because they need to come
1901 # after include_dirs. Think of them like system headers, but
1902 # don't use '-isystem' because the arm-linux-androideabi-4.4.3
1903 # toolchain (circa Gingerbread) will exhibit strange errors.
1904 # The include ordering here is important; change with caution.
1905 ['use_system_stlport==0', {
1906 'cflags': [
1907 '-I<(android_ndk_root)/sources/cxx-stl/stlport/stlport',
1908 ],
1909 'conditions': [
1910 ['target_arch=="arm" and armv7==1', {
1911 'ldflags': [
1912 '-L<(android_ndk_root)/sources/cxx-stl/stlport/libs/armeabi-v7a',
1913 ],
1914 }],
1915 ['target_arch=="arm" and armv7==0', {
1916 'ldflags': [
1917 '-L<(android_ndk_root)/sources/cxx-stl/stlport/libs/armeabi',
1918 ],
1919 }],
1920 ['target_arch=="ia32"', {
1921 'ldflags': [
1922 '-L<(android_ndk_root)/sources/cxx-stl/stlport/libs/x86',
1923 ],
1924 }],
1925 ],
1926 }],
1927 ['target_arch=="ia32"', {
1928 # The x86 toolchain currently has problems with stack-protector.
1929 'cflags!': [
1930 '-fstack-protector',
1931 ],
1932 'cflags': [
1933 '-fno-stack-protector',
1934 ],
1935 }],
1936 ],
1937 'target_conditions': [
1938 ['_type=="executable"', {
1939 'ldflags': [
1940 '-Bdynamic',
1941 '-Wl,-dynamic-linker,/system/bin/linker',
1942 '-Wl,--gc-sections',
1943 '-Wl,-z,nocopyreloc',
1944 # crtbegin_dynamic.o should be the last item in ldflags.
1945 '<(android_ndk_lib)/crtbegin_dynamic.o',
1946 ],
1947 'libraries': [
1948 # crtend_android.o needs to be the last item in libraries.
1949 # Do not add any libraries after this!
1950 '<(android_ndk_lib)/crtend_android.o',
1951 ],
1952 }],
1953 ['_type=="shared_library"', {
1954 'ldflags': [
1955 '-Wl,-shared,-Bsymbolic',
1956 ],
1957 }],
1958 ],
1959 }],
1960 # Settings for building host targets using the system toolchain.
1961 ['_toolset=="host"', {
1962 'ldflags!': [
1963 '-Wl,-z,noexecstack',
1964 '-Wl,--gc-sections',
1965 '-Wl,-O1',
1966 '-Wl,--as-needed',
1967 ],
1968 }],
1969 ],
1970 },
1971 }],
[email protected]93f21e42010-04-01 00:35:151972 ['OS=="solaris"', {
1973 'cflags!': ['-fvisibility=hidden'],
1974 'cflags_cc!': ['-fvisibility-inlines-hidden'],
1975 }],
[email protected]2f80c312009-02-25 21:26:551976 ['OS=="mac"', {
1977 'target_defaults': {
[email protected]24700642009-06-01 16:01:201978 'variables': {
[email protected]162407f2011-09-08 15:33:171979 # These should end with %, but there seems to be a bug with % in
1980 # variables that are intended to be set to different values in
1981 # different targets, like these.
1982 'mac_pie': 1, # Most executables can be position-independent.
[email protected]24700642009-06-01 16:01:201983 'mac_real_dsym': 0, # Fake .dSYMs are fine in most cases.
[email protected]162407f2011-09-08 15:33:171984 'mac_strip': 1, # Strip debugging symbols from the target.
[email protected]24700642009-06-01 16:01:201985 },
[email protected]d92c7c012009-03-19 19:26:421986 'mac_bundle': 0,
[email protected]2f80c312009-02-25 21:26:551987 'xcode_settings': {
1988 'ALWAYS_SEARCH_USER_PATHS': 'NO',
[email protected]ab2956372009-08-13 18:11:041989 'GCC_C_LANGUAGE_STANDARD': 'c99', # -std=c99
1990 'GCC_CW_ASM_SYNTAX': 'NO', # No -fasm-blocks
1991 'GCC_DYNAMIC_NO_PIC': 'NO', # No -mdynamic-no-pic
1992 # (Equivalent to -fPIC)
1993 'GCC_ENABLE_CPP_EXCEPTIONS': 'NO', # -fno-exceptions
1994 'GCC_ENABLE_CPP_RTTI': 'NO', # -fno-rtti
1995 'GCC_ENABLE_PASCAL_STRINGS': 'NO', # No -mpascal-strings
[email protected]3224dcd2009-09-16 17:31:251996 # GCC_INLINES_ARE_PRIVATE_EXTERN maps to -fvisibility-inlines-hidden
1997 'GCC_INLINES_ARE_PRIVATE_EXTERN': 'YES',
[email protected]ab2956372009-08-13 18:11:041998 'GCC_OBJC_CALL_CXX_CDTORS': 'YES', # -fobjc-call-cxx-cdtors
1999 'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES', # -fvisibility=hidden
2000 'GCC_THREADSAFE_STATICS': 'NO', # -fno-threadsafe-statics
2001 'GCC_TREAT_WARNINGS_AS_ERRORS': 'YES', # -Werror
[email protected]2f80c312009-02-25 21:26:552002 'GCC_VERSION': '4.2',
[email protected]ab2956372009-08-13 18:11:042003 'GCC_WARN_ABOUT_MISSING_NEWLINE': 'YES', # -Wnewline-eof
[email protected]3224dcd2009-09-16 17:31:252004 # MACOSX_DEPLOYMENT_TARGET maps to -mmacosx-version-min
2005 'MACOSX_DEPLOYMENT_TARGET': '<(mac_deployment_target)',
[email protected]ab2956372009-08-13 18:11:042006 'PREBINDING': 'NO', # No -Wl,-prebind
[email protected]e1ece302011-09-15 03:58:112007 # Keep pch files below xcodebuild/.
2008 'SHARED_PRECOMPS_DIR': '$(CONFIGURATION_BUILD_DIR)/SharedPrecompiledHeaders',
[email protected]2f80c312009-02-25 21:26:552009 'USE_HEADERMAP': 'NO',
[email protected]57e94022011-05-04 15:33:192010 'OTHER_CFLAGS': [
2011 '-fno-strict-aliasing', # See http://crbug.com/32204
2012 ],
[email protected]080e86f2010-06-21 15:19:042013 'WARNING_CFLAGS': [
2014 '-Wall',
2015 '-Wendif-labels',
2016 '-Wextra',
2017 # Don't warn about unused function parameters.
2018 '-Wno-unused-parameter',
2019 # Don't warn about the "struct foo f = {0};" initialization
2020 # pattern.
2021 '-Wno-missing-field-initializers',
2022 ],
[email protected]b3fb8092009-03-12 19:09:242023 'conditions': [
2024 ['chromium_mac_pch', {'GCC_PRECOMPILE_PREFIX_HEADER': 'YES'},
[email protected]9543af052009-09-15 22:42:592025 {'GCC_PRECOMPILE_PREFIX_HEADER': 'NO'}
2026 ],
[email protected]66733172010-09-22 00:09:282027 ['clang==1', {
[email protected]34f40892011-09-06 21:53:302028 'CC': '$(SOURCE_ROOT)/<(clang_dir)/clang',
2029 'LDPLUSPLUS': '$(SOURCE_ROOT)/<(clang_dir)/clang++',
2030 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0',
[email protected]66733172010-09-22 00:09:282031 'WARNING_CFLAGS': [
[email protected]7f8d486f2011-04-05 19:49:072032 '-Wheader-hygiene',
[email protected]66733172010-09-22 00:09:282033 # Don't die on dtoa code that uses a char as an array index.
2034 # This is required solely for base/third_party/dmg_fp/dtoa.cc.
2035 '-Wno-char-subscripts',
[email protected]25d3bb722010-11-22 14:31:452036 # Clang spots more unused functions.
2037 '-Wno-unused-function',
[email protected]d6431722011-09-01 00:46:332038 # See comments on this flag higher up in this file.
[email protected]0fa0fbc2010-10-12 04:32:052039 '-Wno-unnamed-type-template-args',
[email protected]d53680932011-06-08 16:40:062040 # TODO(thakis): Reenable once the one instance this warns on
2041 # is fixed.
2042 '-Wno-parentheses',
[email protected]66733172010-09-22 00:09:282043 ],
2044 }],
[email protected]5d451ad2011-02-11 16:43:462045 ['clang==1 and clang_use_chrome_plugins==1', {
2046 'OTHER_CFLAGS': [
2047 '<(clang_chrome_plugins_flags)',
2048 ],
2049 }],
[email protected]5e781232011-01-28 02:57:592050 ['clang==1 and clang_load!="" and clang_add_plugin!=""', {
2051 'OTHER_CFLAGS': [
2052 '-Xclang', '-load', '-Xclang', '<(clang_load)',
2053 '-Xclang', '-add-plugin', '-Xclang', '<(clang_add_plugin)',
2054 ],
2055 }],
[email protected]b3fb8092009-03-12 19:09:242056 ],
[email protected]2f80c312009-02-25 21:26:552057 },
[email protected]34f40892011-09-06 21:53:302058 'conditions': [
2059 ['clang==1', {
2060 'variables': {
2061 'clang_dir': '../third_party/llvm-build/Release+Asserts/bin',
2062 },
2063 }],
2064 ],
[email protected]2f80c312009-02-25 21:26:552065 'target_conditions': [
[email protected]2f80c312009-02-25 21:26:552066 ['_type!="static_library"', {
[email protected]5d7dc972009-04-16 15:30:462067 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-search_paths_first']},
2068 }],
2069 ['_mac_bundle', {
2070 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-ObjC']},
[email protected]87fde4a2009-02-28 00:50:082071 }],
[email protected]6303fed2011-08-11 01:12:102072 ['_type=="executable"', {
2073 'postbuilds': [
2074 {
2075 # Arranges for data (heap) pages to be protected against
[email protected]8c40f322011-08-24 03:33:362076 # code execution when running on Mac OS X 10.7 ("Lion"), and
2077 # ensures that the position-independent executable (PIE) bit
2078 # is set for ASLR when running on Mac OS X 10.5 ("Leopard").
[email protected]6303fed2011-08-11 01:12:102079 'variables': {
[email protected]8c40f322011-08-24 03:33:362080 # Define change_mach_o_flags in a variable ending in _path
2081 # so that GYP understands it's a path and performs proper
2082 # relativization during dict merging.
2083 'change_mach_o_flags_path':
2084 'mac/change_mach_o_flags_from_xcode.sh',
[email protected]162407f2011-09-08 15:33:172085 'change_mach_o_flags_options%': [
[email protected]081c0342011-08-24 14:59:132086 ],
2087 'target_conditions': [
[email protected]162407f2011-09-08 15:33:172088 ['mac_pie==0 or release_valgrind_build==1', {
2089 # Don't enable PIE if it's unwanted. It's unwanted if
2090 # the target specifies mac_pie=0 or if building for
2091 # Valgrind, because Valgrind doesn't understand slide.
2092 # See the similar mac_pie/release_valgrind_build check
2093 # below.
[email protected]081c0342011-08-24 14:59:132094 'change_mach_o_flags_options': [
[email protected]081c0342011-08-24 14:59:132095 '--no-pie',
2096 ],
2097 }],
2098 ],
[email protected]6303fed2011-08-11 01:12:102099 },
[email protected]8c40f322011-08-24 03:33:362100 'postbuild_name': 'Change Mach-O Flags',
2101 'action': [
2102 '<(change_mach_o_flags_path)',
[email protected]081c0342011-08-24 14:59:132103 '>@(change_mach_o_flags_options)',
[email protected]8c40f322011-08-24 03:33:362104 ],
[email protected]6303fed2011-08-11 01:12:102105 },
2106 ],
[email protected]5a5d97aa2011-09-02 15:34:002107 'conditions': [
2108 ['asan==1', {
2109 'variables': {
2110 'asan_saves_file': 'asan.saves',
2111 },
2112 'xcode_settings': {
2113 'CHROMIUM_STRIP_SAVE_FILE': '<(asan_saves_file)'
2114 },
2115 }],
2116 ],
[email protected]162407f2011-09-08 15:33:172117 'target_conditions': [
2118 ['mac_pie==1 and release_valgrind_build==0', {
2119 # Turn on position-independence (ASLR) for executables. When
2120 # PIE is on for the Chrome executables, the framework will
2121 # also be subject to ASLR.
2122 # Don't do this when building for Valgrind, because Valgrind
2123 # doesn't understand slide. TODO: Make Valgrind on Mac OS X
2124 # understand slide, and get rid of the Valgrind check.
2125 'xcode_settings': {
2126 'OTHER_LDFLAGS': [
2127 '-Wl,-pie', # Position-independent executable (MH_PIE)
2128 ],
2129 },
2130 }],
2131 ],
[email protected]6a0242bc2011-07-01 00:34:462132 }],
[email protected]9a5e72862010-09-02 16:16:582133 ['(_type=="executable" or _type=="shared_library" or \
2134 _type=="loadable_module") and mac_strip!=0', {
[email protected]24700642009-06-01 16:01:202135 'target_conditions': [
2136 ['mac_real_dsym == 1', {
2137 # To get a real .dSYM bundle produced by dsymutil, set the
2138 # debug information format to dwarf-with-dsym. Since
2139 # strip_from_xcode will not be used, set Xcode to do the
2140 # stripping as well.
2141 'configurations': {
[email protected]5153767c2009-12-22 01:52:502142 'Release_Base': {
[email protected]24700642009-06-01 16:01:202143 'xcode_settings': {
2144 'DEBUG_INFORMATION_FORMAT': 'dwarf-with-dsym',
2145 'DEPLOYMENT_POSTPROCESSING': 'YES',
2146 'STRIP_INSTALLED_PRODUCT': 'YES',
[email protected]e14a9f92009-08-05 19:26:072147 'target_conditions': [
[email protected]c2111422010-06-01 18:30:252148 ['_type=="shared_library" or _type=="loadable_module"', {
[email protected]e14a9f92009-08-05 19:26:072149 # The Xcode default is to strip debugging symbols
2150 # only (-S). Local symbols should be stripped as
2151 # well, which will be handled by -x. Xcode will
2152 # continue to insert -S when stripping even when
2153 # additional flags are added with STRIPFLAGS.
2154 'STRIPFLAGS': '-x',
[email protected]c2111422010-06-01 18:30:252155 }], # _type=="shared_library" or _type=="loadable_module"'
[email protected]e14a9f92009-08-05 19:26:072156 ], # target_conditions
2157 }, # xcode_settings
2158 }, # configuration "Release"
2159 }, # configurations
[email protected]24700642009-06-01 16:01:202160 }, { # mac_real_dsym != 1
2161 # To get a fast fake .dSYM bundle, use a post-build step to
2162 # produce the .dSYM and strip the executable. strip_from_xcode
2163 # only operates in the Release configuration.
2164 'postbuilds': [
2165 {
2166 'variables': {
2167 # Define strip_from_xcode in a variable ending in _path
2168 # so that gyp understands it's a path and performs proper
2169 # relativization during dict merging.
2170 'strip_from_xcode_path': 'mac/strip_from_xcode',
2171 },
2172 'postbuild_name': 'Strip If Needed',
2173 'action': ['<(strip_from_xcode_path)'],
2174 },
[email protected]e14a9f92009-08-05 19:26:072175 ], # postbuilds
2176 }], # mac_real_dsym
2177 ], # target_conditions
[email protected]9a5e72862010-09-02 16:16:582178 }], # (_type=="executable" or _type=="shared_library" or
2179 # _type=="loadable_module") and mac_strip!=0
[email protected]e14a9f92009-08-05 19:26:072180 ], # target_conditions
2181 }, # target_defaults
2182 }], # OS=="mac"
[email protected]2f80c312009-02-25 21:26:552183 ['OS=="win"', {
2184 'target_defaults': {
2185 'defines': [
[email protected]0bc63042011-08-13 02:19:252186 '_WIN32_WINNT=0x0600',
2187 'WINVER=0x0600',
[email protected]2f80c312009-02-25 21:26:552188 'WIN32',
2189 '_WINDOWS',
[email protected]2f80c312009-02-25 21:26:552190 'NOMINMAX',
[email protected]e3116282011-08-13 00:52:282191 'PSAPI_VERSION=1',
[email protected]2f80c312009-02-25 21:26:552192 '_CRT_RAND_S',
2193 'CERT_CHAIN_PARA_HAS_EXTRA_FIELDS',
2194 'WIN32_LEAN_AND_MEAN',
[email protected]7a812dd62010-06-30 18:52:272195 '_ATL_NO_OPENGL',
[email protected]adfb98c2009-06-23 20:08:452196 '_HAS_TR1=0',
[email protected]2f80c312009-02-25 21:26:552197 ],
[email protected]8974e042010-06-21 18:06:522198 'conditions': [
2199 ['component=="static_library"', {
2200 'defines': [
2201 '_HAS_EXCEPTIONS=0',
2202 ],
2203 }],
[email protected]3e2648a2011-03-21 20:58:502204 ['secure_atl', {
2205 'defines': [
2206 '_SECURE_ATL',
2207 ],
2208 }],
[email protected]8974e042010-06-21 18:06:522209 ],
[email protected]5b5ca7cb2009-07-20 23:00:202210 'msvs_system_include_dirs': [
[email protected]998b5152009-12-12 22:19:522211 '<(DEPTH)/third_party/platformsdk_win7/files/Include',
[email protected]a78da50e2010-06-09 21:31:372212 '<(DEPTH)/third_party/directxsdk/files/Include',
[email protected]2f80c312009-02-25 21:26:552213 '$(VSInstallDir)/VC/atlmfc/include',
2214 ],
[email protected]a8d99cef2009-08-26 20:47:492215 'msvs_cygwin_dirs': ['<(DEPTH)/third_party/cygwin'],
[email protected]942c3a60f2011-05-03 02:04:112216 'msvs_disabled_warnings': [4351, 4396, 4503, 4819,
2217 # TODO(maruel): These warnings are level 4. They will be slowly
2218 # removed as code is fixed.
2219 4100, 4121, 4125, 4127, 4130, 4131, 4189, 4201, 4238, 4244, 4245,
2220 4310, 4355, 4428, 4481, 4505, 4510, 4512, 4530, 4610, 4611, 4701,
2221 4702, 4706,
2222 ],
[email protected]2f80c312009-02-25 21:26:552223 'msvs_settings': {
2224 'VCCLCompilerTool': {
2225 'MinimalRebuild': 'false',
[email protected]2f80c312009-02-25 21:26:552226 'BufferSecurityCheck': 'true',
2227 'EnableFunctionLevelLinking': 'true',
2228 'RuntimeTypeInfo': 'false',
[email protected]942c3a60f2011-05-03 02:04:112229 'WarningLevel': '4',
[email protected]2f80c312009-02-25 21:26:552230 'WarnAsError': 'true',
2231 'DebugInformationFormat': '3',
[email protected]3fef6e62009-07-31 19:58:582232 'conditions': [
[email protected]3e2648a2011-03-21 20:58:502233 ['msvs_multi_core_compile', {
[email protected]1f9471a2010-01-04 06:40:162234 'AdditionalOptions': ['/MP'],
[email protected]912c55c2009-07-31 23:33:552235 }],
[email protected]3e2648a2011-03-21 20:58:502236 ['MSVS_VERSION=="2005e"', {
2237 'AdditionalOptions': ['/w44068'], # Unknown pragma to 4 (ATL)
2238 }],
[email protected]8974e042010-06-21 18:06:522239 ['component=="shared_library"', {
2240 'ExceptionHandling': '1', # /EHsc
2241 }, {
2242 'ExceptionHandling': '0',
2243 }],
[email protected]3fef6e62009-07-31 19:58:582244 ],
[email protected]2f80c312009-02-25 21:26:552245 },
2246 'VCLibrarianTool': {
[email protected]1f9471a2010-01-04 06:40:162247 'AdditionalOptions': ['/ignore:4221'],
[email protected]a78da50e2010-06-09 21:31:372248 'AdditionalLibraryDirectories': [
2249 '<(DEPTH)/third_party/platformsdk_win7/files/Lib',
2250 '<(DEPTH)/third_party/directxsdk/files/Lib/x86',
2251 ],
[email protected]2f80c312009-02-25 21:26:552252 },
2253 'VCLinkerTool': {
[email protected]2f80c312009-02-25 21:26:552254 'AdditionalDependencies': [
2255 'wininet.lib',
[email protected]b1d8c252011-01-13 20:27:502256 'dnsapi.lib',
[email protected]2f80c312009-02-25 21:26:552257 'version.lib',
2258 'msimg32.lib',
2259 'ws2_32.lib',
2260 'usp10.lib',
2261 'psapi.lib',
[email protected]96fd0032009-04-24 00:13:082262 'dbghelp.lib',
[email protected]dfdf7ee2011-04-28 18:51:482263 'winmm.lib',
2264 'shlwapi.lib',
[email protected]2f80c312009-02-25 21:26:552265 ],
[email protected]4de39f82011-03-28 12:01:292266 'conditions': [
[email protected]3e2648a2011-03-21 20:58:502267 ['msvs_express', {
2268 # Explicitly required when using the ATL with express
2269 'AdditionalDependencies': [
2270 'atlthunk.lib',
2271 ],
2272 }],
2273 ['MSVS_VERSION=="2005e"', {
2274 # Non-express versions link automatically to these
2275 'AdditionalDependencies': [
2276 'advapi32.lib',
2277 'comdlg32.lib',
2278 'ole32.lib',
2279 'shell32.lib',
2280 'user32.lib',
2281 'winspool.lib',
2282 ],
2283 }],
2284 ],
[email protected]a78da50e2010-06-09 21:31:372285 'AdditionalLibraryDirectories': [
2286 '<(DEPTH)/third_party/platformsdk_win7/files/Lib',
2287 '<(DEPTH)/third_party/directxsdk/files/Lib/x86',
2288 ],
[email protected]2f80c312009-02-25 21:26:552289 'GenerateDebugInformation': 'true',
2290 'MapFileName': '$(OutDir)\\$(TargetName).map',
2291 'ImportLibrary': '$(OutDir)\\lib\\$(TargetName).lib',
[email protected]2f80c312009-02-25 21:26:552292 'FixedBaseAddress': '1',
[email protected]825ff8d2009-05-22 01:40:482293 # SubSystem values:
2294 # 0 == not set
2295 # 1 == /SUBSYSTEM:CONSOLE
2296 # 2 == /SUBSYSTEM:WINDOWS
2297 # Most of the executables we'll ever create are tests
2298 # and utilities with console output.
2299 'SubSystem': '1',
[email protected]2f80c312009-02-25 21:26:552300 },
2301 'VCMIDLTool': {
2302 'GenerateStublessProxies': 'true',
2303 'TypeLibraryName': '$(InputName).tlb',
2304 'OutputDirectory': '$(IntDir)',
2305 'HeaderFileName': '$(InputName).h',
2306 'DLLDataFileName': 'dlldata.c',
2307 'InterfaceIdentifierFileName': '$(InputName)_i.c',
2308 'ProxyFileName': '$(InputName)_p.c',
2309 },
2310 'VCResourceCompilerTool': {
2311 'Culture' : '1033',
[email protected]4d91cbc2010-05-07 20:41:382312 'AdditionalIncludeDirectories': [
2313 '<(DEPTH)',
2314 '<(SHARED_INTERMEDIATE_DIR)',
2315 ],
[email protected]2f80c312009-02-25 21:26:552316 },
2317 },
2318 },
2319 }],
[email protected]79e2336c2011-05-12 18:18:342320 ['disable_nacl==1', {
[email protected]d8c7cbcc2009-10-02 19:00:312321 'target_defaults': {
2322 'defines': [
2323 'DISABLE_NACL',
2324 ],
2325 },
2326 }],
[email protected]cfbf9bc2009-12-07 22:07:562327 ['OS=="win" and msvs_use_common_linker_extras', {
[email protected]48c7af72009-07-03 22:00:192328 'target_defaults': {
2329 'msvs_settings': {
2330 'VCLinkerTool': {
[email protected]48c7af72009-07-03 22:00:192331 'DelayLoadDLLs': [
2332 'dbghelp.dll',
2333 'dwmapi.dll',
2334 'uxtheme.dll',
2335 ],
2336 },
2337 },
[email protected]ef4fa4072009-12-04 22:46:502338 'configurations': {
[email protected]5153767c2009-12-22 01:52:502339 'x86_Base': {
[email protected]ef4fa4072009-12-04 22:46:502340 'msvs_settings': {
2341 'VCLinkerTool': {
[email protected]1f9471a2010-01-04 06:40:162342 'AdditionalOptions': [
2343 '/safeseh',
2344 '/dynamicbase',
2345 '/ignore:4199',
2346 '/ignore:4221',
2347 '/nxcompat',
2348 ],
[email protected]ef4fa4072009-12-04 22:46:502349 },
2350 },
2351 },
[email protected]5153767c2009-12-22 01:52:502352 'x64_Base': {
[email protected]ef4fa4072009-12-04 22:46:502353 'msvs_settings': {
2354 'VCLinkerTool': {
[email protected]1f9471a2010-01-04 06:40:162355 'AdditionalOptions': [
[email protected]ef4fa4072009-12-04 22:46:502356 # safeseh is not compatible with x64
[email protected]1f9471a2010-01-04 06:40:162357 '/dynamicbase',
2358 '/ignore:4199',
2359 '/ignore:4221',
2360 '/nxcompat',
2361 ],
[email protected]ef4fa4072009-12-04 22:46:502362 },
2363 },
2364 },
2365 },
[email protected]48c7af72009-07-03 22:00:192366 },
2367 }],
[email protected]9821d0d2010-04-16 22:40:372368 ['enable_new_npdevice_api==1', {
2369 'target_defaults': {
2370 'defines': [
2371 'ENABLE_NEW_NPDEVICE_API',
2372 ],
2373 },
2374 }],
[email protected]34f40892011-09-06 21:53:302375 ['clang==1', {
2376 'make_global_settings': [
2377 ['CC', 'third_party/llvm-build/Release+Asserts/bin/clang'],
2378 ['CXX', 'third_party/llvm-build/Release+Asserts/bin/clang++'],
[email protected]60550c82011-09-06 23:51:072379 ['LINK', '$(CXX)'],
[email protected]34f40892011-09-06 21:53:302380 ['CC.host', '$(CC)'],
2381 ['CXX.host', '$(CXX)'],
2382 ['LINK.host', '$(LINK)'],
2383 ],
2384 }],
[email protected]2f80c312009-02-25 21:26:552385 ],
2386 'xcode_settings': {
[email protected]0c8ab452009-11-06 21:57:502387 # DON'T ADD ANYTHING NEW TO THIS BLOCK UNLESS YOU REALLY REALLY NEED IT!
2388 # This block adds *project-wide* configuration settings to each project
2389 # file. It's almost always wrong to put things here. Specify your
2390 # custom xcode_settings in target_defaults to add them to targets instead.
2391
2392 # In an Xcode Project Info window, the "Base SDK for All Configurations"
2393 # setting sets the SDK on a project-wide basis. In order to get the
2394 # configured SDK to show properly in the Xcode UI, SDKROOT must be set
2395 # here at the project level.
2396 'SDKROOT': 'macosx<(mac_sdk)', # -isysroot
2397
[email protected]2f80c312009-02-25 21:26:552398 # The Xcode generator will look for an xcode_settings section at the root
2399 # of each dict and use it to apply settings on a file-wide basis. Most
2400 # settings should not be here, they should be in target-specific
2401 # xcode_settings sections, or better yet, should use non-Xcode-specific
2402 # settings in target dicts. SYMROOT is a special case, because many other
2403 # Xcode variables depend on it, including variables such as
2404 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something
2405 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the
2406 # files to appear (when present) in the UI as actual files and not red
2407 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR,
2408 # and therefore SYMROOT, needs to be set at the project level.
[email protected]bfa24b962009-03-02 00:16:162409 'SYMROOT': '<(DEPTH)/xcodebuild',
[email protected]2f80c312009-02-25 21:26:552410 },
[email protected]ee28c9f2009-09-04 01:53:012411}