blob: c50b17543e0ae1e836db73e094b993289e369c49 [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]e72e55b2011-01-06 22:19:3093
[email protected]8fb0ef02011-05-20 00:53:5094 # We used to provide a variable for changing how libraries were built.
95 # This variable remains until we can clean up all the users.
96 # This needs to be one nested variables dict in so that dependent
97 # gyp files can make use of it in their outer variables. (Yikes!)
98 # http://code.google.com/p/chromium/issues/detail?id=83308
99 'library%': 'static_library',
100
[email protected]e14a9f92009-08-05 19:26:07101 # Override branding to select the desired branding flavor.
102 'branding%': 'Chromium',
103
104 # Override buildtype to select the desired build flavor.
105 # Dev - everyday build for development/testing
106 # Official - release build (generally implies additional processing)
107 # TODO(mmoss) Once 'buildtype' is fully supported (e.g. Windows gyp
108 # conversion is done), some of the things which are now controlled by
109 # 'branding', such as symbol generation, will need to be refactored based
110 # on 'buildtype' (i.e. we don't care about saving symbols for non-Official
111 # builds).
112 'buildtype%': 'Dev',
[email protected]cbd5fd52009-08-26 00:14:27113
[email protected]e72e55b2011-01-06 22:19:30114 # Default architecture we're building for is the architecture we're
115 # building on.
116 'target_arch%': '<(host_arch)',
[email protected]b3f23ba2010-04-26 22:58:17117
[email protected]e72e55b2011-01-06 22:19:30118 # This variable tells WebCore.gyp and JavaScriptCore.gyp whether they are
119 # are built under a chromium full build (1) or a webkit.org chromium
120 # build (0).
121 'inside_chromium_build%': 1,
[email protected]8974e042010-06-21 18:06:52122
[email protected]e72e55b2011-01-06 22:19:30123 # Set to 1 to enable fast builds. It disables debug info for fastest
124 # compilation.
125 'fastbuild%': 0,
[email protected]93012ca2010-08-10 20:10:49126
[email protected]3d38d8e2011-04-16 20:48:51127 # Disable file manager component extension by default.
128 'file_manager_extension%': 0,
129
[email protected]e72e55b2011-01-06 22:19:30130 # Python version.
[email protected]a43c5a02011-05-27 06:54:51131 'python_ver%': '2.6',
[email protected]b3f23ba2010-04-26 22:58:17132
[email protected]e72e55b2011-01-06 22:19:30133 # Set ARM-v7 compilation flags
134 'armv7%': 0,
135
136 # Set Neon compilation flags (only meaningful if armv7==1).
137 'arm_neon%': 1,
138
139 # The system root for cross-compiles. Default: none.
140 'sysroot%': '',
141
142 # On Linux, we build with sse2 for Chromium builds.
143 'disable_sse2%': 0,
144
145 # Use libjpeg-turbo as the JPEG codec used by Chromium.
[email protected]32e56e52011-02-28 02:28:03146 'use_libjpeg_turbo%': 1,
[email protected]e72e55b2011-01-06 22:19:30147
148 # Variable 'component' is for cases where we would like to build some
149 # components as dynamic shared libraries but still need variable
150 # 'library' for static libraries.
151 # By default, component is set to whatever library is set to and
152 # it can be overriden by the GYP command line or by ~/.gyp/include.gypi.
[email protected]5a547332011-05-19 23:18:53153 'component%': 'static_library',
[email protected]e72e55b2011-01-06 22:19:30154
[email protected]bb6aba32011-01-07 19:04:43155 # Set to select the Title Case versions of strings in GRD files.
156 'use_titlecase_in_grd_files%': 0,
[email protected]63692212010-09-16 00:22:21157
[email protected]98da0042011-02-02 00:10:27158 # Use translations provided by volunteers at launchpad.net. This
159 # currently only works on Linux.
[email protected]00dc155832011-02-01 18:51:19160 'use_third_party_translations%': 0,
161
[email protected]9a425422011-01-11 00:53:18162 # Remoting compilation is enabled by default. Set to 0 to disable.
163 'remoting%': 1,
164
[email protected]a026daa2011-04-20 15:49:51165 # P2P APIs are compiled in by default. Set to 0 to disable.
166 # Also note that this should be enabled for remoting to compile.
167 'p2p_apis%': 1,
168
[email protected]1ec68c42011-06-01 13:56:25169 # Configuration policy is enabled by default. Set to 0 to disable.
170 'configuration_policy%': 1,
171
[email protected]4b58e7d2011-07-11 10:22:56172 # Safe browsing is compiled in by default. Set to 0 to disable.
173 'safe_browsing%': 1,
174
[email protected]5d451ad2011-02-11 16:43:46175 # If this is set, the clang plugins used on the buildbot will be used.
176 # Run tools/clang/scripts/update.sh to make sure they are compiled.
177 # This causes 'clang_chrome_plugins_flags' to be set.
178 # Has no effect if 'clang' is not set as well.
179 'clang_use_chrome_plugins%': 0,
180
[email protected]1ad5a7b2011-06-24 03:15:13181 # Set to 1 compile with -fPIC cflag on linux. This is a must for shared
182 # libraries on linux x86-64 and arm, plus ASLR.
183 'linux_fpic%': 1,
184
[email protected]c6a1f94172011-07-05 02:35:00185 # Enable navigator.registerProtocolHandler and supporting UI.
186 'enable_register_protocol_handler%': 1,
187
[email protected]32877d302011-07-07 17:57:49188 # Smooth scrolling is disabled by default.
189 'enable_smooth_scrolling%': 0,
190
[email protected]bb6aba32011-01-07 19:04:43191 'conditions': [
[email protected]7d7564a12011-06-21 19:20:22192 # Use Skia as WebKit renderer on Mac
193 ['OS=="mac"', {
194 'use_skia%': 0,
195 }, {
196 'use_skia%': 1,
197 }],
198
[email protected]79e2336c2011-05-12 18:18:34199 # A flag for POSIX platforms
[email protected]c49ab0c2011-05-18 17:25:37200 ['OS=="win"', {
[email protected]79e2336c2011-05-12 18:18:34201 'os_posix%': 0,
[email protected]c49ab0c2011-05-18 17:25:37202 }, {
203 'os_posix%': 1,
[email protected]79e2336c2011-05-12 18:18:34204 }],
205
206 # Flags to use Gtk and X11 on non-Mac POSIX platforms
[email protected]c49ab0c2011-05-18 17:25:37207 ['OS=="win" or OS=="mac"', {
[email protected]79e2336c2011-05-12 18:18:34208 'toolkit_uses_gtk%': 0,
209 'use_x11%': 0,
[email protected]c49ab0c2011-05-18 17:25:37210 }, {
211 'toolkit_uses_gtk%': 1,
212 'use_x11%': 1,
[email protected]79e2336c2011-05-12 18:18:34213 }],
214
[email protected]63692212010-09-16 00:22:21215 # A flag to enable or disable our compile-time dependency
216 # on gnome-keyring. If that dependency is disabled, no gnome-keyring
217 # support will be available. This option is useful
218 # for Linux distributions.
219 ['chromeos==1', {
220 'use_gnome_keyring%': 0,
221 }, {
222 'use_gnome_keyring%': 1,
223 }],
[email protected]0afe5212010-10-01 18:56:11224
[email protected]bb6aba32011-01-07 19:04:43225 ['toolkit_views==0 or OS=="mac"', {
226 # GTK+ and Mac wants Title Case strings
227 'use_titlecase_in_grd_files%': 1,
228 }],
229
[email protected]1b4209f2011-01-07 00:25:40230 # Enable some hacks to support Flapper only on Chrome OS.
231 ['chromeos==1', {
232 'enable_flapper_hacks%': 1,
233 }, {
234 'enable_flapper_hacks%': 0,
235 }],
[email protected]3d38d8e2011-04-16 20:48:51236
237 # Enable file manager extension by default on Chrome OS.
238 ['chromeos==1', {
239 'file_manager_extension%': 1,
240 }, {
241 'file_manager_extension%': 0,
242 }],
[email protected]32877d302011-07-07 17:57:49243
244 # Enable smooth scrolling for Linux and ChromeOS
245 ['OS=="linux"', {
246 'enable_smooth_scrolling%': 1,
247 }, {
248 'enable_smooth_scrolling%': 0,
249 }],
[email protected]b3f23ba2010-04-26 22:58:17250 ],
[email protected]e14a9f92009-08-05 19:26:07251 },
252
[email protected]e72e55b2011-01-06 22:19:30253 # Copy conditionally-set variables out one scope.
[email protected]e14a9f92009-08-05 19:26:07254 'branding%': '<(branding)',
255 'buildtype%': '<(buildtype)',
[email protected]e0d00142009-09-18 22:10:27256 'target_arch%': '<(target_arch)',
[email protected]cf185b32010-01-12 04:29:59257 'host_arch%': '<(host_arch)',
[email protected]8fb0ef02011-05-20 00:53:50258 'library%': 'static_library',
[email protected]c153e5352009-09-22 12:37:44259 'toolkit_views%': '<(toolkit_views)',
[email protected]1b546692011-06-30 18:22:30260 'toolkit_uses_pure_views%': '<(toolkit_uses_pure_views)',
[email protected]9c8a1982011-05-24 23:08:58261 'views_compositor%': '<(views_compositor)',
[email protected]79e2336c2011-05-12 18:18:34262 'os_posix%': '<(os_posix)',
263 'toolkit_uses_gtk%': '<(toolkit_uses_gtk)',
[email protected]7d7564a12011-06-21 19:20:22264 'use_skia%': '<(use_skia)',
[email protected]79e2336c2011-05-12 18:18:34265 'use_x11%': '<(use_x11)',
[email protected]63692212010-09-16 00:22:21266 'use_gnome_keyring%': '<(use_gnome_keyring)',
[email protected]0afe5212010-10-01 18:56:11267 'linux_fpic%': '<(linux_fpic)',
[email protected]1b4209f2011-01-07 00:25:40268 'enable_flapper_hacks%': '<(enable_flapper_hacks)',
[email protected]c153e5352009-09-22 12:37:44269 'chromeos%': '<(chromeos)',
[email protected]93012ca2010-08-10 20:10:49270 'touchui%': '<(touchui)',
[email protected]8ebc9b42011-07-14 15:22:18271 'webui_certificate_viewer%': '<(webui_certificate_viewer)',
[email protected]e47c32032011-03-01 19:26:20272 'file_manager_extension%': '<(file_manager_extension)',
[email protected]b2f030c2009-09-24 20:36:21273 'inside_chromium_build%': '<(inside_chromium_build)',
[email protected]9c1949e2009-10-02 19:59:54274 'fastbuild%': '<(fastbuild)',
[email protected]a76fe1a2010-03-01 23:39:36275 'python_ver%': '<(python_ver)',
[email protected]eafc0b452010-02-26 21:53:43276 'armv7%': '<(armv7)',
277 'arm_neon%': '<(arm_neon)',
[email protected]4d83eb72010-03-04 16:42:23278 'sysroot%': '<(sysroot)',
[email protected]ac120ff2010-04-28 02:14:22279 'disable_sse2%': '<(disable_sse2)',
[email protected]8974e042010-06-21 18:06:52280 'component%': '<(component)',
[email protected]bb6aba32011-01-07 19:04:43281 'use_titlecase_in_grd_files%': '<(use_titlecase_in_grd_files)',
[email protected]9e94cca2011-02-04 17:38:17282 'use_third_party_translations%': '<(use_third_party_translations)',
[email protected]9a425422011-01-11 00:53:18283 'remoting%': '<(remoting)',
[email protected]a026daa2011-04-20 15:49:51284 'p2p_apis%': '<(p2p_apis)',
[email protected]1ec68c42011-06-01 13:56:25285 'configuration_policy%': '<(configuration_policy)',
[email protected]4b58e7d2011-07-11 10:22:56286 'safe_browsing%': '<(safe_browsing)',
[email protected]5d451ad2011-02-11 16:43:46287 'clang_use_chrome_plugins%': '<(clang_use_chrome_plugins)',
[email protected]365dd5b92011-05-26 01:30:56288 'enable_register_protocol_handler%': '<(enable_register_protocol_handler)',
[email protected]32877d302011-07-07 17:57:49289 'enable_smooth_scrolling%': '<(enable_smooth_scrolling)',
[email protected]a22ebd812011-06-23 00:05:39290
[email protected]caa95c82009-11-23 22:39:32291 # The release channel that this build targets. This is used to restrict
292 # channel-specific build options, like which installer packages to create.
293 # The default is 'all', which does no channel-specific filtering.
294 'channel%': 'all',
295
[email protected]b3fb8092009-03-12 19:09:24296 # Override chromium_mac_pch and set it to 0 to suppress the use of
297 # precompiled headers on the Mac. Prefix header injection may still be
298 # used, but prefix headers will not be precompiled. This is useful when
299 # using distcc to distribute a build to compile slaves that don't
300 # share the same compiler executable as the system driving the compilation,
301 # because precompiled headers rely on pointers into a specific compiler
302 # executable's image. Setting this to 0 is needed to use an experimental
303 # Linux-Mac cross compiler distcc farm.
304 'chromium_mac_pch%': 1,
305
[email protected]3224dcd2009-09-16 17:31:25306 # Mac OS X SDK and deployment target support.
307 # The SDK identifies the version of the system headers that will be used,
308 # and corresponds to the MAC_OS_X_VERSION_MAX_ALLOWED compile-time macro.
309 # "Maximum allowed" refers to the operating system version whose APIs are
310 # available in the headers.
311 # The deployment target identifies the minimum system version that the
312 # built products are expected to function on. It corresponds to the
313 # MAC_OS_X_VERSION_MIN_REQUIRED compile-time macro.
314 # To ensure these macros are available, #include <AvailabilityMacros.h>.
315 # Additional documentation on these macros is available at
316 # http://developer.apple.com/mac/library/technotes/tn2002/tn2064.html#SECTION3
317 # Chrome normally builds with the Mac OS X 10.5 SDK and sets the
318 # deployment target to 10.5. Other projects, such as O3D, may override
319 # these defaults.
320 'mac_sdk%': '10.5',
321 'mac_deployment_target%': '10.5',
[email protected]9543af052009-09-15 22:42:59322
[email protected]f5ecbba12009-04-03 04:35:18323 # Set to 1 to enable code coverage. In addition to build changes
324 # (e.g. extra CFLAGS), also creates a new target in the src/chrome
325 # project file called "coverage".
326 # Currently ignored on Windows.
327 'coverage%': 0,
[email protected]653bd5f032009-04-08 12:55:49328
[email protected]c61f6432009-04-22 01:16:42329 # Overridable specification for potential use of alternative
330 # JavaScript engines.
331 'javascript_engine%': 'v8',
332
[email protected]7477ea6f2009-12-22 23:28:15333 # Although base/allocator lets you select a heap library via an
[email protected]7e0d664a2009-12-03 21:07:47334 # environment variable, the libcmt shim it uses sometimes gets in
335 # the way. To disable it entirely, and switch to normal msvcrt, do e.g.
336 # 'win_use_allocator_shim': 0,
337 # 'win_release_RuntimeLibrary': 2
338 # to ~/.gyp/include.gypi, gclient runhooks --force, and do a release build.
[email protected]8974e042010-06-21 18:06:52339 'win_use_allocator_shim%': 1, # 1 = shim allocator via libcmt; 0 = msvcrt
[email protected]279cd4212009-09-11 22:32:11340
[email protected]95ff8082009-11-13 22:21:01341 # Whether usage of OpenMAX is enabled.
342 'enable_openmax%': 0,
343
[email protected]d01120e62010-05-10 17:04:48344 # Whether proprietary audio/video codecs are assumed to be included with
345 # this build (only meaningful if branding!=Chrome).
346 'proprietary_codecs%': 0,
347
[email protected]e5b2eaa2009-04-14 01:39:12348 # TODO(bradnelson): eliminate this when possible.
349 # To allow local gyp files to prevent release.vsprops from being included.
350 # Yes(1) means include release.vsprops.
351 # Once all vsprops settings are migrated into gyp, this can go away.
352 'msvs_use_common_release%': 1,
[email protected]606116d22009-05-06 22:38:23353
[email protected]cbd5fd52009-08-26 00:14:27354 # TODO(bradnelson): eliminate this when possible.
355 # To allow local gyp files to override additional linker options for msvs.
356 # Yes(1) means set use the common linker options.
[email protected]48c7af72009-07-03 22:00:19357 'msvs_use_common_linker_extras%': 1,
358
[email protected]1ffb6502009-06-02 07:46:24359 # TODO(sgk): eliminate this if possible.
360 # It would be nicer to support this via a setting in 'target_defaults'
361 # in chrome/app/locales/locales.gypi overriding the setting in the
362 # 'Debug' configuration in the 'target_defaults' dict below,
363 # but that doesn't work as we'd like.
364 'msvs_debug_link_incremental%': '2',
365
[email protected]1f790ef2011-01-11 20:45:36366 # Needed for some of the largest modules.
367 'msvs_debug_link_nonincremental%': '1',
368
[email protected]573136142009-07-15 22:48:37369 # This is the location of the sandbox binary. Chrome looks for this before
370 # running the zygote process. If found, and SUID, it will be used to
371 # sandbox the zygote process and, thus, all renderer processes.
372 'linux_sandbox_path%': '',
373
[email protected]ad6d2c42009-09-15 20:13:38374 # Set this to true to enable SELinux support.
375 'selinux%': 0,
[email protected]4c9cc6c2009-10-01 18:54:57376
[email protected]58680ce2010-09-18 00:09:15377 # Set this to true when building with Clang.
378 # See http://code.google.com/p/chromium/wiki/Clang for details.
379 # TODO: eventually clang should behave identically to gcc, and this
380 # won't be necessary.
381 'clang%': 0,
382
[email protected]5e781232011-01-28 02:57:59383 # These two variables can be set in GYP_DEFINES while running
384 # |gclient runhooks| to let clang run a plugin in every compilation.
385 # Only has an effect if 'clang=1' is in GYP_DEFINES as well.
386 # Example:
[email protected]93120fe2011-02-03 20:46:42387 # 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:59388
389 'clang_load%': '',
390 'clang_add_plugin%': '',
391
[email protected]7664ab32011-02-01 23:35:25392 # Enable sampling based profiler.
393 # See http://google-perftools.googlecode.com/svn/trunk/doc/cpuprofile.html
394 'profiling%': '0',
395
[email protected]36532f332010-08-25 00:22:01396 # Override whether we should use Breakpad on Linux. I.e. for Chrome bot.
397 'linux_breakpad%': 0,
398 # And if we want to dump symbols for Breakpad-enabled builds.
399 'linux_dump_symbols%': 0,
400 # And if we want to strip the binary after dumping symbols.
[email protected]05cb6962009-10-01 23:29:03401 'linux_strip_binary%': 0,
[email protected]1d87c282010-09-15 22:24:49402 # Strip the test binaries needed for Linux reliability tests.
403 'linux_strip_reliability_tests%': 0,
[email protected]05cb6962009-10-01 23:29:03404
[email protected]46ce5b562010-06-16 18:39:53405 # Enable TCMalloc.
406 'linux_use_tcmalloc%': 1,
[email protected]01699e22009-11-11 19:24:24407
[email protected]39ca7de2010-04-16 08:04:03408 # Disable TCMalloc's debugallocation.
409 'linux_use_debugallocation%': 0,
410
[email protected]d8b60602010-03-26 09:41:22411 # Disable TCMalloc's heapchecker.
412 'linux_use_heapchecker%': 0,
413
[email protected]64e2d4a42010-08-27 10:13:21414 # Disable shadow stack keeping used by heapcheck to unwind the stacks
415 # better.
416 'linux_keep_shadow_stacks%': 0,
417
[email protected]6def64a2010-10-28 20:40:34418 # Set to 1 to turn on seccomp sandbox by default.
419 # (Note: this is ignored for official builds.)
420 'linux_use_seccomp_sandbox%': 0,
[email protected]39c4e1a82010-03-30 19:47:41421
[email protected]556c5d72010-06-10 05:45:01422 # Set to 1 to link against libgnome-keyring instead of using dlopen().
423 'linux_link_gnome_keyring%': 0,
[email protected]abcc9ac2011-05-16 20:04:35424 # Set to 1 to link against gsettings APIs instead of using dlopen().
425 'linux_link_gsettings%': 0,
[email protected]556c5d72010-06-10 05:45:01426
[email protected]d8c7cbcc2009-10-02 19:00:31427 # Used to disable Native Client at compile time, for platforms where it
428 # isn't supported
429 'disable_nacl%': 0,
430
[email protected]77c1b29392009-12-04 06:21:29431 # Set Thumb compilation flags.
432 'arm_thumb%': 0,
433
[email protected]53e0f642010-03-05 01:41:56434 # Set ARM fpu compilation flags (only meaningful if armv7==1 and
435 # arm_neon==0).
436 'arm_fpu%': 'vfpv3',
437
[email protected]9821d0d2010-04-16 22:40:37438 # Enable new NPDevice API.
439 'enable_new_npdevice_api%': 0,
[email protected]ed154592010-04-29 00:18:50440
441 # Enable EGLImage support in OpenMAX
[email protected]58023be2011-02-04 20:34:14442 'enable_eglimage%': 1,
[email protected]ed154592010-04-29 00:18:50443
[email protected]6f51b27e2010-06-22 20:43:53444 # Enable a variable used elsewhere throughout the GYP files to determine
445 # whether to compile in the sources for the GPU plugin / process.
446 'enable_gpu%': 1,
447
[email protected]32e1dee2010-12-09 18:36:24448 # Use OpenSSL instead of NSS. Under development: see http://crbug.com/62803
[email protected]d518cd92010-09-29 12:27:44449 'use_openssl%': 0,
450
[email protected]e72e55b2011-01-06 22:19:30451 # .gyp files or targets should set chromium_code to 1 if they build
452 # Chromium-specific code, as opposed to external code. This variable is
453 # used to control such things as the set of warnings to enable, and
454 # whether warnings are treated as errors.
455 'chromium_code%': 0,
456
457 # Set to 1 to compile with the built in pdf viewer.
458 'internal_pdf%': 0,
459
460 # This allows to use libcros from the current system, ie. /usr/lib/
461 # The cros_api will be pulled in as a static library, and all headers
462 # from the system include dirs.
[email protected]bb6aba32011-01-07 19:04:43463 'system_libcros%': 0,
[email protected]e72e55b2011-01-06 22:19:30464
[email protected]e72e55b2011-01-06 22:19:30465 # NOTE: When these end up in the Mac bundle, we need to replace '-' for '_'
466 # so Cocoa is happy (http://crbug.com/20441).
467 'locales': [
468 'am', 'ar', 'bg', 'bn', 'ca', 'cs', 'da', 'de', 'el', 'en-GB',
469 'en-US', 'es-419', 'es', 'et', 'fa', 'fi', 'fil', 'fr', 'gu', 'he',
470 'hi', 'hr', 'hu', 'id', 'it', 'ja', 'kn', 'ko', 'lt', 'lv',
471 'ml', 'mr', 'nb', 'nl', 'pl', 'pt-BR', 'pt-PT', 'ro', 'ru',
472 'sk', 'sl', 'sr', 'sv', 'sw', 'ta', 'te', 'th', 'tr', 'uk',
473 'vi', 'zh-CN', 'zh-TW',
474 ],
475
[email protected]bb6aba32011-01-07 19:04:43476 'grit_defines': [],
477
[email protected]29c2daea2011-01-05 20:38:50478 # Use Harfbuzz-NG instead of Harfbuzz.
479 # Under development: http://crbug.com/68551
480 'use_harfbuzz_ng%': 0,
481
[email protected]bd3bd442011-03-28 07:58:51482 # If debug_devtools is set to 1, JavaScript files for DevTools are
483 # stored as is and loaded from disk. Otherwise, a concatenated file
484 # is stored in resources.pak. It is still possible to load JS files
485 # from disk by passing --debug-devtools cmdline switch.
486 'debug_devtools%': 0,
487
[email protected]be8a9272011-02-10 22:06:07488 # Point to ICU directory.
489 'icu_src_dir': '../third_party/icu',
490
[email protected]912c55c2009-07-31 23:33:55491 'conditions': [
[email protected]79e2336c2011-05-12 18:18:34492 ['os_posix==1 and OS!="mac"', {
[email protected]242a9e62009-11-03 17:32:10493 # This will set gcc_version to XY if you are running gcc X.Y.*.
494 # This is used to tweak build flags for gcc 4.4.
495 'gcc_version%': '<!(python <(DEPTH)/build/compiler_version.py)',
[email protected]4d83eb72010-03-04 16:42:23496 # Figure out the python architecture to decide if we build pyauto.
[email protected]efd68462010-03-04 17:07:54497 'python_arch%': '<!(<(DEPTH)/build/linux/python_arch.sh <(sysroot)/usr/lib/libpython<(python_ver).so.1.0)',
[email protected]cbd5fd52009-08-26 00:14:27498 'conditions': [
[email protected]2a77a9d2010-08-26 19:58:10499 ['branding=="Chrome"', {
[email protected]cbd5fd52009-08-26 00:14:27500 'linux_breakpad%': 1,
[email protected]cbd5fd52009-08-26 00:14:27501 }],
[email protected]4c9cc6c2009-10-01 18:54:57502 # All Chrome builds have breakpad symbols, but only process the
503 # symbols from official builds.
[email protected]c913cb82010-08-31 19:44:08504 ['(branding=="Chrome" and buildtype=="Official")', {
[email protected]4c9cc6c2009-10-01 18:54:57505 'linux_dump_symbols%': 1,
[email protected]4c9cc6c2009-10-01 18:54:57506 }],
[email protected]cbd5fd52009-08-26 00:14:27507 ],
[email protected]79e2336c2011-05-12 18:18:34508 }], # os_posix==1 and OS!="mac"
[email protected]bb6aba32011-01-07 19:04:43509
[email protected]e14a9f92009-08-05 19:26:07510 ['OS=="mac"', {
511 'conditions': [
512 # mac_product_name is set to the name of the .app bundle as it should
513 # appear on disk. This duplicates data from
514 # chrome/app/theme/chromium/BRANDING and
515 # chrome/app/theme/google_chrome/BRANDING, but is necessary to get
516 # these names into the build system.
517 ['branding=="Chrome"', {
518 'mac_product_name%': 'Google Chrome',
519 }, { # else: branding!="Chrome"
520 'mac_product_name%': 'Chromium',
521 }],
522
523 # Feature variables for enabling Mac Breakpad and Keystone auto-update
524 # support. Both features are on by default in official builds with
525 # Chrome branding.
526 ['branding=="Chrome" and buildtype=="Official"', {
527 'mac_breakpad%': 1,
528 'mac_keystone%': 1,
529 }, { # else: branding!="Chrome" or buildtype!="Official"
530 'mac_breakpad%': 0,
531 'mac_keystone%': 0,
532 }],
533 ],
534 }], # OS=="mac"
[email protected]bb6aba32011-01-07 19:04:43535
[email protected]912c55c2009-07-31 23:33:55536 # Whether to use multiple cores to compile with visual studio. This is
537 # optional because it sometimes causes corruption on VS 2005.
538 # It is on by default on VS 2008 and off on VS 2005.
539 ['OS=="win"', {
540 'conditions': [
[email protected]8974e042010-06-21 18:06:52541 ['component=="shared_library"', {
542 'win_use_allocator_shim%': 0,
543 }],
[email protected]912c55c2009-07-31 23:33:55544 ['MSVS_VERSION=="2005"', {
[email protected]669795372009-08-14 17:51:13545 'msvs_multi_core_compile%': 0,
[email protected]912c55c2009-07-31 23:33:55546 },{
547 'msvs_multi_core_compile%': 1,
548 }],
[email protected]10bb8c92009-08-07 21:16:03549 # Don't do incremental linking for large modules on 32-bit.
550 ['MSVS_OS_BITS==32', {
551 'msvs_large_module_debug_link_mode%': '1', # No
552 },{
553 'msvs_large_module_debug_link_mode%': '2', # Yes
554 }],
[email protected]3e2648a2011-03-21 20:58:50555 ['MSVS_VERSION=="2010e" or MSVS_VERSION=="2008e" or MSVS_VERSION=="2005e"', {
556 'msvs_express%': 1,
557 'secure_atl%': 0,
558 },{
559 'msvs_express%': 0,
560 'secure_atl%': 1,
561 }],
[email protected]912c55c2009-07-31 23:33:55562 ],
[email protected]ef4fa4072009-12-04 22:46:50563 'nacl_win64_defines': [
564 # This flag is used to minimize dependencies when building
565 # Native Client loader for 64-bit Windows.
566 'NACL_WIN64',
567 ],
[email protected]912c55c2009-07-31 23:33:55568 }],
[email protected]bb6aba32011-01-07 19:04:43569
[email protected]79e2336c2011-05-12 18:18:34570 ['os_posix==1 and chromeos==0 and target_arch!="arm"', {
[email protected]8e553f42010-10-25 20:05:44571 'use_cups%': 1,
572 }, {
573 'use_cups%': 0,
574 }],
[email protected]bb6aba32011-01-07 19:04:43575
[email protected]19fe8f0b2010-12-07 07:27:27576 # Set the relative path from this file to the GYP file of the JPEG
577 # library used by Chromium.
578 ['use_libjpeg_turbo==1', {
579 'libjpeg_gyp_path': '../third_party/libjpeg_turbo/libjpeg.gyp',
580 }, {
581 'libjpeg_gyp_path': '../third_party/libjpeg/libjpeg.gyp',
582 }], # use_libjpeg_turbo==1
[email protected]bb6aba32011-01-07 19:04:43583
[email protected]abcc9ac2011-05-16 20:04:35584 # Options controlling the use of GConf (the classic GNOME configuration
585 # system) and GIO, which contains GSettings (the new GNOME config system).
[email protected]1c6fe29302011-01-20 22:14:31586 ['chromeos==1', {
587 'use_gconf%': 0,
[email protected]abcc9ac2011-05-16 20:04:35588 'use_gio%': 0,
[email protected]1c6fe29302011-01-20 22:14:31589 }, {
590 'use_gconf%': 1,
[email protected]abcc9ac2011-05-16 20:04:35591 'use_gio%': 1,
[email protected]1c6fe29302011-01-20 22:14:31592 }],
593
[email protected]4de39f82011-03-28 12:01:29594 # Set up -D and -E flags passed into grit.
[email protected]1660bffd2011-03-23 16:24:29595 ['branding=="Chrome"', {
596 # TODO(mmoss) The .grd files look for _google_chrome, but for
597 # consistency they should look for google_chrome_build like C++.
[email protected]4de39f82011-03-28 12:01:29598 'grit_defines': ['-D', '_google_chrome',
599 '-E', 'CHROMIUM_BUILD=google_chrome'],
[email protected]1660bffd2011-03-23 16:24:29600 }, {
[email protected]4de39f82011-03-28 12:01:29601 'grit_defines': ['-D', '_chromium',
602 '-E', 'CHROMIUM_BUILD=chromium'],
[email protected]1660bffd2011-03-23 16:24:29603 }],
[email protected]bb6aba32011-01-07 19:04:43604 ['chromeos==1', {
605 'grit_defines': ['-D', 'chromeos'],
606 }],
607 ['toolkit_views==1', {
608 'grit_defines': ['-D', 'toolkit_views'],
609 }],
[email protected]1b546692011-06-30 18:22:30610 ['toolkit_uses_pure_views==1', {
611 'grit_defines': ['-D', 'toolkit_uses_pure_views'],
612 }],
[email protected]bb6aba32011-01-07 19:04:43613 ['touchui==1', {
614 'grit_defines': ['-D', 'touchui'],
615 }],
[email protected]8ebc9b42011-07-14 15:22:18616 ['webui_certificate_viewer==1', {
617 'grit_defines': ['-D', 'webui_certificate_viewer'],
618 }],
[email protected]e47c32032011-03-01 19:26:20619 ['file_manager_extension==1', {
620 'grit_defines': ['-D', 'file_manager_extension'],
621 }],
[email protected]9a425422011-01-11 00:53:18622 ['remoting==1', {
623 'grit_defines': ['-D', 'remoting'],
624 }],
[email protected]bb6aba32011-01-07 19:04:43625 ['use_titlecase_in_grd_files==1', {
626 'grit_defines': ['-D', 'use_titlecase'],
627 }],
[email protected]00dc155832011-02-01 18:51:19628 ['use_third_party_translations==1', {
629 'grit_defines': ['-D', 'use_third_party_translations'],
[email protected]fb6c1022011-06-27 21:58:12630 'locales': [
631 'ast', 'bs', 'ca@valencia', 'eo', 'eu', 'gl', 'hy', 'ka', 'ku', 'kw',
632 'ug',
633 ],
[email protected]00dc155832011-02-01 18:51:19634 }],
[email protected]5d451ad2011-02-11 16:43:46635
636 ['clang_use_chrome_plugins==1', {
637 'clang_chrome_plugins_flags':
638 '<!(<(DEPTH)/tools/clang/scripts/plugin_flags.sh)',
639 }],
[email protected]cfa2e1102011-04-27 22:30:23640
[email protected]452da69e2011-05-24 02:36:05641 # Set use_ibus to 1 to enable ibus support.
[email protected]cfa2e1102011-04-27 22:30:23642 ['touchui==1 and chromeos==1', {
643 'use_ibus%': 1,
644 }, {
645 'use_ibus%': 0,
[email protected]365dd5b92011-05-26 01:30:56646 }],
647
648 ['enable_register_protocol_handler==1', {
649 'grit_defines': ['-D', 'enable_register_protocol_handler'],
650 }],
[email protected]912c55c2009-07-31 23:33:55651 ],
[email protected]2f80c312009-02-25 21:26:55652 },
653 'target_defaults': {
[email protected]1c966092009-08-20 21:19:26654 'variables': {
[email protected]a6e22132010-02-10 20:43:18655 # The condition that operates on chromium_code is in a target_conditions
656 # section, and will not have access to the default fallback value of
657 # chromium_code at the top of this file, or to the chromium_code
658 # variable placed at the root variables scope of .gyp files, because
659 # those variables are not set at target scope. As a workaround,
660 # if chromium_code is not set at target scope, define it in target scope
661 # to contain whatever value it has during early variable expansion.
662 # That's enough to make it available during target conditional
663 # processing.
664 'chromium_code%': '<(chromium_code)',
665
[email protected]7e0d664a2009-12-03 21:07:47666 # See http://gcc.gnu.org/onlinedocs/gcc-4.4.2/gcc/Optimize-Options.html
[email protected]d5d593a2009-08-28 23:23:29667 'mac_release_optimization%': '3', # Use -O3 unless overridden
[email protected]ffd984b12009-09-11 19:37:00668 'mac_debug_optimization%': '0', # Use -O0 unless overridden
[email protected]7e0d664a2009-12-03 21:07:47669 # See http://msdn.microsoft.com/en-us/library/aa652360(VS.71).aspx
670 'win_release_Optimization%': '2', # 2 = /Os
671 'win_debug_Optimization%': '0', # 0 = /Od
[email protected]6b0507b2010-05-07 07:41:21672 # See http://msdn.microsoft.com/en-us/library/8wtf2dfz(VS.71).aspx
673 'win_debug_RuntimeChecks%': '3', # 3 = all checks enabled, 0 = off
674 # See http://msdn.microsoft.com/en-us/library/47238hez(VS.71).aspx
[email protected]2ae6e022010-05-07 13:19:15675 'win_debug_InlineFunctionExpansion%': '', # empty = default, 0 = off,
676 'win_release_InlineFunctionExpansion%': '2', # 1 = only __inline, 2 = max
[email protected]fac10d12010-11-08 16:00:31677 # VS inserts quite a lot of extra checks to algorithms like
678 # std::partial_sort in Debug build which make them O(N^2)
679 # instead of O(N*logN). This is particularly slow under memory
680 # tools like ThreadSanitizer so we want it to be disablable.
681 # See http://msdn.microsoft.com/en-us/library/aa985982(v=VS.80).aspx
682 'win_debug_disable_iterator_debugging%': '0',
[email protected]7e0d664a2009-12-03 21:07:47683
[email protected]ffd984b12009-09-11 19:37:00684 'release_extra_cflags%': '',
685 'debug_extra_cflags%': '',
[email protected]92822e82009-09-18 14:26:56686 'release_valgrind_build%': 0,
[email protected]8974e042010-06-21 18:06:52687
688 'conditions': [
689 ['OS=="win" and component=="shared_library"', {
690 # See http://msdn.microsoft.com/en-us/library/aa652367.aspx
691 'win_release_RuntimeLibrary%': '2', # 2 = /MT (nondebug DLL)
692 'win_debug_RuntimeLibrary%': '3', # 3 = /MTd (debug DLL)
693 }, {
694 # See http://msdn.microsoft.com/en-us/library/aa652367.aspx
695 'win_release_RuntimeLibrary%': '0', # 0 = /MT (nondebug static)
696 'win_debug_RuntimeLibrary%': '1', # 1 = /MTd (debug static)
697 }],
698 ],
[email protected]1c966092009-08-20 21:19:26699 },
[email protected]32aa8cc2009-03-04 21:36:39700 'conditions': [
701 ['branding=="Chrome"', {
702 'defines': ['GOOGLE_CHROME_BUILD'],
703 }, { # else: branding!="Chrome"
704 'defines': ['CHROMIUM_BUILD'],
705 }],
[email protected]63e39a282011-07-13 20:41:28706 ['component=="shared_library"', {
707 'defines': ['COMPONENT_BUILD'],
708 }],
[email protected]06c756182010-04-27 18:31:31709 ['toolkit_views==1', {
[email protected]e6970232009-05-12 23:51:17710 'defines': ['TOOLKIT_VIEWS=1'],
711 }],
[email protected]1b546692011-06-30 18:22:30712 ['toolkit_uses_pure_views==1', {
713 'defines': ['TOOLKIT_USES_PURE_VIEWS=1'],
714 }],
[email protected]9c8a1982011-05-24 23:08:58715 ['views_compositor==1', {
[email protected]c3870f42011-06-10 16:43:27716 'defines': ['VIEWS_COMPOSITOR=1'],
[email protected]9c8a1982011-05-24 23:08:58717 }],
[email protected]fdc5bed2010-01-09 01:16:57718 ['chromeos==1', {
[email protected]16779842009-07-08 23:45:29719 'defines': ['OS_CHROMEOS=1'],
[email protected]2b883b92009-06-02 22:57:50720 }],
[email protected]0094fbe2010-07-15 21:51:43721 ['touchui==1', {
722 'defines': ['TOUCH_UI=1'],
723 }],
[email protected]e47c32032011-03-01 19:26:20724 ['file_manager_extension==1', {
725 'defines': ['FILE_MANAGER_EXTENSION=1'],
726 }],
[email protected]7664ab32011-02-01 23:35:25727 ['profiling==1', {
728 'defines': ['ENABLE_PROFILING=1'],
729 }],
[email protected]542bf24a2010-06-11 23:08:17730 ['remoting==1', {
731 'defines': ['ENABLE_REMOTING=1'],
[email protected]c0bac532010-06-11 00:39:00732 }],
[email protected]a026daa2011-04-20 15:49:51733 ['p2p_apis==1', {
734 'defines': ['ENABLE_P2P_APIS=1'],
735 }],
[email protected]d01120e62010-05-10 17:04:48736 ['proprietary_codecs==1', {
737 'defines': ['USE_PROPRIETARY_CODECS'],
738 }],
[email protected]1b4209f2011-01-07 00:25:40739 ['enable_flapper_hacks==1', {
740 'defines': ['ENABLE_FLAPPER_HACKS=1'],
741 }],
[email protected]f31e2e52011-07-14 16:01:19742 ['configuration_policy==1', {
743 'defines': ['ENABLE_CONFIGURATION_POLICY'],
744 }],
[email protected]9c1949e2009-10-02 19:59:54745 ['fastbuild!=0', {
746 'conditions': [
[email protected]1cc2fa72010-07-03 08:49:24747 # For Windows, we don't genererate debug information.
[email protected]9c1949e2009-10-02 19:59:54748 ['OS=="win"', {
749 'msvs_settings': {
750 'VCLinkerTool': {
751 'GenerateDebugInformation': 'false',
752 },
753 'VCCLCompilerTool': {
754 'DebugInformationFormat': '0',
755 }
756 }
[email protected]1cc2fa72010-07-03 08:49:24757 }, { # else: OS != "win", generate less debug information.
758 'variables': {
759 'debug_extra_cflags': '-g1',
760 },
[email protected]37c84192010-04-14 21:37:40761 }],
[email protected]aecc4d12011-01-19 05:32:33762 # Clang creates chubby debug information, which makes linking very
763 # slow. For now, don't create debug information with clang. See
764 # http://crbug.com/70000
765 ['OS=="linux" and clang==1', {
766 'variables': {
767 'debug_extra_cflags': '-g0',
768 },
769 }],
[email protected]9c1949e2009-10-02 19:59:54770 ], # conditions for fastbuild.
771 }], # fastbuild!=0
[email protected]ad6d2c42009-09-15 20:13:38772 ['selinux==1', {
773 'defines': ['CHROMIUM_SELINUX=1'],
774 }],
[email protected]7e0d664a2009-12-03 21:07:47775 ['win_use_allocator_shim==0', {
776 'conditions': [
777 ['OS=="win"', {
778 'defines': ['NO_TCMALLOC'],
779 }],
780 ],
781 }],
[email protected]43f28f832010-02-03 02:28:48782 ['enable_gpu==1', {
[email protected]7477ea6f2009-12-22 23:28:15783 'defines': [
784 'ENABLE_GPU=1',
785 ],
786 }],
[email protected]b1c2a5542010-10-08 12:44:40787 ['use_openssl==1', {
788 'defines': [
789 'USE_OPENSSL=1',
790 ],
791 }],
[email protected]ed154592010-04-29 00:18:50792 ['enable_eglimage==1', {
793 'defines': [
794 'ENABLE_EGLIMAGE=1',
795 ],
796 }],
[email protected]7d7564a12011-06-21 19:20:22797 ['use_skia==1', {
798 'defines': [
799 'USE_SKIA=1',
800 ],
801 }],
[email protected]f5ecbba12009-04-03 04:35:18802 ['coverage!=0', {
803 'conditions': [
804 ['OS=="mac"', {
805 'xcode_settings': {
[email protected]ab2956372009-08-13 18:11:04806 'GCC_INSTRUMENT_PROGRAM_FLOW_ARCS': 'YES', # -fprofile-arcs
807 'GCC_GENERATE_TEST_COVERAGE_FILES': 'YES', # -ftest-coverage
[email protected]5ae4f55e2009-04-13 23:19:47808 },
[email protected]e4fb84c2009-12-28 20:45:43809 # Add -lgcov for types executable, shared_library, and
[email protected]dc259ce52010-04-13 04:03:10810 # loadable_module; not for static_library.
[email protected]e4fb84c2009-12-28 20:45:43811 # This is a delayed conditional.
[email protected]f5ecbba12009-04-03 04:35:18812 'target_conditions': [
[email protected]e4fb84c2009-12-28 20:45:43813 ['_type!="static_library"', {
[email protected]f5ecbba12009-04-03 04:35:18814 'xcode_settings': { 'OTHER_LDFLAGS': [ '-lgcov' ] },
[email protected]5ae4f55e2009-04-13 23:19:47815 }],
816 ],
817 }],
[email protected]f5ecbba12009-04-03 04:35:18818 ['OS=="linux"', {
819 'cflags': [ '-ftest-coverage',
820 '-fprofile-arcs' ],
[email protected]7122ffd52009-04-30 23:19:00821 'link_settings': { 'libraries': [ '-lgcov' ] },
[email protected]f5ecbba12009-04-03 04:35:18822 }],
[email protected]e8f6ff42009-07-07 18:20:53823 # Finally, for Windows, we simply turn on profiling.
824 ['OS=="win"', {
825 'msvs_settings': {
826 'VCLinkerTool': {
827 'Profile': 'true',
828 },
[email protected]10bb8c92009-08-07 21:16:03829 'VCCLCompilerTool': {
[email protected]e8f6ff42009-07-07 18:20:53830 # /Z7, not /Zi, so coverage is happyb
831 'DebugInformationFormat': '1',
[email protected]1f9471a2010-01-04 06:40:16832 'AdditionalOptions': ['/Yd'],
[email protected]e8f6ff42009-07-07 18:20:53833 }
834 }
835 }], # OS==win
836 ], # conditions for coverage
837 }], # coverage!=0
[email protected]4e4d6042010-08-26 18:34:38838 ['OS=="win"', {
839 'defines': [
840 '__STD_C',
841 '_CRT_SECURE_NO_DEPRECATE',
842 '_SCL_SECURE_NO_DEPRECATE',
843 ],
844 'include_dirs': [
845 '<(DEPTH)/third_party/wtl/include',
846 ],
847 }], # OS==win
[email protected]365dd5b92011-05-26 01:30:56848 ['enable_register_protocol_handler==1', {
849 'defines': [
[email protected]06bba4fb2011-06-09 05:17:19850 'ENABLE_REGISTER_PROTOCOL_HANDLER=1',
[email protected]365dd5b92011-05-26 01:30:56851 ],
852 }],
[email protected]a6e22132010-02-10 20:43:18853 ], # conditions for 'target_defaults'
854 'target_conditions': [
[email protected]c14d8e772010-02-09 22:06:15855 ['chromium_code==0', {
[email protected]d8543312010-02-10 17:43:28856 'conditions': [
[email protected]79e2336c2011-05-12 18:18:34857 [ 'os_posix==1 and OS!="mac"', {
[email protected]c0a6b272011-02-09 22:32:33858 # We don't want to get warnings from third-party code,
859 # so remove any existing warning-enabling flags like -Wall.
[email protected]d8543312010-02-10 17:43:28860 'cflags!': [
861 '-Wall',
862 '-Wextra',
863 '-Werror',
864 ],
[email protected]ec1d155be2011-02-08 22:19:00865 'cflags': [
866 # Don't warn about hash_map in third-party code.
867 '-Wno-deprecated',
[email protected]c0a6b272011-02-09 22:32:33868 # Don't warn about printf format problems.
869 # This is off by default in gcc but on in Ubuntu's gcc(!).
[email protected]ec392872011-02-10 22:38:22870 '-Wno-format',
[email protected]ec1d155be2011-02-08 22:19:00871 ],
[email protected]d8543312010-02-10 17:43:28872 }],
873 [ 'OS=="win"', {
874 'defines': [
875 '_CRT_SECURE_NO_DEPRECATE',
876 '_CRT_NONSTDC_NO_WARNINGS',
877 '_CRT_NONSTDC_NO_DEPRECATE',
878 '_SCL_SECURE_NO_DEPRECATE',
879 ],
880 'msvs_disabled_warnings': [4800],
881 'msvs_settings': {
882 'VCCLCompilerTool': {
[email protected]942c3a60f2011-05-03 02:04:11883 'WarningLevel': '3',
884 'WarnAsError': 'false', # TODO(maruel): Enable it.
[email protected]d8543312010-02-10 17:43:28885 'Detect64BitPortabilityProblems': 'false',
886 },
887 },
888 }],
[email protected]ea47b6a2011-07-17 19:39:42889 # TODO(darin): Unfortunately, some third_party code depends on base/
890 [ 'OS=="win" and component=="shared_library"', {
891 'msvs_disabled_warnings': [
892 4251, # class 'std::xx' needs to have dll-interface.
893 ],
894 }],
[email protected]d8543312010-02-10 17:43:28895 [ 'OS=="mac"', {
896 'xcode_settings': {
897 'GCC_TREAT_WARNINGS_AS_ERRORS': 'NO',
[email protected]4c4c2e5332010-06-15 11:51:06898 'WARNING_CFLAGS!': ['-Wall', '-Wextra'],
[email protected]d8543312010-02-10 17:43:28899 },
900 }],
[email protected]c14d8e772010-02-09 22:06:15901 ],
902 }, {
903 # In Chromium code, we define __STDC_FORMAT_MACROS in order to get the
904 # C99 macros on Mac and Linux.
905 'defines': [
906 '__STDC_FORMAT_MACROS',
907 ],
908 'conditions': [
909 ['OS!="win"', {
[email protected]40519592010-11-16 15:23:30910 'sources/': [ ['exclude', '_win(_unittest)?\\.(h|cc)$'],
[email protected]a316ca532010-11-15 14:08:16911 ['exclude', '(^|/)win/'],
[email protected]40519592010-11-16 15:23:30912 ['exclude', '(^|/)win_[^/]*\\.(h|cc)$'] ],
[email protected]c14d8e772010-02-09 22:06:15913 }],
914 ['OS!="mac"', {
[email protected]40519592010-11-16 15:23:30915 'sources/': [ ['exclude', '_(cocoa|mac)(_unittest)?\\.(h|cc)$'],
[email protected]a316ca532010-11-15 14:08:16916 ['exclude', '(^|/)(cocoa|mac)/'],
917 ['exclude', '\\.mm?$' ] ],
[email protected]c14d8e772010-02-09 22:06:15918 }],
[email protected]79e2336c2011-05-12 18:18:34919 ['toolkit_uses_gtk!=1', {
[email protected]c14d8e772010-02-09 22:06:15920 'sources/': [
[email protected]40519592010-11-16 15:23:30921 ['exclude', '_(chromeos|gtk|x|x11|xdg)(_unittest)?\\.(h|cc)$'],
[email protected]a316ca532010-11-15 14:08:16922 ['exclude', '(^|/)gtk/'],
[email protected]40519592010-11-16 15:23:30923 ['exclude', '(^|/)(gtk|x11)_[^/]*\\.(h|cc)$'],
[email protected]18cff3d2010-02-17 18:03:13924 ],
925 }],
926 ['OS!="linux"', {
927 'sources/': [
[email protected]40519592010-11-16 15:23:30928 ['exclude', '_linux(_unittest)?\\.(h|cc)$'],
[email protected]a316ca532010-11-15 14:08:16929 ['exclude', '(^|/)linux/'],
[email protected]18cff3d2010-02-17 18:03:13930 ],
[email protected]c14d8e772010-02-09 22:06:15931 }],
932 # We use "POSIX" to refer to all non-Windows operating systems.
933 ['OS=="win"', {
[email protected]40519592010-11-16 15:23:30934 'sources/': [ ['exclude', '_posix\\.(h|cc)$'] ],
[email protected]f55bd4862010-05-27 15:38:07935 # turn on warnings for signed/unsigned mismatch on chromium code.
936 'msvs_settings': {
937 'VCCLCompilerTool': {
938 'AdditionalOptions': ['/we4389'],
939 },
940 },
[email protected]c14d8e772010-02-09 22:06:15941 }],
[email protected]63e39a282011-07-13 20:41:28942 ['OS=="win" and component=="shared_library"', {
943 'msvs_disabled_warnings': [
944 4251, # class 'std::xx' needs to have dll-interface.
945 ],
946 }],
[email protected]c14d8e772010-02-09 22:06:15947 ['chromeos!=1', {
[email protected]40519592010-11-16 15:23:30948 'sources/': [ ['exclude', '_chromeos\\.(h|cc)$'] ]
[email protected]c14d8e772010-02-09 22:06:15949 }],
[email protected]06c756182010-04-27 18:31:31950 ['toolkit_views==0', {
[email protected]40519592010-11-16 15:23:30951 'sources/': [ ['exclude', '_views\\.(h|cc)$'] ]
[email protected]c14d8e772010-02-09 22:06:15952 }],
953 ],
954 }],
[email protected]a6e22132010-02-10 20:43:18955 ], # target_conditions for 'target_defaults'
[email protected]2f80c312009-02-25 21:26:55956 'default_configuration': 'Debug',
957 'configurations': {
[email protected]5153767c2009-12-22 01:52:50958 # VCLinkerTool LinkIncremental values below:
959 # 0 == default
960 # 1 == /INCREMENTAL:NO
961 # 2 == /INCREMENTAL
962 # Debug links incremental, Release does not.
963 #
[email protected]7b99801e2010-11-03 17:26:23964 # Abstract base configurations to cover common attributes.
[email protected]5153767c2009-12-22 01:52:50965 #
966 'Common_Base': {
[email protected]bb05e452009-10-29 21:24:56967 'abstract': 1,
968 'msvs_configuration_attributes': {
969 'OutputDirectory': '$(SolutionDir)$(ConfigurationName)',
970 'IntermediateDirectory': '$(OutDir)\\obj\\$(ProjectName)',
971 'CharacterSet': '1',
972 },
[email protected]5153767c2009-12-22 01:52:50973 },
974 'x86_Base': {
975 'abstract': 1,
[email protected]ef4fa4072009-12-04 22:46:50976 'msvs_settings': {
977 'VCLinkerTool': {
978 'TargetMachine': '1',
979 },
980 },
[email protected]2fa40782009-11-01 21:17:34981 'msvs_configuration_platform': 'Win32',
[email protected]bb05e452009-10-29 21:24:56982 },
[email protected]5153767c2009-12-22 01:52:50983 'x64_Base': {
984 'abstract': 1,
985 'msvs_configuration_platform': 'x64',
986 'msvs_settings': {
987 'VCLinkerTool': {
988 'TargetMachine': '17', # x86 - 64
[email protected]5153767c2009-12-22 01:52:50989 'AdditionalLibraryDirectories!':
990 ['<(DEPTH)/third_party/platformsdk_win7/files/Lib'],
991 'AdditionalLibraryDirectories':
992 ['<(DEPTH)/third_party/platformsdk_win7/files/Lib/x64'],
993 },
[email protected]d26b4418ab2010-03-24 22:06:35994 'VCLibrarianTool': {
[email protected]5153767c2009-12-22 01:52:50995 'AdditionalLibraryDirectories!':
996 ['<(DEPTH)/third_party/platformsdk_win7/files/Lib'],
997 'AdditionalLibraryDirectories':
998 ['<(DEPTH)/third_party/platformsdk_win7/files/Lib/x64'],
999 },
1000 },
1001 'defines': [
1002 # Not sure if tcmalloc works on 64-bit Windows.
1003 'NO_TCMALLOC',
1004 ],
1005 },
1006 'Debug_Base': {
1007 'abstract': 1,
[email protected]14339762011-04-05 07:36:581008 'defines': [
1009 'DYNAMIC_ANNOTATIONS_ENABLED=1',
1010 'WTF_USE_DYNAMIC_ANNOTATIONS=1',
1011 ],
[email protected]1c966092009-08-20 21:19:261012 'xcode_settings': {
1013 'COPY_PHASE_STRIP': 'NO',
[email protected]d5d593a2009-08-28 23:23:291014 'GCC_OPTIMIZATION_LEVEL': '<(mac_debug_optimization)',
[email protected]a68c29a2011-07-01 16:23:491015 'OTHER_CFLAGS': [
[email protected]a68c29a2011-07-01 16:23:491016 '<@(debug_extra_cflags)',
1017 ],
[email protected]1c966092009-08-20 21:19:261018 },
[email protected]bb05e452009-10-29 21:24:561019 'msvs_settings': {
1020 'VCCLCompilerTool': {
[email protected]7e0d664a2009-12-03 21:07:471021 'Optimization': '<(win_debug_Optimization)',
[email protected]bb05e452009-10-29 21:24:561022 'PreprocessorDefinitions': ['_DEBUG'],
[email protected]6b0507b2010-05-07 07:41:211023 'BasicRuntimeChecks': '<(win_debug_RuntimeChecks)',
[email protected]7e0d664a2009-12-03 21:07:471024 'RuntimeLibrary': '<(win_debug_RuntimeLibrary)',
[email protected]2ae6e022010-05-07 13:19:151025 'conditions': [
1026 # According to MSVS, InlineFunctionExpansion=0 means
1027 # "default inlining", not "/Ob0".
1028 # Thus, we have to handle InlineFunctionExpansion==0 separately.
1029 ['win_debug_InlineFunctionExpansion==0', {
1030 'AdditionalOptions': ['/Ob0'],
1031 }],
1032 ['win_debug_InlineFunctionExpansion!=""', {
1033 'InlineFunctionExpansion':
1034 '<(win_debug_InlineFunctionExpansion)',
1035 }],
[email protected]fac10d12010-11-08 16:00:311036 ['win_debug_disable_iterator_debugging==1', {
1037 'PreprocessorDefinitions': ['_HAS_ITERATOR_DEBUGGING=0'],
1038 }],
[email protected]2ae6e022010-05-07 13:19:151039 ],
[email protected]bb05e452009-10-29 21:24:561040 },
1041 'VCLinkerTool': {
1042 'LinkIncremental': '<(msvs_debug_link_incremental)',
[email protected]646f6b42011-07-14 13:57:021043 # ASLR makes debugging with windbg difficult because Chrome.exe and
1044 # Chrome.dll share the same base name. As result, windbg will
1045 # name the Chrome.dll module like chrome_<base address>, where
1046 # <base address> typically changes with each launch. This in turn
1047 # means that breakpoints in Chrome.dll don't stick from one launch
1048 # to the next. For this reason, we turn ASLR off in debug builds.
1049 # Note that this is a three-way bool, where 0 means to pick up
1050 # the default setting, 1 is off and 2 is on.
1051 'RandomizedBaseAddress': 1,
[email protected]bb05e452009-10-29 21:24:561052 },
1053 'VCResourceCompilerTool': {
1054 'PreprocessorDefinitions': ['_DEBUG'],
1055 },
1056 },
[email protected]2f80c312009-02-25 21:26:551057 'conditions': [
[email protected]bb05e452009-10-29 21:24:561058 ['OS=="linux"', {
1059 'cflags': [
1060 '<@(debug_extra_cflags)',
1061 ],
[email protected]2f80c312009-02-25 21:26:551062 }],
[email protected]56cca4e2011-07-01 21:33:351063 ['release_valgrind_build==0', {
1064 'xcode_settings': {
1065 'OTHER_CFLAGS': [
1066 '-fstack-protector-all', # Implies -fstack-protector
1067 ],
1068 },
1069 }],
[email protected]2f80c312009-02-25 21:26:551070 ],
1071 },
[email protected]5153767c2009-12-22 01:52:501072 'Release_Base': {
1073 'abstract': 1,
[email protected]2f80c312009-02-25 21:26:551074 'defines': [
1075 'NDEBUG',
1076 ],
[email protected]1c966092009-08-20 21:19:261077 'xcode_settings': {
1078 'DEAD_CODE_STRIPPING': 'YES', # -Wl,-dead_strip
1079 'GCC_OPTIMIZATION_LEVEL': '<(mac_release_optimization)',
[email protected]ffd984b12009-09-11 19:37:001080 'OTHER_CFLAGS': [ '<@(release_extra_cflags)', ],
[email protected]1c966092009-08-20 21:19:261081 },
[email protected]bb05e452009-10-29 21:24:561082 'msvs_settings': {
[email protected]7e0d664a2009-12-03 21:07:471083 'VCCLCompilerTool': {
1084 'Optimization': '<(win_release_Optimization)',
1085 'RuntimeLibrary': '<(win_release_RuntimeLibrary)',
[email protected]2ae6e022010-05-07 13:19:151086 'conditions': [
1087 # According to MSVS, InlineFunctionExpansion=0 means
1088 # "default inlining", not "/Ob0".
1089 # Thus, we have to handle InlineFunctionExpansion==0 separately.
1090 ['win_release_InlineFunctionExpansion==0', {
1091 'AdditionalOptions': ['/Ob0'],
1092 }],
1093 ['win_release_InlineFunctionExpansion!=""', {
1094 'InlineFunctionExpansion':
1095 '<(win_release_InlineFunctionExpansion)',
1096 }],
1097 ],
[email protected]7e0d664a2009-12-03 21:07:471098 },
[email protected]bb05e452009-10-29 21:24:561099 'VCLinkerTool': {
1100 'LinkIncremental': '1',
1101 },
1102 },
[email protected]2f80c312009-02-25 21:26:551103 'conditions': [
[email protected]92822e82009-09-18 14:26:561104 ['release_valgrind_build==0', {
[email protected]14339762011-04-05 07:36:581105 'defines': [
1106 'NVALGRIND',
1107 'DYNAMIC_ANNOTATIONS_ENABLED=0',
1108 ],
[email protected]ee857512010-05-14 08:24:421109 }, {
[email protected]14339762011-04-05 07:36:581110 'defines': [
1111 'DYNAMIC_ANNOTATIONS_ENABLED=1',
1112 'WTF_USE_DYNAMIC_ANNOTATIONS=1',
1113 ],
[email protected]92822e82009-09-18 14:26:561114 }],
[email protected]7e0d664a2009-12-03 21:07:471115 ['win_use_allocator_shim==0', {
1116 'defines': ['NO_TCMALLOC'],
1117 }],
[email protected]bb05e452009-10-29 21:24:561118 ['OS=="linux"', {
1119 'cflags': [
[email protected]ffd984b12009-09-11 19:37:001120 '<@(release_extra_cflags)',
[email protected]bb05e452009-10-29 21:24:561121 ],
1122 }],
[email protected]2f80c312009-02-25 21:26:551123 ],
1124 },
[email protected]5153767c2009-12-22 01:52:501125 'Purify_Base': {
1126 'abstract': 1,
1127 'defines': [
1128 'PURIFY',
1129 'NO_TCMALLOC',
1130 ],
1131 'msvs_settings': {
1132 'VCCLCompilerTool': {
1133 'Optimization': '0',
1134 'RuntimeLibrary': '0',
1135 'BufferSecurityCheck': 'false',
1136 },
1137 'VCLinkerTool': {
1138 'EnableCOMDATFolding': '1',
1139 'LinkIncremental': '1',
1140 },
1141 },
1142 },
1143 #
1144 # Concrete configurations
1145 #
1146 'Debug': {
1147 'inherit_from': ['Common_Base', 'x86_Base', 'Debug_Base'],
1148 },
1149 'Release': {
1150 'inherit_from': ['Common_Base', 'x86_Base', 'Release_Base'],
1151 'conditions': [
1152 ['msvs_use_common_release', {
[email protected]1f9471a2010-01-04 06:40:161153 'includes': ['release.gypi'],
[email protected]5153767c2009-12-22 01:52:501154 }],
1155 ]
1156 },
[email protected]f926fa0a2009-08-04 22:50:131157 'conditions': [
1158 [ 'OS=="win"', {
1159 # TODO(bradnelson): add a gyp mechanism to make this more graceful.
1160 'Purify': {
[email protected]5153767c2009-12-22 01:52:501161 'inherit_from': ['Common_Base', 'x86_Base', 'Release_Base', 'Purify'],
[email protected]ef4fa4072009-12-04 22:46:501162 },
1163 'Debug_x64': {
[email protected]5153767c2009-12-22 01:52:501164 'inherit_from': ['Common_Base', 'x64_Base', 'Debug_Base'],
[email protected]78263c12009-11-01 23:45:301165 },
1166 'Release_x64': {
[email protected]5153767c2009-12-22 01:52:501167 'inherit_from': ['Common_Base', 'x64_Base', 'Release_Base'],
[email protected]78263c12009-11-01 23:45:301168 },
1169 'Purify_x64': {
[email protected]1f9471a2010-01-04 06:40:161170 'inherit_from': ['Common_Base', 'x64_Base', 'Release_Base', 'Purify_Base'],
[email protected]78263c12009-11-01 23:45:301171 },
[email protected]f926fa0a2009-08-04 22:50:131172 }],
1173 ],
[email protected]2f80c312009-02-25 21:26:551174 },
1175 },
1176 'conditions': [
[email protected]79e2336c2011-05-12 18:18:341177 ['os_posix==1 and OS!="mac"', {
[email protected]9d384032009-03-20 23:13:261178 'target_defaults': {
[email protected]5315f2842009-04-28 00:43:271179 # Enable -Werror by default, but put it in a variable so it can
1180 # be disabled in ~/.gyp/include.gypi on the valgrind builders.
1181 'variables': {
[email protected]57e94022011-05-04 15:33:191182 # Use -fno-strict-aliasing, see http://crbug.com/32204
[email protected]ecf52cb82010-01-13 19:25:421183 'no_strict_aliasing%': 1,
[email protected]79e2336c2011-05-12 18:18:341184 'conditions': [
1185 ['OS=="linux"', {
1186 'werror%': '-Werror',
1187 }, { # turn off -Werror on other Unices
1188 'werror%': '',
1189 }],
[email protected]47deeb62009-12-17 14:49:391190 ],
[email protected]5315f2842009-04-28 00:43:271191 },
[email protected]9d384032009-03-20 23:13:261192 'cflags': [
[email protected]1bba09c2009-08-13 12:53:161193 '<(werror)', # See note above about the werror variable.
1194 '-pthread',
1195 '-fno-exceptions',
1196 '-Wall',
[email protected]0fa17082010-03-26 00:48:051197 # TODO(evan): turn this back on once all the builds work.
1198 # '-Wextra',
[email protected]225c8f52010-02-05 22:23:201199 # Don't warn about unused function params. We use those everywhere.
1200 '-Wno-unused-parameter',
1201 # Don't warn about the "struct foo f = {0};" initialization pattern.
1202 '-Wno-missing-field-initializers',
[email protected]1bba09c2009-08-13 12:53:161203 '-D_FILE_OFFSET_BITS=64',
[email protected]3df6e3a2010-01-21 20:23:121204 # Don't export any symbols (for example, to plugins we dlopen()).
1205 # Note: this is *required* to make some plugins work.
1206 '-fvisibility=hidden',
[email protected]7ca6ce12010-09-15 23:39:351207 '-pipe',
[email protected]8a2fcba2009-07-29 00:52:241208 ],
1209 'cflags_cc': [
[email protected]832d0212009-10-28 19:12:221210 '-fno-rtti',
[email protected]8a2fcba2009-07-29 00:52:241211 '-fno-threadsafe-statics',
[email protected]f5986c42009-11-17 18:39:361212 # Make inline functions have hidden visiblity by default.
1213 # Surprisingly, not covered by -fvisibility=hidden.
1214 '-fvisibility-inlines-hidden',
[email protected]9d384032009-03-20 23:13:261215 ],
[email protected]a6cf87e2009-04-03 04:07:381216 'ldflags': [
[email protected]138241f2010-03-30 23:53:101217 '-pthread', '-Wl,-z,noexecstack',
[email protected]9d384032009-03-20 23:13:261218 ],
[email protected]3aacaf952009-04-02 15:34:091219 'configurations': {
[email protected]5153767c2009-12-22 01:52:501220 'Debug_Base': {
[email protected]c5bdc032009-04-20 19:11:311221 'variables': {
1222 'debug_optimize%': '0',
1223 },
[email protected]3aacaf952009-04-02 15:34:091224 'defines': [
1225 '_DEBUG',
1226 ],
1227 'cflags': [
[email protected]9cb5cc702011-02-01 19:56:041228 '-O>(debug_optimize)',
[email protected]3aacaf952009-04-02 15:34:091229 '-g',
1230 ],
[email protected]5315f2842009-04-28 00:43:271231 },
[email protected]5153767c2009-12-22 01:52:501232 'Release_Base': {
[email protected]740e2de2009-07-21 11:41:011233 'variables': {
1234 'release_optimize%': '2',
[email protected]1dd529642010-05-15 01:02:511235 # Binaries become big and gold is unable to perform GC
1236 # and remove unused sections for some of test targets
1237 # on 32 bit platform.
1238 # (This is currently observed only in chromeos valgrind bots)
1239 # The following flag is to disable --gc-sections linker
1240 # option for these bots.
1241 'no_gc_sections%': 0,
[email protected]409dceef2011-05-10 19:49:121242
1243 # TODO(bradnelson): reexamine how this is done if we change the
1244 # expansion of configurations
1245 'release_valgrind_build%': 0,
[email protected]740e2de2009-07-21 11:41:011246 },
[email protected]3aacaf952009-04-02 15:34:091247 'cflags': [
[email protected]9cb5cc702011-02-01 19:56:041248 '-O>(release_optimize)',
[email protected]d8cc3a62009-04-08 18:29:531249 # Don't emit the GCC version ident directives, they just end up
1250 # in the .comment section taking up binary size.
1251 '-fno-ident',
1252 # Put data and code in their own sections, so that unused symbols
1253 # can be removed at link time with --gc-sections.
1254 '-fdata-sections',
1255 '-ffunction-sections',
[email protected]3aacaf952009-04-02 15:34:091256 ],
[email protected]c902f2c2010-08-06 20:04:181257 'ldflags': [
1258 # Specifically tell the linker to perform optimizations.
1259 # See http://lwn.net/Articles/192624/ .
1260 '-Wl,-O1',
[email protected]27c2e492010-08-06 22:55:221261 '-Wl,--as-needed',
[email protected]c902f2c2010-08-06 20:04:181262 ],
[email protected]1dd529642010-05-15 01:02:511263 'conditions' : [
1264 ['no_gc_sections==0', {
1265 'ldflags': [
1266 '-Wl,--gc-sections',
1267 ],
1268 }],
[email protected]ecf7b6482010-10-13 09:15:201269 ['clang==1', {
1270 'cflags!': [
1271 '-fno-ident',
1272 ],
1273 }],
[email protected]7664ab32011-02-01 23:35:251274 ['profiling==1', {
1275 'cflags': [
1276 '-fno-omit-frame-pointer',
1277 '-g',
1278 ],
1279 }],
[email protected]c75f33e42011-05-04 18:11:521280 # At gyp time, we test the linker for ICF support; this flag
1281 # is then provided to us by gyp. (Currently only gold supports
1282 # an --icf flag.)
[email protected]16d71b0d2011-06-22 00:43:531283 # There seems to be a conflict of --icf and -pie in gold which
1284 # can generate crashy binaries. As a security measure, -pie
1285 # takes precendence for now.
[email protected]409dceef2011-05-10 19:49:121286 ['LINKER_SUPPORTS_ICF==1 and release_valgrind_build==0', {
[email protected]f2fcf4df72011-06-03 20:05:461287 'target_conditions': [
1288 ['_toolset=="target"', {
1289 'ldflags': [
[email protected]16d71b0d2011-06-22 00:43:531290 #'-Wl,--icf=safe',
1291 '-Wl,--icf=none',
[email protected]f2fcf4df72011-06-03 20:05:461292 ]
1293 }]
[email protected]c75f33e42011-05-04 18:11:521294 ]
1295 }],
[email protected]1dd529642010-05-15 01:02:511296 ]
[email protected]3aacaf952009-04-02 15:34:091297 },
1298 },
[email protected]601b540222009-04-03 21:32:041299 'variants': {
1300 'coverage': {
1301 'cflags': ['-fprofile-arcs', '-ftest-coverage'],
1302 'ldflags': ['-fprofile-arcs'],
1303 },
1304 'profile': {
1305 'cflags': ['-pg', '-g'],
1306 'ldflags': ['-pg'],
1307 },
1308 'symbols': {
1309 'cflags': ['-g'],
1310 },
1311 },
[email protected]606116d22009-05-06 22:38:231312 'conditions': [
[email protected]7e8eb7612009-07-29 15:56:001313 [ 'target_arch=="ia32"', {
[email protected]606116d22009-05-06 22:38:231314 'asflags': [
1315 # Needed so that libs with .s files (e.g. libicudata.a)
1316 # are compatible with the general 32-bit-ness.
1317 '-32',
1318 ],
1319 # All floating-point computations on x87 happens in 80-bit
1320 # precision. Because the C and C++ language standards allow
1321 # the compiler to keep the floating-point values in higher
1322 # precision than what's specified in the source and doing so
1323 # is more efficient than constantly rounding up to 64-bit or
1324 # 32-bit precision as specified in the source, the compiler,
1325 # especially in the optimized mode, tries very hard to keep
1326 # values in x87 floating-point stack (in 80-bit precision)
1327 # as long as possible. This has important side effects, that
1328 # the real value used in computation may change depending on
1329 # how the compiler did the optimization - that is, the value
1330 # kept in 80-bit is different than the value rounded down to
1331 # 64-bit or 32-bit. There are possible compiler options to make
1332 # this behavior consistent (e.g. -ffloat-store would keep all
1333 # floating-values in the memory, thus force them to be rounded
1334 # to its original precision) but they have significant runtime
1335 # performance penalty.
1336 #
1337 # -mfpmath=sse -msse2 makes the compiler use SSE instructions
1338 # which keep floating-point values in SSE registers in its
1339 # native precision (32-bit for single precision, and 64-bit for
1340 # double precision values). This means the floating-point value
1341 # used during computation does not change depending on how the
1342 # compiler optimized the code, since the value is always kept
1343 # in its specified precision.
[email protected]ffde7932009-05-29 00:39:061344 'conditions': [
[email protected]ac120ff2010-04-28 02:14:221345 ['branding=="Chromium" and disable_sse2==0', {
[email protected]ffde7932009-05-29 00:39:061346 'cflags': [
1347 '-march=pentium4',
1348 '-msse2',
1349 '-mfpmath=sse',
1350 ],
1351 }],
[email protected]06c756182010-04-27 18:31:311352 # ChromeOS targets Pinetrail, which is sse3, but most of the
[email protected]0183dbb2010-04-16 02:00:441353 # benefit comes from sse2 so this setting allows ChromeOS
1354 # to build on other CPUs. In the future -march=atom would help
1355 # but requires a newer compiler.
[email protected]ac120ff2010-04-28 02:14:221356 ['chromeos==1 and disable_sse2==0', {
[email protected]0183dbb2010-04-16 02:00:441357 'cflags': [
1358 '-msse2',
1359 ],
1360 }],
[email protected]34799f9d2010-07-08 17:51:331361 # Install packages have started cropping up with
1362 # different headers between the 32-bit and 64-bit
1363 # versions, so we have to shadow those differences off
1364 # and make sure a 32-bit-on-64-bit build picks up the
1365 # right files.
1366 ['host_arch!="ia32"', {
1367 'include_dirs+': [
1368 '/usr/include32',
1369 ],
1370 }],
[email protected]ffde7932009-05-29 00:39:061371 ],
[email protected]dc259ce52010-04-13 04:03:101372 # -mmmx allows mmintrin.h to be used for mmx intrinsics.
1373 # video playback is mmx and sse2 optimized.
[email protected]606116d22009-05-06 22:38:231374 'cflags': [
1375 '-m32',
[email protected]dc259ce52010-04-13 04:03:101376 '-mmmx',
[email protected]1c6560af2009-07-14 11:02:161377 ],
[email protected]606116d22009-05-06 22:38:231378 'ldflags': [
1379 '-m32',
1380 ],
1381 }],
[email protected]3dda8a962009-08-10 18:58:071382 ['target_arch=="arm"', {
[email protected]77c1b29392009-12-04 06:21:291383 'target_conditions': [
1384 ['_toolset=="target"', {
1385 'cflags_cc': [
1386 # The codesourcery arm-2009q3 toolchain warns at that the ABI
1387 # has changed whenever it encounters a varargs function. This
1388 # silences those warnings, as they are not helpful and
1389 # clutter legitimate warnings.
1390 '-Wno-abi',
1391 ],
1392 'conditions': [
1393 ['arm_thumb == 1', {
1394 'cflags': [
1395 '-mthumb',
[email protected]77c1b29392009-12-04 06:21:291396 ]
1397 }],
1398 ['armv7==1', {
[email protected]dc9711f2009-11-13 19:30:251399 'cflags': [
1400 '-march=armv7-a',
1401 '-mtune=cortex-a8',
[email protected]dc9711f2009-11-13 19:30:251402 '-mfloat-abi=softfp',
1403 ],
[email protected]eafc0b452010-02-26 21:53:431404 'conditions': [
1405 ['arm_neon==1', {
1406 'cflags': [ '-mfpu=neon', ],
1407 }, {
[email protected]53e0f642010-03-05 01:41:561408 'cflags': [ '-mfpu=<(arm_fpu)', ],
[email protected]eafc0b452010-02-26 21:53:431409 }]
1410 ],
[email protected]dc9711f2009-11-13 19:30:251411 }],
[email protected]3dda8a962009-08-10 18:58:071412 ],
1413 }],
1414 ],
1415 }],
[email protected]2fb843b2010-08-12 02:11:081416 ['linux_fpic==1', {
[email protected]c76723a2010-01-25 23:10:581417 'cflags': [
1418 '-fPIC',
1419 ],
1420 }],
[email protected]ee28c9f2009-09-04 01:53:011421 ['sysroot!=""', {
[email protected]fd36ce822009-10-28 20:13:571422 'target_conditions': [
1423 ['_toolset=="target"', {
1424 'cflags': [
1425 '--sysroot=<(sysroot)',
1426 ],
1427 'ldflags': [
1428 '--sysroot=<(sysroot)',
1429 ],
1430 }]]
[email protected]ee28c9f2009-09-04 01:53:011431 }],
[email protected]58680ce2010-09-18 00:09:151432 ['clang==1', {
[email protected]3e40c882011-02-10 21:03:351433 'target_conditions': [
1434 ['_toolset=="target"', {
1435 'cflags': [
[email protected]7f8d486f2011-04-05 19:49:071436 '-Wheader-hygiene',
[email protected]3e40c882011-02-10 21:03:351437 # Clang spots more unused functions.
1438 '-Wno-unused-function',
1439 # Don't die on dtoa code that uses a char as an array index.
1440 '-Wno-char-subscripts',
1441 # Survive EXPECT_EQ(unnamed_enum, unsigned int) -- see
1442 # http://code.google.com/p/googletest/source/detail?r=446 .
1443 # TODO(thakis): Use -isystem instead (http://crbug.com/58751 )
1444 '-Wno-unnamed-type-template-args',
[email protected]3e40c882011-02-10 21:03:351445 ],
1446 'cflags!': [
1447 # Clang doesn't seem to know know this flag.
1448 '-mfpmath=sse',
1449 ],
1450 }]],
[email protected]58680ce2010-09-18 00:09:151451 }],
[email protected]5d451ad2011-02-11 16:43:461452 ['clang==1 and clang_use_chrome_plugins==1', {
1453 'target_conditions': [
1454 ['_toolset=="target"', {
1455 'cflags': [
1456 '<(clang_chrome_plugins_flags)',
1457 ],
1458 }]],
1459 }],
[email protected]5e781232011-01-28 02:57:591460 ['clang==1 and clang_load!="" and clang_add_plugin!=""', {
[email protected]3e40c882011-02-10 21:03:351461 'target_conditions': [
1462 ['_toolset=="target"', {
1463 'cflags': [
1464 '-Xclang', '-load', '-Xclang', '<(clang_load)',
1465 '-Xclang', '-add-plugin', '-Xclang', '<(clang_add_plugin)',
1466 ],
1467 }]],
[email protected]5e781232011-01-28 02:57:591468 }],
[email protected]cc4219a2009-08-14 05:30:521469 ['no_strict_aliasing==1', {
1470 'cflags': [
1471 '-fno-strict-aliasing',
1472 ],
1473 }],
[email protected]cbd5fd52009-08-26 00:14:271474 ['linux_breakpad==1', {
[email protected]c87efd42010-08-26 18:28:171475 'cflags': [ '-g' ],
[email protected]cbd5fd52009-08-26 00:14:271476 'defines': ['USE_LINUX_BREAKPAD'],
1477 }],
[email protected]d8b60602010-03-26 09:41:221478 ['linux_use_heapchecker==1', {
1479 'variables': {'linux_use_tcmalloc%': 1},
1480 }],
[email protected]61a9b2d82010-02-26 00:31:081481 ['linux_use_tcmalloc==0', {
1482 'defines': ['NO_TCMALLOC'],
[email protected]01699e22009-11-11 19:24:241483 }],
[email protected]d8b60602010-03-26 09:41:221484 ['linux_use_heapchecker==0', {
1485 'defines': ['NO_HEAPCHECKER'],
1486 }],
[email protected]64e2d4a42010-08-27 10:13:211487 ['linux_keep_shadow_stacks==1', {
1488 'defines': ['KEEP_SHADOW_STACKS'],
1489 'cflags': ['-finstrument-functions'],
1490 }],
[email protected]606116d22009-05-06 22:38:231491 ],
[email protected]9d384032009-03-20 23:13:261492 },
1493 }],
[email protected]c51e8d52009-12-11 20:04:061494 # FreeBSD-specific options; note that most FreeBSD options are set above,
1495 # with Linux.
1496 ['OS=="freebsd"', {
1497 'target_defaults': {
1498 'ldflags': [
1499 '-Wl,--no-keep-memory',
1500 ],
1501 },
1502 }],
[email protected]93f21e42010-04-01 00:35:151503 ['OS=="solaris"', {
1504 'cflags!': ['-fvisibility=hidden'],
1505 'cflags_cc!': ['-fvisibility-inlines-hidden'],
1506 }],
[email protected]2f80c312009-02-25 21:26:551507 ['OS=="mac"', {
1508 'target_defaults': {
[email protected]24700642009-06-01 16:01:201509 'variables': {
[email protected]9a5e72862010-09-02 16:16:581510 # These should be 'mac_real_dsym%' and 'mac_strip%', but there
1511 # seems to be a bug with % in variables that are intended to be
1512 # set to different values in different targets, like these two.
1513 'mac_strip': 1, # Strip debugging symbols from the target.
[email protected]24700642009-06-01 16:01:201514 'mac_real_dsym': 0, # Fake .dSYMs are fine in most cases.
1515 },
[email protected]d92c7c012009-03-19 19:26:421516 'mac_bundle': 0,
[email protected]2f80c312009-02-25 21:26:551517 'xcode_settings': {
1518 'ALWAYS_SEARCH_USER_PATHS': 'NO',
[email protected]ab2956372009-08-13 18:11:041519 'GCC_C_LANGUAGE_STANDARD': 'c99', # -std=c99
1520 'GCC_CW_ASM_SYNTAX': 'NO', # No -fasm-blocks
1521 'GCC_DYNAMIC_NO_PIC': 'NO', # No -mdynamic-no-pic
1522 # (Equivalent to -fPIC)
1523 'GCC_ENABLE_CPP_EXCEPTIONS': 'NO', # -fno-exceptions
1524 'GCC_ENABLE_CPP_RTTI': 'NO', # -fno-rtti
1525 'GCC_ENABLE_PASCAL_STRINGS': 'NO', # No -mpascal-strings
[email protected]3224dcd2009-09-16 17:31:251526 # GCC_INLINES_ARE_PRIVATE_EXTERN maps to -fvisibility-inlines-hidden
1527 'GCC_INLINES_ARE_PRIVATE_EXTERN': 'YES',
[email protected]ab2956372009-08-13 18:11:041528 'GCC_OBJC_CALL_CXX_CDTORS': 'YES', # -fobjc-call-cxx-cdtors
1529 'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES', # -fvisibility=hidden
1530 'GCC_THREADSAFE_STATICS': 'NO', # -fno-threadsafe-statics
1531 'GCC_TREAT_WARNINGS_AS_ERRORS': 'YES', # -Werror
[email protected]2f80c312009-02-25 21:26:551532 'GCC_VERSION': '4.2',
[email protected]ab2956372009-08-13 18:11:041533 'GCC_WARN_ABOUT_MISSING_NEWLINE': 'YES', # -Wnewline-eof
[email protected]3224dcd2009-09-16 17:31:251534 # MACOSX_DEPLOYMENT_TARGET maps to -mmacosx-version-min
1535 'MACOSX_DEPLOYMENT_TARGET': '<(mac_deployment_target)',
[email protected]ab2956372009-08-13 18:11:041536 'PREBINDING': 'NO', # No -Wl,-prebind
[email protected]2f80c312009-02-25 21:26:551537 'USE_HEADERMAP': 'NO',
[email protected]57e94022011-05-04 15:33:191538 'OTHER_CFLAGS': [
1539 '-fno-strict-aliasing', # See http://crbug.com/32204
1540 ],
[email protected]080e86f2010-06-21 15:19:041541 'WARNING_CFLAGS': [
1542 '-Wall',
1543 '-Wendif-labels',
1544 '-Wextra',
1545 # Don't warn about unused function parameters.
1546 '-Wno-unused-parameter',
1547 # Don't warn about the "struct foo f = {0};" initialization
1548 # pattern.
1549 '-Wno-missing-field-initializers',
1550 ],
[email protected]b3fb8092009-03-12 19:09:241551 'conditions': [
1552 ['chromium_mac_pch', {'GCC_PRECOMPILE_PREFIX_HEADER': 'YES'},
[email protected]9543af052009-09-15 22:42:591553 {'GCC_PRECOMPILE_PREFIX_HEADER': 'NO'}
1554 ],
[email protected]66733172010-09-22 00:09:281555 ['clang==1', {
1556 'WARNING_CFLAGS': [
[email protected]7f8d486f2011-04-05 19:49:071557 '-Wheader-hygiene',
[email protected]66733172010-09-22 00:09:281558 # Don't die on dtoa code that uses a char as an array index.
1559 # This is required solely for base/third_party/dmg_fp/dtoa.cc.
1560 '-Wno-char-subscripts',
[email protected]25d3bb722010-11-22 14:31:451561 # Clang spots more unused functions.
1562 '-Wno-unused-function',
[email protected]0fa0fbc2010-10-12 04:32:051563 # Survive EXPECT_EQ(unnamed_enum, unsigned int) -- see
1564 # http://code.google.com/p/googletest/source/detail?r=446 .
1565 # TODO(thakis): Use -isystem instead (http://crbug.com/58751 ).
1566 '-Wno-unnamed-type-template-args',
[email protected]d53680932011-06-08 16:40:061567 # TODO(thakis): Reenable once the one instance this warns on
1568 # is fixed.
1569 '-Wno-parentheses',
[email protected]66733172010-09-22 00:09:281570 ],
[email protected]bddae312011-03-05 04:47:251571 'OTHER_CFLAGS': [
1572 # TODO(thakis): Causes many warnings - http://crbug.com/75001
1573 '-fobjc-exceptions',
1574 ],
[email protected]66733172010-09-22 00:09:281575 }],
[email protected]5d451ad2011-02-11 16:43:461576 ['clang==1 and clang_use_chrome_plugins==1', {
1577 'OTHER_CFLAGS': [
1578 '<(clang_chrome_plugins_flags)',
1579 ],
1580 }],
[email protected]5e781232011-01-28 02:57:591581 ['clang==1 and clang_load!="" and clang_add_plugin!=""', {
1582 'OTHER_CFLAGS': [
1583 '-Xclang', '-load', '-Xclang', '<(clang_load)',
1584 '-Xclang', '-add-plugin', '-Xclang', '<(clang_add_plugin)',
1585 ],
1586 }],
[email protected]b3fb8092009-03-12 19:09:241587 ],
[email protected]2f80c312009-02-25 21:26:551588 },
1589 'target_conditions': [
[email protected]2f80c312009-02-25 21:26:551590 ['_type!="static_library"', {
[email protected]5d7dc972009-04-16 15:30:461591 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-search_paths_first']},
1592 }],
1593 ['_mac_bundle', {
1594 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-ObjC']},
[email protected]87fde4a2009-02-28 00:50:081595 }],
[email protected]6a0242bc2011-07-01 00:34:461596 ['_type=="executable" and release_valgrind_build==0', {
1597 # Turn on position-independence (ASLR) for executables. When PIE
1598 # is on for the Chrome executables, the framework will also be
1599 # subject to ASLR.
1600 # Don't do this when building for Valgrind because Valgrind
1601 # doesn't understand slide. TODO: Make Valgrind on Mac OS X
1602 # understand slide, and get rid of the Valgrind check.
1603 'xcode_settings': {
1604 'OTHER_LDFLAGS': [
1605 '-Wl,-pie', # Position-independent executable (MH_PIE)
1606 ],
1607 },
1608 }],
[email protected]9a5e72862010-09-02 16:16:581609 ['(_type=="executable" or _type=="shared_library" or \
1610 _type=="loadable_module") and mac_strip!=0', {
[email protected]24700642009-06-01 16:01:201611 'target_conditions': [
1612 ['mac_real_dsym == 1', {
1613 # To get a real .dSYM bundle produced by dsymutil, set the
1614 # debug information format to dwarf-with-dsym. Since
1615 # strip_from_xcode will not be used, set Xcode to do the
1616 # stripping as well.
1617 'configurations': {
[email protected]5153767c2009-12-22 01:52:501618 'Release_Base': {
[email protected]24700642009-06-01 16:01:201619 'xcode_settings': {
1620 'DEBUG_INFORMATION_FORMAT': 'dwarf-with-dsym',
1621 'DEPLOYMENT_POSTPROCESSING': 'YES',
1622 'STRIP_INSTALLED_PRODUCT': 'YES',
[email protected]e14a9f92009-08-05 19:26:071623 'target_conditions': [
[email protected]c2111422010-06-01 18:30:251624 ['_type=="shared_library" or _type=="loadable_module"', {
[email protected]e14a9f92009-08-05 19:26:071625 # The Xcode default is to strip debugging symbols
1626 # only (-S). Local symbols should be stripped as
1627 # well, which will be handled by -x. Xcode will
1628 # continue to insert -S when stripping even when
1629 # additional flags are added with STRIPFLAGS.
1630 'STRIPFLAGS': '-x',
[email protected]c2111422010-06-01 18:30:251631 }], # _type=="shared_library" or _type=="loadable_module"'
[email protected]e14a9f92009-08-05 19:26:071632 ], # target_conditions
1633 }, # xcode_settings
1634 }, # configuration "Release"
1635 }, # configurations
[email protected]24700642009-06-01 16:01:201636 }, { # mac_real_dsym != 1
1637 # To get a fast fake .dSYM bundle, use a post-build step to
1638 # produce the .dSYM and strip the executable. strip_from_xcode
1639 # only operates in the Release configuration.
1640 'postbuilds': [
1641 {
1642 'variables': {
1643 # Define strip_from_xcode in a variable ending in _path
1644 # so that gyp understands it's a path and performs proper
1645 # relativization during dict merging.
1646 'strip_from_xcode_path': 'mac/strip_from_xcode',
1647 },
1648 'postbuild_name': 'Strip If Needed',
1649 'action': ['<(strip_from_xcode_path)'],
1650 },
[email protected]e14a9f92009-08-05 19:26:071651 ], # postbuilds
1652 }], # mac_real_dsym
1653 ], # target_conditions
[email protected]9a5e72862010-09-02 16:16:581654 }], # (_type=="executable" or _type=="shared_library" or
1655 # _type=="loadable_module") and mac_strip!=0
[email protected]e14a9f92009-08-05 19:26:071656 ], # target_conditions
1657 }, # target_defaults
1658 }], # OS=="mac"
[email protected]2f80c312009-02-25 21:26:551659 ['OS=="win"', {
1660 'target_defaults': {
1661 'defines': [
1662 '_WIN32_WINNT=0x0600',
1663 'WINVER=0x0600',
1664 'WIN32',
1665 '_WINDOWS',
[email protected]2f80c312009-02-25 21:26:551666 'NOMINMAX',
1667 '_CRT_RAND_S',
1668 'CERT_CHAIN_PARA_HAS_EXTRA_FIELDS',
1669 'WIN32_LEAN_AND_MEAN',
[email protected]7a812dd62010-06-30 18:52:271670 '_ATL_NO_OPENGL',
[email protected]adfb98c2009-06-23 20:08:451671 '_HAS_TR1=0',
[email protected]2f80c312009-02-25 21:26:551672 ],
[email protected]8974e042010-06-21 18:06:521673 'conditions': [
1674 ['component=="static_library"', {
1675 'defines': [
1676 '_HAS_EXCEPTIONS=0',
1677 ],
1678 }],
[email protected]3e2648a2011-03-21 20:58:501679 ['secure_atl', {
1680 'defines': [
1681 '_SECURE_ATL',
1682 ],
1683 }],
[email protected]8974e042010-06-21 18:06:521684 ],
[email protected]5b5ca7cb2009-07-20 23:00:201685 'msvs_system_include_dirs': [
[email protected]998b5152009-12-12 22:19:521686 '<(DEPTH)/third_party/platformsdk_win7/files/Include',
[email protected]a78da50e2010-06-09 21:31:371687 '<(DEPTH)/third_party/directxsdk/files/Include',
[email protected]2f80c312009-02-25 21:26:551688 '$(VSInstallDir)/VC/atlmfc/include',
1689 ],
[email protected]a8d99cef2009-08-26 20:47:491690 'msvs_cygwin_dirs': ['<(DEPTH)/third_party/cygwin'],
[email protected]942c3a60f2011-05-03 02:04:111691 'msvs_disabled_warnings': [4351, 4396, 4503, 4819,
1692 # TODO(maruel): These warnings are level 4. They will be slowly
1693 # removed as code is fixed.
1694 4100, 4121, 4125, 4127, 4130, 4131, 4189, 4201, 4238, 4244, 4245,
1695 4310, 4355, 4428, 4481, 4505, 4510, 4512, 4530, 4610, 4611, 4701,
1696 4702, 4706,
1697 ],
[email protected]2f80c312009-02-25 21:26:551698 'msvs_settings': {
1699 'VCCLCompilerTool': {
1700 'MinimalRebuild': 'false',
[email protected]2f80c312009-02-25 21:26:551701 'BufferSecurityCheck': 'true',
1702 'EnableFunctionLevelLinking': 'true',
1703 'RuntimeTypeInfo': 'false',
[email protected]942c3a60f2011-05-03 02:04:111704 'WarningLevel': '4',
[email protected]2f80c312009-02-25 21:26:551705 'WarnAsError': 'true',
1706 'DebugInformationFormat': '3',
[email protected]3fef6e62009-07-31 19:58:581707 'conditions': [
[email protected]3e2648a2011-03-21 20:58:501708 ['msvs_multi_core_compile', {
[email protected]1f9471a2010-01-04 06:40:161709 'AdditionalOptions': ['/MP'],
[email protected]912c55c2009-07-31 23:33:551710 }],
[email protected]3e2648a2011-03-21 20:58:501711 ['MSVS_VERSION=="2005e"', {
1712 'AdditionalOptions': ['/w44068'], # Unknown pragma to 4 (ATL)
1713 }],
[email protected]8974e042010-06-21 18:06:521714 ['component=="shared_library"', {
1715 'ExceptionHandling': '1', # /EHsc
1716 }, {
1717 'ExceptionHandling': '0',
1718 }],
[email protected]3fef6e62009-07-31 19:58:581719 ],
[email protected]2f80c312009-02-25 21:26:551720 },
1721 'VCLibrarianTool': {
[email protected]1f9471a2010-01-04 06:40:161722 'AdditionalOptions': ['/ignore:4221'],
[email protected]a78da50e2010-06-09 21:31:371723 'AdditionalLibraryDirectories': [
1724 '<(DEPTH)/third_party/platformsdk_win7/files/Lib',
1725 '<(DEPTH)/third_party/directxsdk/files/Lib/x86',
1726 ],
[email protected]2f80c312009-02-25 21:26:551727 },
1728 'VCLinkerTool': {
[email protected]2f80c312009-02-25 21:26:551729 'AdditionalDependencies': [
1730 'wininet.lib',
[email protected]b1d8c252011-01-13 20:27:501731 'dnsapi.lib',
[email protected]2f80c312009-02-25 21:26:551732 'version.lib',
1733 'msimg32.lib',
1734 'ws2_32.lib',
1735 'usp10.lib',
1736 'psapi.lib',
[email protected]96fd0032009-04-24 00:13:081737 'dbghelp.lib',
[email protected]dfdf7ee2011-04-28 18:51:481738 'winmm.lib',
1739 'shlwapi.lib',
[email protected]2f80c312009-02-25 21:26:551740 ],
[email protected]4de39f82011-03-28 12:01:291741 'conditions': [
[email protected]3e2648a2011-03-21 20:58:501742 ['msvs_express', {
1743 # Explicitly required when using the ATL with express
1744 'AdditionalDependencies': [
1745 'atlthunk.lib',
1746 ],
1747 }],
1748 ['MSVS_VERSION=="2005e"', {
1749 # Non-express versions link automatically to these
1750 'AdditionalDependencies': [
1751 'advapi32.lib',
1752 'comdlg32.lib',
1753 'ole32.lib',
1754 'shell32.lib',
1755 'user32.lib',
1756 'winspool.lib',
1757 ],
1758 }],
1759 ],
[email protected]a78da50e2010-06-09 21:31:371760 'AdditionalLibraryDirectories': [
1761 '<(DEPTH)/third_party/platformsdk_win7/files/Lib',
1762 '<(DEPTH)/third_party/directxsdk/files/Lib/x86',
1763 ],
[email protected]2f80c312009-02-25 21:26:551764 'GenerateDebugInformation': 'true',
1765 'MapFileName': '$(OutDir)\\$(TargetName).map',
1766 'ImportLibrary': '$(OutDir)\\lib\\$(TargetName).lib',
[email protected]2f80c312009-02-25 21:26:551767 'FixedBaseAddress': '1',
[email protected]825ff8d2009-05-22 01:40:481768 # SubSystem values:
1769 # 0 == not set
1770 # 1 == /SUBSYSTEM:CONSOLE
1771 # 2 == /SUBSYSTEM:WINDOWS
1772 # Most of the executables we'll ever create are tests
1773 # and utilities with console output.
1774 'SubSystem': '1',
[email protected]2f80c312009-02-25 21:26:551775 },
1776 'VCMIDLTool': {
1777 'GenerateStublessProxies': 'true',
1778 'TypeLibraryName': '$(InputName).tlb',
1779 'OutputDirectory': '$(IntDir)',
1780 'HeaderFileName': '$(InputName).h',
1781 'DLLDataFileName': 'dlldata.c',
1782 'InterfaceIdentifierFileName': '$(InputName)_i.c',
1783 'ProxyFileName': '$(InputName)_p.c',
1784 },
1785 'VCResourceCompilerTool': {
1786 'Culture' : '1033',
[email protected]4d91cbc2010-05-07 20:41:381787 'AdditionalIncludeDirectories': [
1788 '<(DEPTH)',
1789 '<(SHARED_INTERMEDIATE_DIR)',
1790 ],
[email protected]2f80c312009-02-25 21:26:551791 },
1792 },
1793 },
1794 }],
[email protected]79e2336c2011-05-12 18:18:341795 ['disable_nacl==1', {
[email protected]d8c7cbcc2009-10-02 19:00:311796 'target_defaults': {
1797 'defines': [
1798 'DISABLE_NACL',
1799 ],
1800 },
1801 }],
[email protected]cfbf9bc2009-12-07 22:07:561802 ['OS=="win" and msvs_use_common_linker_extras', {
[email protected]48c7af72009-07-03 22:00:191803 'target_defaults': {
1804 'msvs_settings': {
1805 'VCLinkerTool': {
[email protected]48c7af72009-07-03 22:00:191806 'DelayLoadDLLs': [
1807 'dbghelp.dll',
1808 'dwmapi.dll',
1809 'uxtheme.dll',
1810 ],
1811 },
1812 },
[email protected]ef4fa4072009-12-04 22:46:501813 'configurations': {
[email protected]5153767c2009-12-22 01:52:501814 'x86_Base': {
[email protected]ef4fa4072009-12-04 22:46:501815 'msvs_settings': {
1816 'VCLinkerTool': {
[email protected]1f9471a2010-01-04 06:40:161817 'AdditionalOptions': [
1818 '/safeseh',
1819 '/dynamicbase',
1820 '/ignore:4199',
1821 '/ignore:4221',
1822 '/nxcompat',
1823 ],
[email protected]ef4fa4072009-12-04 22:46:501824 },
1825 },
1826 },
[email protected]5153767c2009-12-22 01:52:501827 'x64_Base': {
[email protected]ef4fa4072009-12-04 22:46:501828 'msvs_settings': {
1829 'VCLinkerTool': {
[email protected]1f9471a2010-01-04 06:40:161830 'AdditionalOptions': [
[email protected]ef4fa4072009-12-04 22:46:501831 # safeseh is not compatible with x64
[email protected]1f9471a2010-01-04 06:40:161832 '/dynamicbase',
1833 '/ignore:4199',
1834 '/ignore:4221',
1835 '/nxcompat',
1836 ],
[email protected]ef4fa4072009-12-04 22:46:501837 },
1838 },
1839 },
1840 },
[email protected]48c7af72009-07-03 22:00:191841 },
1842 }],
[email protected]9821d0d2010-04-16 22:40:371843 ['enable_new_npdevice_api==1', {
1844 'target_defaults': {
1845 'defines': [
1846 'ENABLE_NEW_NPDEVICE_API',
1847 ],
1848 },
1849 }],
[email protected]2f80c312009-02-25 21:26:551850 ],
1851 'xcode_settings': {
[email protected]0c8ab452009-11-06 21:57:501852 # DON'T ADD ANYTHING NEW TO THIS BLOCK UNLESS YOU REALLY REALLY NEED IT!
1853 # This block adds *project-wide* configuration settings to each project
1854 # file. It's almost always wrong to put things here. Specify your
1855 # custom xcode_settings in target_defaults to add them to targets instead.
1856
1857 # In an Xcode Project Info window, the "Base SDK for All Configurations"
1858 # setting sets the SDK on a project-wide basis. In order to get the
1859 # configured SDK to show properly in the Xcode UI, SDKROOT must be set
1860 # here at the project level.
1861 'SDKROOT': 'macosx<(mac_sdk)', # -isysroot
1862
[email protected]2f80c312009-02-25 21:26:551863 # The Xcode generator will look for an xcode_settings section at the root
1864 # of each dict and use it to apply settings on a file-wide basis. Most
1865 # settings should not be here, they should be in target-specific
1866 # xcode_settings sections, or better yet, should use non-Xcode-specific
1867 # settings in target dicts. SYMROOT is a special case, because many other
1868 # Xcode variables depend on it, including variables such as
1869 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something
1870 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the
1871 # files to appear (when present) in the UI as actual files and not red
1872 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR,
1873 # and therefore SYMROOT, needs to be set at the project level.
[email protected]bfa24b962009-03-02 00:16:161874 'SYMROOT': '<(DEPTH)/xcodebuild',
[email protected]2f80c312009-02-25 21:26:551875 },
[email protected]ee28c9f2009-09-04 01:53:011876}