blob: aebb3c5657f04f781e19073b377c0257ade1afbe [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]3d38d8e2011-04-16 20:48:51138 # Disable file manager component extension by default.
139 'file_manager_extension%': 0,
140
[email protected]8b2e9f392011-08-05 04:00:47141 # Disable WebUI TaskManager by default.
142 'webui_task_manager%': 0,
143
[email protected]e72e55b2011-01-06 22:19:30144 # Python version.
[email protected]a43c5a02011-05-27 06:54:51145 'python_ver%': '2.6',
[email protected]b3f23ba2010-04-26 22:58:17146
[email protected]e72e55b2011-01-06 22:19:30147 # Set ARM-v7 compilation flags
148 'armv7%': 0,
149
150 # Set Neon compilation flags (only meaningful if armv7==1).
151 'arm_neon%': 1,
152
153 # The system root for cross-compiles. Default: none.
154 'sysroot%': '',
155
156 # On Linux, we build with sse2 for Chromium builds.
157 'disable_sse2%': 0,
158
159 # Use libjpeg-turbo as the JPEG codec used by Chromium.
[email protected]32e56e52011-02-28 02:28:03160 'use_libjpeg_turbo%': 1,
[email protected]e72e55b2011-01-06 22:19:30161
162 # Variable 'component' is for cases where we would like to build some
163 # components as dynamic shared libraries but still need variable
164 # 'library' for static libraries.
165 # By default, component is set to whatever library is set to and
166 # it can be overriden by the GYP command line or by ~/.gyp/include.gypi.
[email protected]5a547332011-05-19 23:18:53167 'component%': 'static_library',
[email protected]e72e55b2011-01-06 22:19:30168
[email protected]bb6aba32011-01-07 19:04:43169 # Set to select the Title Case versions of strings in GRD files.
170 'use_titlecase_in_grd_files%': 0,
[email protected]63692212010-09-16 00:22:21171
[email protected]98da0042011-02-02 00:10:27172 # Use translations provided by volunteers at launchpad.net. This
173 # currently only works on Linux.
[email protected]00dc155832011-02-01 18:51:19174 'use_third_party_translations%': 0,
175
[email protected]9a425422011-01-11 00:53:18176 # Remoting compilation is enabled by default. Set to 0 to disable.
177 'remoting%': 1,
178
[email protected]5834f4392011-09-13 20:06:17179 # Threaded compositing
180 'use_threaded_compositing%': 0,
181
[email protected]a026daa2011-04-20 15:49:51182 # P2P APIs are compiled in by default. Set to 0 to disable.
183 # Also note that this should be enabled for remoting to compile.
184 'p2p_apis%': 1,
185
[email protected]1ec68c42011-06-01 13:56:25186 # Configuration policy is enabled by default. Set to 0 to disable.
187 'configuration_policy%': 1,
188
[email protected]4b58e7d2011-07-11 10:22:56189 # Safe browsing is compiled in by default. Set to 0 to disable.
190 'safe_browsing%': 1,
191
[email protected]5d451ad2011-02-11 16:43:46192 # If this is set, the clang plugins used on the buildbot will be used.
193 # Run tools/clang/scripts/update.sh to make sure they are compiled.
194 # This causes 'clang_chrome_plugins_flags' to be set.
195 # Has no effect if 'clang' is not set as well.
196 'clang_use_chrome_plugins%': 0,
197
[email protected]92799b632011-08-15 14:33:06198 # Enable building with ASAN (Clang's -fasan option).
199 # -fasan only works with clang, but asan=1 implies clang=1
200 # See https://sites.google.com/a/chromium.org/dev/developers/testing/addresssanitizer
201 'asan%': 0,
202
[email protected]1ad5a7b2011-06-24 03:15:13203 # Set to 1 compile with -fPIC cflag on linux. This is a must for shared
204 # libraries on linux x86-64 and arm, plus ASLR.
205 'linux_fpic%': 1,
206
[email protected]c6a1f94172011-07-05 02:35:00207 # Enable navigator.registerProtocolHandler and supporting UI.
208 'enable_register_protocol_handler%': 1,
209
[email protected]62af76e2011-08-01 02:34:01210 # Enable Web Intents and supporting UI.
211 'enable_web_intents%': 0,
212
[email protected]32877d302011-07-07 17:57:49213 # Smooth scrolling is disabled by default.
214 'enable_smooth_scrolling%': 0,
215
[email protected]dda90ae2011-07-19 22:07:48216 # Webrtc compilation is enabled by default. Set to 0 to disable.
217 'enable_webrtc%': 1,
218
[email protected]bb6aba32011-01-07 19:04:43219 'conditions': [
[email protected]7d7564a12011-06-21 19:20:22220 ['OS=="mac"', {
221 'use_skia%': 0,
[email protected]e4dbede82011-09-16 16:11:07222 # Mac uses clang by default, so turn on the plugin as well.
223 'clang_use_chrome_plugins%': 1,
[email protected]7d7564a12011-06-21 19:20:22224 }, {
225 'use_skia%': 1,
226 }],
227
[email protected]79e2336c2011-05-12 18:18:34228 # A flag for POSIX platforms
[email protected]c49ab0c2011-05-18 17:25:37229 ['OS=="win"', {
[email protected]79e2336c2011-05-12 18:18:34230 'os_posix%': 0,
[email protected]c49ab0c2011-05-18 17:25:37231 }, {
232 'os_posix%': 1,
[email protected]79e2336c2011-05-12 18:18:34233 }],
234
235 # Flags to use Gtk and X11 on non-Mac POSIX platforms
[email protected]da1c8d692011-09-20 20:35:01236 ['OS=="win" or OS=="mac" or OS=="android"', {
[email protected]9cabbaf72011-09-20 20:29:52237 'use_glib%': 0,
[email protected]79e2336c2011-05-12 18:18:34238 'toolkit_uses_gtk%': 0,
239 'use_x11%': 0,
[email protected]c49ab0c2011-05-18 17:25:37240 }, {
[email protected]236754a2011-07-28 17:38:23241 # TODO(dnicoara) Wayland build should have these disabled, but
242 # currently GTK and X is too spread and it's hard to completely
243 # remove every dependency.
[email protected]9cabbaf72011-09-20 20:29:52244 'use_glib%': 1,
[email protected]c49ab0c2011-05-18 17:25:37245 'toolkit_uses_gtk%': 1,
246 'use_x11%': 1,
[email protected]79e2336c2011-05-12 18:18:34247 }],
[email protected]9cabbaf72011-09-20 20:29:52248 ['use_aura==1', {
249 'use_glib%': 1,
250 'toolkit_uses_gtk%': 0,
251 'use_x11%': 1,
252 }],
[email protected]79e2336c2011-05-12 18:18:34253
[email protected]63692212010-09-16 00:22:21254 # A flag to enable or disable our compile-time dependency
255 # on gnome-keyring. If that dependency is disabled, no gnome-keyring
256 # support will be available. This option is useful
257 # for Linux distributions.
258 ['chromeos==1', {
259 'use_gnome_keyring%': 0,
260 }, {
261 'use_gnome_keyring%': 1,
262 }],
[email protected]0afe5212010-10-01 18:56:11263
[email protected]bb6aba32011-01-07 19:04:43264 ['toolkit_views==0 or OS=="mac"', {
265 # GTK+ and Mac wants Title Case strings
266 'use_titlecase_in_grd_files%': 1,
267 }],
268
[email protected]1b4209f2011-01-07 00:25:40269 # Enable some hacks to support Flapper only on Chrome OS.
270 ['chromeos==1', {
271 'enable_flapper_hacks%': 1,
272 }, {
273 'enable_flapper_hacks%': 0,
274 }],
[email protected]3d38d8e2011-04-16 20:48:51275
276 # Enable file manager extension by default on Chrome OS.
277 ['chromeos==1', {
278 'file_manager_extension%': 1,
279 }, {
280 'file_manager_extension%': 0,
281 }],
[email protected]7de46352011-09-12 15:39:19282
[email protected]fd88a8842011-09-13 02:50:22283 # Enable WebUI TaskManager only on Chrome OS, Touch or PureView.
[email protected]3fa441d2011-09-18 17:28:50284 ['chromeos==1 or touchui==1 or use_only_pure_views==1 or use_aura==1', {
[email protected]8b2e9f392011-08-05 04:00:47285 'webui_task_manager%': 1,
286 }, {
287 'webui_task_manager%': 0,
288 }],
289
[email protected]da1c8d692011-09-20 20:35:01290 ['OS=="android"', {
291 'proprietary_codecs%': 1,
292 'enable_webrtc%': 0,
293 }],
294
[email protected]554b7062011-09-03 03:09:40295 # Enable smooth scrolling for Mac, Win, Linux and ChromeOS
296 ['OS=="linux" or OS=="mac" or OS=="win"', {
[email protected]32877d302011-07-07 17:57:49297 'enable_smooth_scrolling%': 1,
298 }, {
299 'enable_smooth_scrolling%': 0,
300 }],
[email protected]b3f23ba2010-04-26 22:58:17301 ],
[email protected]e14a9f92009-08-05 19:26:07302 },
303
[email protected]e72e55b2011-01-06 22:19:30304 # Copy conditionally-set variables out one scope.
[email protected]e14a9f92009-08-05 19:26:07305 'branding%': '<(branding)',
306 'buildtype%': '<(buildtype)',
[email protected]e0d00142009-09-18 22:10:27307 'target_arch%': '<(target_arch)',
[email protected]cf185b32010-01-12 04:29:59308 'host_arch%': '<(host_arch)',
[email protected]8fb0ef02011-05-20 00:53:50309 'library%': 'static_library',
[email protected]c153e5352009-09-22 12:37:44310 'toolkit_views%': '<(toolkit_views)',
[email protected]fd88a8842011-09-13 02:50:22311 'use_only_pure_views%': '<(use_only_pure_views)',
[email protected]9c8a1982011-05-24 23:08:58312 'views_compositor%': '<(views_compositor)',
[email protected]41423092011-08-25 15:39:58313 'use_aura%': '<(use_aura)',
[email protected]79e2336c2011-05-12 18:18:34314 'os_posix%': '<(os_posix)',
[email protected]9cabbaf72011-09-20 20:29:52315 'use_glib%': '<(use_glib)',
[email protected]79e2336c2011-05-12 18:18:34316 'toolkit_uses_gtk%': '<(toolkit_uses_gtk)',
[email protected]7d7564a12011-06-21 19:20:22317 'use_skia%': '<(use_skia)',
[email protected]79e2336c2011-05-12 18:18:34318 'use_x11%': '<(use_x11)',
[email protected]63692212010-09-16 00:22:21319 'use_gnome_keyring%': '<(use_gnome_keyring)',
[email protected]0afe5212010-10-01 18:56:11320 'linux_fpic%': '<(linux_fpic)',
[email protected]1b4209f2011-01-07 00:25:40321 'enable_flapper_hacks%': '<(enable_flapper_hacks)',
[email protected]c153e5352009-09-22 12:37:44322 'chromeos%': '<(chromeos)',
[email protected]93012ca2010-08-10 20:10:49323 'touchui%': '<(touchui)',
[email protected]5de10b5d2011-09-19 18:49:47324 'webui_dialogs%': '<(webui_dialogs)',
[email protected]e47c32032011-03-01 19:26:20325 'file_manager_extension%': '<(file_manager_extension)',
[email protected]8b2e9f392011-08-05 04:00:47326 'webui_task_manager%': '<(webui_task_manager)',
[email protected]b2f030c2009-09-24 20:36:21327 'inside_chromium_build%': '<(inside_chromium_build)',
[email protected]9c1949e2009-10-02 19:59:54328 'fastbuild%': '<(fastbuild)',
[email protected]a76fe1a2010-03-01 23:39:36329 'python_ver%': '<(python_ver)',
[email protected]eafc0b452010-02-26 21:53:43330 'armv7%': '<(armv7)',
331 'arm_neon%': '<(arm_neon)',
[email protected]4d83eb72010-03-04 16:42:23332 'sysroot%': '<(sysroot)',
[email protected]ac120ff2010-04-28 02:14:22333 'disable_sse2%': '<(disable_sse2)',
[email protected]8974e042010-06-21 18:06:52334 'component%': '<(component)',
[email protected]bb6aba32011-01-07 19:04:43335 'use_titlecase_in_grd_files%': '<(use_titlecase_in_grd_files)',
[email protected]9e94cca2011-02-04 17:38:17336 'use_third_party_translations%': '<(use_third_party_translations)',
[email protected]9a425422011-01-11 00:53:18337 'remoting%': '<(remoting)',
[email protected]5834f4392011-09-13 20:06:17338 'use_threaded_compositing%': '<(use_threaded_compositing)',
[email protected]dda90ae2011-07-19 22:07:48339 'enable_webrtc%': '<(enable_webrtc)',
[email protected]a026daa2011-04-20 15:49:51340 'p2p_apis%': '<(p2p_apis)',
[email protected]1ec68c42011-06-01 13:56:25341 'configuration_policy%': '<(configuration_policy)',
[email protected]4b58e7d2011-07-11 10:22:56342 'safe_browsing%': '<(safe_browsing)',
[email protected]5d451ad2011-02-11 16:43:46343 'clang_use_chrome_plugins%': '<(clang_use_chrome_plugins)',
[email protected]92799b632011-08-15 14:33:06344 'asan%': '<(asan)',
[email protected]365dd5b92011-05-26 01:30:56345 'enable_register_protocol_handler%': '<(enable_register_protocol_handler)',
[email protected]32877d302011-07-07 17:57:49346 'enable_smooth_scrolling%': '<(enable_smooth_scrolling)',
[email protected]41ed4e82011-08-25 23:02:07347 'enable_web_intents%': '<(enable_web_intents)',
[email protected]4076d2f2011-08-11 18:20:22348 # Whether to build for Wayland display server
349 'use_wayland%': 0,
[email protected]a22ebd812011-06-23 00:05:39350
[email protected]caa95c82009-11-23 22:39:32351 # The release channel that this build targets. This is used to restrict
352 # channel-specific build options, like which installer packages to create.
353 # The default is 'all', which does no channel-specific filtering.
354 'channel%': 'all',
355
[email protected]b3fb8092009-03-12 19:09:24356 # Override chromium_mac_pch and set it to 0 to suppress the use of
357 # precompiled headers on the Mac. Prefix header injection may still be
358 # used, but prefix headers will not be precompiled. This is useful when
359 # using distcc to distribute a build to compile slaves that don't
360 # share the same compiler executable as the system driving the compilation,
361 # because precompiled headers rely on pointers into a specific compiler
362 # executable's image. Setting this to 0 is needed to use an experimental
363 # Linux-Mac cross compiler distcc farm.
364 'chromium_mac_pch%': 1,
365
[email protected]3224dcd2009-09-16 17:31:25366 # Mac OS X SDK and deployment target support.
367 # The SDK identifies the version of the system headers that will be used,
368 # and corresponds to the MAC_OS_X_VERSION_MAX_ALLOWED compile-time macro.
369 # "Maximum allowed" refers to the operating system version whose APIs are
370 # available in the headers.
371 # The deployment target identifies the minimum system version that the
372 # built products are expected to function on. It corresponds to the
373 # MAC_OS_X_VERSION_MIN_REQUIRED compile-time macro.
374 # To ensure these macros are available, #include <AvailabilityMacros.h>.
375 # Additional documentation on these macros is available at
376 # http://developer.apple.com/mac/library/technotes/tn2002/tn2064.html#SECTION3
377 # Chrome normally builds with the Mac OS X 10.5 SDK and sets the
378 # deployment target to 10.5. Other projects, such as O3D, may override
379 # these defaults.
380 'mac_sdk%': '10.5',
381 'mac_deployment_target%': '10.5',
[email protected]9543af052009-09-15 22:42:59382
[email protected]f5ecbba12009-04-03 04:35:18383 # Set to 1 to enable code coverage. In addition to build changes
384 # (e.g. extra CFLAGS), also creates a new target in the src/chrome
385 # project file called "coverage".
386 # Currently ignored on Windows.
387 'coverage%': 0,
[email protected]653bd5f032009-04-08 12:55:49388
[email protected]7477ea6f2009-12-22 23:28:15389 # Although base/allocator lets you select a heap library via an
[email protected]7e0d664a2009-12-03 21:07:47390 # environment variable, the libcmt shim it uses sometimes gets in
391 # the way. To disable it entirely, and switch to normal msvcrt, do e.g.
392 # 'win_use_allocator_shim': 0,
393 # 'win_release_RuntimeLibrary': 2
394 # to ~/.gyp/include.gypi, gclient runhooks --force, and do a release build.
[email protected]8974e042010-06-21 18:06:52395 'win_use_allocator_shim%': 1, # 1 = shim allocator via libcmt; 0 = msvcrt
[email protected]279cd4212009-09-11 22:32:11396
[email protected]95ff8082009-11-13 22:21:01397 # Whether usage of OpenMAX is enabled.
398 'enable_openmax%': 0,
399
[email protected]d01120e62010-05-10 17:04:48400 # Whether proprietary audio/video codecs are assumed to be included with
401 # this build (only meaningful if branding!=Chrome).
402 'proprietary_codecs%': 0,
403
[email protected]e5b2eaa2009-04-14 01:39:12404 # TODO(bradnelson): eliminate this when possible.
405 # To allow local gyp files to prevent release.vsprops from being included.
406 # Yes(1) means include release.vsprops.
407 # Once all vsprops settings are migrated into gyp, this can go away.
408 'msvs_use_common_release%': 1,
[email protected]606116d22009-05-06 22:38:23409
[email protected]cbd5fd52009-08-26 00:14:27410 # TODO(bradnelson): eliminate this when possible.
411 # To allow local gyp files to override additional linker options for msvs.
412 # Yes(1) means set use the common linker options.
[email protected]48c7af72009-07-03 22:00:19413 'msvs_use_common_linker_extras%': 1,
414
[email protected]1ffb6502009-06-02 07:46:24415 # TODO(sgk): eliminate this if possible.
416 # It would be nicer to support this via a setting in 'target_defaults'
417 # in chrome/app/locales/locales.gypi overriding the setting in the
418 # 'Debug' configuration in the 'target_defaults' dict below,
419 # but that doesn't work as we'd like.
420 'msvs_debug_link_incremental%': '2',
421
[email protected]1f790ef2011-01-11 20:45:36422 # Needed for some of the largest modules.
423 'msvs_debug_link_nonincremental%': '1',
424
[email protected]5ab8f482011-08-18 18:30:06425 # Turn on Use Library Dependency Inputs for linking chrome.dll on Windows
426 # to get incremental linking to be faster in debug builds.
427 'incremental_chrome_dll%': 0,
428
[email protected]573136142009-07-15 22:48:37429 # This is the location of the sandbox binary. Chrome looks for this before
430 # running the zygote process. If found, and SUID, it will be used to
431 # sandbox the zygote process and, thus, all renderer processes.
432 'linux_sandbox_path%': '',
433
[email protected]ad6d2c42009-09-15 20:13:38434 # Set this to true to enable SELinux support.
435 'selinux%': 0,
[email protected]4c9cc6c2009-10-01 18:54:57436
[email protected]58680ce2010-09-18 00:09:15437 # Set this to true when building with Clang.
438 # See http://code.google.com/p/chromium/wiki/Clang for details.
439 # TODO: eventually clang should behave identically to gcc, and this
440 # won't be necessary.
441 'clang%': 0,
442
[email protected]5e781232011-01-28 02:57:59443 # These two variables can be set in GYP_DEFINES while running
444 # |gclient runhooks| to let clang run a plugin in every compilation.
445 # Only has an effect if 'clang=1' is in GYP_DEFINES as well.
446 # Example:
[email protected]93120fe2011-02-03 20:46:42447 # 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:59448
449 'clang_load%': '',
450 'clang_add_plugin%': '',
451
[email protected]da1c8d692011-09-20 20:35:01452 # The default type of gtest.
453 'gtest_target_type%': 'executable',
454
[email protected]7664ab32011-02-01 23:35:25455 # Enable sampling based profiler.
456 # See http://google-perftools.googlecode.com/svn/trunk/doc/cpuprofile.html
457 'profiling%': '0',
458
[email protected]93b373502011-08-16 19:06:22459 # Enable strict glibc debug mode.
460 'glibcxx_debug%': 0,
461
[email protected]36532f332010-08-25 00:22:01462 # Override whether we should use Breakpad on Linux. I.e. for Chrome bot.
463 'linux_breakpad%': 0,
464 # And if we want to dump symbols for Breakpad-enabled builds.
465 'linux_dump_symbols%': 0,
466 # And if we want to strip the binary after dumping symbols.
[email protected]05cb6962009-10-01 23:29:03467 'linux_strip_binary%': 0,
[email protected]1d87c282010-09-15 22:24:49468 # Strip the test binaries needed for Linux reliability tests.
469 'linux_strip_reliability_tests%': 0,
[email protected]05cb6962009-10-01 23:29:03470
[email protected]46ce5b562010-06-16 18:39:53471 # Enable TCMalloc.
472 'linux_use_tcmalloc%': 1,
[email protected]01699e22009-11-11 19:24:24473
[email protected]39ca7de2010-04-16 08:04:03474 # Disable TCMalloc's debugallocation.
475 'linux_use_debugallocation%': 0,
476
[email protected]d8b60602010-03-26 09:41:22477 # Disable TCMalloc's heapchecker.
478 'linux_use_heapchecker%': 0,
479
[email protected]64e2d4a42010-08-27 10:13:21480 # Disable shadow stack keeping used by heapcheck to unwind the stacks
481 # better.
482 'linux_keep_shadow_stacks%': 0,
483
[email protected]556c5d72010-06-10 05:45:01484 # Set to 1 to link against libgnome-keyring instead of using dlopen().
485 'linux_link_gnome_keyring%': 0,
[email protected]abcc9ac2011-05-16 20:04:35486 # Set to 1 to link against gsettings APIs instead of using dlopen().
487 'linux_link_gsettings%': 0,
[email protected]556c5d72010-06-10 05:45:01488
[email protected]d8c7cbcc2009-10-02 19:00:31489 # Used to disable Native Client at compile time, for platforms where it
490 # isn't supported
491 'disable_nacl%': 0,
492
[email protected]77c1b29392009-12-04 06:21:29493 # Set Thumb compilation flags.
494 'arm_thumb%': 0,
495
[email protected]53e0f642010-03-05 01:41:56496 # Set ARM fpu compilation flags (only meaningful if armv7==1 and
497 # arm_neon==0).
498 'arm_fpu%': 'vfpv3',
499
[email protected]9821d0d2010-04-16 22:40:37500 # Enable new NPDevice API.
501 'enable_new_npdevice_api%': 0,
[email protected]ed154592010-04-29 00:18:50502
503 # Enable EGLImage support in OpenMAX
[email protected]58023be2011-02-04 20:34:14504 'enable_eglimage%': 1,
[email protected]ed154592010-04-29 00:18:50505
[email protected]6f51b27e2010-06-22 20:43:53506 # Enable a variable used elsewhere throughout the GYP files to determine
507 # whether to compile in the sources for the GPU plugin / process.
508 'enable_gpu%': 1,
509
[email protected]32e1dee2010-12-09 18:36:24510 # Use OpenSSL instead of NSS. Under development: see http://crbug.com/62803
[email protected]d518cd92010-09-29 12:27:44511 'use_openssl%': 0,
512
[email protected]e72e55b2011-01-06 22:19:30513 # .gyp files or targets should set chromium_code to 1 if they build
514 # Chromium-specific code, as opposed to external code. This variable is
515 # used to control such things as the set of warnings to enable, and
516 # whether warnings are treated as errors.
517 'chromium_code%': 0,
518
519 # Set to 1 to compile with the built in pdf viewer.
520 'internal_pdf%': 0,
521
522 # This allows to use libcros from the current system, ie. /usr/lib/
523 # The cros_api will be pulled in as a static library, and all headers
524 # from the system include dirs.
[email protected]bb6aba32011-01-07 19:04:43525 'system_libcros%': 0,
[email protected]e72e55b2011-01-06 22:19:30526
[email protected]e72e55b2011-01-06 22:19:30527 # NOTE: When these end up in the Mac bundle, we need to replace '-' for '_'
528 # so Cocoa is happy (http://crbug.com/20441).
529 'locales': [
530 'am', 'ar', 'bg', 'bn', 'ca', 'cs', 'da', 'de', 'el', 'en-GB',
531 'en-US', 'es-419', 'es', 'et', 'fa', 'fi', 'fil', 'fr', 'gu', 'he',
532 'hi', 'hr', 'hu', 'id', 'it', 'ja', 'kn', 'ko', 'lt', 'lv',
533 'ml', 'mr', 'nb', 'nl', 'pl', 'pt-BR', 'pt-PT', 'ro', 'ru',
534 'sk', 'sl', 'sr', 'sv', 'sw', 'ta', 'te', 'th', 'tr', 'uk',
535 'vi', 'zh-CN', 'zh-TW',
536 ],
537
[email protected]cc0322d2011-07-24 09:29:19538 # Pseudo locales are special locales which are used for testing and
539 # debugging. They don't get copied to the final app. For more info,
540 # check out https://sites.google.com/a/chromium.org/dev/Home/fake-bidi
541 'pseudo_locales': [
542 'fake-bidi',
543 ],
544
[email protected]bb6aba32011-01-07 19:04:43545 'grit_defines': [],
546
[email protected]29c2daea2011-01-05 20:38:50547 # Use Harfbuzz-NG instead of Harfbuzz.
548 # Under development: http://crbug.com/68551
549 'use_harfbuzz_ng%': 0,
550
[email protected]bd3bd442011-03-28 07:58:51551 # If debug_devtools is set to 1, JavaScript files for DevTools are
552 # stored as is and loaded from disk. Otherwise, a concatenated file
553 # is stored in resources.pak. It is still possible to load JS files
554 # from disk by passing --debug-devtools cmdline switch.
555 'debug_devtools%': 0,
556
[email protected]be8a9272011-02-10 22:06:07557 # Point to ICU directory.
558 'icu_src_dir': '../third_party/icu',
559
[email protected]912c55c2009-07-31 23:33:55560 'conditions': [
[email protected]da1c8d692011-09-20 20:35:01561 ['os_posix==1 and OS!="mac" and OS!="android"', {
[email protected]242a9e62009-11-03 17:32:10562 # This will set gcc_version to XY if you are running gcc X.Y.*.
563 # This is used to tweak build flags for gcc 4.4.
564 'gcc_version%': '<!(python <(DEPTH)/build/compiler_version.py)',
[email protected]4d83eb72010-03-04 16:42:23565 # Figure out the python architecture to decide if we build pyauto.
[email protected]efd68462010-03-04 17:07:54566 'python_arch%': '<!(<(DEPTH)/build/linux/python_arch.sh <(sysroot)/usr/lib/libpython<(python_ver).so.1.0)',
[email protected]cbd5fd52009-08-26 00:14:27567 'conditions': [
[email protected]2a77a9d2010-08-26 19:58:10568 ['branding=="Chrome"', {
[email protected]cbd5fd52009-08-26 00:14:27569 'linux_breakpad%': 1,
[email protected]cbd5fd52009-08-26 00:14:27570 }],
[email protected]4c9cc6c2009-10-01 18:54:57571 # All Chrome builds have breakpad symbols, but only process the
572 # symbols from official builds.
[email protected]c913cb82010-08-31 19:44:08573 ['(branding=="Chrome" and buildtype=="Official")', {
[email protected]4c9cc6c2009-10-01 18:54:57574 'linux_dump_symbols%': 1,
[email protected]4c9cc6c2009-10-01 18:54:57575 }],
[email protected]cbd5fd52009-08-26 00:14:27576 ],
[email protected]da1c8d692011-09-20 20:35:01577 }], # os_posix==1 and OS!="mac" and OS!="android"
578 ['OS=="android"', {
579 # Location of Android NDK.
580 'variables': {
581 'variables': {
582 'android_ndk_root%': '<!(/bin/echo -n $ANDROID_NDK_ROOT)',
583 'android_target_arch%': 'arm', # target_arch in android terms.
[email protected]bb6aba32011-01-07 19:04:43584
[email protected]da1c8d692011-09-20 20:35:01585 # Switch between different build types, currently only '0' is
586 # supported.
587 'android_build_type%': 0,
588 },
589 'android_ndk_root%': '<(android_ndk_root)',
590 'android_ndk_sysroot': '<(android_ndk_root)/platforms/android-9/arch-<(android_target_arch)',
591 'android_build_type%': '<(android_build_type)',
592 },
593 'android_ndk_root%': '<(android_ndk_root)',
594 'android_ndk_sysroot': '<(android_ndk_sysroot)',
595 'android_ndk_include': '<(android_ndk_sysroot)/usr/include',
596 'android_ndk_lib': '<(android_ndk_sysroot)/usr/lib',
597
598 # Uses Android's crash report system
599 'linux_breakpad%': 0,
600
601 # Always uses openssl.
602 'use_openssl%': 1,
603
604 'proprietary_codecs%': '<(proprietary_codecs)',
605 'safe_browsing%': 0,
606 'configuration_policy%': 0,
607
608 # Builds the gtest targets as a shared_library.
609 # TODO(michaelbai): Use the fixed value 'shared_library' once it
610 # is fully supported.
611 'gtest_target_type%': '<(gtest_target_type)',
612
613 # Uses system APIs for decoding audio and video.
614 'use_libffmpeg%': '0',
615
616 # Always use the chromium skia. The use_system_harfbuzz needs to
617 # match use_system_skia.
618 'use_system_skia%': '0',
619 'use_system_harfbuzz%': '0',
620
621 # Use the system icu.
622 'use_system_icu%': 1,
623
624 # Choose static link by build type.
625 'conditions': [
626 ['android_build_type==0', {
627 'static_link_system_icu%': 1,
628 }, {
629 'static_link_system_icu%': 0,
630 }],
631 ],
632 # Enable to use system sqlite.
633 'use_system_sqlite%': '<(android_build_type)',
634 # Enable to use system libjpeg.
635 'use_system_libjpeg%': '<(android_build_type)',
636 # Enable to use the system libexpat.
637 'use_system_libexpat%': '<(android_build_type)',
638 # Enable to use the system stlport, otherwise statically
639 # link the NDK one?
640 'use_system_stlport%': '<(android_build_type)',
641 # Copy it out one scope.
642 'android_build_type%': '<(android_build_type)',
643 }], # OS=="android"
[email protected]e14a9f92009-08-05 19:26:07644 ['OS=="mac"', {
[email protected]e1ece302011-09-15 03:58:11645 # Enable clang on mac by default!
646 'clang%': 1,
[email protected]e14a9f92009-08-05 19:26:07647 'conditions': [
648 # mac_product_name is set to the name of the .app bundle as it should
649 # appear on disk. This duplicates data from
650 # chrome/app/theme/chromium/BRANDING and
651 # chrome/app/theme/google_chrome/BRANDING, but is necessary to get
652 # these names into the build system.
653 ['branding=="Chrome"', {
654 'mac_product_name%': 'Google Chrome',
655 }, { # else: branding!="Chrome"
656 'mac_product_name%': 'Chromium',
657 }],
658
659 # Feature variables for enabling Mac Breakpad and Keystone auto-update
660 # support. Both features are on by default in official builds with
661 # Chrome branding.
662 ['branding=="Chrome" and buildtype=="Official"', {
663 'mac_breakpad%': 1,
664 'mac_keystone%': 1,
665 }, { # else: branding!="Chrome" or buildtype!="Official"
666 'mac_breakpad%': 0,
667 'mac_keystone%': 0,
668 }],
669 ],
670 }], # OS=="mac"
[email protected]bb6aba32011-01-07 19:04:43671
[email protected]912c55c2009-07-31 23:33:55672 # Whether to use multiple cores to compile with visual studio. This is
673 # optional because it sometimes causes corruption on VS 2005.
674 # It is on by default on VS 2008 and off on VS 2005.
675 ['OS=="win"', {
676 'conditions': [
[email protected]8974e042010-06-21 18:06:52677 ['component=="shared_library"', {
678 'win_use_allocator_shim%': 0,
679 }],
[email protected]912c55c2009-07-31 23:33:55680 ['MSVS_VERSION=="2005"', {
[email protected]669795372009-08-14 17:51:13681 'msvs_multi_core_compile%': 0,
[email protected]912c55c2009-07-31 23:33:55682 },{
683 'msvs_multi_core_compile%': 1,
684 }],
[email protected]10bb8c92009-08-07 21:16:03685 # Don't do incremental linking for large modules on 32-bit.
686 ['MSVS_OS_BITS==32', {
687 'msvs_large_module_debug_link_mode%': '1', # No
688 },{
689 'msvs_large_module_debug_link_mode%': '2', # Yes
690 }],
[email protected]3e2648a2011-03-21 20:58:50691 ['MSVS_VERSION=="2010e" or MSVS_VERSION=="2008e" or MSVS_VERSION=="2005e"', {
692 'msvs_express%': 1,
693 'secure_atl%': 0,
694 },{
695 'msvs_express%': 0,
696 'secure_atl%': 1,
697 }],
[email protected]912c55c2009-07-31 23:33:55698 ],
[email protected]ef4fa4072009-12-04 22:46:50699 'nacl_win64_defines': [
700 # This flag is used to minimize dependencies when building
701 # Native Client loader for 64-bit Windows.
702 'NACL_WIN64',
703 ],
[email protected]912c55c2009-07-31 23:33:55704 }],
[email protected]bb6aba32011-01-07 19:04:43705
[email protected]79e2336c2011-05-12 18:18:34706 ['os_posix==1 and chromeos==0 and target_arch!="arm"', {
[email protected]8e553f492010-10-25 20:05:44707 'use_cups%': 1,
708 }, {
709 'use_cups%': 0,
710 }],
[email protected]bb6aba32011-01-07 19:04:43711
[email protected]19fe8f0b2010-12-07 07:27:27712 # Set the relative path from this file to the GYP file of the JPEG
713 # library used by Chromium.
714 ['use_libjpeg_turbo==1', {
715 'libjpeg_gyp_path': '../third_party/libjpeg_turbo/libjpeg.gyp',
716 }, {
717 'libjpeg_gyp_path': '../third_party/libjpeg/libjpeg.gyp',
718 }], # use_libjpeg_turbo==1
[email protected]bb6aba32011-01-07 19:04:43719
[email protected]abcc9ac2011-05-16 20:04:35720 # Options controlling the use of GConf (the classic GNOME configuration
721 # system) and GIO, which contains GSettings (the new GNOME config system).
[email protected]1c6fe29302011-01-20 22:14:31722 ['chromeos==1', {
723 'use_gconf%': 0,
[email protected]abcc9ac2011-05-16 20:04:35724 'use_gio%': 0,
[email protected]1c6fe29302011-01-20 22:14:31725 }, {
726 'use_gconf%': 1,
[email protected]abcc9ac2011-05-16 20:04:35727 'use_gio%': 1,
[email protected]1c6fe29302011-01-20 22:14:31728 }],
729
[email protected]4de39f82011-03-28 12:01:29730 # Set up -D and -E flags passed into grit.
[email protected]1660bffd2011-03-23 16:24:29731 ['branding=="Chrome"', {
732 # TODO(mmoss) The .grd files look for _google_chrome, but for
733 # consistency they should look for google_chrome_build like C++.
[email protected]4de39f82011-03-28 12:01:29734 'grit_defines': ['-D', '_google_chrome',
735 '-E', 'CHROMIUM_BUILD=google_chrome'],
[email protected]1660bffd2011-03-23 16:24:29736 }, {
[email protected]4de39f82011-03-28 12:01:29737 'grit_defines': ['-D', '_chromium',
738 '-E', 'CHROMIUM_BUILD=chromium'],
[email protected]1660bffd2011-03-23 16:24:29739 }],
[email protected]bb6aba32011-01-07 19:04:43740 ['chromeos==1', {
741 'grit_defines': ['-D', 'chromeos'],
742 }],
743 ['toolkit_views==1', {
744 'grit_defines': ['-D', 'toolkit_views'],
745 }],
[email protected]fd88a8842011-09-13 02:50:22746 ['use_only_pure_views==1', {
747 'grit_defines': ['-D', 'use_only_pure_views'],
[email protected]1b546692011-06-30 18:22:30748 }],
[email protected]8dd791d2011-09-16 16:37:30749 ['use_aura==1', {
750 'grit_defines': ['-D', 'use_aura'],
751 }],
[email protected]bb6aba32011-01-07 19:04:43752 ['touchui==1', {
753 'grit_defines': ['-D', 'touchui'],
754 }],
[email protected]5de10b5d2011-09-19 18:49:47755 ['webui_dialogs==1', {
756 'grit_defines': ['-D', 'webui_dialogs'],
757 }],
[email protected]e47c32032011-03-01 19:26:20758 ['file_manager_extension==1', {
759 'grit_defines': ['-D', 'file_manager_extension'],
760 }],
[email protected]8b2e9f392011-08-05 04:00:47761 ['webui_task_manager==1', {
762 'grit_defines': ['-D', 'webui_task_manager'],
763 }],
[email protected]9a425422011-01-11 00:53:18764 ['remoting==1', {
765 'grit_defines': ['-D', 'remoting'],
766 }],
[email protected]bb6aba32011-01-07 19:04:43767 ['use_titlecase_in_grd_files==1', {
768 'grit_defines': ['-D', 'use_titlecase'],
769 }],
[email protected]00dc155832011-02-01 18:51:19770 ['use_third_party_translations==1', {
771 'grit_defines': ['-D', 'use_third_party_translations'],
[email protected]fb6c102e2011-06-27 21:58:12772 'locales': [
[email protected]8581e1ba2011-08-22 23:27:16773 'ast', 'bs', 'ca@valencia', 'en-AU', 'eo', 'eu', 'gl', 'hy', 'ia',
774 'ka', 'ku', 'kw', 'ms', 'ug'
[email protected]fb6c102e2011-06-27 21:58:12775 ],
[email protected]00dc155832011-02-01 18:51:19776 }],
[email protected]da1c8d692011-09-20 20:35:01777 ['OS=="android"', {
778 'grit_defines': ['-D', 'android'],
779 }],
[email protected]5d451ad2011-02-11 16:43:46780 ['clang_use_chrome_plugins==1', {
781 'clang_chrome_plugins_flags':
782 '<!(<(DEPTH)/tools/clang/scripts/plugin_flags.sh)',
783 }],
[email protected]cfa2e1102011-04-27 22:30:23784
[email protected]452da69e2011-05-24 02:36:05785 # Set use_ibus to 1 to enable ibus support.
[email protected]cfa2e1102011-04-27 22:30:23786 ['touchui==1 and chromeos==1', {
787 'use_ibus%': 1,
788 }, {
789 'use_ibus%': 0,
[email protected]365dd5b92011-05-26 01:30:56790 }],
791
792 ['enable_register_protocol_handler==1', {
793 'grit_defines': ['-D', 'enable_register_protocol_handler'],
794 }],
[email protected]92799b632011-08-15 14:33:06795
[email protected]41ed4e82011-08-25 23:02:07796 ['enable_web_intents==1', {
797 'grit_defines': ['-D', 'enable_web_intents'],
798 }],
799
[email protected]92799b632011-08-15 14:33:06800 ['asan==1', {
801 'clang%': 1,
802 }],
[email protected]912c55c2009-07-31 23:33:55803 ],
[email protected]2f80c312009-02-25 21:26:55804 },
805 'target_defaults': {
[email protected]1c966092009-08-20 21:19:26806 'variables': {
[email protected]a6e22132010-02-10 20:43:18807 # The condition that operates on chromium_code is in a target_conditions
808 # section, and will not have access to the default fallback value of
809 # chromium_code at the top of this file, or to the chromium_code
810 # variable placed at the root variables scope of .gyp files, because
811 # those variables are not set at target scope. As a workaround,
812 # if chromium_code is not set at target scope, define it in target scope
813 # to contain whatever value it has during early variable expansion.
814 # That's enough to make it available during target conditional
815 # processing.
816 'chromium_code%': '<(chromium_code)',
817
[email protected]7e0d664a2009-12-03 21:07:47818 # See http://gcc.gnu.org/onlinedocs/gcc-4.4.2/gcc/Optimize-Options.html
[email protected]d5d593a2009-08-28 23:23:29819 'mac_release_optimization%': '3', # Use -O3 unless overridden
[email protected]ffd984b12009-09-11 19:37:00820 'mac_debug_optimization%': '0', # Use -O0 unless overridden
[email protected]7e0d664a2009-12-03 21:07:47821 # See http://msdn.microsoft.com/en-us/library/aa652360(VS.71).aspx
822 'win_release_Optimization%': '2', # 2 = /Os
823 'win_debug_Optimization%': '0', # 0 = /Od
[email protected]6b0507b2010-05-07 07:41:21824 # See http://msdn.microsoft.com/en-us/library/8wtf2dfz(VS.71).aspx
825 'win_debug_RuntimeChecks%': '3', # 3 = all checks enabled, 0 = off
826 # See http://msdn.microsoft.com/en-us/library/47238hez(VS.71).aspx
[email protected]2ae6e022010-05-07 13:19:15827 'win_debug_InlineFunctionExpansion%': '', # empty = default, 0 = off,
828 'win_release_InlineFunctionExpansion%': '2', # 1 = only __inline, 2 = max
[email protected]fac10d12010-11-08 16:00:31829 # VS inserts quite a lot of extra checks to algorithms like
830 # std::partial_sort in Debug build which make them O(N^2)
831 # instead of O(N*logN). This is particularly slow under memory
832 # tools like ThreadSanitizer so we want it to be disablable.
833 # See http://msdn.microsoft.com/en-us/library/aa985982(v=VS.80).aspx
834 'win_debug_disable_iterator_debugging%': '0',
[email protected]7e0d664a2009-12-03 21:07:47835
[email protected]ffd984b12009-09-11 19:37:00836 'release_extra_cflags%': '',
837 'debug_extra_cflags%': '',
[email protected]92822e82009-09-18 14:26:56838 'release_valgrind_build%': 0,
[email protected]8974e042010-06-21 18:06:52839
840 'conditions': [
841 ['OS=="win" and component=="shared_library"', {
842 # See http://msdn.microsoft.com/en-us/library/aa652367.aspx
843 'win_release_RuntimeLibrary%': '2', # 2 = /MT (nondebug DLL)
844 'win_debug_RuntimeLibrary%': '3', # 3 = /MTd (debug DLL)
845 }, {
846 # See http://msdn.microsoft.com/en-us/library/aa652367.aspx
847 'win_release_RuntimeLibrary%': '0', # 0 = /MT (nondebug static)
848 'win_debug_RuntimeLibrary%': '1', # 1 = /MTd (debug static)
849 }],
850 ],
[email protected]1c966092009-08-20 21:19:26851 },
[email protected]32aa8cc2009-03-04 21:36:39852 'conditions': [
853 ['branding=="Chrome"', {
854 'defines': ['GOOGLE_CHROME_BUILD'],
855 }, { # else: branding!="Chrome"
856 'defines': ['CHROMIUM_BUILD'],
857 }],
[email protected]63e39a282011-07-13 20:41:28858 ['component=="shared_library"', {
859 'defines': ['COMPONENT_BUILD'],
860 }],
[email protected]06c756182010-04-27 18:31:31861 ['toolkit_views==1', {
[email protected]e6970232009-05-12 23:51:17862 'defines': ['TOOLKIT_VIEWS=1'],
863 }],
[email protected]fd88a8842011-09-13 02:50:22864 ['use_only_pure_views==1', {
865 'defines': ['USE_ONLY_PURE_VIEWS=1'],
[email protected]1b546692011-06-30 18:22:30866 }],
[email protected]9c8a1982011-05-24 23:08:58867 ['views_compositor==1', {
[email protected]c3870f42011-06-10 16:43:27868 'defines': ['VIEWS_COMPOSITOR=1'],
[email protected]9c8a1982011-05-24 23:08:58869 }],
[email protected]41423092011-08-25 15:39:58870 ['use_aura==1', {
871 'defines': ['USE_AURA=1'],
[email protected]e599f0132011-08-24 19:03:35872 }],
[email protected]fdc5bed2010-01-09 01:16:57873 ['chromeos==1', {
[email protected]16779842009-07-08 23:45:29874 'defines': ['OS_CHROMEOS=1'],
[email protected]2b883b92009-06-02 22:57:50875 }],
[email protected]0094fbe2010-07-15 21:51:43876 ['touchui==1', {
877 'defines': ['TOUCH_UI=1'],
878 }],
[email protected]236754a2011-07-28 17:38:23879 ['use_wayland==1', {
880 'defines': ['USE_WAYLAND=1', 'WL_EGL_PLATFORM=1'],
881 }],
[email protected]e47c32032011-03-01 19:26:20882 ['file_manager_extension==1', {
883 'defines': ['FILE_MANAGER_EXTENSION=1'],
884 }],
[email protected]8b2e9f392011-08-05 04:00:47885 ['webui_task_manager==1', {
886 'defines': ['WEBUI_TASK_MANAGER=1'],
887 }],
[email protected]7664ab32011-02-01 23:35:25888 ['profiling==1', {
889 'defines': ['ENABLE_PROFILING=1'],
890 }],
[email protected]93b373502011-08-16 19:06:22891 ['OS=="linux" and glibcxx_debug==1', {
892 'defines': ['_GLIBCXX_DEBUG=1',],
893 'cflags_cc!': ['-fno-rtti'],
894 'cflags_cc+': ['-frtti', '-g'],
895 }],
[email protected]542bf24a2010-06-11 23:08:17896 ['remoting==1', {
897 'defines': ['ENABLE_REMOTING=1'],
[email protected]c0bac532010-06-11 00:39:00898 }],
[email protected]5834f4392011-09-13 20:06:17899 ['use_threaded_compositing==1', {
900 'defines': ['WTF_USE_THREADED_COMPOSITING'],
901 }],
[email protected]a026daa2011-04-20 15:49:51902 ['p2p_apis==1', {
903 'defines': ['ENABLE_P2P_APIS=1'],
904 }],
[email protected]d01120e62010-05-10 17:04:48905 ['proprietary_codecs==1', {
906 'defines': ['USE_PROPRIETARY_CODECS'],
907 }],
[email protected]1b4209f2011-01-07 00:25:40908 ['enable_flapper_hacks==1', {
909 'defines': ['ENABLE_FLAPPER_HACKS=1'],
910 }],
[email protected]f31e2e52011-07-14 16:01:19911 ['configuration_policy==1', {
912 'defines': ['ENABLE_CONFIGURATION_POLICY'],
913 }],
[email protected]9c1949e2009-10-02 19:59:54914 ['fastbuild!=0', {
[email protected]5834f4392011-09-13 20:06:17915
[email protected]9c1949e2009-10-02 19:59:54916 'conditions': [
[email protected]1cc2fa72010-07-03 08:49:24917 # For Windows, we don't genererate debug information.
[email protected]9c1949e2009-10-02 19:59:54918 ['OS=="win"', {
919 'msvs_settings': {
920 'VCLinkerTool': {
921 'GenerateDebugInformation': 'false',
922 },
923 'VCCLCompilerTool': {
924 'DebugInformationFormat': '0',
925 }
926 }
[email protected]1cc2fa72010-07-03 08:49:24927 }, { # else: OS != "win", generate less debug information.
928 'variables': {
929 'debug_extra_cflags': '-g1',
930 },
[email protected]37c84192010-04-14 21:37:40931 }],
[email protected]aecc4d12011-01-19 05:32:33932 # Clang creates chubby debug information, which makes linking very
933 # slow. For now, don't create debug information with clang. See
934 # http://crbug.com/70000
935 ['OS=="linux" and clang==1', {
936 'variables': {
937 'debug_extra_cflags': '-g0',
938 },
939 }],
[email protected]9c1949e2009-10-02 19:59:54940 ], # conditions for fastbuild.
941 }], # fastbuild!=0
[email protected]ad6d2c42009-09-15 20:13:38942 ['selinux==1', {
943 'defines': ['CHROMIUM_SELINUX=1'],
944 }],
[email protected]7e0d664a2009-12-03 21:07:47945 ['win_use_allocator_shim==0', {
946 'conditions': [
947 ['OS=="win"', {
948 'defines': ['NO_TCMALLOC'],
949 }],
950 ],
951 }],
[email protected]43f28f832010-02-03 02:28:48952 ['enable_gpu==1', {
[email protected]7477ea6f2009-12-22 23:28:15953 'defines': [
954 'ENABLE_GPU=1',
955 ],
956 }],
[email protected]b1c2a5542010-10-08 12:44:40957 ['use_openssl==1', {
958 'defines': [
959 'USE_OPENSSL=1',
960 ],
961 }],
[email protected]ed154592010-04-29 00:18:50962 ['enable_eglimage==1', {
963 'defines': [
964 'ENABLE_EGLIMAGE=1',
965 ],
966 }],
[email protected]7d7564a12011-06-21 19:20:22967 ['use_skia==1', {
968 'defines': [
969 'USE_SKIA=1',
970 ],
971 }],
[email protected]f5ecbba12009-04-03 04:35:18972 ['coverage!=0', {
973 'conditions': [
974 ['OS=="mac"', {
975 'xcode_settings': {
[email protected]ab2956372009-08-13 18:11:04976 'GCC_INSTRUMENT_PROGRAM_FLOW_ARCS': 'YES', # -fprofile-arcs
977 'GCC_GENERATE_TEST_COVERAGE_FILES': 'YES', # -ftest-coverage
[email protected]5ae4f55e2009-04-13 23:19:47978 },
[email protected]e4fb84c2009-12-28 20:45:43979 # Add -lgcov for types executable, shared_library, and
[email protected]dc259ce52010-04-13 04:03:10980 # loadable_module; not for static_library.
[email protected]e4fb84c2009-12-28 20:45:43981 # This is a delayed conditional.
[email protected]f5ecbba12009-04-03 04:35:18982 'target_conditions': [
[email protected]e4fb84c2009-12-28 20:45:43983 ['_type!="static_library"', {
[email protected]f5ecbba12009-04-03 04:35:18984 'xcode_settings': { 'OTHER_LDFLAGS': [ '-lgcov' ] },
[email protected]5ae4f55e2009-04-13 23:19:47985 }],
986 ],
987 }],
[email protected]da1c8d692011-09-20 20:35:01988 ['OS=="linux" or OS=="android"', {
[email protected]f5ecbba12009-04-03 04:35:18989 'cflags': [ '-ftest-coverage',
990 '-fprofile-arcs' ],
[email protected]7122ffd52009-04-30 23:19:00991 'link_settings': { 'libraries': [ '-lgcov' ] },
[email protected]f5ecbba12009-04-03 04:35:18992 }],
[email protected]e8f6ff42009-07-07 18:20:53993 # Finally, for Windows, we simply turn on profiling.
994 ['OS=="win"', {
995 'msvs_settings': {
996 'VCLinkerTool': {
997 'Profile': 'true',
998 },
[email protected]10bb8c92009-08-07 21:16:03999 'VCCLCompilerTool': {
[email protected]e8f6ff42009-07-07 18:20:531000 # /Z7, not /Zi, so coverage is happyb
1001 'DebugInformationFormat': '1',
[email protected]1f9471a2010-01-04 06:40:161002 'AdditionalOptions': ['/Yd'],
[email protected]e8f6ff42009-07-07 18:20:531003 }
1004 }
1005 }], # OS==win
1006 ], # conditions for coverage
1007 }], # coverage!=0
[email protected]4e4d6042010-08-26 18:34:381008 ['OS=="win"', {
1009 'defines': [
1010 '__STD_C',
1011 '_CRT_SECURE_NO_DEPRECATE',
1012 '_SCL_SECURE_NO_DEPRECATE',
1013 ],
1014 'include_dirs': [
1015 '<(DEPTH)/third_party/wtl/include',
1016 ],
1017 }], # OS==win
[email protected]365dd5b92011-05-26 01:30:561018 ['enable_register_protocol_handler==1', {
1019 'defines': [
[email protected]06bba4fb2011-06-09 05:17:191020 'ENABLE_REGISTER_PROTOCOL_HANDLER=1',
[email protected]365dd5b92011-05-26 01:30:561021 ],
1022 }],
[email protected]41ed4e82011-08-25 23:02:071023 ['enable_web_intents==1', {
1024 'defines': [
1025 'ENABLE_INTENTS=1',
1026 ],
1027 }],
[email protected]a6e22132010-02-10 20:43:181028 ], # conditions for 'target_defaults'
1029 'target_conditions': [
[email protected]c14d8e772010-02-09 22:06:151030 ['chromium_code==0', {
[email protected]d8543312010-02-10 17:43:281031 'conditions': [
[email protected]79e2336c2011-05-12 18:18:341032 [ 'os_posix==1 and OS!="mac"', {
[email protected]c0a6b272011-02-09 22:32:331033 # We don't want to get warnings from third-party code,
1034 # so remove any existing warning-enabling flags like -Wall.
[email protected]d8543312010-02-10 17:43:281035 'cflags!': [
1036 '-Wall',
1037 '-Wextra',
1038 '-Werror',
1039 ],
[email protected]ec1d155be2011-02-08 22:19:001040 'cflags': [
1041 # Don't warn about hash_map in third-party code.
1042 '-Wno-deprecated',
[email protected]c0a6b272011-02-09 22:32:331043 # Don't warn about printf format problems.
1044 # This is off by default in gcc but on in Ubuntu's gcc(!).
[email protected]ec392872011-02-10 22:38:221045 '-Wno-format',
[email protected]ec1d155be2011-02-08 22:19:001046 ],
[email protected]d16bd642011-07-25 23:59:181047 'cflags_cc!': [
1048 # TODO(fischman): remove this.
1049 # http://code.google.com/p/chromium/issues/detail?id=90453
1050 '-Wsign-compare',
1051 ]
[email protected]d8543312010-02-10 17:43:281052 }],
[email protected]6e4451892011-07-27 10:32:111053 [ 'os_posix==1 and OS!="mac" and chromeos==0', {
1054 'cflags': [
1055 # Don't warn about ignoring the return value from e.g. close().
1056 # This is off by default in some gccs but on by default in others.
1057 # Currently this option is not set for Chrome OS build because
1058 # the current version of gcc (4.3.4) used for building Chrome in
1059 # Chrome OS chroot doesn't support this option.
1060 # TODO(mazda): remove the conditional for Chrome OS when gcc
1061 # version is upgraded.
1062 '-Wno-unused-result',
1063 ],
1064 }],
[email protected]d8543312010-02-10 17:43:281065 [ 'OS=="win"', {
1066 'defines': [
1067 '_CRT_SECURE_NO_DEPRECATE',
1068 '_CRT_NONSTDC_NO_WARNINGS',
1069 '_CRT_NONSTDC_NO_DEPRECATE',
1070 '_SCL_SECURE_NO_DEPRECATE',
1071 ],
1072 'msvs_disabled_warnings': [4800],
1073 'msvs_settings': {
1074 'VCCLCompilerTool': {
[email protected]942c3a60f2011-05-03 02:04:111075 'WarningLevel': '3',
1076 'WarnAsError': 'false', # TODO(maruel): Enable it.
[email protected]d8543312010-02-10 17:43:281077 'Detect64BitPortabilityProblems': 'false',
1078 },
1079 },
1080 }],
[email protected]ea47b6a2011-07-17 19:39:421081 # TODO(darin): Unfortunately, some third_party code depends on base/
1082 [ 'OS=="win" and component=="shared_library"', {
1083 'msvs_disabled_warnings': [
1084 4251, # class 'std::xx' needs to have dll-interface.
1085 ],
1086 }],
[email protected]d8543312010-02-10 17:43:281087 [ 'OS=="mac"', {
1088 'xcode_settings': {
1089 'GCC_TREAT_WARNINGS_AS_ERRORS': 'NO',
[email protected]4c4c2e5332010-06-15 11:51:061090 'WARNING_CFLAGS!': ['-Wall', '-Wextra'],
[email protected]d8543312010-02-10 17:43:281091 },
1092 }],
[email protected]c14d8e772010-02-09 22:06:151093 ],
1094 }, {
1095 # In Chromium code, we define __STDC_FORMAT_MACROS in order to get the
1096 # C99 macros on Mac and Linux.
1097 'defines': [
1098 '__STDC_FORMAT_MACROS',
1099 ],
1100 'conditions': [
1101 ['OS!="win"', {
[email protected]40519592010-11-16 15:23:301102 'sources/': [ ['exclude', '_win(_unittest)?\\.(h|cc)$'],
[email protected]a316ca532010-11-15 14:08:161103 ['exclude', '(^|/)win/'],
[email protected]40519592010-11-16 15:23:301104 ['exclude', '(^|/)win_[^/]*\\.(h|cc)$'] ],
[email protected]c14d8e772010-02-09 22:06:151105 }],
1106 ['OS!="mac"', {
[email protected]40519592010-11-16 15:23:301107 'sources/': [ ['exclude', '_(cocoa|mac)(_unittest)?\\.(h|cc)$'],
[email protected]a316ca532010-11-15 14:08:161108 ['exclude', '(^|/)(cocoa|mac)/'],
1109 ['exclude', '\\.mm?$' ] ],
[email protected]c14d8e772010-02-09 22:06:151110 }],
[email protected]79e2336c2011-05-12 18:18:341111 ['toolkit_uses_gtk!=1', {
[email protected]c14d8e772010-02-09 22:06:151112 'sources/': [
[email protected]40519592010-11-16 15:23:301113 ['exclude', '_(chromeos|gtk|x|x11|xdg)(_unittest)?\\.(h|cc)$'],
[email protected]a316ca532010-11-15 14:08:161114 ['exclude', '(^|/)gtk/'],
[email protected]40519592010-11-16 15:23:301115 ['exclude', '(^|/)(gtk|x11)_[^/]*\\.(h|cc)$'],
[email protected]18cff3d2010-02-17 18:03:131116 ],
1117 }],
[email protected]f1b2cd02011-08-10 16:50:441118 ['use_wayland!=1', {
1119 'sources/': [
1120 ['exclude', '_(wayland)(_unittest)?\\.(h|cc)$'],
1121 ['exclude', '(^|/)wayland/'],
1122 ['exclude', '(^|/)(wayland)_[^/]*\\.(h|cc)$'],
1123 ],
1124 }],
[email protected]18cff3d2010-02-17 18:03:131125 ['OS!="linux"', {
1126 'sources/': [
[email protected]40519592010-11-16 15:23:301127 ['exclude', '_linux(_unittest)?\\.(h|cc)$'],
[email protected]a316ca532010-11-15 14:08:161128 ['exclude', '(^|/)linux/'],
[email protected]18cff3d2010-02-17 18:03:131129 ],
[email protected]c14d8e772010-02-09 22:06:151130 }],
[email protected]f98d7b92011-09-09 10:17:351131 ['OS!="android"', {
1132 'sources/': [
1133 ['exclude', '_android(_unittest)?\\.cc$'],
1134 ['exclude', '(^|/)android/'],
1135 ],
1136 }],
[email protected]c14d8e772010-02-09 22:06:151137 # We use "POSIX" to refer to all non-Windows operating systems.
1138 ['OS=="win"', {
[email protected]40519592010-11-16 15:23:301139 'sources/': [ ['exclude', '_posix\\.(h|cc)$'] ],
[email protected]f55bd4862010-05-27 15:38:071140 # turn on warnings for signed/unsigned mismatch on chromium code.
1141 'msvs_settings': {
1142 'VCCLCompilerTool': {
1143 'AdditionalOptions': ['/we4389'],
1144 },
1145 },
[email protected]c14d8e772010-02-09 22:06:151146 }],
[email protected]63e39a282011-07-13 20:41:281147 ['OS=="win" and component=="shared_library"', {
1148 'msvs_disabled_warnings': [
1149 4251, # class 'std::xx' needs to have dll-interface.
1150 ],
1151 }],
[email protected]c14d8e772010-02-09 22:06:151152 ['chromeos!=1', {
[email protected]40519592010-11-16 15:23:301153 'sources/': [ ['exclude', '_chromeos\\.(h|cc)$'] ]
[email protected]c14d8e772010-02-09 22:06:151154 }],
[email protected]06c756182010-04-27 18:31:311155 ['toolkit_views==0', {
[email protected]40519592010-11-16 15:23:301156 'sources/': [ ['exclude', '_views\\.(h|cc)$'] ]
[email protected]c14d8e772010-02-09 22:06:151157 }],
[email protected]41423092011-08-25 15:39:581158 ['use_aura==0', {
1159 'sources/': [ ['exclude', '_aura\\.(h|cc)$'] ]
1160 }],
[email protected]c14d8e772010-02-09 22:06:151161 ],
1162 }],
[email protected]a6e22132010-02-10 20:43:181163 ], # target_conditions for 'target_defaults'
[email protected]2f80c312009-02-25 21:26:551164 'default_configuration': 'Debug',
1165 'configurations': {
[email protected]5153767c2009-12-22 01:52:501166 # VCLinkerTool LinkIncremental values below:
1167 # 0 == default
1168 # 1 == /INCREMENTAL:NO
1169 # 2 == /INCREMENTAL
1170 # Debug links incremental, Release does not.
1171 #
[email protected]7b99801e2010-11-03 17:26:231172 # Abstract base configurations to cover common attributes.
[email protected]5153767c2009-12-22 01:52:501173 #
1174 'Common_Base': {
[email protected]bb05e452009-10-29 21:24:561175 'abstract': 1,
1176 'msvs_configuration_attributes': {
1177 'OutputDirectory': '$(SolutionDir)$(ConfigurationName)',
1178 'IntermediateDirectory': '$(OutDir)\\obj\\$(ProjectName)',
1179 'CharacterSet': '1',
1180 },
[email protected]5153767c2009-12-22 01:52:501181 },
1182 'x86_Base': {
1183 'abstract': 1,
[email protected]ef4fa4072009-12-04 22:46:501184 'msvs_settings': {
1185 'VCLinkerTool': {
1186 'TargetMachine': '1',
1187 },
1188 },
[email protected]2fa40782009-11-01 21:17:341189 'msvs_configuration_platform': 'Win32',
[email protected]bb05e452009-10-29 21:24:561190 },
[email protected]5153767c2009-12-22 01:52:501191 'x64_Base': {
1192 'abstract': 1,
1193 'msvs_configuration_platform': 'x64',
1194 'msvs_settings': {
1195 'VCLinkerTool': {
1196 'TargetMachine': '17', # x86 - 64
[email protected]5153767c2009-12-22 01:52:501197 'AdditionalLibraryDirectories!':
1198 ['<(DEPTH)/third_party/platformsdk_win7/files/Lib'],
1199 'AdditionalLibraryDirectories':
1200 ['<(DEPTH)/third_party/platformsdk_win7/files/Lib/x64'],
1201 },
[email protected]d26b4418ab2010-03-24 22:06:351202 'VCLibrarianTool': {
[email protected]5153767c2009-12-22 01:52:501203 'AdditionalLibraryDirectories!':
1204 ['<(DEPTH)/third_party/platformsdk_win7/files/Lib'],
1205 'AdditionalLibraryDirectories':
1206 ['<(DEPTH)/third_party/platformsdk_win7/files/Lib/x64'],
1207 },
1208 },
1209 'defines': [
1210 # Not sure if tcmalloc works on 64-bit Windows.
1211 'NO_TCMALLOC',
1212 ],
1213 },
1214 'Debug_Base': {
1215 'abstract': 1,
[email protected]14339762011-04-05 07:36:581216 'defines': [
1217 'DYNAMIC_ANNOTATIONS_ENABLED=1',
1218 'WTF_USE_DYNAMIC_ANNOTATIONS=1',
1219 ],
[email protected]1c966092009-08-20 21:19:261220 'xcode_settings': {
1221 'COPY_PHASE_STRIP': 'NO',
[email protected]d5d593a2009-08-28 23:23:291222 'GCC_OPTIMIZATION_LEVEL': '<(mac_debug_optimization)',
[email protected]a68c29a2011-07-01 16:23:491223 'OTHER_CFLAGS': [
[email protected]a68c29a2011-07-01 16:23:491224 '<@(debug_extra_cflags)',
1225 ],
[email protected]1c966092009-08-20 21:19:261226 },
[email protected]bb05e452009-10-29 21:24:561227 'msvs_settings': {
1228 'VCCLCompilerTool': {
[email protected]7e0d664a2009-12-03 21:07:471229 'Optimization': '<(win_debug_Optimization)',
[email protected]bb05e452009-10-29 21:24:561230 'PreprocessorDefinitions': ['_DEBUG'],
[email protected]6b0507b2010-05-07 07:41:211231 'BasicRuntimeChecks': '<(win_debug_RuntimeChecks)',
[email protected]7e0d664a2009-12-03 21:07:471232 'RuntimeLibrary': '<(win_debug_RuntimeLibrary)',
[email protected]2ae6e022010-05-07 13:19:151233 'conditions': [
1234 # According to MSVS, InlineFunctionExpansion=0 means
1235 # "default inlining", not "/Ob0".
1236 # Thus, we have to handle InlineFunctionExpansion==0 separately.
1237 ['win_debug_InlineFunctionExpansion==0', {
1238 'AdditionalOptions': ['/Ob0'],
1239 }],
1240 ['win_debug_InlineFunctionExpansion!=""', {
1241 'InlineFunctionExpansion':
1242 '<(win_debug_InlineFunctionExpansion)',
1243 }],
[email protected]fac10d12010-11-08 16:00:311244 ['win_debug_disable_iterator_debugging==1', {
1245 'PreprocessorDefinitions': ['_HAS_ITERATOR_DEBUGGING=0'],
1246 }],
[email protected]2ae6e022010-05-07 13:19:151247 ],
[email protected]bb05e452009-10-29 21:24:561248 },
1249 'VCLinkerTool': {
1250 'LinkIncremental': '<(msvs_debug_link_incremental)',
[email protected]646f6b42011-07-14 13:57:021251 # ASLR makes debugging with windbg difficult because Chrome.exe and
1252 # Chrome.dll share the same base name. As result, windbg will
1253 # name the Chrome.dll module like chrome_<base address>, where
1254 # <base address> typically changes with each launch. This in turn
1255 # means that breakpoints in Chrome.dll don't stick from one launch
1256 # to the next. For this reason, we turn ASLR off in debug builds.
1257 # Note that this is a three-way bool, where 0 means to pick up
1258 # the default setting, 1 is off and 2 is on.
1259 'RandomizedBaseAddress': 1,
[email protected]bb05e452009-10-29 21:24:561260 },
1261 'VCResourceCompilerTool': {
1262 'PreprocessorDefinitions': ['_DEBUG'],
1263 },
1264 },
[email protected]2f80c312009-02-25 21:26:551265 'conditions': [
[email protected]bb05e452009-10-29 21:24:561266 ['OS=="linux"', {
1267 'cflags': [
1268 '<@(debug_extra_cflags)',
1269 ],
[email protected]2f80c312009-02-25 21:26:551270 }],
[email protected]56cca4e2011-07-01 21:33:351271 ['release_valgrind_build==0', {
1272 'xcode_settings': {
1273 'OTHER_CFLAGS': [
1274 '-fstack-protector-all', # Implies -fstack-protector
1275 ],
1276 },
1277 }],
[email protected]2f80c312009-02-25 21:26:551278 ],
1279 },
[email protected]5153767c2009-12-22 01:52:501280 'Release_Base': {
1281 'abstract': 1,
[email protected]2f80c312009-02-25 21:26:551282 'defines': [
1283 'NDEBUG',
1284 ],
[email protected]1c966092009-08-20 21:19:261285 'xcode_settings': {
1286 'DEAD_CODE_STRIPPING': 'YES', # -Wl,-dead_strip
1287 'GCC_OPTIMIZATION_LEVEL': '<(mac_release_optimization)',
[email protected]ffd984b12009-09-11 19:37:001288 'OTHER_CFLAGS': [ '<@(release_extra_cflags)', ],
[email protected]1c966092009-08-20 21:19:261289 },
[email protected]bb05e452009-10-29 21:24:561290 'msvs_settings': {
[email protected]7e0d664a2009-12-03 21:07:471291 'VCCLCompilerTool': {
1292 'Optimization': '<(win_release_Optimization)',
1293 'RuntimeLibrary': '<(win_release_RuntimeLibrary)',
[email protected]2ae6e022010-05-07 13:19:151294 'conditions': [
1295 # According to MSVS, InlineFunctionExpansion=0 means
1296 # "default inlining", not "/Ob0".
1297 # Thus, we have to handle InlineFunctionExpansion==0 separately.
1298 ['win_release_InlineFunctionExpansion==0', {
1299 'AdditionalOptions': ['/Ob0'],
1300 }],
1301 ['win_release_InlineFunctionExpansion!=""', {
1302 'InlineFunctionExpansion':
1303 '<(win_release_InlineFunctionExpansion)',
1304 }],
1305 ],
[email protected]7e0d664a2009-12-03 21:07:471306 },
[email protected]bb05e452009-10-29 21:24:561307 'VCLinkerTool': {
[email protected]c059c612011-08-08 20:56:341308 # LinkIncremental is a tri-state boolean, where 0 means default
1309 # (i.e., inherit from parent solution), 1 means false, and
1310 # 2 means true.
[email protected]bb05e452009-10-29 21:24:561311 'LinkIncremental': '1',
[email protected]c059c612011-08-08 20:56:341312 # This corresponds to the /PROFILE flag which ensures the PDB
1313 # file contains FIXUP information (growing the PDB file by about
1314 # 5%) but does not otherwise alter the output binary. This
1315 # information is used by the Syzygy optimization tool when
1316 # decomposing the release image.
1317 'Profile': 'true',
[email protected]bb05e452009-10-29 21:24:561318 },
1319 },
[email protected]2f80c312009-02-25 21:26:551320 'conditions': [
[email protected]92822e82009-09-18 14:26:561321 ['release_valgrind_build==0', {
[email protected]14339762011-04-05 07:36:581322 'defines': [
1323 'NVALGRIND',
1324 'DYNAMIC_ANNOTATIONS_ENABLED=0',
1325 ],
[email protected]ee857512010-05-14 08:24:421326 }, {
[email protected]14339762011-04-05 07:36:581327 'defines': [
1328 'DYNAMIC_ANNOTATIONS_ENABLED=1',
1329 'WTF_USE_DYNAMIC_ANNOTATIONS=1',
1330 ],
[email protected]92822e82009-09-18 14:26:561331 }],
[email protected]7e0d664a2009-12-03 21:07:471332 ['win_use_allocator_shim==0', {
1333 'defines': ['NO_TCMALLOC'],
1334 }],
[email protected]bb05e452009-10-29 21:24:561335 ['OS=="linux"', {
1336 'cflags': [
[email protected]ffd984b12009-09-11 19:37:001337 '<@(release_extra_cflags)',
[email protected]bb05e452009-10-29 21:24:561338 ],
1339 }],
[email protected]2f80c312009-02-25 21:26:551340 ],
1341 },
[email protected]5153767c2009-12-22 01:52:501342 #
1343 # Concrete configurations
1344 #
1345 'Debug': {
1346 'inherit_from': ['Common_Base', 'x86_Base', 'Debug_Base'],
1347 },
1348 'Release': {
1349 'inherit_from': ['Common_Base', 'x86_Base', 'Release_Base'],
1350 'conditions': [
1351 ['msvs_use_common_release', {
[email protected]1f9471a2010-01-04 06:40:161352 'includes': ['release.gypi'],
[email protected]5153767c2009-12-22 01:52:501353 }],
1354 ]
1355 },
[email protected]f926fa0a2009-08-04 22:50:131356 'conditions': [
1357 [ 'OS=="win"', {
1358 # TODO(bradnelson): add a gyp mechanism to make this more graceful.
[email protected]ef4fa4072009-12-04 22:46:501359 'Debug_x64': {
[email protected]5153767c2009-12-22 01:52:501360 'inherit_from': ['Common_Base', 'x64_Base', 'Debug_Base'],
[email protected]78263c12009-11-01 23:45:301361 },
1362 'Release_x64': {
[email protected]5153767c2009-12-22 01:52:501363 'inherit_from': ['Common_Base', 'x64_Base', 'Release_Base'],
[email protected]78263c12009-11-01 23:45:301364 },
[email protected]f926fa0a2009-08-04 22:50:131365 }],
1366 ],
[email protected]2f80c312009-02-25 21:26:551367 },
1368 },
1369 'conditions': [
[email protected]79e2336c2011-05-12 18:18:341370 ['os_posix==1 and OS!="mac"', {
[email protected]9d384032009-03-20 23:13:261371 'target_defaults': {
[email protected]5315f2842009-04-28 00:43:271372 # Enable -Werror by default, but put it in a variable so it can
1373 # be disabled in ~/.gyp/include.gypi on the valgrind builders.
1374 'variables': {
[email protected]57e94022011-05-04 15:33:191375 # Use -fno-strict-aliasing, see http://crbug.com/32204
[email protected]ecf52cb82010-01-13 19:25:421376 'no_strict_aliasing%': 1,
[email protected]79e2336c2011-05-12 18:18:341377 'conditions': [
1378 ['OS=="linux"', {
1379 'werror%': '-Werror',
1380 }, { # turn off -Werror on other Unices
1381 'werror%': '',
1382 }],
[email protected]47deeb62009-12-17 14:49:391383 ],
[email protected]5315f2842009-04-28 00:43:271384 },
[email protected]9d384032009-03-20 23:13:261385 'cflags': [
[email protected]1bba09c2009-08-13 12:53:161386 '<(werror)', # See note above about the werror variable.
1387 '-pthread',
1388 '-fno-exceptions',
1389 '-Wall',
[email protected]0fa17082010-03-26 00:48:051390 # TODO(evan): turn this back on once all the builds work.
1391 # '-Wextra',
[email protected]225c8f52010-02-05 22:23:201392 # Don't warn about unused function params. We use those everywhere.
1393 '-Wno-unused-parameter',
1394 # Don't warn about the "struct foo f = {0};" initialization pattern.
1395 '-Wno-missing-field-initializers',
[email protected]1bba09c2009-08-13 12:53:161396 '-D_FILE_OFFSET_BITS=64',
[email protected]3df6e3a2010-01-21 20:23:121397 # Don't export any symbols (for example, to plugins we dlopen()).
1398 # Note: this is *required* to make some plugins work.
1399 '-fvisibility=hidden',
[email protected]7ca6ce12010-09-15 23:39:351400 '-pipe',
[email protected]8a2fcba2009-07-29 00:52:241401 ],
1402 'cflags_cc': [
[email protected]832d0212009-10-28 19:12:221403 '-fno-rtti',
[email protected]8a2fcba2009-07-29 00:52:241404 '-fno-threadsafe-statics',
[email protected]f5986c42009-11-17 18:39:361405 # Make inline functions have hidden visiblity by default.
1406 # Surprisingly, not covered by -fvisibility=hidden.
1407 '-fvisibility-inlines-hidden',
[email protected]554abd902011-07-25 04:03:171408 # GCC turns on -Wsign-compare for C++ under -Wall, but clang doesn't,
1409 # so we specify it explicitly.
1410 # TODO(fischman): remove this if http://llvm.org/PR10448 obsoletes it.
[email protected]d16bd642011-07-25 23:59:181411 # http://code.google.com/p/chromium/issues/detail?id=90453
[email protected]554abd902011-07-25 04:03:171412 '-Wsign-compare',
[email protected]9d384032009-03-20 23:13:261413 ],
[email protected]a6cf87e2009-04-03 04:07:381414 'ldflags': [
[email protected]138241f2010-03-30 23:53:101415 '-pthread', '-Wl,-z,noexecstack',
[email protected]9d384032009-03-20 23:13:261416 ],
[email protected]3aacaf952009-04-02 15:34:091417 'configurations': {
[email protected]5153767c2009-12-22 01:52:501418 'Debug_Base': {
[email protected]c5bdc032009-04-20 19:11:311419 'variables': {
1420 'debug_optimize%': '0',
1421 },
[email protected]3aacaf952009-04-02 15:34:091422 'defines': [
1423 '_DEBUG',
1424 ],
1425 'cflags': [
[email protected]9cb5cc702011-02-01 19:56:041426 '-O>(debug_optimize)',
[email protected]3aacaf952009-04-02 15:34:091427 '-g',
1428 ],
[email protected]da1c8d692011-09-20 20:35:011429 'conditions' : [
1430 ['OS=="android"', {
1431 'cflags': [
1432 '-fno-omit-frame-pointer',
1433 ],
1434 }],
1435 ],
1436 'target_conditions' : [
1437 ['_toolset=="target"', {
1438 'conditions': [
1439 ['OS=="android" and debug_optimize==0', {
1440 'cflags': [
1441 '-mlong-calls', # Needed when compiling with -O0
1442 ],
1443 }],
1444 ['arm_thumb==1', {
1445 'cflags': [
1446 '-marm',
1447 ],
1448 }],
1449 ],
1450 }],
1451 ],
[email protected]5315f2842009-04-28 00:43:271452 },
[email protected]5153767c2009-12-22 01:52:501453 'Release_Base': {
[email protected]740e2de2009-07-21 11:41:011454 'variables': {
1455 'release_optimize%': '2',
[email protected]1dd529642010-05-15 01:02:511456 # Binaries become big and gold is unable to perform GC
1457 # and remove unused sections for some of test targets
1458 # on 32 bit platform.
1459 # (This is currently observed only in chromeos valgrind bots)
1460 # The following flag is to disable --gc-sections linker
1461 # option for these bots.
1462 'no_gc_sections%': 0,
[email protected]409dceef2011-05-10 19:49:121463
1464 # TODO(bradnelson): reexamine how this is done if we change the
1465 # expansion of configurations
1466 'release_valgrind_build%': 0,
[email protected]740e2de2009-07-21 11:41:011467 },
[email protected]3aacaf952009-04-02 15:34:091468 'cflags': [
[email protected]9cb5cc702011-02-01 19:56:041469 '-O>(release_optimize)',
[email protected]d8cc3a62009-04-08 18:29:531470 # Don't emit the GCC version ident directives, they just end up
1471 # in the .comment section taking up binary size.
1472 '-fno-ident',
1473 # Put data and code in their own sections, so that unused symbols
1474 # can be removed at link time with --gc-sections.
1475 '-fdata-sections',
1476 '-ffunction-sections',
[email protected]3aacaf952009-04-02 15:34:091477 ],
[email protected]c902f2cba2010-08-06 20:04:181478 'ldflags': [
1479 # Specifically tell the linker to perform optimizations.
1480 # See http://lwn.net/Articles/192624/ .
1481 '-Wl,-O1',
[email protected]27c2e492010-08-06 22:55:221482 '-Wl,--as-needed',
[email protected]c902f2cba2010-08-06 20:04:181483 ],
[email protected]1dd529642010-05-15 01:02:511484 'conditions' : [
1485 ['no_gc_sections==0', {
1486 'ldflags': [
1487 '-Wl,--gc-sections',
1488 ],
1489 }],
[email protected]da1c8d692011-09-20 20:35:011490 ['OS=="android"', {
1491 'cflags': [
1492 '-fomit-frame-pointer',
1493 ],
1494 }],
[email protected]ecf7b6482010-10-13 09:15:201495 ['clang==1', {
1496 'cflags!': [
1497 '-fno-ident',
1498 ],
1499 }],
[email protected]7664ab32011-02-01 23:35:251500 ['profiling==1', {
1501 'cflags': [
1502 '-fno-omit-frame-pointer',
1503 '-g',
1504 ],
1505 }],
[email protected]c75f33e42011-05-04 18:11:521506 # At gyp time, we test the linker for ICF support; this flag
1507 # is then provided to us by gyp. (Currently only gold supports
1508 # an --icf flag.)
[email protected]16d71b0d2011-06-22 00:43:531509 # There seems to be a conflict of --icf and -pie in gold which
1510 # can generate crashy binaries. As a security measure, -pie
1511 # takes precendence for now.
[email protected]409dceef2011-05-10 19:49:121512 ['LINKER_SUPPORTS_ICF==1 and release_valgrind_build==0', {
[email protected]f2fcf4df72011-06-03 20:05:461513 'target_conditions': [
1514 ['_toolset=="target"', {
1515 'ldflags': [
[email protected]16d71b0d2011-06-22 00:43:531516 #'-Wl,--icf=safe',
1517 '-Wl,--icf=none',
[email protected]f2fcf4df72011-06-03 20:05:461518 ]
1519 }]
[email protected]c75f33e42011-05-04 18:11:521520 ]
1521 }],
[email protected]1dd529642010-05-15 01:02:511522 ]
[email protected]3aacaf952009-04-02 15:34:091523 },
1524 },
[email protected]601b540222009-04-03 21:32:041525 'variants': {
1526 'coverage': {
1527 'cflags': ['-fprofile-arcs', '-ftest-coverage'],
1528 'ldflags': ['-fprofile-arcs'],
1529 },
1530 'profile': {
1531 'cflags': ['-pg', '-g'],
1532 'ldflags': ['-pg'],
1533 },
1534 'symbols': {
1535 'cflags': ['-g'],
1536 },
1537 },
[email protected]606116d22009-05-06 22:38:231538 'conditions': [
[email protected]04b482602011-09-14 02:36:211539 ['target_arch=="ia32"', {
1540 'target_conditions': [
1541 ['_toolset=="target"', {
1542 'asflags': [
1543 # Needed so that libs with .s files (e.g. libicudata.a)
1544 # are compatible with the general 32-bit-ness.
1545 '-32',
1546 ],
1547 # All floating-point computations on x87 happens in 80-bit
1548 # precision. Because the C and C++ language standards allow
1549 # the compiler to keep the floating-point values in higher
1550 # precision than what's specified in the source and doing so
1551 # is more efficient than constantly rounding up to 64-bit or
1552 # 32-bit precision as specified in the source, the compiler,
1553 # especially in the optimized mode, tries very hard to keep
1554 # values in x87 floating-point stack (in 80-bit precision)
1555 # as long as possible. This has important side effects, that
1556 # the real value used in computation may change depending on
1557 # how the compiler did the optimization - that is, the value
1558 # kept in 80-bit is different than the value rounded down to
1559 # 64-bit or 32-bit. There are possible compiler options to
1560 # make this behavior consistent (e.g. -ffloat-store would keep
1561 # all floating-values in the memory, thus force them to be
1562 # rounded to its original precision) but they have significant
1563 # runtime performance penalty.
1564 #
1565 # -mfpmath=sse -msse2 makes the compiler use SSE instructions
1566 # which keep floating-point values in SSE registers in its
1567 # native precision (32-bit for single precision, and 64-bit
1568 # for double precision values). This means the floating-point
1569 # value used during computation does not change depending on
1570 # how the compiler optimized the code, since the value is
1571 # always kept in its specified precision.
1572 'conditions': [
1573 ['branding=="Chromium" and disable_sse2==0', {
1574 'cflags': [
1575 '-march=pentium4',
1576 '-msse2',
1577 '-mfpmath=sse',
1578 ],
1579 }],
1580 # ChromeOS targets Pinetrail, which is sse3, but most of the
1581 # benefit comes from sse2 so this setting allows ChromeOS
1582 # to build on other CPUs. In the future -march=atom would
1583 # help but requires a newer compiler.
1584 ['chromeos==1 and disable_sse2==0', {
1585 'cflags': [
1586 '-msse2',
1587 ],
1588 }],
1589 # Install packages have started cropping up with
1590 # different headers between the 32-bit and 64-bit
1591 # versions, so we have to shadow those differences off
1592 # and make sure a 32-bit-on-64-bit build picks up the
1593 # right files.
1594 ['host_arch!="ia32"', {
1595 'include_dirs+': [
1596 '/usr/include32',
1597 ],
1598 }],
1599 ],
1600 # -mmmx allows mmintrin.h to be used for mmx intrinsics.
1601 # video playback is mmx and sse2 optimized.
[email protected]ffde7932009-05-29 00:39:061602 'cflags': [
[email protected]04b482602011-09-14 02:36:211603 '-m32',
1604 '-mmmx',
1605 ],
1606 'ldflags': [
1607 '-m32',
[email protected]ffde7932009-05-29 00:39:061608 ],
1609 }],
[email protected]606116d22009-05-06 22:38:231610 ],
1611 }],
[email protected]3dda8a962009-08-10 18:58:071612 ['target_arch=="arm"', {
[email protected]77c1b29392009-12-04 06:21:291613 'target_conditions': [
1614 ['_toolset=="target"', {
1615 'cflags_cc': [
1616 # The codesourcery arm-2009q3 toolchain warns at that the ABI
1617 # has changed whenever it encounters a varargs function. This
1618 # silences those warnings, as they are not helpful and
1619 # clutter legitimate warnings.
1620 '-Wno-abi',
1621 ],
1622 'conditions': [
[email protected]da1c8d692011-09-20 20:35:011623 ['arm_thumb==1', {
[email protected]77c1b29392009-12-04 06:21:291624 'cflags': [
1625 '-mthumb',
[email protected]77c1b29392009-12-04 06:21:291626 ]
1627 }],
1628 ['armv7==1', {
[email protected]dc9711f2009-11-13 19:30:251629 'cflags': [
1630 '-march=armv7-a',
1631 '-mtune=cortex-a8',
[email protected]dc9711f2009-11-13 19:30:251632 '-mfloat-abi=softfp',
1633 ],
[email protected]eafc0b452010-02-26 21:53:431634 'conditions': [
1635 ['arm_neon==1', {
1636 'cflags': [ '-mfpu=neon', ],
1637 }, {
[email protected]53e0f642010-03-05 01:41:561638 'cflags': [ '-mfpu=<(arm_fpu)', ],
[email protected]eafc0b452010-02-26 21:53:431639 }]
1640 ],
[email protected]dc9711f2009-11-13 19:30:251641 }],
[email protected]da1c8d692011-09-20 20:35:011642 ['OS=="android"', {
1643 # The following flags are derived from what Android uses
1644 # by default when building for arm.
1645 'cflags': [ '-Wno-psabi', ],
1646 'conditions': [
1647 ['arm_thumb == 1', {
1648 # Android toolchain doesn't support -mimplicit-it=thumb
1649 'cflags!': [ '-Wa,-mimplicit-it=thumb', ],
1650 'cflags': [ '-mthumb-interwork', ],
1651 }],
1652 ['armv7==0', {
1653 # Flags suitable for Android emulator
1654 'cflags': [
1655 '-march=armv5te',
1656 '-mtune=xscale',
1657 '-msoft-float',
1658 '-D__ARM_ARCH_5__',
1659 '-D__ARM_ARCH_5T__',
1660 '-D__ARM_ARCH_5E__',
1661 '-D__ARM_ARCH_5TE__',
1662 ],
1663 }],
1664 ],
1665 }],
[email protected]3dda8a962009-08-10 18:58:071666 ],
1667 }],
1668 ],
1669 }],
[email protected]2fb843b2010-08-12 02:11:081670 ['linux_fpic==1', {
[email protected]c76723a2010-01-25 23:10:581671 'cflags': [
1672 '-fPIC',
1673 ],
1674 }],
[email protected]ee28c9f2009-09-04 01:53:011675 ['sysroot!=""', {
[email protected]fd36ce822009-10-28 20:13:571676 'target_conditions': [
1677 ['_toolset=="target"', {
1678 'cflags': [
1679 '--sysroot=<(sysroot)',
1680 ],
1681 'ldflags': [
1682 '--sysroot=<(sysroot)',
1683 ],
1684 }]]
[email protected]ee28c9f2009-09-04 01:53:011685 }],
[email protected]58680ce2010-09-18 00:09:151686 ['clang==1', {
[email protected]18ca15a2011-08-10 03:07:121687 'cflags': [
1688 '-Wheader-hygiene',
1689 # Clang spots more unused functions.
1690 '-Wno-unused-function',
1691 # Don't die on dtoa code that uses a char as an array index.
1692 '-Wno-char-subscripts',
[email protected]d6431722011-09-01 00:46:331693 # Especially needed for gtest macros using enum values from Mac
1694 # system headers.
1695 # TODO(pkasting): In C++11 this is legal, so this should be
1696 # removed when we change to that. (This is also why we don't
1697 # bother fixing all these cases today.)
[email protected]18ca15a2011-08-10 03:07:121698 '-Wno-unnamed-type-template-args',
1699 ],
1700 'cflags!': [
1701 # Clang doesn't seem to know know this flag.
1702 '-mfpmath=sse',
1703 ],
[email protected]58680ce2010-09-18 00:09:151704 }],
[email protected]5d451ad2011-02-11 16:43:461705 ['clang==1 and clang_use_chrome_plugins==1', {
[email protected]d23720682011-08-11 00:16:261706 'cflags': [
1707 '<(clang_chrome_plugins_flags)',
1708 ],
[email protected]5d451ad2011-02-11 16:43:461709 }],
[email protected]5e781232011-01-28 02:57:591710 ['clang==1 and clang_load!="" and clang_add_plugin!=""', {
[email protected]d23720682011-08-11 00:16:261711 'cflags': [
1712 '-Xclang', '-load', '-Xclang', '<(clang_load)',
1713 '-Xclang', '-add-plugin', '-Xclang', '<(clang_add_plugin)',
1714 ],
[email protected]5e781232011-01-28 02:57:591715 }],
[email protected]92799b632011-08-15 14:33:061716 ['asan==1', {
1717 # Only in the linux section for now, since ASAN doesn't
1718 # work on Mac yet.
1719 'cflags': [
1720 '-fasan -w',
1721 ],
1722 'ldflags': [
1723 '-fasan',
1724 ],
1725 }],
[email protected]cc4219a2009-08-14 05:30:521726 ['no_strict_aliasing==1', {
1727 'cflags': [
1728 '-fno-strict-aliasing',
1729 ],
1730 }],
[email protected]cbd5fd52009-08-26 00:14:271731 ['linux_breakpad==1', {
[email protected]c87efd42010-08-26 18:28:171732 'cflags': [ '-g' ],
[email protected]cbd5fd52009-08-26 00:14:271733 'defines': ['USE_LINUX_BREAKPAD'],
1734 }],
[email protected]d8b60602010-03-26 09:41:221735 ['linux_use_heapchecker==1', {
1736 'variables': {'linux_use_tcmalloc%': 1},
1737 }],
[email protected]61a9b2d82010-02-26 00:31:081738 ['linux_use_tcmalloc==0', {
1739 'defines': ['NO_TCMALLOC'],
[email protected]01699e22009-11-11 19:24:241740 }],
[email protected]d8b60602010-03-26 09:41:221741 ['linux_use_heapchecker==0', {
1742 'defines': ['NO_HEAPCHECKER'],
1743 }],
[email protected]64e2d4a42010-08-27 10:13:211744 ['linux_keep_shadow_stacks==1', {
1745 'defines': ['KEEP_SHADOW_STACKS'],
1746 'cflags': ['-finstrument-functions'],
1747 }],
[email protected]606116d22009-05-06 22:38:231748 ],
[email protected]9d384032009-03-20 23:13:261749 },
1750 }],
[email protected]c51e8d52009-12-11 20:04:061751 # FreeBSD-specific options; note that most FreeBSD options are set above,
1752 # with Linux.
1753 ['OS=="freebsd"', {
1754 'target_defaults': {
1755 'ldflags': [
1756 '-Wl,--no-keep-memory',
1757 ],
1758 },
1759 }],
[email protected]da1c8d692011-09-20 20:35:011760 # Android-specific options; note that most are set above with Linux.
1761 ['OS=="android"', {
1762 'variables': {
1763 'android_target_arch%': 'arm', # target_arch in android terms.
1764 'conditions': [
1765 # Android uses x86 instead of ia32 for their target_arch designation.
1766 ['target_arch=="ia32"', {
1767 'android_target_arch%': 'x86',
1768 }],
1769 # Use shared stlport library when system one used.
1770 # Figure this out early since it needs symbols from libgcc.a, so it
1771 # has to be before that in the set of libraries.
1772 ['use_system_stlport==1', {
1773 'android_stlport_library': 'stlport',
1774 }, {
1775 'android_stlport_library': 'stlport_static',
1776 }],
1777 ],
1778
1779 # Placing this variable here prevents from forking libvpx, used
1780 # by remoting. Remoting is off, so it needn't built,
1781 # so forking it's deps seems like overkill.
1782 # But this variable need defined to properly run gyp.
1783 # A proper solution is to have an OS==android conditional
1784 # in third_party/libvpx/libvpx.gyp to define it.
1785 'libvpx_path': 'lib/linux/arm',
1786 },
1787 'target_defaults': {
1788 # Build a Release build by default to match Android build behavior.
1789 # This is typical with Android because Debug builds tend to be much
1790 # larger and run very slowly on constrained devices. It is still
1791 # possible to do a Debug build by specifying BUILDTYPE=Debug on the
1792 # 'make' command line.
1793 'default_configuration': 'Release',
1794
1795 'variables': {
1796 'release_extra_cflags%': '',
1797 },
1798
1799 'target_conditions': [
1800 # Settings for building device targets using Android's toolchain.
1801 # These are based on the setup.mk file from the Android NDK.
1802 #
1803 # The NDK Android executable link step looks as follows:
1804 # $LDFLAGS
1805 # $(TARGET_CRTBEGIN_DYNAMIC_O) <-- crtbegin.o
1806 # $(PRIVATE_OBJECTS) <-- The .o that we built
1807 # $(PRIVATE_STATIC_LIBRARIES) <-- The .a that we built
1808 # $(TARGET_LIBGCC) <-- libgcc.a
1809 # $(PRIVATE_SHARED_LIBRARIES) <-- The .so that we built
1810 # $(PRIVATE_LDLIBS) <-- System .so
1811 # $(TARGET_CRTEND_O) <-- crtend.o
1812 #
1813 # For now the above are approximated for executables by adding
1814 # crtbegin.o to the end of the ldflags and 'crtend.o' to the end
1815 # of 'libraries'.
1816 #
1817 # The NDK Android shared library link step looks as follows:
1818 # $LDFLAGS
1819 # $(PRIVATE_OBJECTS) <-- The .o that we built
1820 # -l,--whole-archive
1821 # $(PRIVATE_WHOLE_STATIC_LIBRARIES)
1822 # -l,--no-whole-archive
1823 # $(PRIVATE_STATIC_LIBRARIES) <-- The .a that we built
1824 # $(TARGET_LIBGCC) <-- libgcc.a
1825 # $(PRIVATE_SHARED_LIBRARIES) <-- The .so that we built
1826 # $(PRIVATE_LDLIBS) <-- System .so
1827 #
1828 # For now, assume not need any whole static libs.
1829 #
1830 # For both executables and shared libraries, add the proper
1831 # libgcc.a to the start of libraries which puts it in the
1832 # proper spot after .o and .a files get linked in.
1833 #
1834 # TODO: The proper thing to do longer-tem would be proper gyp
1835 # support for a custom link command line.
1836 ['_toolset=="target"', {
1837 'cflags!': [
1838 '-pthread', # Not supported by Android toolchain.
1839 ],
1840 'cflags': [
1841 '-U__linux__', # Don't allow toolchain to claim -D__linux__
1842 '-ffunction-sections',
1843 '-funwind-tables',
1844 '-g',
1845 '-fstack-protector',
1846 '-fno-short-enums',
1847 '-finline-limit=64',
1848 '-Wa,--noexecstack',
1849 '-Wno-error=non-virtual-dtor', # TODO(michaelbai): Fix warnings.
1850 '<@(release_extra_cflags)',
1851 # Note: This include is in cflags to ensure that it comes after
1852 # all of the includes.
1853 '-I<(android_ndk_include)',
1854 ],
1855 'defines': [
1856 'ANDROID',
1857 '__GNU_SOURCE=1', # Necessary for clone()
1858 'USE_STLPORT=1',
1859 '_STLP_USE_PTR_SPECIALIZATIONS=1',
1860 'HAVE_OFF64_T',
1861 'HAVE_SYS_UIO_H',
1862 'ANDROID_BINSIZE_HACK', # Enable temporary hacks to reduce binsize.
1863 ],
1864 'ldflags!': [
1865 '-pthread', # Not supported by Android toolchain.
1866 ],
1867 'ldflags': [
1868 '-nostdlib',
1869 '-Wl,--no-undefined',
1870 '-Wl,--icf=safe', # Enable identical code folding to reduce size
1871 # Don't export symbols from statically linked libraries.
1872 '-Wl,--exclude-libs=ALL',
1873 ],
1874 'libraries!': [
1875 '-lrt', # librt is built into Bionic.
1876 # Not supported by Android toolchain.
1877 # Where do these come from? Can't find references in
1878 # any Chromium gyp or gypi file. Maybe they come from
1879 # gyp itself?
1880 '-lpthread', '-lnss3', '-lnssutil3', '-lsmime3', '-lplds4', '-lplc4', '-lnspr4',
1881 ],
1882 'libraries': [
1883 '-l<(android_stlport_library)',
1884 # Manually link the libgcc.a that the cross compiler uses.
1885 '<!($CROSS_CC -print-libgcc-file-name)',
1886 '-lc',
1887 '-ldl',
1888 '-lstdc++',
1889 '-lm',
1890 ],
1891 'conditions': [
1892 ['android_build_type==0', {
1893 'ldflags': [
1894 '-Wl,-rpath-link=<(android_ndk_lib)',
1895 '-L<(android_ndk_lib)',
1896 ],
1897 }],
1898 # NOTE: The stlport header include paths below are specified in
1899 # cflags rather than include_dirs because they need to come
1900 # after include_dirs. Think of them like system headers, but
1901 # don't use '-isystem' because the arm-linux-androideabi-4.4.3
1902 # toolchain (circa Gingerbread) will exhibit strange errors.
1903 # The include ordering here is important; change with caution.
1904 ['use_system_stlport==0', {
1905 'cflags': [
1906 '-I<(android_ndk_root)/sources/cxx-stl/stlport/stlport',
1907 ],
1908 'conditions': [
1909 ['target_arch=="arm" and armv7==1', {
1910 'ldflags': [
1911 '-L<(android_ndk_root)/sources/cxx-stl/stlport/libs/armeabi-v7a',
1912 ],
1913 }],
1914 ['target_arch=="arm" and armv7==0', {
1915 'ldflags': [
1916 '-L<(android_ndk_root)/sources/cxx-stl/stlport/libs/armeabi',
1917 ],
1918 }],
1919 ['target_arch=="ia32"', {
1920 'ldflags': [
1921 '-L<(android_ndk_root)/sources/cxx-stl/stlport/libs/x86',
1922 ],
1923 }],
1924 ],
1925 }],
1926 ['target_arch=="ia32"', {
1927 # The x86 toolchain currently has problems with stack-protector.
1928 'cflags!': [
1929 '-fstack-protector',
1930 ],
1931 'cflags': [
1932 '-fno-stack-protector',
1933 ],
1934 }],
1935 ],
1936 'target_conditions': [
1937 ['_type=="executable"', {
1938 'ldflags': [
1939 '-Bdynamic',
1940 '-Wl,-dynamic-linker,/system/bin/linker',
1941 '-Wl,--gc-sections',
1942 '-Wl,-z,nocopyreloc',
1943 # crtbegin_dynamic.o should be the last item in ldflags.
1944 '<(android_ndk_lib)/crtbegin_dynamic.o',
1945 ],
1946 'libraries': [
1947 # crtend_android.o needs to be the last item in libraries.
1948 # Do not add any libraries after this!
1949 '<(android_ndk_lib)/crtend_android.o',
1950 ],
1951 }],
1952 ['_type=="shared_library"', {
1953 'ldflags': [
1954 '-Wl,-shared,-Bsymbolic',
1955 ],
1956 }],
1957 ],
1958 }],
1959 # Settings for building host targets using the system toolchain.
1960 ['_toolset=="host"', {
1961 'ldflags!': [
1962 '-Wl,-z,noexecstack',
1963 '-Wl,--gc-sections',
1964 '-Wl,-O1',
1965 '-Wl,--as-needed',
1966 ],
1967 }],
1968 ],
1969 },
1970 }],
[email protected]93f21e42010-04-01 00:35:151971 ['OS=="solaris"', {
1972 'cflags!': ['-fvisibility=hidden'],
1973 'cflags_cc!': ['-fvisibility-inlines-hidden'],
1974 }],
[email protected]2f80c312009-02-25 21:26:551975 ['OS=="mac"', {
1976 'target_defaults': {
[email protected]24700642009-06-01 16:01:201977 'variables': {
[email protected]162407f2011-09-08 15:33:171978 # These should end with %, but there seems to be a bug with % in
1979 # variables that are intended to be set to different values in
1980 # different targets, like these.
1981 'mac_pie': 1, # Most executables can be position-independent.
[email protected]24700642009-06-01 16:01:201982 'mac_real_dsym': 0, # Fake .dSYMs are fine in most cases.
[email protected]162407f2011-09-08 15:33:171983 'mac_strip': 1, # Strip debugging symbols from the target.
[email protected]24700642009-06-01 16:01:201984 },
[email protected]d92c7c012009-03-19 19:26:421985 'mac_bundle': 0,
[email protected]2f80c312009-02-25 21:26:551986 'xcode_settings': {
1987 'ALWAYS_SEARCH_USER_PATHS': 'NO',
[email protected]ab2956372009-08-13 18:11:041988 'GCC_C_LANGUAGE_STANDARD': 'c99', # -std=c99
1989 'GCC_CW_ASM_SYNTAX': 'NO', # No -fasm-blocks
1990 'GCC_DYNAMIC_NO_PIC': 'NO', # No -mdynamic-no-pic
1991 # (Equivalent to -fPIC)
1992 'GCC_ENABLE_CPP_EXCEPTIONS': 'NO', # -fno-exceptions
1993 'GCC_ENABLE_CPP_RTTI': 'NO', # -fno-rtti
1994 'GCC_ENABLE_PASCAL_STRINGS': 'NO', # No -mpascal-strings
[email protected]3224dcd2009-09-16 17:31:251995 # GCC_INLINES_ARE_PRIVATE_EXTERN maps to -fvisibility-inlines-hidden
1996 'GCC_INLINES_ARE_PRIVATE_EXTERN': 'YES',
[email protected]ab2956372009-08-13 18:11:041997 'GCC_OBJC_CALL_CXX_CDTORS': 'YES', # -fobjc-call-cxx-cdtors
1998 'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES', # -fvisibility=hidden
1999 'GCC_THREADSAFE_STATICS': 'NO', # -fno-threadsafe-statics
2000 'GCC_TREAT_WARNINGS_AS_ERRORS': 'YES', # -Werror
[email protected]2f80c312009-02-25 21:26:552001 'GCC_VERSION': '4.2',
[email protected]ab2956372009-08-13 18:11:042002 'GCC_WARN_ABOUT_MISSING_NEWLINE': 'YES', # -Wnewline-eof
[email protected]3224dcd2009-09-16 17:31:252003 # MACOSX_DEPLOYMENT_TARGET maps to -mmacosx-version-min
2004 'MACOSX_DEPLOYMENT_TARGET': '<(mac_deployment_target)',
[email protected]ab2956372009-08-13 18:11:042005 'PREBINDING': 'NO', # No -Wl,-prebind
[email protected]e1ece302011-09-15 03:58:112006 # Keep pch files below xcodebuild/.
2007 'SHARED_PRECOMPS_DIR': '$(CONFIGURATION_BUILD_DIR)/SharedPrecompiledHeaders',
[email protected]2f80c312009-02-25 21:26:552008 'USE_HEADERMAP': 'NO',
[email protected]57e94022011-05-04 15:33:192009 'OTHER_CFLAGS': [
2010 '-fno-strict-aliasing', # See http://crbug.com/32204
2011 ],
[email protected]080e86f2010-06-21 15:19:042012 'WARNING_CFLAGS': [
2013 '-Wall',
2014 '-Wendif-labels',
2015 '-Wextra',
2016 # Don't warn about unused function parameters.
2017 '-Wno-unused-parameter',
2018 # Don't warn about the "struct foo f = {0};" initialization
2019 # pattern.
2020 '-Wno-missing-field-initializers',
2021 ],
[email protected]b3fb8092009-03-12 19:09:242022 'conditions': [
2023 ['chromium_mac_pch', {'GCC_PRECOMPILE_PREFIX_HEADER': 'YES'},
[email protected]9543af052009-09-15 22:42:592024 {'GCC_PRECOMPILE_PREFIX_HEADER': 'NO'}
2025 ],
[email protected]66733172010-09-22 00:09:282026 ['clang==1', {
[email protected]34f40892011-09-06 21:53:302027 'CC': '$(SOURCE_ROOT)/<(clang_dir)/clang',
2028 'LDPLUSPLUS': '$(SOURCE_ROOT)/<(clang_dir)/clang++',
2029 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0',
[email protected]66733172010-09-22 00:09:282030 'WARNING_CFLAGS': [
[email protected]7f8d486f2011-04-05 19:49:072031 '-Wheader-hygiene',
[email protected]66733172010-09-22 00:09:282032 # Don't die on dtoa code that uses a char as an array index.
2033 # This is required solely for base/third_party/dmg_fp/dtoa.cc.
2034 '-Wno-char-subscripts',
[email protected]25d3bb722010-11-22 14:31:452035 # Clang spots more unused functions.
2036 '-Wno-unused-function',
[email protected]d6431722011-09-01 00:46:332037 # See comments on this flag higher up in this file.
[email protected]0fa0fbc2010-10-12 04:32:052038 '-Wno-unnamed-type-template-args',
[email protected]d53680932011-06-08 16:40:062039 # TODO(thakis): Reenable once the one instance this warns on
2040 # is fixed.
2041 '-Wno-parentheses',
[email protected]66733172010-09-22 00:09:282042 ],
2043 }],
[email protected]5d451ad2011-02-11 16:43:462044 ['clang==1 and clang_use_chrome_plugins==1', {
2045 'OTHER_CFLAGS': [
2046 '<(clang_chrome_plugins_flags)',
2047 ],
2048 }],
[email protected]5e781232011-01-28 02:57:592049 ['clang==1 and clang_load!="" and clang_add_plugin!=""', {
2050 'OTHER_CFLAGS': [
2051 '-Xclang', '-load', '-Xclang', '<(clang_load)',
2052 '-Xclang', '-add-plugin', '-Xclang', '<(clang_add_plugin)',
2053 ],
2054 }],
[email protected]b3fb8092009-03-12 19:09:242055 ],
[email protected]2f80c312009-02-25 21:26:552056 },
[email protected]34f40892011-09-06 21:53:302057 'conditions': [
2058 ['clang==1', {
2059 'variables': {
2060 'clang_dir': '../third_party/llvm-build/Release+Asserts/bin',
2061 },
2062 }],
2063 ],
[email protected]2f80c312009-02-25 21:26:552064 'target_conditions': [
[email protected]2f80c312009-02-25 21:26:552065 ['_type!="static_library"', {
[email protected]5d7dc972009-04-16 15:30:462066 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-search_paths_first']},
2067 }],
2068 ['_mac_bundle', {
2069 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-ObjC']},
[email protected]87fde4a2009-02-28 00:50:082070 }],
[email protected]6303fed2011-08-11 01:12:102071 ['_type=="executable"', {
2072 'postbuilds': [
2073 {
2074 # Arranges for data (heap) pages to be protected against
[email protected]8c40f322011-08-24 03:33:362075 # code execution when running on Mac OS X 10.7 ("Lion"), and
2076 # ensures that the position-independent executable (PIE) bit
2077 # is set for ASLR when running on Mac OS X 10.5 ("Leopard").
[email protected]6303fed2011-08-11 01:12:102078 'variables': {
[email protected]8c40f322011-08-24 03:33:362079 # Define change_mach_o_flags in a variable ending in _path
2080 # so that GYP understands it's a path and performs proper
2081 # relativization during dict merging.
2082 'change_mach_o_flags_path':
2083 'mac/change_mach_o_flags_from_xcode.sh',
[email protected]162407f2011-09-08 15:33:172084 'change_mach_o_flags_options%': [
[email protected]081c0342011-08-24 14:59:132085 ],
2086 'target_conditions': [
[email protected]162407f2011-09-08 15:33:172087 ['mac_pie==0 or release_valgrind_build==1', {
2088 # Don't enable PIE if it's unwanted. It's unwanted if
2089 # the target specifies mac_pie=0 or if building for
2090 # Valgrind, because Valgrind doesn't understand slide.
2091 # See the similar mac_pie/release_valgrind_build check
2092 # below.
[email protected]081c0342011-08-24 14:59:132093 'change_mach_o_flags_options': [
[email protected]081c0342011-08-24 14:59:132094 '--no-pie',
2095 ],
2096 }],
2097 ],
[email protected]6303fed2011-08-11 01:12:102098 },
[email protected]8c40f322011-08-24 03:33:362099 'postbuild_name': 'Change Mach-O Flags',
2100 'action': [
2101 '<(change_mach_o_flags_path)',
[email protected]081c0342011-08-24 14:59:132102 '>@(change_mach_o_flags_options)',
[email protected]8c40f322011-08-24 03:33:362103 ],
[email protected]6303fed2011-08-11 01:12:102104 },
2105 ],
[email protected]5a5d97aa2011-09-02 15:34:002106 'conditions': [
2107 ['asan==1', {
2108 'variables': {
2109 'asan_saves_file': 'asan.saves',
2110 },
2111 'xcode_settings': {
2112 'CHROMIUM_STRIP_SAVE_FILE': '<(asan_saves_file)'
2113 },
2114 }],
2115 ],
[email protected]162407f2011-09-08 15:33:172116 'target_conditions': [
2117 ['mac_pie==1 and release_valgrind_build==0', {
2118 # Turn on position-independence (ASLR) for executables. When
2119 # PIE is on for the Chrome executables, the framework will
2120 # also be subject to ASLR.
2121 # Don't do this when building for Valgrind, because Valgrind
2122 # doesn't understand slide. TODO: Make Valgrind on Mac OS X
2123 # understand slide, and get rid of the Valgrind check.
2124 'xcode_settings': {
2125 'OTHER_LDFLAGS': [
2126 '-Wl,-pie', # Position-independent executable (MH_PIE)
2127 ],
2128 },
2129 }],
2130 ],
[email protected]6a0242bc2011-07-01 00:34:462131 }],
[email protected]9a5e72862010-09-02 16:16:582132 ['(_type=="executable" or _type=="shared_library" or \
2133 _type=="loadable_module") and mac_strip!=0', {
[email protected]24700642009-06-01 16:01:202134 'target_conditions': [
2135 ['mac_real_dsym == 1', {
2136 # To get a real .dSYM bundle produced by dsymutil, set the
2137 # debug information format to dwarf-with-dsym. Since
2138 # strip_from_xcode will not be used, set Xcode to do the
2139 # stripping as well.
2140 'configurations': {
[email protected]5153767c2009-12-22 01:52:502141 'Release_Base': {
[email protected]24700642009-06-01 16:01:202142 'xcode_settings': {
2143 'DEBUG_INFORMATION_FORMAT': 'dwarf-with-dsym',
2144 'DEPLOYMENT_POSTPROCESSING': 'YES',
2145 'STRIP_INSTALLED_PRODUCT': 'YES',
[email protected]e14a9f92009-08-05 19:26:072146 'target_conditions': [
[email protected]c2111422010-06-01 18:30:252147 ['_type=="shared_library" or _type=="loadable_module"', {
[email protected]e14a9f92009-08-05 19:26:072148 # The Xcode default is to strip debugging symbols
2149 # only (-S). Local symbols should be stripped as
2150 # well, which will be handled by -x. Xcode will
2151 # continue to insert -S when stripping even when
2152 # additional flags are added with STRIPFLAGS.
2153 'STRIPFLAGS': '-x',
[email protected]c2111422010-06-01 18:30:252154 }], # _type=="shared_library" or _type=="loadable_module"'
[email protected]e14a9f92009-08-05 19:26:072155 ], # target_conditions
2156 }, # xcode_settings
2157 }, # configuration "Release"
2158 }, # configurations
[email protected]24700642009-06-01 16:01:202159 }, { # mac_real_dsym != 1
2160 # To get a fast fake .dSYM bundle, use a post-build step to
2161 # produce the .dSYM and strip the executable. strip_from_xcode
2162 # only operates in the Release configuration.
2163 'postbuilds': [
2164 {
2165 'variables': {
2166 # Define strip_from_xcode in a variable ending in _path
2167 # so that gyp understands it's a path and performs proper
2168 # relativization during dict merging.
2169 'strip_from_xcode_path': 'mac/strip_from_xcode',
2170 },
2171 'postbuild_name': 'Strip If Needed',
2172 'action': ['<(strip_from_xcode_path)'],
2173 },
[email protected]e14a9f92009-08-05 19:26:072174 ], # postbuilds
2175 }], # mac_real_dsym
2176 ], # target_conditions
[email protected]9a5e72862010-09-02 16:16:582177 }], # (_type=="executable" or _type=="shared_library" or
2178 # _type=="loadable_module") and mac_strip!=0
[email protected]e14a9f92009-08-05 19:26:072179 ], # target_conditions
2180 }, # target_defaults
2181 }], # OS=="mac"
[email protected]2f80c312009-02-25 21:26:552182 ['OS=="win"', {
2183 'target_defaults': {
2184 'defines': [
[email protected]0bc63042011-08-13 02:19:252185 '_WIN32_WINNT=0x0600',
2186 'WINVER=0x0600',
[email protected]2f80c312009-02-25 21:26:552187 'WIN32',
2188 '_WINDOWS',
[email protected]2f80c312009-02-25 21:26:552189 'NOMINMAX',
[email protected]e3116282011-08-13 00:52:282190 'PSAPI_VERSION=1',
[email protected]2f80c312009-02-25 21:26:552191 '_CRT_RAND_S',
2192 'CERT_CHAIN_PARA_HAS_EXTRA_FIELDS',
2193 'WIN32_LEAN_AND_MEAN',
[email protected]7a812dd62010-06-30 18:52:272194 '_ATL_NO_OPENGL',
[email protected]adfb98c2009-06-23 20:08:452195 '_HAS_TR1=0',
[email protected]2f80c312009-02-25 21:26:552196 ],
[email protected]8974e042010-06-21 18:06:522197 'conditions': [
2198 ['component=="static_library"', {
2199 'defines': [
2200 '_HAS_EXCEPTIONS=0',
2201 ],
2202 }],
[email protected]3e2648a2011-03-21 20:58:502203 ['secure_atl', {
2204 'defines': [
2205 '_SECURE_ATL',
2206 ],
2207 }],
[email protected]8974e042010-06-21 18:06:522208 ],
[email protected]5b5ca7cb2009-07-20 23:00:202209 'msvs_system_include_dirs': [
[email protected]998b5152009-12-12 22:19:522210 '<(DEPTH)/third_party/platformsdk_win7/files/Include',
[email protected]a78da50e2010-06-09 21:31:372211 '<(DEPTH)/third_party/directxsdk/files/Include',
[email protected]2f80c312009-02-25 21:26:552212 '$(VSInstallDir)/VC/atlmfc/include',
2213 ],
[email protected]a8d99cef2009-08-26 20:47:492214 'msvs_cygwin_dirs': ['<(DEPTH)/third_party/cygwin'],
[email protected]942c3a60f2011-05-03 02:04:112215 'msvs_disabled_warnings': [4351, 4396, 4503, 4819,
2216 # TODO(maruel): These warnings are level 4. They will be slowly
2217 # removed as code is fixed.
2218 4100, 4121, 4125, 4127, 4130, 4131, 4189, 4201, 4238, 4244, 4245,
2219 4310, 4355, 4428, 4481, 4505, 4510, 4512, 4530, 4610, 4611, 4701,
2220 4702, 4706,
2221 ],
[email protected]2f80c312009-02-25 21:26:552222 'msvs_settings': {
2223 'VCCLCompilerTool': {
2224 'MinimalRebuild': 'false',
[email protected]2f80c312009-02-25 21:26:552225 'BufferSecurityCheck': 'true',
2226 'EnableFunctionLevelLinking': 'true',
2227 'RuntimeTypeInfo': 'false',
[email protected]942c3a60f2011-05-03 02:04:112228 'WarningLevel': '4',
[email protected]2f80c312009-02-25 21:26:552229 'WarnAsError': 'true',
2230 'DebugInformationFormat': '3',
[email protected]3fef6e62009-07-31 19:58:582231 'conditions': [
[email protected]3e2648a2011-03-21 20:58:502232 ['msvs_multi_core_compile', {
[email protected]1f9471a2010-01-04 06:40:162233 'AdditionalOptions': ['/MP'],
[email protected]912c55c2009-07-31 23:33:552234 }],
[email protected]3e2648a2011-03-21 20:58:502235 ['MSVS_VERSION=="2005e"', {
2236 'AdditionalOptions': ['/w44068'], # Unknown pragma to 4 (ATL)
2237 }],
[email protected]8974e042010-06-21 18:06:522238 ['component=="shared_library"', {
2239 'ExceptionHandling': '1', # /EHsc
2240 }, {
2241 'ExceptionHandling': '0',
2242 }],
[email protected]3fef6e62009-07-31 19:58:582243 ],
[email protected]2f80c312009-02-25 21:26:552244 },
2245 'VCLibrarianTool': {
[email protected]1f9471a2010-01-04 06:40:162246 'AdditionalOptions': ['/ignore:4221'],
[email protected]a78da50e2010-06-09 21:31:372247 'AdditionalLibraryDirectories': [
2248 '<(DEPTH)/third_party/platformsdk_win7/files/Lib',
2249 '<(DEPTH)/third_party/directxsdk/files/Lib/x86',
2250 ],
[email protected]2f80c312009-02-25 21:26:552251 },
2252 'VCLinkerTool': {
[email protected]2f80c312009-02-25 21:26:552253 'AdditionalDependencies': [
2254 'wininet.lib',
[email protected]b1d8c252011-01-13 20:27:502255 'dnsapi.lib',
[email protected]2f80c312009-02-25 21:26:552256 'version.lib',
2257 'msimg32.lib',
2258 'ws2_32.lib',
2259 'usp10.lib',
2260 'psapi.lib',
[email protected]96fd0032009-04-24 00:13:082261 'dbghelp.lib',
[email protected]dfdf7ee2011-04-28 18:51:482262 'winmm.lib',
2263 'shlwapi.lib',
[email protected]2f80c312009-02-25 21:26:552264 ],
[email protected]4de39f82011-03-28 12:01:292265 'conditions': [
[email protected]3e2648a2011-03-21 20:58:502266 ['msvs_express', {
2267 # Explicitly required when using the ATL with express
2268 'AdditionalDependencies': [
2269 'atlthunk.lib',
2270 ],
2271 }],
2272 ['MSVS_VERSION=="2005e"', {
2273 # Non-express versions link automatically to these
2274 'AdditionalDependencies': [
2275 'advapi32.lib',
2276 'comdlg32.lib',
2277 'ole32.lib',
2278 'shell32.lib',
2279 'user32.lib',
2280 'winspool.lib',
2281 ],
2282 }],
2283 ],
[email protected]a78da50e2010-06-09 21:31:372284 'AdditionalLibraryDirectories': [
2285 '<(DEPTH)/third_party/platformsdk_win7/files/Lib',
2286 '<(DEPTH)/third_party/directxsdk/files/Lib/x86',
2287 ],
[email protected]2f80c312009-02-25 21:26:552288 'GenerateDebugInformation': 'true',
2289 'MapFileName': '$(OutDir)\\$(TargetName).map',
2290 'ImportLibrary': '$(OutDir)\\lib\\$(TargetName).lib',
[email protected]2f80c312009-02-25 21:26:552291 'FixedBaseAddress': '1',
[email protected]825ff8d2009-05-22 01:40:482292 # SubSystem values:
2293 # 0 == not set
2294 # 1 == /SUBSYSTEM:CONSOLE
2295 # 2 == /SUBSYSTEM:WINDOWS
2296 # Most of the executables we'll ever create are tests
2297 # and utilities with console output.
2298 'SubSystem': '1',
[email protected]2f80c312009-02-25 21:26:552299 },
2300 'VCMIDLTool': {
2301 'GenerateStublessProxies': 'true',
2302 'TypeLibraryName': '$(InputName).tlb',
2303 'OutputDirectory': '$(IntDir)',
2304 'HeaderFileName': '$(InputName).h',
2305 'DLLDataFileName': 'dlldata.c',
2306 'InterfaceIdentifierFileName': '$(InputName)_i.c',
2307 'ProxyFileName': '$(InputName)_p.c',
2308 },
2309 'VCResourceCompilerTool': {
2310 'Culture' : '1033',
[email protected]4d91cbc2010-05-07 20:41:382311 'AdditionalIncludeDirectories': [
2312 '<(DEPTH)',
2313 '<(SHARED_INTERMEDIATE_DIR)',
2314 ],
[email protected]2f80c312009-02-25 21:26:552315 },
2316 },
2317 },
2318 }],
[email protected]79e2336c2011-05-12 18:18:342319 ['disable_nacl==1', {
[email protected]d8c7cbcc2009-10-02 19:00:312320 'target_defaults': {
2321 'defines': [
2322 'DISABLE_NACL',
2323 ],
2324 },
2325 }],
[email protected]cfbf9bc2009-12-07 22:07:562326 ['OS=="win" and msvs_use_common_linker_extras', {
[email protected]48c7af72009-07-03 22:00:192327 'target_defaults': {
2328 'msvs_settings': {
2329 'VCLinkerTool': {
[email protected]48c7af72009-07-03 22:00:192330 'DelayLoadDLLs': [
2331 'dbghelp.dll',
2332 'dwmapi.dll',
2333 'uxtheme.dll',
2334 ],
2335 },
2336 },
[email protected]ef4fa4072009-12-04 22:46:502337 'configurations': {
[email protected]5153767c2009-12-22 01:52:502338 'x86_Base': {
[email protected]ef4fa4072009-12-04 22:46:502339 'msvs_settings': {
2340 'VCLinkerTool': {
[email protected]1f9471a2010-01-04 06:40:162341 'AdditionalOptions': [
2342 '/safeseh',
2343 '/dynamicbase',
2344 '/ignore:4199',
2345 '/ignore:4221',
2346 '/nxcompat',
2347 ],
[email protected]ef4fa4072009-12-04 22:46:502348 },
2349 },
2350 },
[email protected]5153767c2009-12-22 01:52:502351 'x64_Base': {
[email protected]ef4fa4072009-12-04 22:46:502352 'msvs_settings': {
2353 'VCLinkerTool': {
[email protected]1f9471a2010-01-04 06:40:162354 'AdditionalOptions': [
[email protected]ef4fa4072009-12-04 22:46:502355 # safeseh is not compatible with x64
[email protected]1f9471a2010-01-04 06:40:162356 '/dynamicbase',
2357 '/ignore:4199',
2358 '/ignore:4221',
2359 '/nxcompat',
2360 ],
[email protected]ef4fa4072009-12-04 22:46:502361 },
2362 },
2363 },
2364 },
[email protected]48c7af72009-07-03 22:00:192365 },
2366 }],
[email protected]9821d0d2010-04-16 22:40:372367 ['enable_new_npdevice_api==1', {
2368 'target_defaults': {
2369 'defines': [
2370 'ENABLE_NEW_NPDEVICE_API',
2371 ],
2372 },
2373 }],
[email protected]34f40892011-09-06 21:53:302374 ['clang==1', {
2375 'make_global_settings': [
2376 ['CC', 'third_party/llvm-build/Release+Asserts/bin/clang'],
2377 ['CXX', 'third_party/llvm-build/Release+Asserts/bin/clang++'],
[email protected]60550c82011-09-06 23:51:072378 ['LINK', '$(CXX)'],
[email protected]34f40892011-09-06 21:53:302379 ['CC.host', '$(CC)'],
2380 ['CXX.host', '$(CXX)'],
2381 ['LINK.host', '$(LINK)'],
2382 ],
2383 }],
[email protected]2f80c312009-02-25 21:26:552384 ],
2385 'xcode_settings': {
[email protected]0c8ab452009-11-06 21:57:502386 # DON'T ADD ANYTHING NEW TO THIS BLOCK UNLESS YOU REALLY REALLY NEED IT!
2387 # This block adds *project-wide* configuration settings to each project
2388 # file. It's almost always wrong to put things here. Specify your
2389 # custom xcode_settings in target_defaults to add them to targets instead.
2390
2391 # In an Xcode Project Info window, the "Base SDK for All Configurations"
2392 # setting sets the SDK on a project-wide basis. In order to get the
2393 # configured SDK to show properly in the Xcode UI, SDKROOT must be set
2394 # here at the project level.
2395 'SDKROOT': 'macosx<(mac_sdk)', # -isysroot
2396
[email protected]2f80c312009-02-25 21:26:552397 # The Xcode generator will look for an xcode_settings section at the root
2398 # of each dict and use it to apply settings on a file-wide basis. Most
2399 # settings should not be here, they should be in target-specific
2400 # xcode_settings sections, or better yet, should use non-Xcode-specific
2401 # settings in target dicts. SYMROOT is a special case, because many other
2402 # Xcode variables depend on it, including variables such as
2403 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something
2404 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the
2405 # files to appear (when present) in the UI as actual files and not red
2406 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR,
2407 # and therefore SYMROOT, needs to be set at the project level.
[email protected]bfa24b962009-03-02 00:16:162408 'SYMROOT': '<(DEPTH)/xcodebuild',
[email protected]2f80c312009-02-25 21:26:552409 },
[email protected]ee28c9f2009-09-04 01:53:012410}