blob: 14839d30eed22551a0e90c9565ab56e07b8c5714 [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]1b546692011-06-30 18:22:3024 # Whether the Views toolkit can use its Pure form when available
25 # or if it must only use GTK (the default at the moment).
26 # This is an intermediate step until all of Views is 'Pure',
27 # at which point we plan to remove those switches.
28 # This turns on the TOOLKIT_USES_PURE_VIEWS macro which is used
29 # to replace the corresponding GTK implementation in such a way
30 # that GTK and PureViews can coexist. This intermediate solution
31 # allow us to switch the view implementations using
32 # --use-pure-views, without breaking exiting gtk implementation.
33 'toolkit_uses_pure_views%': 0,
34
[email protected]bb6aba32011-01-07 19:04:4335 # Disable touch support by default.
36 'touchui%': 0,
[email protected]9c8a1982011-05-24 23:08:5837
[email protected]8ebc9b42011-07-14 15:22:1838 # Disable webui certificate viewer until it is complete.
39 'webui_certificate_viewer%': 0,
40
[email protected]9c8a1982011-05-24 23:08:5841 # Whether the compositor is enabled on views.
42 'views_compositor%': 0,
[email protected]bb6aba32011-01-07 19:04:4343 },
44 # Copy conditionally-set variables out one scope.
45 'chromeos%': '<(chromeos)',
[email protected]1b546692011-06-30 18:22:3046 'toolkit_uses_pure_views%': '<(toolkit_uses_pure_views)',
[email protected]bb6aba32011-01-07 19:04:4347 'touchui%': '<(touchui)',
[email protected]8ebc9b42011-07-14 15:22:1848 'webui_certificate_viewer%': '<(webui_certificate_viewer)',
[email protected]9c8a1982011-05-24 23:08:5849 'views_compositor%': '<(views_compositor)',
[email protected]e72e55b2011-01-06 22:19:3050
[email protected]e72e55b2011-01-06 22:19:3051 # Compute the architecture that we're building on.
52 'conditions': [
[email protected]c49ab0c2011-05-18 17:25:3753 [ 'OS=="win" or OS=="mac"', {
54 'host_arch%': 'ia32',
55 }, {
[email protected]79e2336c2011-05-12 18:18:3456 # This handles the Unix platforms for which there is some support.
57 # Anything else gets passed through, which probably won't work very
58 # well; such hosts should pass an explicit target_arch to gyp.
[email protected]e72e55b2011-01-06 22:19:3059 'host_arch%':
[email protected]79e2336c2011-05-12 18:18:3460 '<!(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:3061 }],
[email protected]bb6aba32011-01-07 19:04:4362
63 # Set default value of toolkit_views on for Windows, Chrome OS
64 # and the touch UI.
[email protected]1b546692011-06-30 18:22:3065 ['OS=="win" or chromeos==1 or touchui==1 or toolkit_uses_pure_views==1', {
[email protected]bb6aba32011-01-07 19:04:4366 'toolkit_views%': 1,
67 }, {
68 'toolkit_views%': 0,
69 }],
[email protected]1b546692011-06-30 18:22:3070
71 # Views are always Pure in Touch case
72 ['touchui==1', {
73 'toolkit_uses_pure_views%': 1,
74 }, {
75 'toolkit_uses_pure_views%': 0,
76 }],
[email protected]8ebc9b42011-07-14 15:22:1877
78 # Use WebUI certificate viewer in Touch case
79 ['touchui==1', {
80 'webui_certificate_viewer%': 1
81 }],
[email protected]e72e55b2011-01-06 22:19:3082 ],
83 },
84
85 # Copy conditionally-set variables out one scope.
86 'chromeos%': '<(chromeos)',
87 'touchui%': '<(touchui)',
[email protected]8ebc9b42011-07-14 15:22:1888 'webui_certificate_viewer%': '<(webui_certificate_viewer)',
[email protected]e72e55b2011-01-06 22:19:3089 'host_arch%': '<(host_arch)',
[email protected]bb6aba32011-01-07 19:04:4390 'toolkit_views%': '<(toolkit_views)',
[email protected]1b546692011-06-30 18:22:3091 'toolkit_uses_pure_views%': '<(toolkit_uses_pure_views)',
[email protected]9c8a1982011-05-24 23:08:5892 'views_compositor%': '<(views_compositor)',
[email protected]236754a2011-07-28 17:38:2393 # Whether to build for Wayland display server
94 'use_wayland%': 0,
[email protected]e72e55b2011-01-06 22:19:3095
[email protected]8fb0ef02011-05-20 00:53:5096 # We used to provide a variable for changing how libraries were built.
97 # This variable remains until we can clean up all the users.
98 # This needs to be one nested variables dict in so that dependent
99 # gyp files can make use of it in their outer variables. (Yikes!)
100 # http://code.google.com/p/chromium/issues/detail?id=83308
101 'library%': 'static_library',
102
[email protected]e14a9f92009-08-05 19:26:07103 # Override branding to select the desired branding flavor.
104 'branding%': 'Chromium',
105
106 # Override buildtype to select the desired build flavor.
107 # Dev - everyday build for development/testing
108 # Official - release build (generally implies additional processing)
109 # TODO(mmoss) Once 'buildtype' is fully supported (e.g. Windows gyp
110 # conversion is done), some of the things which are now controlled by
111 # 'branding', such as symbol generation, will need to be refactored based
112 # on 'buildtype' (i.e. we don't care about saving symbols for non-Official
113 # builds).
114 'buildtype%': 'Dev',
[email protected]cbd5fd52009-08-26 00:14:27115
[email protected]e72e55b2011-01-06 22:19:30116 # Default architecture we're building for is the architecture we're
117 # building on.
118 'target_arch%': '<(host_arch)',
[email protected]b3f23ba2010-04-26 22:58:17119
[email protected]e72e55b2011-01-06 22:19:30120 # This variable tells WebCore.gyp and JavaScriptCore.gyp whether they are
121 # are built under a chromium full build (1) or a webkit.org chromium
122 # build (0).
123 'inside_chromium_build%': 1,
[email protected]8974e042010-06-21 18:06:52124
[email protected]e72e55b2011-01-06 22:19:30125 # Set to 1 to enable fast builds. It disables debug info for fastest
126 # compilation.
127 'fastbuild%': 0,
[email protected]93012ca2010-08-10 20:10:49128
[email protected]3d38d8e2011-04-16 20:48:51129 # Disable file manager component extension by default.
130 'file_manager_extension%': 0,
131
[email protected]8b2e9f392011-08-05 04:00:47132 # Disable WebUI TaskManager by default.
133 'webui_task_manager%': 0,
134
[email protected]e72e55b2011-01-06 22:19:30135 # Python version.
[email protected]a43c5a02011-05-27 06:54:51136 'python_ver%': '2.6',
[email protected]b3f23ba2010-04-26 22:58:17137
[email protected]e72e55b2011-01-06 22:19:30138 # Set ARM-v7 compilation flags
139 'armv7%': 0,
140
141 # Set Neon compilation flags (only meaningful if armv7==1).
142 'arm_neon%': 1,
143
144 # The system root for cross-compiles. Default: none.
145 'sysroot%': '',
146
147 # On Linux, we build with sse2 for Chromium builds.
148 'disable_sse2%': 0,
149
150 # Use libjpeg-turbo as the JPEG codec used by Chromium.
[email protected]32e56e52011-02-28 02:28:03151 'use_libjpeg_turbo%': 1,
[email protected]e72e55b2011-01-06 22:19:30152
153 # Variable 'component' is for cases where we would like to build some
154 # components as dynamic shared libraries but still need variable
155 # 'library' for static libraries.
156 # By default, component is set to whatever library is set to and
157 # it can be overriden by the GYP command line or by ~/.gyp/include.gypi.
[email protected]5a547332011-05-19 23:18:53158 'component%': 'static_library',
[email protected]e72e55b2011-01-06 22:19:30159
[email protected]bb6aba32011-01-07 19:04:43160 # Set to select the Title Case versions of strings in GRD files.
161 'use_titlecase_in_grd_files%': 0,
[email protected]63692212010-09-16 00:22:21162
[email protected]98da0042011-02-02 00:10:27163 # Use translations provided by volunteers at launchpad.net. This
164 # currently only works on Linux.
[email protected]00dc155832011-02-01 18:51:19165 'use_third_party_translations%': 0,
166
[email protected]9a425422011-01-11 00:53:18167 # Remoting compilation is enabled by default. Set to 0 to disable.
168 'remoting%': 1,
169
[email protected]a026daa2011-04-20 15:49:51170 # P2P APIs are compiled in by default. Set to 0 to disable.
171 # Also note that this should be enabled for remoting to compile.
172 'p2p_apis%': 1,
173
[email protected]1ec68c42011-06-01 13:56:25174 # Configuration policy is enabled by default. Set to 0 to disable.
175 'configuration_policy%': 1,
176
[email protected]4b58e7d2011-07-11 10:22:56177 # Safe browsing is compiled in by default. Set to 0 to disable.
178 'safe_browsing%': 1,
179
[email protected]5d451ad2011-02-11 16:43:46180 # If this is set, the clang plugins used on the buildbot will be used.
181 # Run tools/clang/scripts/update.sh to make sure they are compiled.
182 # This causes 'clang_chrome_plugins_flags' to be set.
183 # Has no effect if 'clang' is not set as well.
184 'clang_use_chrome_plugins%': 0,
185
[email protected]1ad5a7b2011-06-24 03:15:13186 # Set to 1 compile with -fPIC cflag on linux. This is a must for shared
187 # libraries on linux x86-64 and arm, plus ASLR.
188 'linux_fpic%': 1,
189
[email protected]c6a1f94172011-07-05 02:35:00190 # Enable navigator.registerProtocolHandler and supporting UI.
191 'enable_register_protocol_handler%': 1,
192
[email protected]62af76e2011-08-01 02:34:01193 # Enable Web Intents and supporting UI.
194 'enable_web_intents%': 0,
195
[email protected]32877d302011-07-07 17:57:49196 # Smooth scrolling is disabled by default.
197 'enable_smooth_scrolling%': 0,
198
[email protected]dda90ae2011-07-19 22:07:48199 # Webrtc compilation is enabled by default. Set to 0 to disable.
200 'enable_webrtc%': 1,
201
[email protected]bb6aba32011-01-07 19:04:43202 'conditions': [
[email protected]7d7564a12011-06-21 19:20:22203 # Use Skia as WebKit renderer on Mac
204 ['OS=="mac"', {
205 'use_skia%': 0,
206 }, {
207 'use_skia%': 1,
208 }],
209
[email protected]79e2336c2011-05-12 18:18:34210 # A flag for POSIX platforms
[email protected]c49ab0c2011-05-18 17:25:37211 ['OS=="win"', {
[email protected]79e2336c2011-05-12 18:18:34212 'os_posix%': 0,
[email protected]c49ab0c2011-05-18 17:25:37213 }, {
214 'os_posix%': 1,
[email protected]79e2336c2011-05-12 18:18:34215 }],
216
217 # Flags to use Gtk and X11 on non-Mac POSIX platforms
[email protected]c49ab0c2011-05-18 17:25:37218 ['OS=="win" or OS=="mac"', {
[email protected]79e2336c2011-05-12 18:18:34219 'toolkit_uses_gtk%': 0,
220 'use_x11%': 0,
[email protected]c49ab0c2011-05-18 17:25:37221 }, {
[email protected]236754a2011-07-28 17:38:23222 # TODO(dnicoara) Wayland build should have these disabled, but
223 # currently GTK and X is too spread and it's hard to completely
224 # remove every dependency.
[email protected]c49ab0c2011-05-18 17:25:37225 'toolkit_uses_gtk%': 1,
226 'use_x11%': 1,
[email protected]79e2336c2011-05-12 18:18:34227 }],
228
[email protected]63692212010-09-16 00:22:21229 # A flag to enable or disable our compile-time dependency
230 # on gnome-keyring. If that dependency is disabled, no gnome-keyring
231 # support will be available. This option is useful
232 # for Linux distributions.
233 ['chromeos==1', {
234 'use_gnome_keyring%': 0,
235 }, {
236 'use_gnome_keyring%': 1,
237 }],
[email protected]0afe5212010-10-01 18:56:11238
[email protected]bb6aba32011-01-07 19:04:43239 ['toolkit_views==0 or OS=="mac"', {
240 # GTK+ and Mac wants Title Case strings
241 'use_titlecase_in_grd_files%': 1,
242 }],
243
[email protected]1b4209f2011-01-07 00:25:40244 # Enable some hacks to support Flapper only on Chrome OS.
245 ['chromeos==1', {
246 'enable_flapper_hacks%': 1,
247 }, {
248 'enable_flapper_hacks%': 0,
249 }],
[email protected]3d38d8e2011-04-16 20:48:51250
251 # Enable file manager extension by default on Chrome OS.
252 ['chromeos==1', {
253 'file_manager_extension%': 1,
254 }, {
255 'file_manager_extension%': 0,
256 }],
[email protected]32877d302011-07-07 17:57:49257
[email protected]8b2e9f392011-08-05 04:00:47258 # Enable WebUI TaskManager only on Chrome OS and Touch UI.
259 ['chromeos==1 or touchui==1', {
260 'webui_task_manager%': 1,
261 }, {
262 'webui_task_manager%': 0,
263 }],
264
[email protected]32877d302011-07-07 17:57:49265 # Enable smooth scrolling for Linux and ChromeOS
266 ['OS=="linux"', {
267 'enable_smooth_scrolling%': 1,
268 }, {
269 'enable_smooth_scrolling%': 0,
270 }],
[email protected]b3f23ba2010-04-26 22:58:17271 ],
[email protected]e14a9f92009-08-05 19:26:07272 },
273
[email protected]e72e55b2011-01-06 22:19:30274 # Copy conditionally-set variables out one scope.
[email protected]e14a9f92009-08-05 19:26:07275 'branding%': '<(branding)',
276 'buildtype%': '<(buildtype)',
[email protected]e0d00142009-09-18 22:10:27277 'target_arch%': '<(target_arch)',
[email protected]cf185b32010-01-12 04:29:59278 'host_arch%': '<(host_arch)',
[email protected]8fb0ef02011-05-20 00:53:50279 'library%': 'static_library',
[email protected]c153e5352009-09-22 12:37:44280 'toolkit_views%': '<(toolkit_views)',
[email protected]1b546692011-06-30 18:22:30281 'toolkit_uses_pure_views%': '<(toolkit_uses_pure_views)',
[email protected]9c8a1982011-05-24 23:08:58282 'views_compositor%': '<(views_compositor)',
[email protected]79e2336c2011-05-12 18:18:34283 'os_posix%': '<(os_posix)',
284 'toolkit_uses_gtk%': '<(toolkit_uses_gtk)',
[email protected]7d7564a12011-06-21 19:20:22285 'use_skia%': '<(use_skia)',
[email protected]79e2336c2011-05-12 18:18:34286 'use_x11%': '<(use_x11)',
[email protected]63692212010-09-16 00:22:21287 'use_gnome_keyring%': '<(use_gnome_keyring)',
[email protected]0afe5212010-10-01 18:56:11288 'linux_fpic%': '<(linux_fpic)',
[email protected]1b4209f2011-01-07 00:25:40289 'enable_flapper_hacks%': '<(enable_flapper_hacks)',
[email protected]c153e5352009-09-22 12:37:44290 'chromeos%': '<(chromeos)',
[email protected]93012ca2010-08-10 20:10:49291 'touchui%': '<(touchui)',
[email protected]8ebc9b42011-07-14 15:22:18292 'webui_certificate_viewer%': '<(webui_certificate_viewer)',
[email protected]e47c32032011-03-01 19:26:20293 'file_manager_extension%': '<(file_manager_extension)',
[email protected]8b2e9f392011-08-05 04:00:47294 'webui_task_manager%': '<(webui_task_manager)',
[email protected]b2f030c2009-09-24 20:36:21295 'inside_chromium_build%': '<(inside_chromium_build)',
[email protected]9c1949e2009-10-02 19:59:54296 'fastbuild%': '<(fastbuild)',
[email protected]a76fe1a2010-03-01 23:39:36297 'python_ver%': '<(python_ver)',
[email protected]eafc0b452010-02-26 21:53:43298 'armv7%': '<(armv7)',
299 'arm_neon%': '<(arm_neon)',
[email protected]4d83eb72010-03-04 16:42:23300 'sysroot%': '<(sysroot)',
[email protected]ac120ff2010-04-28 02:14:22301 'disable_sse2%': '<(disable_sse2)',
[email protected]8974e042010-06-21 18:06:52302 'component%': '<(component)',
[email protected]bb6aba32011-01-07 19:04:43303 'use_titlecase_in_grd_files%': '<(use_titlecase_in_grd_files)',
[email protected]9e94cca2011-02-04 17:38:17304 'use_third_party_translations%': '<(use_third_party_translations)',
[email protected]9a425422011-01-11 00:53:18305 'remoting%': '<(remoting)',
[email protected]dda90ae2011-07-19 22:07:48306 'enable_webrtc%': '<(enable_webrtc)',
[email protected]a026daa2011-04-20 15:49:51307 'p2p_apis%': '<(p2p_apis)',
[email protected]1ec68c42011-06-01 13:56:25308 'configuration_policy%': '<(configuration_policy)',
[email protected]4b58e7d2011-07-11 10:22:56309 'safe_browsing%': '<(safe_browsing)',
[email protected]5d451ad2011-02-11 16:43:46310 'clang_use_chrome_plugins%': '<(clang_use_chrome_plugins)',
[email protected]365dd5b92011-05-26 01:30:56311 'enable_register_protocol_handler%': '<(enable_register_protocol_handler)',
[email protected]32877d302011-07-07 17:57:49312 'enable_smooth_scrolling%': '<(enable_smooth_scrolling)',
[email protected]236754a2011-07-28 17:38:23313 'use_wayland%': '<(use_wayland)',
[email protected]a22ebd812011-06-23 00:05:39314
[email protected]caa95c82009-11-23 22:39:32315 # The release channel that this build targets. This is used to restrict
316 # channel-specific build options, like which installer packages to create.
317 # The default is 'all', which does no channel-specific filtering.
318 'channel%': 'all',
319
[email protected]b3fb8092009-03-12 19:09:24320 # Override chromium_mac_pch and set it to 0 to suppress the use of
321 # precompiled headers on the Mac. Prefix header injection may still be
322 # used, but prefix headers will not be precompiled. This is useful when
323 # using distcc to distribute a build to compile slaves that don't
324 # share the same compiler executable as the system driving the compilation,
325 # because precompiled headers rely on pointers into a specific compiler
326 # executable's image. Setting this to 0 is needed to use an experimental
327 # Linux-Mac cross compiler distcc farm.
328 'chromium_mac_pch%': 1,
329
[email protected]3224dcd2009-09-16 17:31:25330 # Mac OS X SDK and deployment target support.
331 # The SDK identifies the version of the system headers that will be used,
332 # and corresponds to the MAC_OS_X_VERSION_MAX_ALLOWED compile-time macro.
333 # "Maximum allowed" refers to the operating system version whose APIs are
334 # available in the headers.
335 # The deployment target identifies the minimum system version that the
336 # built products are expected to function on. It corresponds to the
337 # MAC_OS_X_VERSION_MIN_REQUIRED compile-time macro.
338 # To ensure these macros are available, #include <AvailabilityMacros.h>.
339 # Additional documentation on these macros is available at
340 # http://developer.apple.com/mac/library/technotes/tn2002/tn2064.html#SECTION3
341 # Chrome normally builds with the Mac OS X 10.5 SDK and sets the
342 # deployment target to 10.5. Other projects, such as O3D, may override
343 # these defaults.
344 'mac_sdk%': '10.5',
345 'mac_deployment_target%': '10.5',
[email protected]9543af052009-09-15 22:42:59346
[email protected]f5ecbba12009-04-03 04:35:18347 # Set to 1 to enable code coverage. In addition to build changes
348 # (e.g. extra CFLAGS), also creates a new target in the src/chrome
349 # project file called "coverage".
350 # Currently ignored on Windows.
351 'coverage%': 0,
[email protected]653bd5f032009-04-08 12:55:49352
[email protected]c61f6432009-04-22 01:16:42353 # Overridable specification for potential use of alternative
354 # JavaScript engines.
355 'javascript_engine%': 'v8',
356
[email protected]7477ea6f2009-12-22 23:28:15357 # Although base/allocator lets you select a heap library via an
[email protected]7e0d664a2009-12-03 21:07:47358 # environment variable, the libcmt shim it uses sometimes gets in
359 # the way. To disable it entirely, and switch to normal msvcrt, do e.g.
360 # 'win_use_allocator_shim': 0,
361 # 'win_release_RuntimeLibrary': 2
362 # to ~/.gyp/include.gypi, gclient runhooks --force, and do a release build.
[email protected]8974e042010-06-21 18:06:52363 'win_use_allocator_shim%': 1, # 1 = shim allocator via libcmt; 0 = msvcrt
[email protected]279cd4212009-09-11 22:32:11364
[email protected]95ff8082009-11-13 22:21:01365 # Whether usage of OpenMAX is enabled.
366 'enable_openmax%': 0,
367
[email protected]d01120e62010-05-10 17:04:48368 # Whether proprietary audio/video codecs are assumed to be included with
369 # this build (only meaningful if branding!=Chrome).
370 'proprietary_codecs%': 0,
371
[email protected]e5b2eaa2009-04-14 01:39:12372 # TODO(bradnelson): eliminate this when possible.
373 # To allow local gyp files to prevent release.vsprops from being included.
374 # Yes(1) means include release.vsprops.
375 # Once all vsprops settings are migrated into gyp, this can go away.
376 'msvs_use_common_release%': 1,
[email protected]606116d22009-05-06 22:38:23377
[email protected]cbd5fd52009-08-26 00:14:27378 # TODO(bradnelson): eliminate this when possible.
379 # To allow local gyp files to override additional linker options for msvs.
380 # Yes(1) means set use the common linker options.
[email protected]48c7af72009-07-03 22:00:19381 'msvs_use_common_linker_extras%': 1,
382
[email protected]1ffb6502009-06-02 07:46:24383 # TODO(sgk): eliminate this if possible.
384 # It would be nicer to support this via a setting in 'target_defaults'
385 # in chrome/app/locales/locales.gypi overriding the setting in the
386 # 'Debug' configuration in the 'target_defaults' dict below,
387 # but that doesn't work as we'd like.
388 'msvs_debug_link_incremental%': '2',
389
[email protected]1f790ef2011-01-11 20:45:36390 # Needed for some of the largest modules.
391 'msvs_debug_link_nonincremental%': '1',
392
[email protected]573136142009-07-15 22:48:37393 # This is the location of the sandbox binary. Chrome looks for this before
394 # running the zygote process. If found, and SUID, it will be used to
395 # sandbox the zygote process and, thus, all renderer processes.
396 'linux_sandbox_path%': '',
397
[email protected]ad6d2c42009-09-15 20:13:38398 # Set this to true to enable SELinux support.
399 'selinux%': 0,
[email protected]4c9cc6c2009-10-01 18:54:57400
[email protected]58680ce2010-09-18 00:09:15401 # Set this to true when building with Clang.
402 # See http://code.google.com/p/chromium/wiki/Clang for details.
403 # TODO: eventually clang should behave identically to gcc, and this
404 # won't be necessary.
405 'clang%': 0,
406
[email protected]5e781232011-01-28 02:57:59407 # These two variables can be set in GYP_DEFINES while running
408 # |gclient runhooks| to let clang run a plugin in every compilation.
409 # Only has an effect if 'clang=1' is in GYP_DEFINES as well.
410 # Example:
[email protected]93120fe2011-02-03 20:46:42411 # 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:59412
413 'clang_load%': '',
414 'clang_add_plugin%': '',
415
[email protected]7664ab32011-02-01 23:35:25416 # Enable sampling based profiler.
417 # See http://google-perftools.googlecode.com/svn/trunk/doc/cpuprofile.html
418 'profiling%': '0',
419
[email protected]36532f332010-08-25 00:22:01420 # Override whether we should use Breakpad on Linux. I.e. for Chrome bot.
421 'linux_breakpad%': 0,
422 # And if we want to dump symbols for Breakpad-enabled builds.
423 'linux_dump_symbols%': 0,
424 # And if we want to strip the binary after dumping symbols.
[email protected]05cb6962009-10-01 23:29:03425 'linux_strip_binary%': 0,
[email protected]1d87c282010-09-15 22:24:49426 # Strip the test binaries needed for Linux reliability tests.
427 'linux_strip_reliability_tests%': 0,
[email protected]05cb6962009-10-01 23:29:03428
[email protected]46ce5b562010-06-16 18:39:53429 # Enable TCMalloc.
430 'linux_use_tcmalloc%': 1,
[email protected]01699e22009-11-11 19:24:24431
[email protected]39ca7de2010-04-16 08:04:03432 # Disable TCMalloc's debugallocation.
433 'linux_use_debugallocation%': 0,
434
[email protected]d8b60602010-03-26 09:41:22435 # Disable TCMalloc's heapchecker.
436 'linux_use_heapchecker%': 0,
437
[email protected]64e2d4a42010-08-27 10:13:21438 # Disable shadow stack keeping used by heapcheck to unwind the stacks
439 # better.
440 'linux_keep_shadow_stacks%': 0,
441
[email protected]6def64a2010-10-28 20:40:34442 # Set to 1 to turn on seccomp sandbox by default.
443 # (Note: this is ignored for official builds.)
444 'linux_use_seccomp_sandbox%': 0,
[email protected]39c4e1a82010-03-30 19:47:41445
[email protected]556c5d72010-06-10 05:45:01446 # Set to 1 to link against libgnome-keyring instead of using dlopen().
447 'linux_link_gnome_keyring%': 0,
[email protected]abcc9ac2011-05-16 20:04:35448 # Set to 1 to link against gsettings APIs instead of using dlopen().
449 'linux_link_gsettings%': 0,
[email protected]556c5d72010-06-10 05:45:01450
[email protected]d8c7cbcc2009-10-02 19:00:31451 # Used to disable Native Client at compile time, for platforms where it
452 # isn't supported
453 'disable_nacl%': 0,
454
[email protected]77c1b29392009-12-04 06:21:29455 # Set Thumb compilation flags.
456 'arm_thumb%': 0,
457
[email protected]53e0f642010-03-05 01:41:56458 # Set ARM fpu compilation flags (only meaningful if armv7==1 and
459 # arm_neon==0).
460 'arm_fpu%': 'vfpv3',
461
[email protected]9821d0d2010-04-16 22:40:37462 # Enable new NPDevice API.
463 'enable_new_npdevice_api%': 0,
[email protected]ed154592010-04-29 00:18:50464
465 # Enable EGLImage support in OpenMAX
[email protected]58023be2011-02-04 20:34:14466 'enable_eglimage%': 1,
[email protected]ed154592010-04-29 00:18:50467
[email protected]6f51b27e2010-06-22 20:43:53468 # Enable a variable used elsewhere throughout the GYP files to determine
469 # whether to compile in the sources for the GPU plugin / process.
470 'enable_gpu%': 1,
471
[email protected]32e1dee2010-12-09 18:36:24472 # Use OpenSSL instead of NSS. Under development: see http://crbug.com/62803
[email protected]d518cd92010-09-29 12:27:44473 'use_openssl%': 0,
474
[email protected]e72e55b2011-01-06 22:19:30475 # .gyp files or targets should set chromium_code to 1 if they build
476 # Chromium-specific code, as opposed to external code. This variable is
477 # used to control such things as the set of warnings to enable, and
478 # whether warnings are treated as errors.
479 'chromium_code%': 0,
480
481 # Set to 1 to compile with the built in pdf viewer.
482 'internal_pdf%': 0,
483
484 # This allows to use libcros from the current system, ie. /usr/lib/
485 # The cros_api will be pulled in as a static library, and all headers
486 # from the system include dirs.
[email protected]bb6aba32011-01-07 19:04:43487 'system_libcros%': 0,
[email protected]e72e55b2011-01-06 22:19:30488
[email protected]e72e55b2011-01-06 22:19:30489 # NOTE: When these end up in the Mac bundle, we need to replace '-' for '_'
490 # so Cocoa is happy (http://crbug.com/20441).
491 'locales': [
492 'am', 'ar', 'bg', 'bn', 'ca', 'cs', 'da', 'de', 'el', 'en-GB',
493 'en-US', 'es-419', 'es', 'et', 'fa', 'fi', 'fil', 'fr', 'gu', 'he',
494 'hi', 'hr', 'hu', 'id', 'it', 'ja', 'kn', 'ko', 'lt', 'lv',
495 'ml', 'mr', 'nb', 'nl', 'pl', 'pt-BR', 'pt-PT', 'ro', 'ru',
496 'sk', 'sl', 'sr', 'sv', 'sw', 'ta', 'te', 'th', 'tr', 'uk',
497 'vi', 'zh-CN', 'zh-TW',
498 ],
499
[email protected]cc0322d2011-07-24 09:29:19500 # Pseudo locales are special locales which are used for testing and
501 # debugging. They don't get copied to the final app. For more info,
502 # check out https://sites.google.com/a/chromium.org/dev/Home/fake-bidi
503 'pseudo_locales': [
504 'fake-bidi',
505 ],
506
[email protected]bb6aba32011-01-07 19:04:43507 'grit_defines': [],
508
[email protected]29c2daea2011-01-05 20:38:50509 # Use Harfbuzz-NG instead of Harfbuzz.
510 # Under development: http://crbug.com/68551
511 'use_harfbuzz_ng%': 0,
512
[email protected]bd3bd442011-03-28 07:58:51513 # If debug_devtools is set to 1, JavaScript files for DevTools are
514 # stored as is and loaded from disk. Otherwise, a concatenated file
515 # is stored in resources.pak. It is still possible to load JS files
516 # from disk by passing --debug-devtools cmdline switch.
517 'debug_devtools%': 0,
518
[email protected]be8a9272011-02-10 22:06:07519 # Point to ICU directory.
520 'icu_src_dir': '../third_party/icu',
521
[email protected]912c55c2009-07-31 23:33:55522 'conditions': [
[email protected]79e2336c2011-05-12 18:18:34523 ['os_posix==1 and OS!="mac"', {
[email protected]242a9e62009-11-03 17:32:10524 # This will set gcc_version to XY if you are running gcc X.Y.*.
525 # This is used to tweak build flags for gcc 4.4.
526 'gcc_version%': '<!(python <(DEPTH)/build/compiler_version.py)',
[email protected]4d83eb72010-03-04 16:42:23527 # Figure out the python architecture to decide if we build pyauto.
[email protected]efd68462010-03-04 17:07:54528 'python_arch%': '<!(<(DEPTH)/build/linux/python_arch.sh <(sysroot)/usr/lib/libpython<(python_ver).so.1.0)',
[email protected]cbd5fd52009-08-26 00:14:27529 'conditions': [
[email protected]2a77a9d2010-08-26 19:58:10530 ['branding=="Chrome"', {
[email protected]cbd5fd52009-08-26 00:14:27531 'linux_breakpad%': 1,
[email protected]cbd5fd52009-08-26 00:14:27532 }],
[email protected]4c9cc6c2009-10-01 18:54:57533 # All Chrome builds have breakpad symbols, but only process the
534 # symbols from official builds.
[email protected]c913cb82010-08-31 19:44:08535 ['(branding=="Chrome" and buildtype=="Official")', {
[email protected]4c9cc6c2009-10-01 18:54:57536 'linux_dump_symbols%': 1,
[email protected]4c9cc6c2009-10-01 18:54:57537 }],
[email protected]cbd5fd52009-08-26 00:14:27538 ],
[email protected]79e2336c2011-05-12 18:18:34539 }], # os_posix==1 and OS!="mac"
[email protected]bb6aba32011-01-07 19:04:43540
[email protected]e14a9f92009-08-05 19:26:07541 ['OS=="mac"', {
542 'conditions': [
543 # mac_product_name is set to the name of the .app bundle as it should
544 # appear on disk. This duplicates data from
545 # chrome/app/theme/chromium/BRANDING and
546 # chrome/app/theme/google_chrome/BRANDING, but is necessary to get
547 # these names into the build system.
548 ['branding=="Chrome"', {
549 'mac_product_name%': 'Google Chrome',
550 }, { # else: branding!="Chrome"
551 'mac_product_name%': 'Chromium',
552 }],
553
554 # Feature variables for enabling Mac Breakpad and Keystone auto-update
555 # support. Both features are on by default in official builds with
556 # Chrome branding.
557 ['branding=="Chrome" and buildtype=="Official"', {
558 'mac_breakpad%': 1,
559 'mac_keystone%': 1,
[email protected]08857c6c2011-08-10 00:11:49560
561 # Official builds use clang, but only on m15+. Since there's just
562 # one buildbot config for the builder for m13, m14, and m15, this
563 # can't be defined in the buildbot config but is instead defined
564 # here (it was added after the m14 branch was cut). This is in the
565 # buildtype=="Official" section so that developers don't see it
566 # for their local builds.
567 'clang%': 1,
[email protected]e14a9f92009-08-05 19:26:07568 }, { # else: branding!="Chrome" or buildtype!="Official"
569 'mac_breakpad%': 0,
570 'mac_keystone%': 0,
571 }],
572 ],
573 }], # OS=="mac"
[email protected]bb6aba32011-01-07 19:04:43574
[email protected]912c55c2009-07-31 23:33:55575 # Whether to use multiple cores to compile with visual studio. This is
576 # optional because it sometimes causes corruption on VS 2005.
577 # It is on by default on VS 2008 and off on VS 2005.
578 ['OS=="win"', {
579 'conditions': [
[email protected]8974e042010-06-21 18:06:52580 ['component=="shared_library"', {
581 'win_use_allocator_shim%': 0,
582 }],
[email protected]912c55c2009-07-31 23:33:55583 ['MSVS_VERSION=="2005"', {
[email protected]669795372009-08-14 17:51:13584 'msvs_multi_core_compile%': 0,
[email protected]912c55c2009-07-31 23:33:55585 },{
586 'msvs_multi_core_compile%': 1,
587 }],
[email protected]10bb8c92009-08-07 21:16:03588 # Don't do incremental linking for large modules on 32-bit.
589 ['MSVS_OS_BITS==32', {
590 'msvs_large_module_debug_link_mode%': '1', # No
591 },{
592 'msvs_large_module_debug_link_mode%': '2', # Yes
593 }],
[email protected]3e2648a2011-03-21 20:58:50594 ['MSVS_VERSION=="2010e" or MSVS_VERSION=="2008e" or MSVS_VERSION=="2005e"', {
595 'msvs_express%': 1,
596 'secure_atl%': 0,
597 },{
598 'msvs_express%': 0,
599 'secure_atl%': 1,
600 }],
[email protected]912c55c2009-07-31 23:33:55601 ],
[email protected]ef4fa4072009-12-04 22:46:50602 'nacl_win64_defines': [
603 # This flag is used to minimize dependencies when building
604 # Native Client loader for 64-bit Windows.
605 'NACL_WIN64',
606 ],
[email protected]912c55c2009-07-31 23:33:55607 }],
[email protected]bb6aba32011-01-07 19:04:43608
[email protected]79e2336c2011-05-12 18:18:34609 ['os_posix==1 and chromeos==0 and target_arch!="arm"', {
[email protected]8e553f42010-10-25 20:05:44610 'use_cups%': 1,
611 }, {
612 'use_cups%': 0,
613 }],
[email protected]bb6aba32011-01-07 19:04:43614
[email protected]19fe8f0b2010-12-07 07:27:27615 # Set the relative path from this file to the GYP file of the JPEG
616 # library used by Chromium.
617 ['use_libjpeg_turbo==1', {
618 'libjpeg_gyp_path': '../third_party/libjpeg_turbo/libjpeg.gyp',
619 }, {
620 'libjpeg_gyp_path': '../third_party/libjpeg/libjpeg.gyp',
621 }], # use_libjpeg_turbo==1
[email protected]bb6aba32011-01-07 19:04:43622
[email protected]abcc9ac2011-05-16 20:04:35623 # Options controlling the use of GConf (the classic GNOME configuration
624 # system) and GIO, which contains GSettings (the new GNOME config system).
[email protected]1c6fe29302011-01-20 22:14:31625 ['chromeos==1', {
626 'use_gconf%': 0,
[email protected]abcc9ac2011-05-16 20:04:35627 'use_gio%': 0,
[email protected]1c6fe29302011-01-20 22:14:31628 }, {
629 'use_gconf%': 1,
[email protected]abcc9ac2011-05-16 20:04:35630 'use_gio%': 1,
[email protected]1c6fe29302011-01-20 22:14:31631 }],
632
[email protected]4de39f82011-03-28 12:01:29633 # Set up -D and -E flags passed into grit.
[email protected]1660bffd2011-03-23 16:24:29634 ['branding=="Chrome"', {
635 # TODO(mmoss) The .grd files look for _google_chrome, but for
636 # consistency they should look for google_chrome_build like C++.
[email protected]4de39f82011-03-28 12:01:29637 'grit_defines': ['-D', '_google_chrome',
638 '-E', 'CHROMIUM_BUILD=google_chrome'],
[email protected]1660bffd2011-03-23 16:24:29639 }, {
[email protected]4de39f82011-03-28 12:01:29640 'grit_defines': ['-D', '_chromium',
641 '-E', 'CHROMIUM_BUILD=chromium'],
[email protected]1660bffd2011-03-23 16:24:29642 }],
[email protected]bb6aba32011-01-07 19:04:43643 ['chromeos==1', {
644 'grit_defines': ['-D', 'chromeos'],
645 }],
646 ['toolkit_views==1', {
647 'grit_defines': ['-D', 'toolkit_views'],
648 }],
[email protected]1b546692011-06-30 18:22:30649 ['toolkit_uses_pure_views==1', {
650 'grit_defines': ['-D', 'toolkit_uses_pure_views'],
651 }],
[email protected]bb6aba32011-01-07 19:04:43652 ['touchui==1', {
653 'grit_defines': ['-D', 'touchui'],
654 }],
[email protected]8ebc9b42011-07-14 15:22:18655 ['webui_certificate_viewer==1', {
656 'grit_defines': ['-D', 'webui_certificate_viewer'],
657 }],
[email protected]e47c32032011-03-01 19:26:20658 ['file_manager_extension==1', {
659 'grit_defines': ['-D', 'file_manager_extension'],
660 }],
[email protected]8b2e9f392011-08-05 04:00:47661 ['webui_task_manager==1', {
662 'grit_defines': ['-D', 'webui_task_manager'],
663 }],
[email protected]9a425422011-01-11 00:53:18664 ['remoting==1', {
665 'grit_defines': ['-D', 'remoting'],
666 }],
[email protected]bb6aba32011-01-07 19:04:43667 ['use_titlecase_in_grd_files==1', {
668 'grit_defines': ['-D', 'use_titlecase'],
669 }],
[email protected]00dc155832011-02-01 18:51:19670 ['use_third_party_translations==1', {
671 'grit_defines': ['-D', 'use_third_party_translations'],
[email protected]fb6c1022011-06-27 21:58:12672 'locales': [
[email protected]53e73332011-08-09 04:44:34673 'ast', 'bs', 'ca@valencia', 'en-AU', 'eo', 'eu', 'gl', 'hy', 'ia', 'ka',
674 'ku', 'kw', 'ug',
[email protected]fb6c1022011-06-27 21:58:12675 ],
[email protected]00dc155832011-02-01 18:51:19676 }],
[email protected]5d451ad2011-02-11 16:43:46677
678 ['clang_use_chrome_plugins==1', {
679 'clang_chrome_plugins_flags':
680 '<!(<(DEPTH)/tools/clang/scripts/plugin_flags.sh)',
681 }],
[email protected]cfa2e1102011-04-27 22:30:23682
[email protected]452da69e2011-05-24 02:36:05683 # Set use_ibus to 1 to enable ibus support.
[email protected]cfa2e1102011-04-27 22:30:23684 ['touchui==1 and chromeos==1', {
685 'use_ibus%': 1,
686 }, {
687 'use_ibus%': 0,
[email protected]365dd5b92011-05-26 01:30:56688 }],
689
690 ['enable_register_protocol_handler==1', {
691 'grit_defines': ['-D', 'enable_register_protocol_handler'],
692 }],
[email protected]912c55c2009-07-31 23:33:55693 ],
[email protected]2f80c312009-02-25 21:26:55694 },
695 'target_defaults': {
[email protected]1c966092009-08-20 21:19:26696 'variables': {
[email protected]a6e22132010-02-10 20:43:18697 # The condition that operates on chromium_code is in a target_conditions
698 # section, and will not have access to the default fallback value of
699 # chromium_code at the top of this file, or to the chromium_code
700 # variable placed at the root variables scope of .gyp files, because
701 # those variables are not set at target scope. As a workaround,
702 # if chromium_code is not set at target scope, define it in target scope
703 # to contain whatever value it has during early variable expansion.
704 # That's enough to make it available during target conditional
705 # processing.
706 'chromium_code%': '<(chromium_code)',
707
[email protected]7e0d664a2009-12-03 21:07:47708 # See http://gcc.gnu.org/onlinedocs/gcc-4.4.2/gcc/Optimize-Options.html
[email protected]d5d593a2009-08-28 23:23:29709 'mac_release_optimization%': '3', # Use -O3 unless overridden
[email protected]ffd984b12009-09-11 19:37:00710 'mac_debug_optimization%': '0', # Use -O0 unless overridden
[email protected]7e0d664a2009-12-03 21:07:47711 # See http://msdn.microsoft.com/en-us/library/aa652360(VS.71).aspx
712 'win_release_Optimization%': '2', # 2 = /Os
713 'win_debug_Optimization%': '0', # 0 = /Od
[email protected]6b0507b2010-05-07 07:41:21714 # See http://msdn.microsoft.com/en-us/library/8wtf2dfz(VS.71).aspx
715 'win_debug_RuntimeChecks%': '3', # 3 = all checks enabled, 0 = off
716 # See http://msdn.microsoft.com/en-us/library/47238hez(VS.71).aspx
[email protected]2ae6e022010-05-07 13:19:15717 'win_debug_InlineFunctionExpansion%': '', # empty = default, 0 = off,
718 'win_release_InlineFunctionExpansion%': '2', # 1 = only __inline, 2 = max
[email protected]fac10d12010-11-08 16:00:31719 # VS inserts quite a lot of extra checks to algorithms like
720 # std::partial_sort in Debug build which make them O(N^2)
721 # instead of O(N*logN). This is particularly slow under memory
722 # tools like ThreadSanitizer so we want it to be disablable.
723 # See http://msdn.microsoft.com/en-us/library/aa985982(v=VS.80).aspx
724 'win_debug_disable_iterator_debugging%': '0',
[email protected]7e0d664a2009-12-03 21:07:47725
[email protected]ffd984b12009-09-11 19:37:00726 'release_extra_cflags%': '',
727 'debug_extra_cflags%': '',
[email protected]92822e82009-09-18 14:26:56728 'release_valgrind_build%': 0,
[email protected]8974e042010-06-21 18:06:52729
730 'conditions': [
731 ['OS=="win" and component=="shared_library"', {
732 # See http://msdn.microsoft.com/en-us/library/aa652367.aspx
733 'win_release_RuntimeLibrary%': '2', # 2 = /MT (nondebug DLL)
734 'win_debug_RuntimeLibrary%': '3', # 3 = /MTd (debug DLL)
735 }, {
736 # See http://msdn.microsoft.com/en-us/library/aa652367.aspx
737 'win_release_RuntimeLibrary%': '0', # 0 = /MT (nondebug static)
738 'win_debug_RuntimeLibrary%': '1', # 1 = /MTd (debug static)
739 }],
740 ],
[email protected]1c966092009-08-20 21:19:26741 },
[email protected]32aa8cc2009-03-04 21:36:39742 'conditions': [
743 ['branding=="Chrome"', {
744 'defines': ['GOOGLE_CHROME_BUILD'],
745 }, { # else: branding!="Chrome"
746 'defines': ['CHROMIUM_BUILD'],
747 }],
[email protected]63e39a282011-07-13 20:41:28748 ['component=="shared_library"', {
749 'defines': ['COMPONENT_BUILD'],
750 }],
[email protected]06c756182010-04-27 18:31:31751 ['toolkit_views==1', {
[email protected]e6970232009-05-12 23:51:17752 'defines': ['TOOLKIT_VIEWS=1'],
753 }],
[email protected]1b546692011-06-30 18:22:30754 ['toolkit_uses_pure_views==1', {
755 'defines': ['TOOLKIT_USES_PURE_VIEWS=1'],
756 }],
[email protected]9c8a1982011-05-24 23:08:58757 ['views_compositor==1', {
[email protected]c3870f42011-06-10 16:43:27758 'defines': ['VIEWS_COMPOSITOR=1'],
[email protected]9c8a1982011-05-24 23:08:58759 }],
[email protected]fdc5bed2010-01-09 01:16:57760 ['chromeos==1', {
[email protected]16779842009-07-08 23:45:29761 'defines': ['OS_CHROMEOS=1'],
[email protected]2b883b92009-06-02 22:57:50762 }],
[email protected]0094fbe2010-07-15 21:51:43763 ['touchui==1', {
764 'defines': ['TOUCH_UI=1'],
765 }],
[email protected]236754a2011-07-28 17:38:23766 ['use_wayland==1', {
767 'defines': ['USE_WAYLAND=1', 'WL_EGL_PLATFORM=1'],
768 }],
[email protected]e47c32032011-03-01 19:26:20769 ['file_manager_extension==1', {
770 'defines': ['FILE_MANAGER_EXTENSION=1'],
771 }],
[email protected]8b2e9f392011-08-05 04:00:47772 ['webui_task_manager==1', {
773 'defines': ['WEBUI_TASK_MANAGER=1'],
774 }],
[email protected]7664ab32011-02-01 23:35:25775 ['profiling==1', {
776 'defines': ['ENABLE_PROFILING=1'],
777 }],
[email protected]542bf24a2010-06-11 23:08:17778 ['remoting==1', {
779 'defines': ['ENABLE_REMOTING=1'],
[email protected]c0bac532010-06-11 00:39:00780 }],
[email protected]a026daa2011-04-20 15:49:51781 ['p2p_apis==1', {
782 'defines': ['ENABLE_P2P_APIS=1'],
783 }],
[email protected]d01120e62010-05-10 17:04:48784 ['proprietary_codecs==1', {
785 'defines': ['USE_PROPRIETARY_CODECS'],
786 }],
[email protected]1b4209f2011-01-07 00:25:40787 ['enable_flapper_hacks==1', {
788 'defines': ['ENABLE_FLAPPER_HACKS=1'],
789 }],
[email protected]f31e2e52011-07-14 16:01:19790 ['configuration_policy==1', {
791 'defines': ['ENABLE_CONFIGURATION_POLICY'],
792 }],
[email protected]9c1949e2009-10-02 19:59:54793 ['fastbuild!=0', {
794 'conditions': [
[email protected]1cc2fa72010-07-03 08:49:24795 # For Windows, we don't genererate debug information.
[email protected]9c1949e2009-10-02 19:59:54796 ['OS=="win"', {
797 'msvs_settings': {
798 'VCLinkerTool': {
799 'GenerateDebugInformation': 'false',
800 },
801 'VCCLCompilerTool': {
802 'DebugInformationFormat': '0',
803 }
804 }
[email protected]1cc2fa72010-07-03 08:49:24805 }, { # else: OS != "win", generate less debug information.
806 'variables': {
807 'debug_extra_cflags': '-g1',
808 },
[email protected]37c84192010-04-14 21:37:40809 }],
[email protected]aecc4d12011-01-19 05:32:33810 # Clang creates chubby debug information, which makes linking very
811 # slow. For now, don't create debug information with clang. See
812 # http://crbug.com/70000
813 ['OS=="linux" and clang==1', {
814 'variables': {
815 'debug_extra_cflags': '-g0',
816 },
817 }],
[email protected]9c1949e2009-10-02 19:59:54818 ], # conditions for fastbuild.
819 }], # fastbuild!=0
[email protected]ad6d2c42009-09-15 20:13:38820 ['selinux==1', {
821 'defines': ['CHROMIUM_SELINUX=1'],
822 }],
[email protected]7e0d664a2009-12-03 21:07:47823 ['win_use_allocator_shim==0', {
824 'conditions': [
825 ['OS=="win"', {
826 'defines': ['NO_TCMALLOC'],
827 }],
828 ],
829 }],
[email protected]43f28f832010-02-03 02:28:48830 ['enable_gpu==1', {
[email protected]7477ea6f2009-12-22 23:28:15831 'defines': [
832 'ENABLE_GPU=1',
833 ],
834 }],
[email protected]b1c2a5542010-10-08 12:44:40835 ['use_openssl==1', {
836 'defines': [
837 'USE_OPENSSL=1',
838 ],
839 }],
[email protected]ed154592010-04-29 00:18:50840 ['enable_eglimage==1', {
841 'defines': [
842 'ENABLE_EGLIMAGE=1',
843 ],
844 }],
[email protected]7d7564a12011-06-21 19:20:22845 ['use_skia==1', {
846 'defines': [
847 'USE_SKIA=1',
848 ],
849 }],
[email protected]f5ecbba12009-04-03 04:35:18850 ['coverage!=0', {
851 'conditions': [
852 ['OS=="mac"', {
853 'xcode_settings': {
[email protected]ab2956372009-08-13 18:11:04854 'GCC_INSTRUMENT_PROGRAM_FLOW_ARCS': 'YES', # -fprofile-arcs
855 'GCC_GENERATE_TEST_COVERAGE_FILES': 'YES', # -ftest-coverage
[email protected]5ae4f55e2009-04-13 23:19:47856 },
[email protected]e4fb84c2009-12-28 20:45:43857 # Add -lgcov for types executable, shared_library, and
[email protected]dc259ce52010-04-13 04:03:10858 # loadable_module; not for static_library.
[email protected]e4fb84c2009-12-28 20:45:43859 # This is a delayed conditional.
[email protected]f5ecbba12009-04-03 04:35:18860 'target_conditions': [
[email protected]e4fb84c2009-12-28 20:45:43861 ['_type!="static_library"', {
[email protected]f5ecbba12009-04-03 04:35:18862 'xcode_settings': { 'OTHER_LDFLAGS': [ '-lgcov' ] },
[email protected]5ae4f55e2009-04-13 23:19:47863 }],
864 ],
865 }],
[email protected]f5ecbba12009-04-03 04:35:18866 ['OS=="linux"', {
867 'cflags': [ '-ftest-coverage',
868 '-fprofile-arcs' ],
[email protected]7122ffd52009-04-30 23:19:00869 'link_settings': { 'libraries': [ '-lgcov' ] },
[email protected]f5ecbba12009-04-03 04:35:18870 }],
[email protected]e8f6ff42009-07-07 18:20:53871 # Finally, for Windows, we simply turn on profiling.
872 ['OS=="win"', {
873 'msvs_settings': {
874 'VCLinkerTool': {
875 'Profile': 'true',
876 },
[email protected]10bb8c92009-08-07 21:16:03877 'VCCLCompilerTool': {
[email protected]e8f6ff42009-07-07 18:20:53878 # /Z7, not /Zi, so coverage is happyb
879 'DebugInformationFormat': '1',
[email protected]1f9471a2010-01-04 06:40:16880 'AdditionalOptions': ['/Yd'],
[email protected]e8f6ff42009-07-07 18:20:53881 }
882 }
883 }], # OS==win
884 ], # conditions for coverage
885 }], # coverage!=0
[email protected]4e4d6042010-08-26 18:34:38886 ['OS=="win"', {
887 'defines': [
888 '__STD_C',
889 '_CRT_SECURE_NO_DEPRECATE',
890 '_SCL_SECURE_NO_DEPRECATE',
891 ],
892 'include_dirs': [
893 '<(DEPTH)/third_party/wtl/include',
894 ],
895 }], # OS==win
[email protected]365dd5b92011-05-26 01:30:56896 ['enable_register_protocol_handler==1', {
897 'defines': [
[email protected]06bba4fb2011-06-09 05:17:19898 'ENABLE_REGISTER_PROTOCOL_HANDLER=1',
[email protected]365dd5b92011-05-26 01:30:56899 ],
900 }],
[email protected]a6e22132010-02-10 20:43:18901 ], # conditions for 'target_defaults'
902 'target_conditions': [
[email protected]c14d8e772010-02-09 22:06:15903 ['chromium_code==0', {
[email protected]d8543312010-02-10 17:43:28904 'conditions': [
[email protected]79e2336c2011-05-12 18:18:34905 [ 'os_posix==1 and OS!="mac"', {
[email protected]c0a6b272011-02-09 22:32:33906 # We don't want to get warnings from third-party code,
907 # so remove any existing warning-enabling flags like -Wall.
[email protected]d8543312010-02-10 17:43:28908 'cflags!': [
909 '-Wall',
910 '-Wextra',
911 '-Werror',
912 ],
[email protected]ec1d155be2011-02-08 22:19:00913 'cflags': [
914 # Don't warn about hash_map in third-party code.
915 '-Wno-deprecated',
[email protected]c0a6b272011-02-09 22:32:33916 # Don't warn about printf format problems.
917 # This is off by default in gcc but on in Ubuntu's gcc(!).
[email protected]ec392872011-02-10 22:38:22918 '-Wno-format',
[email protected]ec1d155be2011-02-08 22:19:00919 ],
[email protected]d16bd642011-07-25 23:59:18920 'cflags_cc!': [
921 # TODO(fischman): remove this.
922 # http://code.google.com/p/chromium/issues/detail?id=90453
923 '-Wsign-compare',
924 ]
[email protected]d8543312010-02-10 17:43:28925 }],
[email protected]6e4451892011-07-27 10:32:11926 [ 'os_posix==1 and OS!="mac" and chromeos==0', {
927 'cflags': [
928 # Don't warn about ignoring the return value from e.g. close().
929 # This is off by default in some gccs but on by default in others.
930 # Currently this option is not set for Chrome OS build because
931 # the current version of gcc (4.3.4) used for building Chrome in
932 # Chrome OS chroot doesn't support this option.
933 # TODO(mazda): remove the conditional for Chrome OS when gcc
934 # version is upgraded.
935 '-Wno-unused-result',
936 ],
937 }],
[email protected]d8543312010-02-10 17:43:28938 [ 'OS=="win"', {
939 'defines': [
940 '_CRT_SECURE_NO_DEPRECATE',
941 '_CRT_NONSTDC_NO_WARNINGS',
942 '_CRT_NONSTDC_NO_DEPRECATE',
943 '_SCL_SECURE_NO_DEPRECATE',
944 ],
945 'msvs_disabled_warnings': [4800],
946 'msvs_settings': {
947 'VCCLCompilerTool': {
[email protected]942c3a60f2011-05-03 02:04:11948 'WarningLevel': '3',
949 'WarnAsError': 'false', # TODO(maruel): Enable it.
[email protected]d8543312010-02-10 17:43:28950 'Detect64BitPortabilityProblems': 'false',
951 },
952 },
953 }],
[email protected]ea47b6a2011-07-17 19:39:42954 # TODO(darin): Unfortunately, some third_party code depends on base/
955 [ 'OS=="win" and component=="shared_library"', {
956 'msvs_disabled_warnings': [
957 4251, # class 'std::xx' needs to have dll-interface.
958 ],
959 }],
[email protected]d8543312010-02-10 17:43:28960 [ 'OS=="mac"', {
961 'xcode_settings': {
962 'GCC_TREAT_WARNINGS_AS_ERRORS': 'NO',
[email protected]4c4c2e5332010-06-15 11:51:06963 'WARNING_CFLAGS!': ['-Wall', '-Wextra'],
[email protected]d8543312010-02-10 17:43:28964 },
965 }],
[email protected]c14d8e772010-02-09 22:06:15966 ],
967 }, {
968 # In Chromium code, we define __STDC_FORMAT_MACROS in order to get the
969 # C99 macros on Mac and Linux.
970 'defines': [
971 '__STDC_FORMAT_MACROS',
972 ],
973 'conditions': [
974 ['OS!="win"', {
[email protected]40519592010-11-16 15:23:30975 'sources/': [ ['exclude', '_win(_unittest)?\\.(h|cc)$'],
[email protected]a316ca532010-11-15 14:08:16976 ['exclude', '(^|/)win/'],
[email protected]40519592010-11-16 15:23:30977 ['exclude', '(^|/)win_[^/]*\\.(h|cc)$'] ],
[email protected]c14d8e772010-02-09 22:06:15978 }],
979 ['OS!="mac"', {
[email protected]40519592010-11-16 15:23:30980 'sources/': [ ['exclude', '_(cocoa|mac)(_unittest)?\\.(h|cc)$'],
[email protected]a316ca532010-11-15 14:08:16981 ['exclude', '(^|/)(cocoa|mac)/'],
982 ['exclude', '\\.mm?$' ] ],
[email protected]c14d8e772010-02-09 22:06:15983 }],
[email protected]79e2336c2011-05-12 18:18:34984 ['toolkit_uses_gtk!=1', {
[email protected]c14d8e772010-02-09 22:06:15985 'sources/': [
[email protected]40519592010-11-16 15:23:30986 ['exclude', '_(chromeos|gtk|x|x11|xdg)(_unittest)?\\.(h|cc)$'],
[email protected]a316ca532010-11-15 14:08:16987 ['exclude', '(^|/)gtk/'],
[email protected]40519592010-11-16 15:23:30988 ['exclude', '(^|/)(gtk|x11)_[^/]*\\.(h|cc)$'],
[email protected]18cff3d2010-02-17 18:03:13989 ],
990 }],
[email protected]f1b2cd02011-08-10 16:50:44991 ['use_wayland!=1', {
992 'sources/': [
993 ['exclude', '_(wayland)(_unittest)?\\.(h|cc)$'],
994 ['exclude', '(^|/)wayland/'],
995 ['exclude', '(^|/)(wayland)_[^/]*\\.(h|cc)$'],
996 ],
997 }],
[email protected]18cff3d2010-02-17 18:03:13998 ['OS!="linux"', {
999 'sources/': [
[email protected]40519592010-11-16 15:23:301000 ['exclude', '_linux(_unittest)?\\.(h|cc)$'],
[email protected]a316ca532010-11-15 14:08:161001 ['exclude', '(^|/)linux/'],
[email protected]18cff3d2010-02-17 18:03:131002 ],
[email protected]c14d8e772010-02-09 22:06:151003 }],
1004 # We use "POSIX" to refer to all non-Windows operating systems.
1005 ['OS=="win"', {
[email protected]40519592010-11-16 15:23:301006 'sources/': [ ['exclude', '_posix\\.(h|cc)$'] ],
[email protected]f55bd4862010-05-27 15:38:071007 # turn on warnings for signed/unsigned mismatch on chromium code.
1008 'msvs_settings': {
1009 'VCCLCompilerTool': {
1010 'AdditionalOptions': ['/we4389'],
1011 },
1012 },
[email protected]c14d8e772010-02-09 22:06:151013 }],
[email protected]63e39a282011-07-13 20:41:281014 ['OS=="win" and component=="shared_library"', {
1015 'msvs_disabled_warnings': [
1016 4251, # class 'std::xx' needs to have dll-interface.
1017 ],
1018 }],
[email protected]c14d8e772010-02-09 22:06:151019 ['chromeos!=1', {
[email protected]40519592010-11-16 15:23:301020 'sources/': [ ['exclude', '_chromeos\\.(h|cc)$'] ]
[email protected]c14d8e772010-02-09 22:06:151021 }],
[email protected]06c756182010-04-27 18:31:311022 ['toolkit_views==0', {
[email protected]40519592010-11-16 15:23:301023 'sources/': [ ['exclude', '_views\\.(h|cc)$'] ]
[email protected]c14d8e772010-02-09 22:06:151024 }],
1025 ],
1026 }],
[email protected]a6e22132010-02-10 20:43:181027 ], # target_conditions for 'target_defaults'
[email protected]2f80c312009-02-25 21:26:551028 'default_configuration': 'Debug',
1029 'configurations': {
[email protected]5153767c2009-12-22 01:52:501030 # VCLinkerTool LinkIncremental values below:
1031 # 0 == default
1032 # 1 == /INCREMENTAL:NO
1033 # 2 == /INCREMENTAL
1034 # Debug links incremental, Release does not.
1035 #
[email protected]7b99801e2010-11-03 17:26:231036 # Abstract base configurations to cover common attributes.
[email protected]5153767c2009-12-22 01:52:501037 #
1038 'Common_Base': {
[email protected]bb05e452009-10-29 21:24:561039 'abstract': 1,
1040 'msvs_configuration_attributes': {
1041 'OutputDirectory': '$(SolutionDir)$(ConfigurationName)',
1042 'IntermediateDirectory': '$(OutDir)\\obj\\$(ProjectName)',
1043 'CharacterSet': '1',
1044 },
[email protected]5153767c2009-12-22 01:52:501045 },
1046 'x86_Base': {
1047 'abstract': 1,
[email protected]ef4fa4072009-12-04 22:46:501048 'msvs_settings': {
1049 'VCLinkerTool': {
1050 'TargetMachine': '1',
1051 },
1052 },
[email protected]2fa40782009-11-01 21:17:341053 'msvs_configuration_platform': 'Win32',
[email protected]bb05e452009-10-29 21:24:561054 },
[email protected]5153767c2009-12-22 01:52:501055 'x64_Base': {
1056 'abstract': 1,
1057 'msvs_configuration_platform': 'x64',
1058 'msvs_settings': {
1059 'VCLinkerTool': {
1060 'TargetMachine': '17', # x86 - 64
[email protected]5153767c2009-12-22 01:52:501061 'AdditionalLibraryDirectories!':
1062 ['<(DEPTH)/third_party/platformsdk_win7/files/Lib'],
1063 'AdditionalLibraryDirectories':
1064 ['<(DEPTH)/third_party/platformsdk_win7/files/Lib/x64'],
1065 },
[email protected]d26b4418ab2010-03-24 22:06:351066 'VCLibrarianTool': {
[email protected]5153767c2009-12-22 01:52:501067 'AdditionalLibraryDirectories!':
1068 ['<(DEPTH)/third_party/platformsdk_win7/files/Lib'],
1069 'AdditionalLibraryDirectories':
1070 ['<(DEPTH)/third_party/platformsdk_win7/files/Lib/x64'],
1071 },
1072 },
1073 'defines': [
1074 # Not sure if tcmalloc works on 64-bit Windows.
1075 'NO_TCMALLOC',
1076 ],
1077 },
1078 'Debug_Base': {
1079 'abstract': 1,
[email protected]14339762011-04-05 07:36:581080 'defines': [
1081 'DYNAMIC_ANNOTATIONS_ENABLED=1',
1082 'WTF_USE_DYNAMIC_ANNOTATIONS=1',
1083 ],
[email protected]1c966092009-08-20 21:19:261084 'xcode_settings': {
1085 'COPY_PHASE_STRIP': 'NO',
[email protected]d5d593a2009-08-28 23:23:291086 'GCC_OPTIMIZATION_LEVEL': '<(mac_debug_optimization)',
[email protected]a68c29a2011-07-01 16:23:491087 'OTHER_CFLAGS': [
[email protected]a68c29a2011-07-01 16:23:491088 '<@(debug_extra_cflags)',
1089 ],
[email protected]1c966092009-08-20 21:19:261090 },
[email protected]bb05e452009-10-29 21:24:561091 'msvs_settings': {
1092 'VCCLCompilerTool': {
[email protected]7e0d664a2009-12-03 21:07:471093 'Optimization': '<(win_debug_Optimization)',
[email protected]bb05e452009-10-29 21:24:561094 'PreprocessorDefinitions': ['_DEBUG'],
[email protected]6b0507b2010-05-07 07:41:211095 'BasicRuntimeChecks': '<(win_debug_RuntimeChecks)',
[email protected]7e0d664a2009-12-03 21:07:471096 'RuntimeLibrary': '<(win_debug_RuntimeLibrary)',
[email protected]2ae6e022010-05-07 13:19:151097 'conditions': [
1098 # According to MSVS, InlineFunctionExpansion=0 means
1099 # "default inlining", not "/Ob0".
1100 # Thus, we have to handle InlineFunctionExpansion==0 separately.
1101 ['win_debug_InlineFunctionExpansion==0', {
1102 'AdditionalOptions': ['/Ob0'],
1103 }],
1104 ['win_debug_InlineFunctionExpansion!=""', {
1105 'InlineFunctionExpansion':
1106 '<(win_debug_InlineFunctionExpansion)',
1107 }],
[email protected]fac10d12010-11-08 16:00:311108 ['win_debug_disable_iterator_debugging==1', {
1109 'PreprocessorDefinitions': ['_HAS_ITERATOR_DEBUGGING=0'],
1110 }],
[email protected]2ae6e022010-05-07 13:19:151111 ],
[email protected]bb05e452009-10-29 21:24:561112 },
1113 'VCLinkerTool': {
1114 'LinkIncremental': '<(msvs_debug_link_incremental)',
[email protected]646f6b42011-07-14 13:57:021115 # ASLR makes debugging with windbg difficult because Chrome.exe and
1116 # Chrome.dll share the same base name. As result, windbg will
1117 # name the Chrome.dll module like chrome_<base address>, where
1118 # <base address> typically changes with each launch. This in turn
1119 # means that breakpoints in Chrome.dll don't stick from one launch
1120 # to the next. For this reason, we turn ASLR off in debug builds.
1121 # Note that this is a three-way bool, where 0 means to pick up
1122 # the default setting, 1 is off and 2 is on.
1123 'RandomizedBaseAddress': 1,
[email protected]bb05e452009-10-29 21:24:561124 },
1125 'VCResourceCompilerTool': {
1126 'PreprocessorDefinitions': ['_DEBUG'],
1127 },
1128 },
[email protected]2f80c312009-02-25 21:26:551129 'conditions': [
[email protected]bb05e452009-10-29 21:24:561130 ['OS=="linux"', {
1131 'cflags': [
1132 '<@(debug_extra_cflags)',
1133 ],
[email protected]2f80c312009-02-25 21:26:551134 }],
[email protected]56cca4e2011-07-01 21:33:351135 ['release_valgrind_build==0', {
1136 'xcode_settings': {
1137 'OTHER_CFLAGS': [
1138 '-fstack-protector-all', # Implies -fstack-protector
1139 ],
1140 },
1141 }],
[email protected]2f80c312009-02-25 21:26:551142 ],
1143 },
[email protected]5153767c2009-12-22 01:52:501144 'Release_Base': {
1145 'abstract': 1,
[email protected]2f80c312009-02-25 21:26:551146 'defines': [
1147 'NDEBUG',
1148 ],
[email protected]1c966092009-08-20 21:19:261149 'xcode_settings': {
1150 'DEAD_CODE_STRIPPING': 'YES', # -Wl,-dead_strip
1151 'GCC_OPTIMIZATION_LEVEL': '<(mac_release_optimization)',
[email protected]ffd984b12009-09-11 19:37:001152 'OTHER_CFLAGS': [ '<@(release_extra_cflags)', ],
[email protected]1c966092009-08-20 21:19:261153 },
[email protected]bb05e452009-10-29 21:24:561154 'msvs_settings': {
[email protected]7e0d664a2009-12-03 21:07:471155 'VCCLCompilerTool': {
1156 'Optimization': '<(win_release_Optimization)',
1157 'RuntimeLibrary': '<(win_release_RuntimeLibrary)',
[email protected]2ae6e022010-05-07 13:19:151158 'conditions': [
1159 # According to MSVS, InlineFunctionExpansion=0 means
1160 # "default inlining", not "/Ob0".
1161 # Thus, we have to handle InlineFunctionExpansion==0 separately.
1162 ['win_release_InlineFunctionExpansion==0', {
1163 'AdditionalOptions': ['/Ob0'],
1164 }],
1165 ['win_release_InlineFunctionExpansion!=""', {
1166 'InlineFunctionExpansion':
1167 '<(win_release_InlineFunctionExpansion)',
1168 }],
1169 ],
[email protected]7e0d664a2009-12-03 21:07:471170 },
[email protected]bb05e452009-10-29 21:24:561171 'VCLinkerTool': {
[email protected]c059c612011-08-08 20:56:341172 # LinkIncremental is a tri-state boolean, where 0 means default
1173 # (i.e., inherit from parent solution), 1 means false, and
1174 # 2 means true.
[email protected]bb05e452009-10-29 21:24:561175 'LinkIncremental': '1',
[email protected]c059c612011-08-08 20:56:341176 # This corresponds to the /PROFILE flag which ensures the PDB
1177 # file contains FIXUP information (growing the PDB file by about
1178 # 5%) but does not otherwise alter the output binary. This
1179 # information is used by the Syzygy optimization tool when
1180 # decomposing the release image.
1181 'Profile': 'true',
[email protected]bb05e452009-10-29 21:24:561182 },
1183 },
[email protected]2f80c312009-02-25 21:26:551184 'conditions': [
[email protected]92822e82009-09-18 14:26:561185 ['release_valgrind_build==0', {
[email protected]14339762011-04-05 07:36:581186 'defines': [
1187 'NVALGRIND',
1188 'DYNAMIC_ANNOTATIONS_ENABLED=0',
1189 ],
[email protected]ee857512010-05-14 08:24:421190 }, {
[email protected]14339762011-04-05 07:36:581191 'defines': [
1192 'DYNAMIC_ANNOTATIONS_ENABLED=1',
1193 'WTF_USE_DYNAMIC_ANNOTATIONS=1',
1194 ],
[email protected]92822e82009-09-18 14:26:561195 }],
[email protected]7e0d664a2009-12-03 21:07:471196 ['win_use_allocator_shim==0', {
1197 'defines': ['NO_TCMALLOC'],
1198 }],
[email protected]bb05e452009-10-29 21:24:561199 ['OS=="linux"', {
1200 'cflags': [
[email protected]ffd984b12009-09-11 19:37:001201 '<@(release_extra_cflags)',
[email protected]bb05e452009-10-29 21:24:561202 ],
1203 }],
[email protected]2f80c312009-02-25 21:26:551204 ],
1205 },
[email protected]5153767c2009-12-22 01:52:501206 'Purify_Base': {
1207 'abstract': 1,
1208 'defines': [
1209 'PURIFY',
1210 'NO_TCMALLOC',
1211 ],
1212 'msvs_settings': {
1213 'VCCLCompilerTool': {
1214 'Optimization': '0',
1215 'RuntimeLibrary': '0',
1216 'BufferSecurityCheck': 'false',
1217 },
1218 'VCLinkerTool': {
1219 'EnableCOMDATFolding': '1',
1220 'LinkIncremental': '1',
1221 },
1222 },
1223 },
1224 #
1225 # Concrete configurations
1226 #
1227 'Debug': {
1228 'inherit_from': ['Common_Base', 'x86_Base', 'Debug_Base'],
1229 },
1230 'Release': {
1231 'inherit_from': ['Common_Base', 'x86_Base', 'Release_Base'],
1232 'conditions': [
1233 ['msvs_use_common_release', {
[email protected]1f9471a2010-01-04 06:40:161234 'includes': ['release.gypi'],
[email protected]5153767c2009-12-22 01:52:501235 }],
1236 ]
1237 },
[email protected]f926fa0a2009-08-04 22:50:131238 'conditions': [
1239 [ 'OS=="win"', {
1240 # TODO(bradnelson): add a gyp mechanism to make this more graceful.
1241 'Purify': {
[email protected]5153767c2009-12-22 01:52:501242 'inherit_from': ['Common_Base', 'x86_Base', 'Release_Base', 'Purify'],
[email protected]ef4fa4072009-12-04 22:46:501243 },
1244 'Debug_x64': {
[email protected]5153767c2009-12-22 01:52:501245 'inherit_from': ['Common_Base', 'x64_Base', 'Debug_Base'],
[email protected]78263c12009-11-01 23:45:301246 },
1247 'Release_x64': {
[email protected]5153767c2009-12-22 01:52:501248 'inherit_from': ['Common_Base', 'x64_Base', 'Release_Base'],
[email protected]78263c12009-11-01 23:45:301249 },
1250 'Purify_x64': {
[email protected]1f9471a2010-01-04 06:40:161251 'inherit_from': ['Common_Base', 'x64_Base', 'Release_Base', 'Purify_Base'],
[email protected]78263c12009-11-01 23:45:301252 },
[email protected]f926fa0a2009-08-04 22:50:131253 }],
1254 ],
[email protected]2f80c312009-02-25 21:26:551255 },
1256 },
1257 'conditions': [
[email protected]79e2336c2011-05-12 18:18:341258 ['os_posix==1 and OS!="mac"', {
[email protected]9d384032009-03-20 23:13:261259 'target_defaults': {
[email protected]5315f2842009-04-28 00:43:271260 # Enable -Werror by default, but put it in a variable so it can
1261 # be disabled in ~/.gyp/include.gypi on the valgrind builders.
1262 'variables': {
[email protected]57e94022011-05-04 15:33:191263 # Use -fno-strict-aliasing, see http://crbug.com/32204
[email protected]ecf52cb82010-01-13 19:25:421264 'no_strict_aliasing%': 1,
[email protected]79e2336c2011-05-12 18:18:341265 'conditions': [
1266 ['OS=="linux"', {
1267 'werror%': '-Werror',
1268 }, { # turn off -Werror on other Unices
1269 'werror%': '',
1270 }],
[email protected]47deeb62009-12-17 14:49:391271 ],
[email protected]5315f2842009-04-28 00:43:271272 },
[email protected]9d384032009-03-20 23:13:261273 'cflags': [
[email protected]1bba09c2009-08-13 12:53:161274 '<(werror)', # See note above about the werror variable.
1275 '-pthread',
1276 '-fno-exceptions',
1277 '-Wall',
[email protected]0fa17082010-03-26 00:48:051278 # TODO(evan): turn this back on once all the builds work.
1279 # '-Wextra',
[email protected]225c8f52010-02-05 22:23:201280 # Don't warn about unused function params. We use those everywhere.
1281 '-Wno-unused-parameter',
1282 # Don't warn about the "struct foo f = {0};" initialization pattern.
1283 '-Wno-missing-field-initializers',
[email protected]1bba09c2009-08-13 12:53:161284 '-D_FILE_OFFSET_BITS=64',
[email protected]3df6e3a2010-01-21 20:23:121285 # Don't export any symbols (for example, to plugins we dlopen()).
1286 # Note: this is *required* to make some plugins work.
1287 '-fvisibility=hidden',
[email protected]7ca6ce12010-09-15 23:39:351288 '-pipe',
[email protected]8a2fcba2009-07-29 00:52:241289 ],
1290 'cflags_cc': [
[email protected]832d0212009-10-28 19:12:221291 '-fno-rtti',
[email protected]8a2fcba2009-07-29 00:52:241292 '-fno-threadsafe-statics',
[email protected]f5986c42009-11-17 18:39:361293 # Make inline functions have hidden visiblity by default.
1294 # Surprisingly, not covered by -fvisibility=hidden.
1295 '-fvisibility-inlines-hidden',
[email protected]554abd902011-07-25 04:03:171296 # GCC turns on -Wsign-compare for C++ under -Wall, but clang doesn't,
1297 # so we specify it explicitly.
1298 # TODO(fischman): remove this if http://llvm.org/PR10448 obsoletes it.
[email protected]d16bd642011-07-25 23:59:181299 # http://code.google.com/p/chromium/issues/detail?id=90453
[email protected]554abd902011-07-25 04:03:171300 '-Wsign-compare',
[email protected]9d384032009-03-20 23:13:261301 ],
[email protected]a6cf87e2009-04-03 04:07:381302 'ldflags': [
[email protected]138241f2010-03-30 23:53:101303 '-pthread', '-Wl,-z,noexecstack',
[email protected]9d384032009-03-20 23:13:261304 ],
[email protected]3aacaf952009-04-02 15:34:091305 'configurations': {
[email protected]5153767c2009-12-22 01:52:501306 'Debug_Base': {
[email protected]c5bdc032009-04-20 19:11:311307 'variables': {
1308 'debug_optimize%': '0',
1309 },
[email protected]3aacaf952009-04-02 15:34:091310 'defines': [
1311 '_DEBUG',
1312 ],
1313 'cflags': [
[email protected]9cb5cc702011-02-01 19:56:041314 '-O>(debug_optimize)',
[email protected]3aacaf952009-04-02 15:34:091315 '-g',
1316 ],
[email protected]5315f2842009-04-28 00:43:271317 },
[email protected]5153767c2009-12-22 01:52:501318 'Release_Base': {
[email protected]740e2de2009-07-21 11:41:011319 'variables': {
1320 'release_optimize%': '2',
[email protected]1dd529642010-05-15 01:02:511321 # Binaries become big and gold is unable to perform GC
1322 # and remove unused sections for some of test targets
1323 # on 32 bit platform.
1324 # (This is currently observed only in chromeos valgrind bots)
1325 # The following flag is to disable --gc-sections linker
1326 # option for these bots.
1327 'no_gc_sections%': 0,
[email protected]409dceef2011-05-10 19:49:121328
1329 # TODO(bradnelson): reexamine how this is done if we change the
1330 # expansion of configurations
1331 'release_valgrind_build%': 0,
[email protected]740e2de2009-07-21 11:41:011332 },
[email protected]3aacaf952009-04-02 15:34:091333 'cflags': [
[email protected]9cb5cc702011-02-01 19:56:041334 '-O>(release_optimize)',
[email protected]d8cc3a62009-04-08 18:29:531335 # Don't emit the GCC version ident directives, they just end up
1336 # in the .comment section taking up binary size.
1337 '-fno-ident',
1338 # Put data and code in their own sections, so that unused symbols
1339 # can be removed at link time with --gc-sections.
1340 '-fdata-sections',
1341 '-ffunction-sections',
[email protected]3aacaf952009-04-02 15:34:091342 ],
[email protected]c902f2c2010-08-06 20:04:181343 'ldflags': [
1344 # Specifically tell the linker to perform optimizations.
1345 # See http://lwn.net/Articles/192624/ .
1346 '-Wl,-O1',
[email protected]27c2e492010-08-06 22:55:221347 '-Wl,--as-needed',
[email protected]c902f2c2010-08-06 20:04:181348 ],
[email protected]1dd529642010-05-15 01:02:511349 'conditions' : [
1350 ['no_gc_sections==0', {
1351 'ldflags': [
1352 '-Wl,--gc-sections',
1353 ],
1354 }],
[email protected]ecf7b6482010-10-13 09:15:201355 ['clang==1', {
1356 'cflags!': [
1357 '-fno-ident',
1358 ],
1359 }],
[email protected]7664ab32011-02-01 23:35:251360 ['profiling==1', {
1361 'cflags': [
1362 '-fno-omit-frame-pointer',
1363 '-g',
1364 ],
1365 }],
[email protected]c75f33e42011-05-04 18:11:521366 # At gyp time, we test the linker for ICF support; this flag
1367 # is then provided to us by gyp. (Currently only gold supports
1368 # an --icf flag.)
[email protected]16d71b0d2011-06-22 00:43:531369 # There seems to be a conflict of --icf and -pie in gold which
1370 # can generate crashy binaries. As a security measure, -pie
1371 # takes precendence for now.
[email protected]409dceef2011-05-10 19:49:121372 ['LINKER_SUPPORTS_ICF==1 and release_valgrind_build==0', {
[email protected]f2fcf4df72011-06-03 20:05:461373 'target_conditions': [
1374 ['_toolset=="target"', {
1375 'ldflags': [
[email protected]16d71b0d2011-06-22 00:43:531376 #'-Wl,--icf=safe',
1377 '-Wl,--icf=none',
[email protected]f2fcf4df72011-06-03 20:05:461378 ]
1379 }]
[email protected]c75f33e42011-05-04 18:11:521380 ]
1381 }],
[email protected]1dd529642010-05-15 01:02:511382 ]
[email protected]3aacaf952009-04-02 15:34:091383 },
1384 },
[email protected]601b540222009-04-03 21:32:041385 'variants': {
1386 'coverage': {
1387 'cflags': ['-fprofile-arcs', '-ftest-coverage'],
1388 'ldflags': ['-fprofile-arcs'],
1389 },
1390 'profile': {
1391 'cflags': ['-pg', '-g'],
1392 'ldflags': ['-pg'],
1393 },
1394 'symbols': {
1395 'cflags': ['-g'],
1396 },
1397 },
[email protected]606116d22009-05-06 22:38:231398 'conditions': [
[email protected]7e8eb7612009-07-29 15:56:001399 [ 'target_arch=="ia32"', {
[email protected]606116d22009-05-06 22:38:231400 'asflags': [
1401 # Needed so that libs with .s files (e.g. libicudata.a)
1402 # are compatible with the general 32-bit-ness.
1403 '-32',
1404 ],
1405 # All floating-point computations on x87 happens in 80-bit
1406 # precision. Because the C and C++ language standards allow
1407 # the compiler to keep the floating-point values in higher
1408 # precision than what's specified in the source and doing so
1409 # is more efficient than constantly rounding up to 64-bit or
1410 # 32-bit precision as specified in the source, the compiler,
1411 # especially in the optimized mode, tries very hard to keep
1412 # values in x87 floating-point stack (in 80-bit precision)
1413 # as long as possible. This has important side effects, that
1414 # the real value used in computation may change depending on
1415 # how the compiler did the optimization - that is, the value
1416 # kept in 80-bit is different than the value rounded down to
1417 # 64-bit or 32-bit. There are possible compiler options to make
1418 # this behavior consistent (e.g. -ffloat-store would keep all
1419 # floating-values in the memory, thus force them to be rounded
1420 # to its original precision) but they have significant runtime
1421 # performance penalty.
1422 #
1423 # -mfpmath=sse -msse2 makes the compiler use SSE instructions
1424 # which keep floating-point values in SSE registers in its
1425 # native precision (32-bit for single precision, and 64-bit for
1426 # double precision values). This means the floating-point value
1427 # used during computation does not change depending on how the
1428 # compiler optimized the code, since the value is always kept
1429 # in its specified precision.
[email protected]ffde7932009-05-29 00:39:061430 'conditions': [
[email protected]ac120ff2010-04-28 02:14:221431 ['branding=="Chromium" and disable_sse2==0', {
[email protected]ffde7932009-05-29 00:39:061432 'cflags': [
1433 '-march=pentium4',
1434 '-msse2',
1435 '-mfpmath=sse',
1436 ],
1437 }],
[email protected]06c756182010-04-27 18:31:311438 # ChromeOS targets Pinetrail, which is sse3, but most of the
[email protected]0183dbb2010-04-16 02:00:441439 # benefit comes from sse2 so this setting allows ChromeOS
1440 # to build on other CPUs. In the future -march=atom would help
1441 # but requires a newer compiler.
[email protected]ac120ff2010-04-28 02:14:221442 ['chromeos==1 and disable_sse2==0', {
[email protected]0183dbb2010-04-16 02:00:441443 'cflags': [
1444 '-msse2',
1445 ],
1446 }],
[email protected]34799f9d2010-07-08 17:51:331447 # Install packages have started cropping up with
1448 # different headers between the 32-bit and 64-bit
1449 # versions, so we have to shadow those differences off
1450 # and make sure a 32-bit-on-64-bit build picks up the
1451 # right files.
1452 ['host_arch!="ia32"', {
1453 'include_dirs+': [
1454 '/usr/include32',
1455 ],
1456 }],
[email protected]ffde7932009-05-29 00:39:061457 ],
[email protected]dc259ce52010-04-13 04:03:101458 # -mmmx allows mmintrin.h to be used for mmx intrinsics.
1459 # video playback is mmx and sse2 optimized.
[email protected]606116d22009-05-06 22:38:231460 'cflags': [
1461 '-m32',
[email protected]dc259ce52010-04-13 04:03:101462 '-mmmx',
[email protected]1c6560af2009-07-14 11:02:161463 ],
[email protected]606116d22009-05-06 22:38:231464 'ldflags': [
1465 '-m32',
1466 ],
1467 }],
[email protected]3dda8a962009-08-10 18:58:071468 ['target_arch=="arm"', {
[email protected]77c1b29392009-12-04 06:21:291469 'target_conditions': [
1470 ['_toolset=="target"', {
1471 'cflags_cc': [
1472 # The codesourcery arm-2009q3 toolchain warns at that the ABI
1473 # has changed whenever it encounters a varargs function. This
1474 # silences those warnings, as they are not helpful and
1475 # clutter legitimate warnings.
1476 '-Wno-abi',
1477 ],
1478 'conditions': [
1479 ['arm_thumb == 1', {
1480 'cflags': [
1481 '-mthumb',
[email protected]77c1b29392009-12-04 06:21:291482 ]
1483 }],
1484 ['armv7==1', {
[email protected]dc9711f2009-11-13 19:30:251485 'cflags': [
1486 '-march=armv7-a',
1487 '-mtune=cortex-a8',
[email protected]dc9711f2009-11-13 19:30:251488 '-mfloat-abi=softfp',
1489 ],
[email protected]eafc0b452010-02-26 21:53:431490 'conditions': [
1491 ['arm_neon==1', {
1492 'cflags': [ '-mfpu=neon', ],
1493 }, {
[email protected]53e0f642010-03-05 01:41:561494 'cflags': [ '-mfpu=<(arm_fpu)', ],
[email protected]eafc0b452010-02-26 21:53:431495 }]
1496 ],
[email protected]dc9711f2009-11-13 19:30:251497 }],
[email protected]3dda8a962009-08-10 18:58:071498 ],
1499 }],
1500 ],
1501 }],
[email protected]2fb843b2010-08-12 02:11:081502 ['linux_fpic==1', {
[email protected]c76723a2010-01-25 23:10:581503 'cflags': [
1504 '-fPIC',
1505 ],
1506 }],
[email protected]ee28c9f2009-09-04 01:53:011507 ['sysroot!=""', {
[email protected]fd36ce822009-10-28 20:13:571508 'target_conditions': [
1509 ['_toolset=="target"', {
1510 'cflags': [
1511 '--sysroot=<(sysroot)',
1512 ],
1513 'ldflags': [
1514 '--sysroot=<(sysroot)',
1515 ],
1516 }]]
[email protected]ee28c9f2009-09-04 01:53:011517 }],
[email protected]58680ce2010-09-18 00:09:151518 ['clang==1', {
[email protected]18ca15a2011-08-10 03:07:121519 'cflags': [
1520 '-Wheader-hygiene',
1521 # Clang spots more unused functions.
1522 '-Wno-unused-function',
1523 # Don't die on dtoa code that uses a char as an array index.
1524 '-Wno-char-subscripts',
1525 # Survive EXPECT_EQ(unnamed_enum, unsigned int) -- see
1526 # http://code.google.com/p/googletest/source/detail?r=446 .
1527 # TODO(thakis): Use -isystem instead (http://crbug.com/58751 )
1528 '-Wno-unnamed-type-template-args',
1529 ],
1530 'cflags!': [
1531 # Clang doesn't seem to know know this flag.
1532 '-mfpmath=sse',
1533 ],
[email protected]58680ce2010-09-18 00:09:151534 }],
[email protected]5d451ad2011-02-11 16:43:461535 ['clang==1 and clang_use_chrome_plugins==1', {
1536 'target_conditions': [
1537 ['_toolset=="target"', {
1538 'cflags': [
1539 '<(clang_chrome_plugins_flags)',
1540 ],
1541 }]],
1542 }],
[email protected]5e781232011-01-28 02:57:591543 ['clang==1 and clang_load!="" and clang_add_plugin!=""', {
[email protected]3e40c882011-02-10 21:03:351544 'target_conditions': [
1545 ['_toolset=="target"', {
1546 'cflags': [
1547 '-Xclang', '-load', '-Xclang', '<(clang_load)',
1548 '-Xclang', '-add-plugin', '-Xclang', '<(clang_add_plugin)',
1549 ],
1550 }]],
[email protected]5e781232011-01-28 02:57:591551 }],
[email protected]cc4219a2009-08-14 05:30:521552 ['no_strict_aliasing==1', {
1553 'cflags': [
1554 '-fno-strict-aliasing',
1555 ],
1556 }],
[email protected]cbd5fd52009-08-26 00:14:271557 ['linux_breakpad==1', {
[email protected]c87efd42010-08-26 18:28:171558 'cflags': [ '-g' ],
[email protected]cbd5fd52009-08-26 00:14:271559 'defines': ['USE_LINUX_BREAKPAD'],
1560 }],
[email protected]d8b60602010-03-26 09:41:221561 ['linux_use_heapchecker==1', {
1562 'variables': {'linux_use_tcmalloc%': 1},
1563 }],
[email protected]61a9b2d82010-02-26 00:31:081564 ['linux_use_tcmalloc==0', {
1565 'defines': ['NO_TCMALLOC'],
[email protected]01699e22009-11-11 19:24:241566 }],
[email protected]d8b60602010-03-26 09:41:221567 ['linux_use_heapchecker==0', {
1568 'defines': ['NO_HEAPCHECKER'],
1569 }],
[email protected]64e2d4a42010-08-27 10:13:211570 ['linux_keep_shadow_stacks==1', {
1571 'defines': ['KEEP_SHADOW_STACKS'],
1572 'cflags': ['-finstrument-functions'],
1573 }],
[email protected]606116d22009-05-06 22:38:231574 ],
[email protected]9d384032009-03-20 23:13:261575 },
1576 }],
[email protected]c51e8d52009-12-11 20:04:061577 # FreeBSD-specific options; note that most FreeBSD options are set above,
1578 # with Linux.
1579 ['OS=="freebsd"', {
1580 'target_defaults': {
1581 'ldflags': [
1582 '-Wl,--no-keep-memory',
1583 ],
1584 },
1585 }],
[email protected]93f21e42010-04-01 00:35:151586 ['OS=="solaris"', {
1587 'cflags!': ['-fvisibility=hidden'],
1588 'cflags_cc!': ['-fvisibility-inlines-hidden'],
1589 }],
[email protected]2f80c312009-02-25 21:26:551590 ['OS=="mac"', {
1591 'target_defaults': {
[email protected]24700642009-06-01 16:01:201592 'variables': {
[email protected]9a5e72862010-09-02 16:16:581593 # These should be 'mac_real_dsym%' and 'mac_strip%', but there
1594 # seems to be a bug with % in variables that are intended to be
1595 # set to different values in different targets, like these two.
1596 'mac_strip': 1, # Strip debugging symbols from the target.
[email protected]24700642009-06-01 16:01:201597 'mac_real_dsym': 0, # Fake .dSYMs are fine in most cases.
1598 },
[email protected]d92c7c012009-03-19 19:26:421599 'mac_bundle': 0,
[email protected]2f80c312009-02-25 21:26:551600 'xcode_settings': {
1601 'ALWAYS_SEARCH_USER_PATHS': 'NO',
[email protected]ab2956372009-08-13 18:11:041602 'GCC_C_LANGUAGE_STANDARD': 'c99', # -std=c99
1603 'GCC_CW_ASM_SYNTAX': 'NO', # No -fasm-blocks
1604 'GCC_DYNAMIC_NO_PIC': 'NO', # No -mdynamic-no-pic
1605 # (Equivalent to -fPIC)
1606 'GCC_ENABLE_CPP_EXCEPTIONS': 'NO', # -fno-exceptions
1607 'GCC_ENABLE_CPP_RTTI': 'NO', # -fno-rtti
1608 'GCC_ENABLE_PASCAL_STRINGS': 'NO', # No -mpascal-strings
[email protected]3224dcd2009-09-16 17:31:251609 # GCC_INLINES_ARE_PRIVATE_EXTERN maps to -fvisibility-inlines-hidden
1610 'GCC_INLINES_ARE_PRIVATE_EXTERN': 'YES',
[email protected]ab2956372009-08-13 18:11:041611 'GCC_OBJC_CALL_CXX_CDTORS': 'YES', # -fobjc-call-cxx-cdtors
1612 'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES', # -fvisibility=hidden
1613 'GCC_THREADSAFE_STATICS': 'NO', # -fno-threadsafe-statics
1614 'GCC_TREAT_WARNINGS_AS_ERRORS': 'YES', # -Werror
[email protected]2f80c312009-02-25 21:26:551615 'GCC_VERSION': '4.2',
[email protected]ab2956372009-08-13 18:11:041616 'GCC_WARN_ABOUT_MISSING_NEWLINE': 'YES', # -Wnewline-eof
[email protected]3224dcd2009-09-16 17:31:251617 # MACOSX_DEPLOYMENT_TARGET maps to -mmacosx-version-min
1618 'MACOSX_DEPLOYMENT_TARGET': '<(mac_deployment_target)',
[email protected]ab2956372009-08-13 18:11:041619 'PREBINDING': 'NO', # No -Wl,-prebind
[email protected]2f80c312009-02-25 21:26:551620 'USE_HEADERMAP': 'NO',
[email protected]57e94022011-05-04 15:33:191621 'OTHER_CFLAGS': [
1622 '-fno-strict-aliasing', # See http://crbug.com/32204
1623 ],
[email protected]080e86f2010-06-21 15:19:041624 'WARNING_CFLAGS': [
1625 '-Wall',
1626 '-Wendif-labels',
1627 '-Wextra',
1628 # Don't warn about unused function parameters.
1629 '-Wno-unused-parameter',
1630 # Don't warn about the "struct foo f = {0};" initialization
1631 # pattern.
1632 '-Wno-missing-field-initializers',
1633 ],
[email protected]b3fb8092009-03-12 19:09:241634 'conditions': [
1635 ['chromium_mac_pch', {'GCC_PRECOMPILE_PREFIX_HEADER': 'YES'},
[email protected]9543af052009-09-15 22:42:591636 {'GCC_PRECOMPILE_PREFIX_HEADER': 'NO'}
1637 ],
[email protected]66733172010-09-22 00:09:281638 ['clang==1', {
1639 'WARNING_CFLAGS': [
[email protected]7f8d486f2011-04-05 19:49:071640 '-Wheader-hygiene',
[email protected]66733172010-09-22 00:09:281641 # Don't die on dtoa code that uses a char as an array index.
1642 # This is required solely for base/third_party/dmg_fp/dtoa.cc.
1643 '-Wno-char-subscripts',
[email protected]25d3bb722010-11-22 14:31:451644 # Clang spots more unused functions.
1645 '-Wno-unused-function',
[email protected]0fa0fbc2010-10-12 04:32:051646 # Survive EXPECT_EQ(unnamed_enum, unsigned int) -- see
1647 # http://code.google.com/p/googletest/source/detail?r=446 .
1648 # TODO(thakis): Use -isystem instead (http://crbug.com/58751 ).
1649 '-Wno-unnamed-type-template-args',
[email protected]d53680932011-06-08 16:40:061650 # TODO(thakis): Reenable once the one instance this warns on
1651 # is fixed.
1652 '-Wno-parentheses',
[email protected]66733172010-09-22 00:09:281653 ],
1654 }],
[email protected]5d451ad2011-02-11 16:43:461655 ['clang==1 and clang_use_chrome_plugins==1', {
1656 'OTHER_CFLAGS': [
1657 '<(clang_chrome_plugins_flags)',
1658 ],
1659 }],
[email protected]5e781232011-01-28 02:57:591660 ['clang==1 and clang_load!="" and clang_add_plugin!=""', {
1661 'OTHER_CFLAGS': [
1662 '-Xclang', '-load', '-Xclang', '<(clang_load)',
1663 '-Xclang', '-add-plugin', '-Xclang', '<(clang_add_plugin)',
1664 ],
1665 }],
[email protected]b3fb8092009-03-12 19:09:241666 ],
[email protected]2f80c312009-02-25 21:26:551667 },
1668 'target_conditions': [
[email protected]2f80c312009-02-25 21:26:551669 ['_type!="static_library"', {
[email protected]5d7dc972009-04-16 15:30:461670 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-search_paths_first']},
1671 }],
1672 ['_mac_bundle', {
1673 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-ObjC']},
[email protected]87fde4a2009-02-28 00:50:081674 }],
[email protected]6a0242bc2011-07-01 00:34:461675 ['_type=="executable" and release_valgrind_build==0', {
1676 # Turn on position-independence (ASLR) for executables. When PIE
1677 # is on for the Chrome executables, the framework will also be
1678 # subject to ASLR.
1679 # Don't do this when building for Valgrind because Valgrind
1680 # doesn't understand slide. TODO: Make Valgrind on Mac OS X
1681 # understand slide, and get rid of the Valgrind check.
1682 'xcode_settings': {
1683 'OTHER_LDFLAGS': [
1684 '-Wl,-pie', # Position-independent executable (MH_PIE)
1685 ],
1686 },
1687 }],
[email protected]9a5e72862010-09-02 16:16:581688 ['(_type=="executable" or _type=="shared_library" or \
1689 _type=="loadable_module") and mac_strip!=0', {
[email protected]24700642009-06-01 16:01:201690 'target_conditions': [
1691 ['mac_real_dsym == 1', {
1692 # To get a real .dSYM bundle produced by dsymutil, set the
1693 # debug information format to dwarf-with-dsym. Since
1694 # strip_from_xcode will not be used, set Xcode to do the
1695 # stripping as well.
1696 'configurations': {
[email protected]5153767c2009-12-22 01:52:501697 'Release_Base': {
[email protected]24700642009-06-01 16:01:201698 'xcode_settings': {
1699 'DEBUG_INFORMATION_FORMAT': 'dwarf-with-dsym',
1700 'DEPLOYMENT_POSTPROCESSING': 'YES',
1701 'STRIP_INSTALLED_PRODUCT': 'YES',
[email protected]e14a9f92009-08-05 19:26:071702 'target_conditions': [
[email protected]c2111422010-06-01 18:30:251703 ['_type=="shared_library" or _type=="loadable_module"', {
[email protected]e14a9f92009-08-05 19:26:071704 # The Xcode default is to strip debugging symbols
1705 # only (-S). Local symbols should be stripped as
1706 # well, which will be handled by -x. Xcode will
1707 # continue to insert -S when stripping even when
1708 # additional flags are added with STRIPFLAGS.
1709 'STRIPFLAGS': '-x',
[email protected]c2111422010-06-01 18:30:251710 }], # _type=="shared_library" or _type=="loadable_module"'
[email protected]e14a9f92009-08-05 19:26:071711 ], # target_conditions
1712 }, # xcode_settings
1713 }, # configuration "Release"
1714 }, # configurations
[email protected]24700642009-06-01 16:01:201715 }, { # mac_real_dsym != 1
1716 # To get a fast fake .dSYM bundle, use a post-build step to
1717 # produce the .dSYM and strip the executable. strip_from_xcode
1718 # only operates in the Release configuration.
1719 'postbuilds': [
1720 {
1721 'variables': {
1722 # Define strip_from_xcode in a variable ending in _path
1723 # so that gyp understands it's a path and performs proper
1724 # relativization during dict merging.
1725 'strip_from_xcode_path': 'mac/strip_from_xcode',
1726 },
1727 'postbuild_name': 'Strip If Needed',
1728 'action': ['<(strip_from_xcode_path)'],
1729 },
[email protected]e14a9f92009-08-05 19:26:071730 ], # postbuilds
1731 }], # mac_real_dsym
1732 ], # target_conditions
[email protected]9a5e72862010-09-02 16:16:581733 }], # (_type=="executable" or _type=="shared_library" or
1734 # _type=="loadable_module") and mac_strip!=0
[email protected]e14a9f92009-08-05 19:26:071735 ], # target_conditions
1736 }, # target_defaults
1737 }], # OS=="mac"
[email protected]2f80c312009-02-25 21:26:551738 ['OS=="win"', {
1739 'target_defaults': {
1740 'defines': [
1741 '_WIN32_WINNT=0x0600',
1742 'WINVER=0x0600',
1743 'WIN32',
1744 '_WINDOWS',
[email protected]2f80c312009-02-25 21:26:551745 'NOMINMAX',
1746 '_CRT_RAND_S',
1747 'CERT_CHAIN_PARA_HAS_EXTRA_FIELDS',
1748 'WIN32_LEAN_AND_MEAN',
[email protected]7a812dd62010-06-30 18:52:271749 '_ATL_NO_OPENGL',
[email protected]adfb98c2009-06-23 20:08:451750 '_HAS_TR1=0',
[email protected]2f80c312009-02-25 21:26:551751 ],
[email protected]8974e042010-06-21 18:06:521752 'conditions': [
1753 ['component=="static_library"', {
1754 'defines': [
1755 '_HAS_EXCEPTIONS=0',
1756 ],
1757 }],
[email protected]3e2648a2011-03-21 20:58:501758 ['secure_atl', {
1759 'defines': [
1760 '_SECURE_ATL',
1761 ],
1762 }],
[email protected]8974e042010-06-21 18:06:521763 ],
[email protected]5b5ca7cb2009-07-20 23:00:201764 'msvs_system_include_dirs': [
[email protected]998b5152009-12-12 22:19:521765 '<(DEPTH)/third_party/platformsdk_win7/files/Include',
[email protected]a78da50e2010-06-09 21:31:371766 '<(DEPTH)/third_party/directxsdk/files/Include',
[email protected]2f80c312009-02-25 21:26:551767 '$(VSInstallDir)/VC/atlmfc/include',
1768 ],
[email protected]a8d99cef2009-08-26 20:47:491769 'msvs_cygwin_dirs': ['<(DEPTH)/third_party/cygwin'],
[email protected]942c3a60f2011-05-03 02:04:111770 'msvs_disabled_warnings': [4351, 4396, 4503, 4819,
1771 # TODO(maruel): These warnings are level 4. They will be slowly
1772 # removed as code is fixed.
1773 4100, 4121, 4125, 4127, 4130, 4131, 4189, 4201, 4238, 4244, 4245,
1774 4310, 4355, 4428, 4481, 4505, 4510, 4512, 4530, 4610, 4611, 4701,
1775 4702, 4706,
1776 ],
[email protected]2f80c312009-02-25 21:26:551777 'msvs_settings': {
1778 'VCCLCompilerTool': {
1779 'MinimalRebuild': 'false',
[email protected]2f80c312009-02-25 21:26:551780 'BufferSecurityCheck': 'true',
1781 'EnableFunctionLevelLinking': 'true',
1782 'RuntimeTypeInfo': 'false',
[email protected]942c3a60f2011-05-03 02:04:111783 'WarningLevel': '4',
[email protected]2f80c312009-02-25 21:26:551784 'WarnAsError': 'true',
1785 'DebugInformationFormat': '3',
[email protected]3fef6e62009-07-31 19:58:581786 'conditions': [
[email protected]3e2648a2011-03-21 20:58:501787 ['msvs_multi_core_compile', {
[email protected]1f9471a2010-01-04 06:40:161788 'AdditionalOptions': ['/MP'],
[email protected]912c55c2009-07-31 23:33:551789 }],
[email protected]3e2648a2011-03-21 20:58:501790 ['MSVS_VERSION=="2005e"', {
1791 'AdditionalOptions': ['/w44068'], # Unknown pragma to 4 (ATL)
1792 }],
[email protected]8974e042010-06-21 18:06:521793 ['component=="shared_library"', {
1794 'ExceptionHandling': '1', # /EHsc
1795 }, {
1796 'ExceptionHandling': '0',
1797 }],
[email protected]3fef6e62009-07-31 19:58:581798 ],
[email protected]2f80c312009-02-25 21:26:551799 },
1800 'VCLibrarianTool': {
[email protected]1f9471a2010-01-04 06:40:161801 'AdditionalOptions': ['/ignore:4221'],
[email protected]a78da50e2010-06-09 21:31:371802 'AdditionalLibraryDirectories': [
1803 '<(DEPTH)/third_party/platformsdk_win7/files/Lib',
1804 '<(DEPTH)/third_party/directxsdk/files/Lib/x86',
1805 ],
[email protected]2f80c312009-02-25 21:26:551806 },
1807 'VCLinkerTool': {
[email protected]2f80c312009-02-25 21:26:551808 'AdditionalDependencies': [
1809 'wininet.lib',
[email protected]b1d8c252011-01-13 20:27:501810 'dnsapi.lib',
[email protected]2f80c312009-02-25 21:26:551811 'version.lib',
1812 'msimg32.lib',
1813 'ws2_32.lib',
1814 'usp10.lib',
1815 'psapi.lib',
[email protected]96fd0032009-04-24 00:13:081816 'dbghelp.lib',
[email protected]dfdf7ee2011-04-28 18:51:481817 'winmm.lib',
1818 'shlwapi.lib',
[email protected]2f80c312009-02-25 21:26:551819 ],
[email protected]4de39f82011-03-28 12:01:291820 'conditions': [
[email protected]3e2648a2011-03-21 20:58:501821 ['msvs_express', {
1822 # Explicitly required when using the ATL with express
1823 'AdditionalDependencies': [
1824 'atlthunk.lib',
1825 ],
1826 }],
1827 ['MSVS_VERSION=="2005e"', {
1828 # Non-express versions link automatically to these
1829 'AdditionalDependencies': [
1830 'advapi32.lib',
1831 'comdlg32.lib',
1832 'ole32.lib',
1833 'shell32.lib',
1834 'user32.lib',
1835 'winspool.lib',
1836 ],
1837 }],
1838 ],
[email protected]a78da50e2010-06-09 21:31:371839 'AdditionalLibraryDirectories': [
1840 '<(DEPTH)/third_party/platformsdk_win7/files/Lib',
1841 '<(DEPTH)/third_party/directxsdk/files/Lib/x86',
1842 ],
[email protected]2f80c312009-02-25 21:26:551843 'GenerateDebugInformation': 'true',
1844 'MapFileName': '$(OutDir)\\$(TargetName).map',
1845 'ImportLibrary': '$(OutDir)\\lib\\$(TargetName).lib',
[email protected]2f80c312009-02-25 21:26:551846 'FixedBaseAddress': '1',
[email protected]825ff8d2009-05-22 01:40:481847 # SubSystem values:
1848 # 0 == not set
1849 # 1 == /SUBSYSTEM:CONSOLE
1850 # 2 == /SUBSYSTEM:WINDOWS
1851 # Most of the executables we'll ever create are tests
1852 # and utilities with console output.
1853 'SubSystem': '1',
[email protected]2f80c312009-02-25 21:26:551854 },
1855 'VCMIDLTool': {
1856 'GenerateStublessProxies': 'true',
1857 'TypeLibraryName': '$(InputName).tlb',
1858 'OutputDirectory': '$(IntDir)',
1859 'HeaderFileName': '$(InputName).h',
1860 'DLLDataFileName': 'dlldata.c',
1861 'InterfaceIdentifierFileName': '$(InputName)_i.c',
1862 'ProxyFileName': '$(InputName)_p.c',
1863 },
1864 'VCResourceCompilerTool': {
1865 'Culture' : '1033',
[email protected]4d91cbc2010-05-07 20:41:381866 'AdditionalIncludeDirectories': [
1867 '<(DEPTH)',
1868 '<(SHARED_INTERMEDIATE_DIR)',
1869 ],
[email protected]2f80c312009-02-25 21:26:551870 },
1871 },
1872 },
1873 }],
[email protected]79e2336c2011-05-12 18:18:341874 ['disable_nacl==1', {
[email protected]d8c7cbcc2009-10-02 19:00:311875 'target_defaults': {
1876 'defines': [
1877 'DISABLE_NACL',
1878 ],
1879 },
1880 }],
[email protected]cfbf9bc2009-12-07 22:07:561881 ['OS=="win" and msvs_use_common_linker_extras', {
[email protected]48c7af72009-07-03 22:00:191882 'target_defaults': {
1883 'msvs_settings': {
1884 'VCLinkerTool': {
[email protected]48c7af72009-07-03 22:00:191885 'DelayLoadDLLs': [
1886 'dbghelp.dll',
1887 'dwmapi.dll',
1888 'uxtheme.dll',
1889 ],
1890 },
1891 },
[email protected]ef4fa4072009-12-04 22:46:501892 'configurations': {
[email protected]5153767c2009-12-22 01:52:501893 'x86_Base': {
[email protected]ef4fa4072009-12-04 22:46:501894 'msvs_settings': {
1895 'VCLinkerTool': {
[email protected]1f9471a2010-01-04 06:40:161896 'AdditionalOptions': [
1897 '/safeseh',
1898 '/dynamicbase',
1899 '/ignore:4199',
1900 '/ignore:4221',
1901 '/nxcompat',
1902 ],
[email protected]ef4fa4072009-12-04 22:46:501903 },
1904 },
1905 },
[email protected]5153767c2009-12-22 01:52:501906 'x64_Base': {
[email protected]ef4fa4072009-12-04 22:46:501907 'msvs_settings': {
1908 'VCLinkerTool': {
[email protected]1f9471a2010-01-04 06:40:161909 'AdditionalOptions': [
[email protected]ef4fa4072009-12-04 22:46:501910 # safeseh is not compatible with x64
[email protected]1f9471a2010-01-04 06:40:161911 '/dynamicbase',
1912 '/ignore:4199',
1913 '/ignore:4221',
1914 '/nxcompat',
1915 ],
[email protected]ef4fa4072009-12-04 22:46:501916 },
1917 },
1918 },
1919 },
[email protected]48c7af72009-07-03 22:00:191920 },
1921 }],
[email protected]9821d0d2010-04-16 22:40:371922 ['enable_new_npdevice_api==1', {
1923 'target_defaults': {
1924 'defines': [
1925 'ENABLE_NEW_NPDEVICE_API',
1926 ],
1927 },
1928 }],
[email protected]2f80c312009-02-25 21:26:551929 ],
1930 'xcode_settings': {
[email protected]0c8ab452009-11-06 21:57:501931 # DON'T ADD ANYTHING NEW TO THIS BLOCK UNLESS YOU REALLY REALLY NEED IT!
1932 # This block adds *project-wide* configuration settings to each project
1933 # file. It's almost always wrong to put things here. Specify your
1934 # custom xcode_settings in target_defaults to add them to targets instead.
1935
1936 # In an Xcode Project Info window, the "Base SDK for All Configurations"
1937 # setting sets the SDK on a project-wide basis. In order to get the
1938 # configured SDK to show properly in the Xcode UI, SDKROOT must be set
1939 # here at the project level.
1940 'SDKROOT': 'macosx<(mac_sdk)', # -isysroot
1941
[email protected]2f80c312009-02-25 21:26:551942 # The Xcode generator will look for an xcode_settings section at the root
1943 # of each dict and use it to apply settings on a file-wide basis. Most
1944 # settings should not be here, they should be in target-specific
1945 # xcode_settings sections, or better yet, should use non-Xcode-specific
1946 # settings in target dicts. SYMROOT is a special case, because many other
1947 # Xcode variables depend on it, including variables such as
1948 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something
1949 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the
1950 # files to appear (when present) in the UI as actual files and not red
1951 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR,
1952 # and therefore SYMROOT, needs to be set at the project level.
[email protected]bfa24b962009-03-02 00:16:161953 'SYMROOT': '<(DEPTH)/xcodebuild',
[email protected]2f80c312009-02-25 21:26:551954 },
[email protected]ee28c9f2009-09-04 01:53:011955}