blob: 768d9bcce0c2249aea6f52f0f31d137600308b7b [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
38 # Whether the compositor is enabled on views.
39 'views_compositor%': 0,
[email protected]bb6aba32011-01-07 19:04:4340 },
41 # Copy conditionally-set variables out one scope.
42 'chromeos%': '<(chromeos)',
[email protected]1b546692011-06-30 18:22:3043 'toolkit_uses_pure_views%': '<(toolkit_uses_pure_views)',
[email protected]bb6aba32011-01-07 19:04:4344 'touchui%': '<(touchui)',
[email protected]9c8a1982011-05-24 23:08:5845 'views_compositor%': '<(views_compositor)',
[email protected]e72e55b2011-01-06 22:19:3046
[email protected]e72e55b2011-01-06 22:19:3047 # Compute the architecture that we're building on.
48 'conditions': [
[email protected]c49ab0c2011-05-18 17:25:3749 [ 'OS=="win" or OS=="mac"', {
50 'host_arch%': 'ia32',
51 }, {
[email protected]79e2336c2011-05-12 18:18:3452 # This handles the Unix platforms for which there is some support.
53 # Anything else gets passed through, which probably won't work very
54 # well; such hosts should pass an explicit target_arch to gyp.
[email protected]e72e55b2011-01-06 22:19:3055 'host_arch%':
[email protected]79e2336c2011-05-12 18:18:3456 '<!(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:3057 }],
[email protected]bb6aba32011-01-07 19:04:4358
59 # Set default value of toolkit_views on for Windows, Chrome OS
60 # and the touch UI.
[email protected]1b546692011-06-30 18:22:3061 ['OS=="win" or chromeos==1 or touchui==1 or toolkit_uses_pure_views==1', {
[email protected]bb6aba32011-01-07 19:04:4362 'toolkit_views%': 1,
63 }, {
64 'toolkit_views%': 0,
65 }],
[email protected]1b546692011-06-30 18:22:3066
67 # Views are always Pure in Touch case
68 ['touchui==1', {
69 'toolkit_uses_pure_views%': 1,
70 }, {
71 'toolkit_uses_pure_views%': 0,
72 }],
[email protected]e72e55b2011-01-06 22:19:3073 ],
74 },
75
76 # Copy conditionally-set variables out one scope.
77 'chromeos%': '<(chromeos)',
78 'touchui%': '<(touchui)',
79 'host_arch%': '<(host_arch)',
[email protected]bb6aba32011-01-07 19:04:4380 'toolkit_views%': '<(toolkit_views)',
[email protected]1b546692011-06-30 18:22:3081 'toolkit_uses_pure_views%': '<(toolkit_uses_pure_views)',
[email protected]9c8a1982011-05-24 23:08:5882 'views_compositor%': '<(views_compositor)',
[email protected]e72e55b2011-01-06 22:19:3083
[email protected]8fb0ef02011-05-20 00:53:5084 # We used to provide a variable for changing how libraries were built.
85 # This variable remains until we can clean up all the users.
86 # This needs to be one nested variables dict in so that dependent
87 # gyp files can make use of it in their outer variables. (Yikes!)
88 # http://code.google.com/p/chromium/issues/detail?id=83308
89 'library%': 'static_library',
90
[email protected]e14a9f92009-08-05 19:26:0791 # Override branding to select the desired branding flavor.
92 'branding%': 'Chromium',
93
94 # Override buildtype to select the desired build flavor.
95 # Dev - everyday build for development/testing
96 # Official - release build (generally implies additional processing)
97 # TODO(mmoss) Once 'buildtype' is fully supported (e.g. Windows gyp
98 # conversion is done), some of the things which are now controlled by
99 # 'branding', such as symbol generation, will need to be refactored based
100 # on 'buildtype' (i.e. we don't care about saving symbols for non-Official
101 # builds).
102 'buildtype%': 'Dev',
[email protected]cbd5fd52009-08-26 00:14:27103
[email protected]e72e55b2011-01-06 22:19:30104 # Default architecture we're building for is the architecture we're
105 # building on.
106 'target_arch%': '<(host_arch)',
[email protected]b3f23ba2010-04-26 22:58:17107
[email protected]e72e55b2011-01-06 22:19:30108 # This variable tells WebCore.gyp and JavaScriptCore.gyp whether they are
109 # are built under a chromium full build (1) or a webkit.org chromium
110 # build (0).
111 'inside_chromium_build%': 1,
[email protected]8974e042010-06-21 18:06:52112
[email protected]e72e55b2011-01-06 22:19:30113 # Set to 1 to enable fast builds. It disables debug info for fastest
114 # compilation.
115 'fastbuild%': 0,
[email protected]93012ca2010-08-10 20:10:49116
[email protected]3d38d8e2011-04-16 20:48:51117 # Disable file manager component extension by default.
118 'file_manager_extension%': 0,
119
[email protected]e72e55b2011-01-06 22:19:30120 # Python version.
[email protected]a43c5a02011-05-27 06:54:51121 'python_ver%': '2.6',
[email protected]b3f23ba2010-04-26 22:58:17122
[email protected]e72e55b2011-01-06 22:19:30123 # Set ARM-v7 compilation flags
124 'armv7%': 0,
125
126 # Set Neon compilation flags (only meaningful if armv7==1).
127 'arm_neon%': 1,
128
129 # The system root for cross-compiles. Default: none.
130 'sysroot%': '',
131
132 # On Linux, we build with sse2 for Chromium builds.
133 'disable_sse2%': 0,
134
135 # Use libjpeg-turbo as the JPEG codec used by Chromium.
[email protected]32e56e52011-02-28 02:28:03136 'use_libjpeg_turbo%': 1,
[email protected]e72e55b2011-01-06 22:19:30137
138 # Variable 'component' is for cases where we would like to build some
139 # components as dynamic shared libraries but still need variable
140 # 'library' for static libraries.
141 # By default, component is set to whatever library is set to and
142 # it can be overriden by the GYP command line or by ~/.gyp/include.gypi.
[email protected]5a547332011-05-19 23:18:53143 'component%': 'static_library',
[email protected]e72e55b2011-01-06 22:19:30144
[email protected]bb6aba32011-01-07 19:04:43145 # Set to select the Title Case versions of strings in GRD files.
146 'use_titlecase_in_grd_files%': 0,
[email protected]63692212010-09-16 00:22:21147
[email protected]98da0042011-02-02 00:10:27148 # Use translations provided by volunteers at launchpad.net. This
149 # currently only works on Linux.
[email protected]00dc155832011-02-01 18:51:19150 'use_third_party_translations%': 0,
151
[email protected]9a425422011-01-11 00:53:18152 # Remoting compilation is enabled by default. Set to 0 to disable.
153 'remoting%': 1,
154
[email protected]a026daa2011-04-20 15:49:51155 # P2P APIs are compiled in by default. Set to 0 to disable.
156 # Also note that this should be enabled for remoting to compile.
157 'p2p_apis%': 1,
158
[email protected]1ec68c42011-06-01 13:56:25159 # Configuration policy is enabled by default. Set to 0 to disable.
160 'configuration_policy%': 1,
161
[email protected]5d451ad2011-02-11 16:43:46162 # If this is set, the clang plugins used on the buildbot will be used.
163 # Run tools/clang/scripts/update.sh to make sure they are compiled.
164 # This causes 'clang_chrome_plugins_flags' to be set.
165 # Has no effect if 'clang' is not set as well.
166 'clang_use_chrome_plugins%': 0,
167
[email protected]1ad5a7b2011-06-24 03:15:13168 # Set to 1 compile with -fPIC cflag on linux. This is a must for shared
169 # libraries on linux x86-64 and arm, plus ASLR.
170 'linux_fpic%': 1,
171
[email protected]bb6aba32011-01-07 19:04:43172 'conditions': [
[email protected]7d7564a12011-06-21 19:20:22173 # Use Skia as WebKit renderer on Mac
174 ['OS=="mac"', {
175 'use_skia%': 0,
176 }, {
177 'use_skia%': 1,
178 }],
179
[email protected]79e2336c2011-05-12 18:18:34180 # A flag for POSIX platforms
[email protected]c49ab0c2011-05-18 17:25:37181 ['OS=="win"', {
[email protected]79e2336c2011-05-12 18:18:34182 'os_posix%': 0,
[email protected]c49ab0c2011-05-18 17:25:37183 }, {
184 'os_posix%': 1,
[email protected]79e2336c2011-05-12 18:18:34185 }],
186
187 # Flags to use Gtk and X11 on non-Mac POSIX platforms
[email protected]c49ab0c2011-05-18 17:25:37188 ['OS=="win" or OS=="mac"', {
[email protected]79e2336c2011-05-12 18:18:34189 'toolkit_uses_gtk%': 0,
190 'use_x11%': 0,
[email protected]c49ab0c2011-05-18 17:25:37191 }, {
192 'toolkit_uses_gtk%': 1,
193 'use_x11%': 1,
[email protected]79e2336c2011-05-12 18:18:34194 }],
195
[email protected]63692212010-09-16 00:22:21196 # A flag to enable or disable our compile-time dependency
197 # on gnome-keyring. If that dependency is disabled, no gnome-keyring
198 # support will be available. This option is useful
199 # for Linux distributions.
200 ['chromeos==1', {
201 'use_gnome_keyring%': 0,
202 }, {
203 'use_gnome_keyring%': 1,
204 }],
[email protected]0afe5212010-10-01 18:56:11205
[email protected]bb6aba32011-01-07 19:04:43206 ['toolkit_views==0 or OS=="mac"', {
207 # GTK+ and Mac wants Title Case strings
208 'use_titlecase_in_grd_files%': 1,
209 }],
210
[email protected]1b4209f2011-01-07 00:25:40211 # Enable some hacks to support Flapper only on Chrome OS.
212 ['chromeos==1', {
213 'enable_flapper_hacks%': 1,
214 }, {
215 'enable_flapper_hacks%': 0,
216 }],
[email protected]3d38d8e2011-04-16 20:48:51217
218 # Enable file manager extension by default on Chrome OS.
219 ['chromeos==1', {
220 'file_manager_extension%': 1,
221 }, {
222 'file_manager_extension%': 0,
223 }],
[email protected]7eefd4b2011-06-08 00:14:49224
225 # Enable navigator.registerProtocolHandler and supporting UI.
226 # We disable on Linux because the OS-level component of RPH isn't
227 # implemented.
228 ['OS=="linux"', {
229 'enable_register_protocol_handler%': 0,
230 }, {
231 'enable_register_protocol_handler%': 1,
232 }],
[email protected]b3f23ba2010-04-26 22:58:17233 ],
[email protected]e14a9f92009-08-05 19:26:07234 },
235
[email protected]e72e55b2011-01-06 22:19:30236 # Copy conditionally-set variables out one scope.
[email protected]e14a9f92009-08-05 19:26:07237 'branding%': '<(branding)',
238 'buildtype%': '<(buildtype)',
[email protected]e0d00142009-09-18 22:10:27239 'target_arch%': '<(target_arch)',
[email protected]cf185b32010-01-12 04:29:59240 'host_arch%': '<(host_arch)',
[email protected]8fb0ef02011-05-20 00:53:50241 'library%': 'static_library',
[email protected]c153e5352009-09-22 12:37:44242 'toolkit_views%': '<(toolkit_views)',
[email protected]1b546692011-06-30 18:22:30243 'toolkit_uses_pure_views%': '<(toolkit_uses_pure_views)',
[email protected]9c8a1982011-05-24 23:08:58244 'views_compositor%': '<(views_compositor)',
[email protected]79e2336c2011-05-12 18:18:34245 'os_posix%': '<(os_posix)',
246 'toolkit_uses_gtk%': '<(toolkit_uses_gtk)',
[email protected]7d7564a12011-06-21 19:20:22247 'use_skia%': '<(use_skia)',
[email protected]79e2336c2011-05-12 18:18:34248 'use_x11%': '<(use_x11)',
[email protected]63692212010-09-16 00:22:21249 'use_gnome_keyring%': '<(use_gnome_keyring)',
[email protected]0afe5212010-10-01 18:56:11250 'linux_fpic%': '<(linux_fpic)',
[email protected]1b4209f2011-01-07 00:25:40251 'enable_flapper_hacks%': '<(enable_flapper_hacks)',
[email protected]c153e5352009-09-22 12:37:44252 'chromeos%': '<(chromeos)',
[email protected]93012ca2010-08-10 20:10:49253 'touchui%': '<(touchui)',
[email protected]e47c32032011-03-01 19:26:20254 'file_manager_extension%': '<(file_manager_extension)',
[email protected]b2f030c2009-09-24 20:36:21255 'inside_chromium_build%': '<(inside_chromium_build)',
[email protected]9c1949e2009-10-02 19:59:54256 'fastbuild%': '<(fastbuild)',
[email protected]a76fe1a2010-03-01 23:39:36257 'python_ver%': '<(python_ver)',
[email protected]eafc0b452010-02-26 21:53:43258 'armv7%': '<(armv7)',
259 'arm_neon%': '<(arm_neon)',
[email protected]4d83eb72010-03-04 16:42:23260 'sysroot%': '<(sysroot)',
[email protected]ac120ff2010-04-28 02:14:22261 'disable_sse2%': '<(disable_sse2)',
[email protected]8974e042010-06-21 18:06:52262 'component%': '<(component)',
[email protected]bb6aba32011-01-07 19:04:43263 'use_titlecase_in_grd_files%': '<(use_titlecase_in_grd_files)',
[email protected]9e94cca2011-02-04 17:38:17264 'use_third_party_translations%': '<(use_third_party_translations)',
[email protected]9a425422011-01-11 00:53:18265 'remoting%': '<(remoting)',
[email protected]a026daa2011-04-20 15:49:51266 'p2p_apis%': '<(p2p_apis)',
[email protected]1ec68c42011-06-01 13:56:25267 'configuration_policy%': '<(configuration_policy)',
[email protected]5d451ad2011-02-11 16:43:46268 'clang_use_chrome_plugins%': '<(clang_use_chrome_plugins)',
[email protected]365dd5b92011-05-26 01:30:56269 'enable_register_protocol_handler%': '<(enable_register_protocol_handler)',
[email protected]e14a9f92009-08-05 19:26:07270
[email protected]a22ebd812011-06-23 00:05:39271 # Smooth scrolling is disabled by default.
272 'enable_smooth_scrolling%': 0,
273
[email protected]caa95c82009-11-23 22:39:32274 # The release channel that this build targets. This is used to restrict
275 # channel-specific build options, like which installer packages to create.
276 # The default is 'all', which does no channel-specific filtering.
277 'channel%': 'all',
278
[email protected]b3fb8092009-03-12 19:09:24279 # Override chromium_mac_pch and set it to 0 to suppress the use of
280 # precompiled headers on the Mac. Prefix header injection may still be
281 # used, but prefix headers will not be precompiled. This is useful when
282 # using distcc to distribute a build to compile slaves that don't
283 # share the same compiler executable as the system driving the compilation,
284 # because precompiled headers rely on pointers into a specific compiler
285 # executable's image. Setting this to 0 is needed to use an experimental
286 # Linux-Mac cross compiler distcc farm.
287 'chromium_mac_pch%': 1,
288
[email protected]3224dcd2009-09-16 17:31:25289 # Mac OS X SDK and deployment target support.
290 # The SDK identifies the version of the system headers that will be used,
291 # and corresponds to the MAC_OS_X_VERSION_MAX_ALLOWED compile-time macro.
292 # "Maximum allowed" refers to the operating system version whose APIs are
293 # available in the headers.
294 # The deployment target identifies the minimum system version that the
295 # built products are expected to function on. It corresponds to the
296 # MAC_OS_X_VERSION_MIN_REQUIRED compile-time macro.
297 # To ensure these macros are available, #include <AvailabilityMacros.h>.
298 # Additional documentation on these macros is available at
299 # http://developer.apple.com/mac/library/technotes/tn2002/tn2064.html#SECTION3
300 # Chrome normally builds with the Mac OS X 10.5 SDK and sets the
301 # deployment target to 10.5. Other projects, such as O3D, may override
302 # these defaults.
303 'mac_sdk%': '10.5',
304 'mac_deployment_target%': '10.5',
[email protected]9543af052009-09-15 22:42:59305
[email protected]f5ecbba12009-04-03 04:35:18306 # Set to 1 to enable code coverage. In addition to build changes
307 # (e.g. extra CFLAGS), also creates a new target in the src/chrome
308 # project file called "coverage".
309 # Currently ignored on Windows.
310 'coverage%': 0,
[email protected]653bd5f032009-04-08 12:55:49311
[email protected]c61f6432009-04-22 01:16:42312 # Overridable specification for potential use of alternative
313 # JavaScript engines.
314 'javascript_engine%': 'v8',
315
[email protected]7477ea6f2009-12-22 23:28:15316 # Although base/allocator lets you select a heap library via an
[email protected]7e0d664a2009-12-03 21:07:47317 # environment variable, the libcmt shim it uses sometimes gets in
318 # the way. To disable it entirely, and switch to normal msvcrt, do e.g.
319 # 'win_use_allocator_shim': 0,
320 # 'win_release_RuntimeLibrary': 2
321 # to ~/.gyp/include.gypi, gclient runhooks --force, and do a release build.
[email protected]8974e042010-06-21 18:06:52322 'win_use_allocator_shim%': 1, # 1 = shim allocator via libcmt; 0 = msvcrt
[email protected]279cd4212009-09-11 22:32:11323
[email protected]95ff8082009-11-13 22:21:01324 # Whether usage of OpenMAX is enabled.
325 'enable_openmax%': 0,
326
[email protected]d01120e62010-05-10 17:04:48327 # Whether proprietary audio/video codecs are assumed to be included with
328 # this build (only meaningful if branding!=Chrome).
329 'proprietary_codecs%': 0,
330
[email protected]e5b2eaa2009-04-14 01:39:12331 # TODO(bradnelson): eliminate this when possible.
332 # To allow local gyp files to prevent release.vsprops from being included.
333 # Yes(1) means include release.vsprops.
334 # Once all vsprops settings are migrated into gyp, this can go away.
335 'msvs_use_common_release%': 1,
[email protected]606116d22009-05-06 22:38:23336
[email protected]cbd5fd52009-08-26 00:14:27337 # TODO(bradnelson): eliminate this when possible.
338 # To allow local gyp files to override additional linker options for msvs.
339 # Yes(1) means set use the common linker options.
[email protected]48c7af72009-07-03 22:00:19340 'msvs_use_common_linker_extras%': 1,
341
[email protected]1ffb6502009-06-02 07:46:24342 # TODO(sgk): eliminate this if possible.
343 # It would be nicer to support this via a setting in 'target_defaults'
344 # in chrome/app/locales/locales.gypi overriding the setting in the
345 # 'Debug' configuration in the 'target_defaults' dict below,
346 # but that doesn't work as we'd like.
347 'msvs_debug_link_incremental%': '2',
348
[email protected]1f790ef2011-01-11 20:45:36349 # Needed for some of the largest modules.
350 'msvs_debug_link_nonincremental%': '1',
351
[email protected]573136142009-07-15 22:48:37352 # This is the location of the sandbox binary. Chrome looks for this before
353 # running the zygote process. If found, and SUID, it will be used to
354 # sandbox the zygote process and, thus, all renderer processes.
355 'linux_sandbox_path%': '',
356
[email protected]ad6d2c42009-09-15 20:13:38357 # Set this to true to enable SELinux support.
358 'selinux%': 0,
[email protected]4c9cc6c2009-10-01 18:54:57359
[email protected]58680ce2010-09-18 00:09:15360 # Set this to true when building with Clang.
361 # See http://code.google.com/p/chromium/wiki/Clang for details.
362 # TODO: eventually clang should behave identically to gcc, and this
363 # won't be necessary.
364 'clang%': 0,
365
[email protected]5e781232011-01-28 02:57:59366 # These two variables can be set in GYP_DEFINES while running
367 # |gclient runhooks| to let clang run a plugin in every compilation.
368 # Only has an effect if 'clang=1' is in GYP_DEFINES as well.
369 # Example:
[email protected]93120fe2011-02-03 20:46:42370 # 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:59371
372 'clang_load%': '',
373 'clang_add_plugin%': '',
374
[email protected]7664ab32011-02-01 23:35:25375 # Enable sampling based profiler.
376 # See http://google-perftools.googlecode.com/svn/trunk/doc/cpuprofile.html
377 'profiling%': '0',
378
[email protected]36532f332010-08-25 00:22:01379 # Override whether we should use Breakpad on Linux. I.e. for Chrome bot.
380 'linux_breakpad%': 0,
381 # And if we want to dump symbols for Breakpad-enabled builds.
382 'linux_dump_symbols%': 0,
383 # And if we want to strip the binary after dumping symbols.
[email protected]05cb6962009-10-01 23:29:03384 'linux_strip_binary%': 0,
[email protected]1d87c282010-09-15 22:24:49385 # Strip the test binaries needed for Linux reliability tests.
386 'linux_strip_reliability_tests%': 0,
[email protected]05cb6962009-10-01 23:29:03387
[email protected]46ce5b562010-06-16 18:39:53388 # Enable TCMalloc.
389 'linux_use_tcmalloc%': 1,
[email protected]01699e22009-11-11 19:24:24390
[email protected]39ca7de2010-04-16 08:04:03391 # Disable TCMalloc's debugallocation.
392 'linux_use_debugallocation%': 0,
393
[email protected]d8b60602010-03-26 09:41:22394 # Disable TCMalloc's heapchecker.
395 'linux_use_heapchecker%': 0,
396
[email protected]64e2d4a42010-08-27 10:13:21397 # Disable shadow stack keeping used by heapcheck to unwind the stacks
398 # better.
399 'linux_keep_shadow_stacks%': 0,
400
[email protected]6def64a2010-10-28 20:40:34401 # Set to 1 to turn on seccomp sandbox by default.
402 # (Note: this is ignored for official builds.)
403 'linux_use_seccomp_sandbox%': 0,
[email protected]39c4e1a82010-03-30 19:47:41404
[email protected]556c5d72010-06-10 05:45:01405 # Set to 1 to link against libgnome-keyring instead of using dlopen().
406 'linux_link_gnome_keyring%': 0,
[email protected]abcc9ac2011-05-16 20:04:35407 # Set to 1 to link against gsettings APIs instead of using dlopen().
408 'linux_link_gsettings%': 0,
[email protected]556c5d72010-06-10 05:45:01409
[email protected]d8c7cbcc2009-10-02 19:00:31410 # Used to disable Native Client at compile time, for platforms where it
411 # isn't supported
412 'disable_nacl%': 0,
413
[email protected]77c1b29392009-12-04 06:21:29414 # Set Thumb compilation flags.
415 'arm_thumb%': 0,
416
[email protected]53e0f642010-03-05 01:41:56417 # Set ARM fpu compilation flags (only meaningful if armv7==1 and
418 # arm_neon==0).
419 'arm_fpu%': 'vfpv3',
420
[email protected]9821d0d2010-04-16 22:40:37421 # Enable new NPDevice API.
422 'enable_new_npdevice_api%': 0,
[email protected]ed154592010-04-29 00:18:50423
424 # Enable EGLImage support in OpenMAX
[email protected]58023be2011-02-04 20:34:14425 'enable_eglimage%': 1,
[email protected]ed154592010-04-29 00:18:50426
[email protected]6f51b27e2010-06-22 20:43:53427 # Enable a variable used elsewhere throughout the GYP files to determine
428 # whether to compile in the sources for the GPU plugin / process.
429 'enable_gpu%': 1,
430
[email protected]32e1dee2010-12-09 18:36:24431 # Use OpenSSL instead of NSS. Under development: see http://crbug.com/62803
[email protected]d518cd92010-09-29 12:27:44432 'use_openssl%': 0,
433
[email protected]e72e55b2011-01-06 22:19:30434 # .gyp files or targets should set chromium_code to 1 if they build
435 # Chromium-specific code, as opposed to external code. This variable is
436 # used to control such things as the set of warnings to enable, and
437 # whether warnings are treated as errors.
438 'chromium_code%': 0,
439
440 # Set to 1 to compile with the built in pdf viewer.
441 'internal_pdf%': 0,
442
443 # This allows to use libcros from the current system, ie. /usr/lib/
444 # The cros_api will be pulled in as a static library, and all headers
445 # from the system include dirs.
[email protected]bb6aba32011-01-07 19:04:43446 'system_libcros%': 0,
[email protected]e72e55b2011-01-06 22:19:30447
[email protected]e72e55b2011-01-06 22:19:30448 # NOTE: When these end up in the Mac bundle, we need to replace '-' for '_'
449 # so Cocoa is happy (http://crbug.com/20441).
450 'locales': [
451 'am', 'ar', 'bg', 'bn', 'ca', 'cs', 'da', 'de', 'el', 'en-GB',
452 'en-US', 'es-419', 'es', 'et', 'fa', 'fi', 'fil', 'fr', 'gu', 'he',
453 'hi', 'hr', 'hu', 'id', 'it', 'ja', 'kn', 'ko', 'lt', 'lv',
454 'ml', 'mr', 'nb', 'nl', 'pl', 'pt-BR', 'pt-PT', 'ro', 'ru',
455 'sk', 'sl', 'sr', 'sv', 'sw', 'ta', 'te', 'th', 'tr', 'uk',
456 'vi', 'zh-CN', 'zh-TW',
457 ],
458
[email protected]bb6aba32011-01-07 19:04:43459 'grit_defines': [],
460
[email protected]29c2daea2011-01-05 20:38:50461 # Use Harfbuzz-NG instead of Harfbuzz.
462 # Under development: http://crbug.com/68551
463 'use_harfbuzz_ng%': 0,
464
[email protected]bd3bd442011-03-28 07:58:51465 # If debug_devtools is set to 1, JavaScript files for DevTools are
466 # stored as is and loaded from disk. Otherwise, a concatenated file
467 # is stored in resources.pak. It is still possible to load JS files
468 # from disk by passing --debug-devtools cmdline switch.
469 'debug_devtools%': 0,
470
[email protected]be8a9272011-02-10 22:06:07471 # Point to ICU directory.
472 'icu_src_dir': '../third_party/icu',
473
[email protected]912c55c2009-07-31 23:33:55474 'conditions': [
[email protected]79e2336c2011-05-12 18:18:34475 ['os_posix==1 and OS!="mac"', {
[email protected]242a9e62009-11-03 17:32:10476 # This will set gcc_version to XY if you are running gcc X.Y.*.
477 # This is used to tweak build flags for gcc 4.4.
478 'gcc_version%': '<!(python <(DEPTH)/build/compiler_version.py)',
[email protected]4d83eb72010-03-04 16:42:23479 # Figure out the python architecture to decide if we build pyauto.
[email protected]efd68462010-03-04 17:07:54480 'python_arch%': '<!(<(DEPTH)/build/linux/python_arch.sh <(sysroot)/usr/lib/libpython<(python_ver).so.1.0)',
[email protected]cbd5fd52009-08-26 00:14:27481 'conditions': [
[email protected]2a77a9d2010-08-26 19:58:10482 ['branding=="Chrome"', {
[email protected]cbd5fd52009-08-26 00:14:27483 'linux_breakpad%': 1,
[email protected]cbd5fd52009-08-26 00:14:27484 }],
[email protected]4c9cc6c2009-10-01 18:54:57485 # All Chrome builds have breakpad symbols, but only process the
486 # symbols from official builds.
[email protected]c913cb82010-08-31 19:44:08487 ['(branding=="Chrome" and buildtype=="Official")', {
[email protected]4c9cc6c2009-10-01 18:54:57488 'linux_dump_symbols%': 1,
[email protected]4c9cc6c2009-10-01 18:54:57489 }],
[email protected]cbd5fd52009-08-26 00:14:27490 ],
[email protected]79e2336c2011-05-12 18:18:34491 }], # os_posix==1 and OS!="mac"
[email protected]bb6aba32011-01-07 19:04:43492
[email protected]e14a9f92009-08-05 19:26:07493 ['OS=="mac"', {
494 'conditions': [
495 # mac_product_name is set to the name of the .app bundle as it should
496 # appear on disk. This duplicates data from
497 # chrome/app/theme/chromium/BRANDING and
498 # chrome/app/theme/google_chrome/BRANDING, but is necessary to get
499 # these names into the build system.
500 ['branding=="Chrome"', {
501 'mac_product_name%': 'Google Chrome',
502 }, { # else: branding!="Chrome"
503 'mac_product_name%': 'Chromium',
504 }],
505
506 # Feature variables for enabling Mac Breakpad and Keystone auto-update
507 # support. Both features are on by default in official builds with
508 # Chrome branding.
509 ['branding=="Chrome" and buildtype=="Official"', {
510 'mac_breakpad%': 1,
511 'mac_keystone%': 1,
512 }, { # else: branding!="Chrome" or buildtype!="Official"
513 'mac_breakpad%': 0,
514 'mac_keystone%': 0,
515 }],
516 ],
517 }], # OS=="mac"
[email protected]bb6aba32011-01-07 19:04:43518
[email protected]912c55c2009-07-31 23:33:55519 # Whether to use multiple cores to compile with visual studio. This is
520 # optional because it sometimes causes corruption on VS 2005.
521 # It is on by default on VS 2008 and off on VS 2005.
522 ['OS=="win"', {
523 'conditions': [
[email protected]8974e042010-06-21 18:06:52524 ['component=="shared_library"', {
525 'win_use_allocator_shim%': 0,
526 }],
[email protected]912c55c2009-07-31 23:33:55527 ['MSVS_VERSION=="2005"', {
[email protected]669795372009-08-14 17:51:13528 'msvs_multi_core_compile%': 0,
[email protected]912c55c2009-07-31 23:33:55529 },{
530 'msvs_multi_core_compile%': 1,
531 }],
[email protected]10bb8c92009-08-07 21:16:03532 # Don't do incremental linking for large modules on 32-bit.
533 ['MSVS_OS_BITS==32', {
534 'msvs_large_module_debug_link_mode%': '1', # No
535 },{
536 'msvs_large_module_debug_link_mode%': '2', # Yes
537 }],
[email protected]3e2648a2011-03-21 20:58:50538 ['MSVS_VERSION=="2010e" or MSVS_VERSION=="2008e" or MSVS_VERSION=="2005e"', {
539 'msvs_express%': 1,
540 'secure_atl%': 0,
541 },{
542 'msvs_express%': 0,
543 'secure_atl%': 1,
544 }],
[email protected]912c55c2009-07-31 23:33:55545 ],
[email protected]ef4fa4072009-12-04 22:46:50546 'nacl_win64_defines': [
547 # This flag is used to minimize dependencies when building
548 # Native Client loader for 64-bit Windows.
549 'NACL_WIN64',
550 ],
[email protected]912c55c2009-07-31 23:33:55551 }],
[email protected]bb6aba32011-01-07 19:04:43552
[email protected]79e2336c2011-05-12 18:18:34553 ['os_posix==1 and chromeos==0 and target_arch!="arm"', {
[email protected]8e553f42010-10-25 20:05:44554 'use_cups%': 1,
555 }, {
556 'use_cups%': 0,
557 }],
[email protected]bb6aba32011-01-07 19:04:43558
[email protected]19fe8f0b2010-12-07 07:27:27559 # Set the relative path from this file to the GYP file of the JPEG
560 # library used by Chromium.
561 ['use_libjpeg_turbo==1', {
562 'libjpeg_gyp_path': '../third_party/libjpeg_turbo/libjpeg.gyp',
563 }, {
564 'libjpeg_gyp_path': '../third_party/libjpeg/libjpeg.gyp',
565 }], # use_libjpeg_turbo==1
[email protected]bb6aba32011-01-07 19:04:43566
[email protected]abcc9ac2011-05-16 20:04:35567 # Options controlling the use of GConf (the classic GNOME configuration
568 # system) and GIO, which contains GSettings (the new GNOME config system).
[email protected]1c6fe29302011-01-20 22:14:31569 ['chromeos==1', {
570 'use_gconf%': 0,
[email protected]abcc9ac2011-05-16 20:04:35571 'use_gio%': 0,
[email protected]1c6fe29302011-01-20 22:14:31572 }, {
573 'use_gconf%': 1,
[email protected]abcc9ac2011-05-16 20:04:35574 'use_gio%': 1,
[email protected]1c6fe29302011-01-20 22:14:31575 }],
576
[email protected]4de39f82011-03-28 12:01:29577 # Set up -D and -E flags passed into grit.
[email protected]1660bffd2011-03-23 16:24:29578 ['branding=="Chrome"', {
579 # TODO(mmoss) The .grd files look for _google_chrome, but for
580 # consistency they should look for google_chrome_build like C++.
[email protected]4de39f82011-03-28 12:01:29581 'grit_defines': ['-D', '_google_chrome',
582 '-E', 'CHROMIUM_BUILD=google_chrome'],
[email protected]1660bffd2011-03-23 16:24:29583 }, {
[email protected]4de39f82011-03-28 12:01:29584 'grit_defines': ['-D', '_chromium',
585 '-E', 'CHROMIUM_BUILD=chromium'],
[email protected]1660bffd2011-03-23 16:24:29586 }],
[email protected]bb6aba32011-01-07 19:04:43587 ['chromeos==1', {
588 'grit_defines': ['-D', 'chromeos'],
589 }],
590 ['toolkit_views==1', {
591 'grit_defines': ['-D', 'toolkit_views'],
592 }],
[email protected]1b546692011-06-30 18:22:30593 ['toolkit_uses_pure_views==1', {
594 'grit_defines': ['-D', 'toolkit_uses_pure_views'],
595 }],
[email protected]bb6aba32011-01-07 19:04:43596 ['touchui==1', {
597 'grit_defines': ['-D', 'touchui'],
598 }],
[email protected]e47c32032011-03-01 19:26:20599 ['file_manager_extension==1', {
600 'grit_defines': ['-D', 'file_manager_extension'],
601 }],
[email protected]9a425422011-01-11 00:53:18602 ['remoting==1', {
603 'grit_defines': ['-D', 'remoting'],
604 }],
[email protected]bb6aba32011-01-07 19:04:43605 ['use_titlecase_in_grd_files==1', {
606 'grit_defines': ['-D', 'use_titlecase'],
607 }],
[email protected]00dc155832011-02-01 18:51:19608 ['use_third_party_translations==1', {
609 'grit_defines': ['-D', 'use_third_party_translations'],
[email protected]fb6c1022011-06-27 21:58:12610 'locales': [
611 'ast', 'bs', 'ca@valencia', 'eo', 'eu', 'gl', 'hy', 'ka', 'ku', 'kw',
612 'ug',
613 ],
[email protected]00dc155832011-02-01 18:51:19614 }],
[email protected]5d451ad2011-02-11 16:43:46615
616 ['clang_use_chrome_plugins==1', {
617 'clang_chrome_plugins_flags':
618 '<!(<(DEPTH)/tools/clang/scripts/plugin_flags.sh)',
619 }],
[email protected]cfa2e1102011-04-27 22:30:23620
[email protected]452da69e2011-05-24 02:36:05621 # Set use_ibus to 1 to enable ibus support.
[email protected]cfa2e1102011-04-27 22:30:23622 ['touchui==1 and chromeos==1', {
623 'use_ibus%': 1,
624 }, {
625 'use_ibus%': 0,
[email protected]365dd5b92011-05-26 01:30:56626 }],
627
628 ['enable_register_protocol_handler==1', {
629 'grit_defines': ['-D', 'enable_register_protocol_handler'],
630 }],
[email protected]912c55c2009-07-31 23:33:55631 ],
[email protected]2f80c312009-02-25 21:26:55632 },
633 'target_defaults': {
[email protected]1c966092009-08-20 21:19:26634 'variables': {
[email protected]a6e22132010-02-10 20:43:18635 # The condition that operates on chromium_code is in a target_conditions
636 # section, and will not have access to the default fallback value of
637 # chromium_code at the top of this file, or to the chromium_code
638 # variable placed at the root variables scope of .gyp files, because
639 # those variables are not set at target scope. As a workaround,
640 # if chromium_code is not set at target scope, define it in target scope
641 # to contain whatever value it has during early variable expansion.
642 # That's enough to make it available during target conditional
643 # processing.
644 'chromium_code%': '<(chromium_code)',
645
[email protected]7e0d664a2009-12-03 21:07:47646 # See http://gcc.gnu.org/onlinedocs/gcc-4.4.2/gcc/Optimize-Options.html
[email protected]d5d593a2009-08-28 23:23:29647 'mac_release_optimization%': '3', # Use -O3 unless overridden
[email protected]ffd984b12009-09-11 19:37:00648 'mac_debug_optimization%': '0', # Use -O0 unless overridden
[email protected]7e0d664a2009-12-03 21:07:47649 # See http://msdn.microsoft.com/en-us/library/aa652360(VS.71).aspx
650 'win_release_Optimization%': '2', # 2 = /Os
651 'win_debug_Optimization%': '0', # 0 = /Od
[email protected]6b0507b2010-05-07 07:41:21652 # See http://msdn.microsoft.com/en-us/library/8wtf2dfz(VS.71).aspx
653 'win_debug_RuntimeChecks%': '3', # 3 = all checks enabled, 0 = off
654 # See http://msdn.microsoft.com/en-us/library/47238hez(VS.71).aspx
[email protected]2ae6e022010-05-07 13:19:15655 'win_debug_InlineFunctionExpansion%': '', # empty = default, 0 = off,
656 'win_release_InlineFunctionExpansion%': '2', # 1 = only __inline, 2 = max
[email protected]fac10d12010-11-08 16:00:31657 # VS inserts quite a lot of extra checks to algorithms like
658 # std::partial_sort in Debug build which make them O(N^2)
659 # instead of O(N*logN). This is particularly slow under memory
660 # tools like ThreadSanitizer so we want it to be disablable.
661 # See http://msdn.microsoft.com/en-us/library/aa985982(v=VS.80).aspx
662 'win_debug_disable_iterator_debugging%': '0',
[email protected]7e0d664a2009-12-03 21:07:47663
[email protected]ffd984b12009-09-11 19:37:00664 'release_extra_cflags%': '',
665 'debug_extra_cflags%': '',
[email protected]92822e82009-09-18 14:26:56666 'release_valgrind_build%': 0,
[email protected]8974e042010-06-21 18:06:52667
668 'conditions': [
669 ['OS=="win" and component=="shared_library"', {
670 # See http://msdn.microsoft.com/en-us/library/aa652367.aspx
671 'win_release_RuntimeLibrary%': '2', # 2 = /MT (nondebug DLL)
672 'win_debug_RuntimeLibrary%': '3', # 3 = /MTd (debug DLL)
673 }, {
674 # See http://msdn.microsoft.com/en-us/library/aa652367.aspx
675 'win_release_RuntimeLibrary%': '0', # 0 = /MT (nondebug static)
676 'win_debug_RuntimeLibrary%': '1', # 1 = /MTd (debug static)
677 }],
678 ],
[email protected]1c966092009-08-20 21:19:26679 },
[email protected]32aa8cc2009-03-04 21:36:39680 'conditions': [
681 ['branding=="Chrome"', {
682 'defines': ['GOOGLE_CHROME_BUILD'],
683 }, { # else: branding!="Chrome"
684 'defines': ['CHROMIUM_BUILD'],
685 }],
[email protected]06c756182010-04-27 18:31:31686 ['toolkit_views==1', {
[email protected]e6970232009-05-12 23:51:17687 'defines': ['TOOLKIT_VIEWS=1'],
688 }],
[email protected]1b546692011-06-30 18:22:30689 ['toolkit_uses_pure_views==1', {
690 'defines': ['TOOLKIT_USES_PURE_VIEWS=1'],
691 }],
[email protected]9c8a1982011-05-24 23:08:58692 ['views_compositor==1', {
[email protected]c3870f42011-06-10 16:43:27693 'defines': ['VIEWS_COMPOSITOR=1'],
[email protected]9c8a1982011-05-24 23:08:58694 }],
[email protected]fdc5bed2010-01-09 01:16:57695 ['chromeos==1', {
[email protected]16779842009-07-08 23:45:29696 'defines': ['OS_CHROMEOS=1'],
[email protected]2b883b92009-06-02 22:57:50697 }],
[email protected]0094fbe2010-07-15 21:51:43698 ['touchui==1', {
699 'defines': ['TOUCH_UI=1'],
700 }],
[email protected]e47c32032011-03-01 19:26:20701 ['file_manager_extension==1', {
702 'defines': ['FILE_MANAGER_EXTENSION=1'],
703 }],
[email protected]7664ab32011-02-01 23:35:25704 ['profiling==1', {
705 'defines': ['ENABLE_PROFILING=1'],
706 }],
[email protected]542bf24a2010-06-11 23:08:17707 ['remoting==1', {
708 'defines': ['ENABLE_REMOTING=1'],
[email protected]c0bac532010-06-11 00:39:00709 }],
[email protected]a026daa2011-04-20 15:49:51710 ['p2p_apis==1', {
711 'defines': ['ENABLE_P2P_APIS=1'],
712 }],
[email protected]d01120e62010-05-10 17:04:48713 ['proprietary_codecs==1', {
714 'defines': ['USE_PROPRIETARY_CODECS'],
715 }],
[email protected]1b4209f2011-01-07 00:25:40716 ['enable_flapper_hacks==1', {
717 'defines': ['ENABLE_FLAPPER_HACKS=1'],
718 }],
[email protected]9c1949e2009-10-02 19:59:54719 ['fastbuild!=0', {
720 'conditions': [
[email protected]1cc2fa72010-07-03 08:49:24721 # For Windows, we don't genererate debug information.
[email protected]9c1949e2009-10-02 19:59:54722 ['OS=="win"', {
723 'msvs_settings': {
724 'VCLinkerTool': {
725 'GenerateDebugInformation': 'false',
726 },
727 'VCCLCompilerTool': {
728 'DebugInformationFormat': '0',
729 }
730 }
[email protected]1cc2fa72010-07-03 08:49:24731 }, { # else: OS != "win", generate less debug information.
732 'variables': {
733 'debug_extra_cflags': '-g1',
734 },
[email protected]37c84192010-04-14 21:37:40735 }],
[email protected]aecc4d12011-01-19 05:32:33736 # Clang creates chubby debug information, which makes linking very
737 # slow. For now, don't create debug information with clang. See
738 # http://crbug.com/70000
739 ['OS=="linux" and clang==1', {
740 'variables': {
741 'debug_extra_cflags': '-g0',
742 },
743 }],
[email protected]9c1949e2009-10-02 19:59:54744 ], # conditions for fastbuild.
745 }], # fastbuild!=0
[email protected]ad6d2c42009-09-15 20:13:38746 ['selinux==1', {
747 'defines': ['CHROMIUM_SELINUX=1'],
748 }],
[email protected]7e0d664a2009-12-03 21:07:47749 ['win_use_allocator_shim==0', {
750 'conditions': [
751 ['OS=="win"', {
752 'defines': ['NO_TCMALLOC'],
753 }],
754 ],
755 }],
[email protected]43f28f832010-02-03 02:28:48756 ['enable_gpu==1', {
[email protected]7477ea6f2009-12-22 23:28:15757 'defines': [
758 'ENABLE_GPU=1',
759 ],
760 }],
[email protected]b1c2a5542010-10-08 12:44:40761 ['use_openssl==1', {
762 'defines': [
763 'USE_OPENSSL=1',
764 ],
765 }],
[email protected]ed154592010-04-29 00:18:50766 ['enable_eglimage==1', {
767 'defines': [
768 'ENABLE_EGLIMAGE=1',
769 ],
770 }],
[email protected]7d7564a12011-06-21 19:20:22771 ['use_skia==1', {
772 'defines': [
773 'USE_SKIA=1',
774 ],
775 }],
[email protected]f5ecbba12009-04-03 04:35:18776 ['coverage!=0', {
777 'conditions': [
778 ['OS=="mac"', {
779 'xcode_settings': {
[email protected]ab2956372009-08-13 18:11:04780 'GCC_INSTRUMENT_PROGRAM_FLOW_ARCS': 'YES', # -fprofile-arcs
781 'GCC_GENERATE_TEST_COVERAGE_FILES': 'YES', # -ftest-coverage
[email protected]5ae4f55e2009-04-13 23:19:47782 },
[email protected]e4fb84c2009-12-28 20:45:43783 # Add -lgcov for types executable, shared_library, and
[email protected]dc259ce52010-04-13 04:03:10784 # loadable_module; not for static_library.
[email protected]e4fb84c2009-12-28 20:45:43785 # This is a delayed conditional.
[email protected]f5ecbba12009-04-03 04:35:18786 'target_conditions': [
[email protected]e4fb84c2009-12-28 20:45:43787 ['_type!="static_library"', {
[email protected]f5ecbba12009-04-03 04:35:18788 'xcode_settings': { 'OTHER_LDFLAGS': [ '-lgcov' ] },
[email protected]5ae4f55e2009-04-13 23:19:47789 }],
790 ],
791 }],
[email protected]f5ecbba12009-04-03 04:35:18792 ['OS=="linux"', {
793 'cflags': [ '-ftest-coverage',
794 '-fprofile-arcs' ],
[email protected]7122ffd52009-04-30 23:19:00795 'link_settings': { 'libraries': [ '-lgcov' ] },
[email protected]f5ecbba12009-04-03 04:35:18796 }],
[email protected]e8f6ff42009-07-07 18:20:53797 # Finally, for Windows, we simply turn on profiling.
798 ['OS=="win"', {
799 'msvs_settings': {
800 'VCLinkerTool': {
801 'Profile': 'true',
802 },
[email protected]10bb8c92009-08-07 21:16:03803 'VCCLCompilerTool': {
[email protected]e8f6ff42009-07-07 18:20:53804 # /Z7, not /Zi, so coverage is happyb
805 'DebugInformationFormat': '1',
[email protected]1f9471a2010-01-04 06:40:16806 'AdditionalOptions': ['/Yd'],
[email protected]e8f6ff42009-07-07 18:20:53807 }
808 }
809 }], # OS==win
810 ], # conditions for coverage
811 }], # coverage!=0
[email protected]4e4d6042010-08-26 18:34:38812 ['OS=="win"', {
813 'defines': [
814 '__STD_C',
815 '_CRT_SECURE_NO_DEPRECATE',
816 '_SCL_SECURE_NO_DEPRECATE',
817 ],
818 'include_dirs': [
819 '<(DEPTH)/third_party/wtl/include',
820 ],
821 }], # OS==win
[email protected]365dd5b92011-05-26 01:30:56822 ['enable_register_protocol_handler==1', {
823 'defines': [
[email protected]06bba4fb2011-06-09 05:17:19824 'ENABLE_REGISTER_PROTOCOL_HANDLER=1',
[email protected]365dd5b92011-05-26 01:30:56825 ],
826 }],
[email protected]a6e22132010-02-10 20:43:18827 ], # conditions for 'target_defaults'
828 'target_conditions': [
[email protected]c14d8e772010-02-09 22:06:15829 ['chromium_code==0', {
[email protected]d8543312010-02-10 17:43:28830 'conditions': [
[email protected]79e2336c2011-05-12 18:18:34831 [ 'os_posix==1 and OS!="mac"', {
[email protected]c0a6b272011-02-09 22:32:33832 # We don't want to get warnings from third-party code,
833 # so remove any existing warning-enabling flags like -Wall.
[email protected]d8543312010-02-10 17:43:28834 'cflags!': [
835 '-Wall',
836 '-Wextra',
837 '-Werror',
838 ],
[email protected]ec1d155be2011-02-08 22:19:00839 'cflags': [
840 # Don't warn about hash_map in third-party code.
841 '-Wno-deprecated',
[email protected]c0a6b272011-02-09 22:32:33842 # Don't warn about printf format problems.
843 # This is off by default in gcc but on in Ubuntu's gcc(!).
[email protected]ec392872011-02-10 22:38:22844 '-Wno-format',
[email protected]ec1d155be2011-02-08 22:19:00845 ],
[email protected]d8543312010-02-10 17:43:28846 }],
847 [ 'OS=="win"', {
848 'defines': [
849 '_CRT_SECURE_NO_DEPRECATE',
850 '_CRT_NONSTDC_NO_WARNINGS',
851 '_CRT_NONSTDC_NO_DEPRECATE',
852 '_SCL_SECURE_NO_DEPRECATE',
853 ],
854 'msvs_disabled_warnings': [4800],
855 'msvs_settings': {
856 'VCCLCompilerTool': {
[email protected]942c3a60f2011-05-03 02:04:11857 'WarningLevel': '3',
858 'WarnAsError': 'false', # TODO(maruel): Enable it.
[email protected]d8543312010-02-10 17:43:28859 'Detect64BitPortabilityProblems': 'false',
860 },
861 },
862 }],
863 [ 'OS=="mac"', {
864 'xcode_settings': {
865 'GCC_TREAT_WARNINGS_AS_ERRORS': 'NO',
[email protected]4c4c2e5332010-06-15 11:51:06866 'WARNING_CFLAGS!': ['-Wall', '-Wextra'],
[email protected]d8543312010-02-10 17:43:28867 },
868 }],
[email protected]c14d8e772010-02-09 22:06:15869 ],
870 }, {
871 # In Chromium code, we define __STDC_FORMAT_MACROS in order to get the
872 # C99 macros on Mac and Linux.
873 'defines': [
874 '__STDC_FORMAT_MACROS',
875 ],
876 'conditions': [
877 ['OS!="win"', {
[email protected]40519592010-11-16 15:23:30878 'sources/': [ ['exclude', '_win(_unittest)?\\.(h|cc)$'],
[email protected]a316ca532010-11-15 14:08:16879 ['exclude', '(^|/)win/'],
[email protected]40519592010-11-16 15:23:30880 ['exclude', '(^|/)win_[^/]*\\.(h|cc)$'] ],
[email protected]c14d8e772010-02-09 22:06:15881 }],
882 ['OS!="mac"', {
[email protected]40519592010-11-16 15:23:30883 'sources/': [ ['exclude', '_(cocoa|mac)(_unittest)?\\.(h|cc)$'],
[email protected]a316ca532010-11-15 14:08:16884 ['exclude', '(^|/)(cocoa|mac)/'],
885 ['exclude', '\\.mm?$' ] ],
[email protected]c14d8e772010-02-09 22:06:15886 }],
[email protected]79e2336c2011-05-12 18:18:34887 ['toolkit_uses_gtk!=1', {
[email protected]c14d8e772010-02-09 22:06:15888 'sources/': [
[email protected]40519592010-11-16 15:23:30889 ['exclude', '_(chromeos|gtk|x|x11|xdg)(_unittest)?\\.(h|cc)$'],
[email protected]a316ca532010-11-15 14:08:16890 ['exclude', '(^|/)gtk/'],
[email protected]40519592010-11-16 15:23:30891 ['exclude', '(^|/)(gtk|x11)_[^/]*\\.(h|cc)$'],
[email protected]18cff3d2010-02-17 18:03:13892 ],
893 }],
894 ['OS!="linux"', {
895 'sources/': [
[email protected]40519592010-11-16 15:23:30896 ['exclude', '_linux(_unittest)?\\.(h|cc)$'],
[email protected]a316ca532010-11-15 14:08:16897 ['exclude', '(^|/)linux/'],
[email protected]18cff3d2010-02-17 18:03:13898 ],
[email protected]c14d8e772010-02-09 22:06:15899 }],
900 # We use "POSIX" to refer to all non-Windows operating systems.
901 ['OS=="win"', {
[email protected]40519592010-11-16 15:23:30902 'sources/': [ ['exclude', '_posix\\.(h|cc)$'] ],
[email protected]f55bd4862010-05-27 15:38:07903 # turn on warnings for signed/unsigned mismatch on chromium code.
904 'msvs_settings': {
905 'VCCLCompilerTool': {
906 'AdditionalOptions': ['/we4389'],
907 },
908 },
[email protected]c14d8e772010-02-09 22:06:15909 }],
[email protected]c14d8e772010-02-09 22:06:15910 ['chromeos!=1', {
[email protected]40519592010-11-16 15:23:30911 'sources/': [ ['exclude', '_chromeos\\.(h|cc)$'] ]
[email protected]c14d8e772010-02-09 22:06:15912 }],
[email protected]06c756182010-04-27 18:31:31913 ['toolkit_views==0', {
[email protected]40519592010-11-16 15:23:30914 'sources/': [ ['exclude', '_views\\.(h|cc)$'] ]
[email protected]c14d8e772010-02-09 22:06:15915 }],
916 ],
917 }],
[email protected]a6e22132010-02-10 20:43:18918 ], # target_conditions for 'target_defaults'
[email protected]2f80c312009-02-25 21:26:55919 'default_configuration': 'Debug',
920 'configurations': {
[email protected]5153767c2009-12-22 01:52:50921 # VCLinkerTool LinkIncremental values below:
922 # 0 == default
923 # 1 == /INCREMENTAL:NO
924 # 2 == /INCREMENTAL
925 # Debug links incremental, Release does not.
926 #
[email protected]7b99801e2010-11-03 17:26:23927 # Abstract base configurations to cover common attributes.
[email protected]5153767c2009-12-22 01:52:50928 #
929 'Common_Base': {
[email protected]bb05e452009-10-29 21:24:56930 'abstract': 1,
931 'msvs_configuration_attributes': {
932 'OutputDirectory': '$(SolutionDir)$(ConfigurationName)',
933 'IntermediateDirectory': '$(OutDir)\\obj\\$(ProjectName)',
934 'CharacterSet': '1',
935 },
[email protected]5153767c2009-12-22 01:52:50936 },
937 'x86_Base': {
938 'abstract': 1,
[email protected]ef4fa4072009-12-04 22:46:50939 'msvs_settings': {
940 'VCLinkerTool': {
941 'TargetMachine': '1',
942 },
943 },
[email protected]2fa40782009-11-01 21:17:34944 'msvs_configuration_platform': 'Win32',
[email protected]bb05e452009-10-29 21:24:56945 },
[email protected]5153767c2009-12-22 01:52:50946 'x64_Base': {
947 'abstract': 1,
948 'msvs_configuration_platform': 'x64',
949 'msvs_settings': {
950 'VCLinkerTool': {
951 'TargetMachine': '17', # x86 - 64
[email protected]5153767c2009-12-22 01:52:50952 'AdditionalLibraryDirectories!':
953 ['<(DEPTH)/third_party/platformsdk_win7/files/Lib'],
954 'AdditionalLibraryDirectories':
955 ['<(DEPTH)/third_party/platformsdk_win7/files/Lib/x64'],
956 },
[email protected]d26b4418ab2010-03-24 22:06:35957 'VCLibrarianTool': {
[email protected]5153767c2009-12-22 01:52:50958 'AdditionalLibraryDirectories!':
959 ['<(DEPTH)/third_party/platformsdk_win7/files/Lib'],
960 'AdditionalLibraryDirectories':
961 ['<(DEPTH)/third_party/platformsdk_win7/files/Lib/x64'],
962 },
963 },
964 'defines': [
965 # Not sure if tcmalloc works on 64-bit Windows.
966 'NO_TCMALLOC',
967 ],
968 },
969 'Debug_Base': {
970 'abstract': 1,
[email protected]14339762011-04-05 07:36:58971 'defines': [
972 'DYNAMIC_ANNOTATIONS_ENABLED=1',
973 'WTF_USE_DYNAMIC_ANNOTATIONS=1',
974 ],
[email protected]1c966092009-08-20 21:19:26975 'xcode_settings': {
976 'COPY_PHASE_STRIP': 'NO',
[email protected]d5d593a2009-08-28 23:23:29977 'GCC_OPTIMIZATION_LEVEL': '<(mac_debug_optimization)',
[email protected]a68c29a2011-07-01 16:23:49978 'OTHER_CFLAGS': [
979 '-fstack-protector-all', # Implies -fstack-protector
980 '<@(debug_extra_cflags)',
981 ],
[email protected]1c966092009-08-20 21:19:26982 },
[email protected]bb05e452009-10-29 21:24:56983 'msvs_settings': {
984 'VCCLCompilerTool': {
[email protected]7e0d664a2009-12-03 21:07:47985 'Optimization': '<(win_debug_Optimization)',
[email protected]bb05e452009-10-29 21:24:56986 'PreprocessorDefinitions': ['_DEBUG'],
[email protected]6b0507b2010-05-07 07:41:21987 'BasicRuntimeChecks': '<(win_debug_RuntimeChecks)',
[email protected]7e0d664a2009-12-03 21:07:47988 'RuntimeLibrary': '<(win_debug_RuntimeLibrary)',
[email protected]2ae6e022010-05-07 13:19:15989 'conditions': [
990 # According to MSVS, InlineFunctionExpansion=0 means
991 # "default inlining", not "/Ob0".
992 # Thus, we have to handle InlineFunctionExpansion==0 separately.
993 ['win_debug_InlineFunctionExpansion==0', {
994 'AdditionalOptions': ['/Ob0'],
995 }],
996 ['win_debug_InlineFunctionExpansion!=""', {
997 'InlineFunctionExpansion':
998 '<(win_debug_InlineFunctionExpansion)',
999 }],
[email protected]fac10d12010-11-08 16:00:311000 ['win_debug_disable_iterator_debugging==1', {
1001 'PreprocessorDefinitions': ['_HAS_ITERATOR_DEBUGGING=0'],
1002 }],
[email protected]2ae6e022010-05-07 13:19:151003 ],
[email protected]bb05e452009-10-29 21:24:561004 },
1005 'VCLinkerTool': {
1006 'LinkIncremental': '<(msvs_debug_link_incremental)',
1007 },
1008 'VCResourceCompilerTool': {
1009 'PreprocessorDefinitions': ['_DEBUG'],
1010 },
1011 },
[email protected]2f80c312009-02-25 21:26:551012 'conditions': [
[email protected]bb05e452009-10-29 21:24:561013 ['OS=="linux"', {
1014 'cflags': [
1015 '<@(debug_extra_cflags)',
1016 ],
[email protected]2f80c312009-02-25 21:26:551017 }],
1018 ],
1019 },
[email protected]5153767c2009-12-22 01:52:501020 'Release_Base': {
1021 'abstract': 1,
[email protected]2f80c312009-02-25 21:26:551022 'defines': [
1023 'NDEBUG',
1024 ],
[email protected]1c966092009-08-20 21:19:261025 'xcode_settings': {
1026 'DEAD_CODE_STRIPPING': 'YES', # -Wl,-dead_strip
1027 'GCC_OPTIMIZATION_LEVEL': '<(mac_release_optimization)',
[email protected]ffd984b12009-09-11 19:37:001028 'OTHER_CFLAGS': [ '<@(release_extra_cflags)', ],
[email protected]1c966092009-08-20 21:19:261029 },
[email protected]bb05e452009-10-29 21:24:561030 'msvs_settings': {
[email protected]7e0d664a2009-12-03 21:07:471031 'VCCLCompilerTool': {
1032 'Optimization': '<(win_release_Optimization)',
1033 'RuntimeLibrary': '<(win_release_RuntimeLibrary)',
[email protected]2ae6e022010-05-07 13:19:151034 'conditions': [
1035 # According to MSVS, InlineFunctionExpansion=0 means
1036 # "default inlining", not "/Ob0".
1037 # Thus, we have to handle InlineFunctionExpansion==0 separately.
1038 ['win_release_InlineFunctionExpansion==0', {
1039 'AdditionalOptions': ['/Ob0'],
1040 }],
1041 ['win_release_InlineFunctionExpansion!=""', {
1042 'InlineFunctionExpansion':
1043 '<(win_release_InlineFunctionExpansion)',
1044 }],
1045 ],
[email protected]7e0d664a2009-12-03 21:07:471046 },
[email protected]bb05e452009-10-29 21:24:561047 'VCLinkerTool': {
1048 'LinkIncremental': '1',
1049 },
1050 },
[email protected]2f80c312009-02-25 21:26:551051 'conditions': [
[email protected]92822e82009-09-18 14:26:561052 ['release_valgrind_build==0', {
[email protected]14339762011-04-05 07:36:581053 'defines': [
1054 'NVALGRIND',
1055 'DYNAMIC_ANNOTATIONS_ENABLED=0',
1056 ],
[email protected]ee857512010-05-14 08:24:421057 }, {
[email protected]14339762011-04-05 07:36:581058 'defines': [
1059 'DYNAMIC_ANNOTATIONS_ENABLED=1',
1060 'WTF_USE_DYNAMIC_ANNOTATIONS=1',
1061 ],
[email protected]92822e82009-09-18 14:26:561062 }],
[email protected]7e0d664a2009-12-03 21:07:471063 ['win_use_allocator_shim==0', {
1064 'defines': ['NO_TCMALLOC'],
1065 }],
[email protected]bb05e452009-10-29 21:24:561066 ['OS=="linux"', {
1067 'cflags': [
[email protected]ffd984b12009-09-11 19:37:001068 '<@(release_extra_cflags)',
[email protected]bb05e452009-10-29 21:24:561069 ],
1070 }],
[email protected]2f80c312009-02-25 21:26:551071 ],
1072 },
[email protected]5153767c2009-12-22 01:52:501073 'Purify_Base': {
1074 'abstract': 1,
1075 'defines': [
1076 'PURIFY',
1077 'NO_TCMALLOC',
1078 ],
1079 'msvs_settings': {
1080 'VCCLCompilerTool': {
1081 'Optimization': '0',
1082 'RuntimeLibrary': '0',
1083 'BufferSecurityCheck': 'false',
1084 },
1085 'VCLinkerTool': {
1086 'EnableCOMDATFolding': '1',
1087 'LinkIncremental': '1',
1088 },
1089 },
1090 },
1091 #
1092 # Concrete configurations
1093 #
1094 'Debug': {
1095 'inherit_from': ['Common_Base', 'x86_Base', 'Debug_Base'],
1096 },
1097 'Release': {
1098 'inherit_from': ['Common_Base', 'x86_Base', 'Release_Base'],
1099 'conditions': [
1100 ['msvs_use_common_release', {
[email protected]1f9471a2010-01-04 06:40:161101 'includes': ['release.gypi'],
[email protected]5153767c2009-12-22 01:52:501102 }],
1103 ]
1104 },
[email protected]f926fa0a2009-08-04 22:50:131105 'conditions': [
1106 [ 'OS=="win"', {
1107 # TODO(bradnelson): add a gyp mechanism to make this more graceful.
1108 'Purify': {
[email protected]5153767c2009-12-22 01:52:501109 'inherit_from': ['Common_Base', 'x86_Base', 'Release_Base', 'Purify'],
[email protected]ef4fa4072009-12-04 22:46:501110 },
1111 'Debug_x64': {
[email protected]5153767c2009-12-22 01:52:501112 'inherit_from': ['Common_Base', 'x64_Base', 'Debug_Base'],
[email protected]78263c12009-11-01 23:45:301113 },
1114 'Release_x64': {
[email protected]5153767c2009-12-22 01:52:501115 'inherit_from': ['Common_Base', 'x64_Base', 'Release_Base'],
[email protected]78263c12009-11-01 23:45:301116 },
1117 'Purify_x64': {
[email protected]1f9471a2010-01-04 06:40:161118 'inherit_from': ['Common_Base', 'x64_Base', 'Release_Base', 'Purify_Base'],
[email protected]78263c12009-11-01 23:45:301119 },
[email protected]f926fa0a2009-08-04 22:50:131120 }],
1121 ],
[email protected]2f80c312009-02-25 21:26:551122 },
1123 },
1124 'conditions': [
[email protected]79e2336c2011-05-12 18:18:341125 ['os_posix==1 and OS!="mac"', {
[email protected]9d384032009-03-20 23:13:261126 'target_defaults': {
[email protected]5315f2842009-04-28 00:43:271127 # Enable -Werror by default, but put it in a variable so it can
1128 # be disabled in ~/.gyp/include.gypi on the valgrind builders.
1129 'variables': {
[email protected]57e94022011-05-04 15:33:191130 # Use -fno-strict-aliasing, see http://crbug.com/32204
[email protected]ecf52cb82010-01-13 19:25:421131 'no_strict_aliasing%': 1,
[email protected]79e2336c2011-05-12 18:18:341132 'conditions': [
1133 ['OS=="linux"', {
1134 'werror%': '-Werror',
1135 }, { # turn off -Werror on other Unices
1136 'werror%': '',
1137 }],
[email protected]47deeb62009-12-17 14:49:391138 ],
[email protected]5315f2842009-04-28 00:43:271139 },
[email protected]9d384032009-03-20 23:13:261140 'cflags': [
[email protected]1bba09c2009-08-13 12:53:161141 '<(werror)', # See note above about the werror variable.
1142 '-pthread',
1143 '-fno-exceptions',
1144 '-Wall',
[email protected]0fa17082010-03-26 00:48:051145 # TODO(evan): turn this back on once all the builds work.
1146 # '-Wextra',
[email protected]225c8f52010-02-05 22:23:201147 # Don't warn about unused function params. We use those everywhere.
1148 '-Wno-unused-parameter',
1149 # Don't warn about the "struct foo f = {0};" initialization pattern.
1150 '-Wno-missing-field-initializers',
[email protected]1bba09c2009-08-13 12:53:161151 '-D_FILE_OFFSET_BITS=64',
[email protected]3df6e3a2010-01-21 20:23:121152 # Don't export any symbols (for example, to plugins we dlopen()).
1153 # Note: this is *required* to make some plugins work.
1154 '-fvisibility=hidden',
[email protected]7ca6ce12010-09-15 23:39:351155 '-pipe',
[email protected]8a2fcba2009-07-29 00:52:241156 ],
1157 'cflags_cc': [
[email protected]832d0212009-10-28 19:12:221158 '-fno-rtti',
[email protected]8a2fcba2009-07-29 00:52:241159 '-fno-threadsafe-statics',
[email protected]f5986c42009-11-17 18:39:361160 # Make inline functions have hidden visiblity by default.
1161 # Surprisingly, not covered by -fvisibility=hidden.
1162 '-fvisibility-inlines-hidden',
[email protected]9d384032009-03-20 23:13:261163 ],
[email protected]a6cf87e2009-04-03 04:07:381164 'ldflags': [
[email protected]138241f2010-03-30 23:53:101165 '-pthread', '-Wl,-z,noexecstack',
[email protected]9d384032009-03-20 23:13:261166 ],
[email protected]3aacaf952009-04-02 15:34:091167 'configurations': {
[email protected]5153767c2009-12-22 01:52:501168 'Debug_Base': {
[email protected]c5bdc032009-04-20 19:11:311169 'variables': {
1170 'debug_optimize%': '0',
1171 },
[email protected]3aacaf952009-04-02 15:34:091172 'defines': [
1173 '_DEBUG',
1174 ],
1175 'cflags': [
[email protected]9cb5cc702011-02-01 19:56:041176 '-O>(debug_optimize)',
[email protected]3aacaf952009-04-02 15:34:091177 '-g',
1178 ],
[email protected]5315f2842009-04-28 00:43:271179 },
[email protected]5153767c2009-12-22 01:52:501180 'Release_Base': {
[email protected]740e2de2009-07-21 11:41:011181 'variables': {
1182 'release_optimize%': '2',
[email protected]1dd529642010-05-15 01:02:511183 # Binaries become big and gold is unable to perform GC
1184 # and remove unused sections for some of test targets
1185 # on 32 bit platform.
1186 # (This is currently observed only in chromeos valgrind bots)
1187 # The following flag is to disable --gc-sections linker
1188 # option for these bots.
1189 'no_gc_sections%': 0,
[email protected]409dceef2011-05-10 19:49:121190
1191 # TODO(bradnelson): reexamine how this is done if we change the
1192 # expansion of configurations
1193 'release_valgrind_build%': 0,
[email protected]740e2de2009-07-21 11:41:011194 },
[email protected]3aacaf952009-04-02 15:34:091195 'cflags': [
[email protected]9cb5cc702011-02-01 19:56:041196 '-O>(release_optimize)',
[email protected]d8cc3a62009-04-08 18:29:531197 # Don't emit the GCC version ident directives, they just end up
1198 # in the .comment section taking up binary size.
1199 '-fno-ident',
1200 # Put data and code in their own sections, so that unused symbols
1201 # can be removed at link time with --gc-sections.
1202 '-fdata-sections',
1203 '-ffunction-sections',
[email protected]3aacaf952009-04-02 15:34:091204 ],
[email protected]c902f2c2010-08-06 20:04:181205 'ldflags': [
1206 # Specifically tell the linker to perform optimizations.
1207 # See http://lwn.net/Articles/192624/ .
1208 '-Wl,-O1',
[email protected]27c2e492010-08-06 22:55:221209 '-Wl,--as-needed',
[email protected]c902f2c2010-08-06 20:04:181210 ],
[email protected]1dd529642010-05-15 01:02:511211 'conditions' : [
1212 ['no_gc_sections==0', {
1213 'ldflags': [
1214 '-Wl,--gc-sections',
1215 ],
1216 }],
[email protected]ecf7b6482010-10-13 09:15:201217 ['clang==1', {
1218 'cflags!': [
1219 '-fno-ident',
1220 ],
1221 }],
[email protected]7664ab32011-02-01 23:35:251222 ['profiling==1', {
1223 'cflags': [
1224 '-fno-omit-frame-pointer',
1225 '-g',
1226 ],
1227 }],
[email protected]c75f33e42011-05-04 18:11:521228 # At gyp time, we test the linker for ICF support; this flag
1229 # is then provided to us by gyp. (Currently only gold supports
1230 # an --icf flag.)
[email protected]16d71b0d2011-06-22 00:43:531231 # There seems to be a conflict of --icf and -pie in gold which
1232 # can generate crashy binaries. As a security measure, -pie
1233 # takes precendence for now.
[email protected]409dceef2011-05-10 19:49:121234 ['LINKER_SUPPORTS_ICF==1 and release_valgrind_build==0', {
[email protected]f2fcf4df72011-06-03 20:05:461235 'target_conditions': [
1236 ['_toolset=="target"', {
1237 'ldflags': [
[email protected]16d71b0d2011-06-22 00:43:531238 #'-Wl,--icf=safe',
1239 '-Wl,--icf=none',
[email protected]f2fcf4df72011-06-03 20:05:461240 ]
1241 }]
[email protected]c75f33e42011-05-04 18:11:521242 ]
1243 }],
[email protected]1dd529642010-05-15 01:02:511244 ]
[email protected]3aacaf952009-04-02 15:34:091245 },
1246 },
[email protected]601b540222009-04-03 21:32:041247 'variants': {
1248 'coverage': {
1249 'cflags': ['-fprofile-arcs', '-ftest-coverage'],
1250 'ldflags': ['-fprofile-arcs'],
1251 },
1252 'profile': {
1253 'cflags': ['-pg', '-g'],
1254 'ldflags': ['-pg'],
1255 },
1256 'symbols': {
1257 'cflags': ['-g'],
1258 },
1259 },
[email protected]606116d22009-05-06 22:38:231260 'conditions': [
[email protected]7e8eb7612009-07-29 15:56:001261 [ 'target_arch=="ia32"', {
[email protected]606116d22009-05-06 22:38:231262 'asflags': [
1263 # Needed so that libs with .s files (e.g. libicudata.a)
1264 # are compatible with the general 32-bit-ness.
1265 '-32',
1266 ],
1267 # All floating-point computations on x87 happens in 80-bit
1268 # precision. Because the C and C++ language standards allow
1269 # the compiler to keep the floating-point values in higher
1270 # precision than what's specified in the source and doing so
1271 # is more efficient than constantly rounding up to 64-bit or
1272 # 32-bit precision as specified in the source, the compiler,
1273 # especially in the optimized mode, tries very hard to keep
1274 # values in x87 floating-point stack (in 80-bit precision)
1275 # as long as possible. This has important side effects, that
1276 # the real value used in computation may change depending on
1277 # how the compiler did the optimization - that is, the value
1278 # kept in 80-bit is different than the value rounded down to
1279 # 64-bit or 32-bit. There are possible compiler options to make
1280 # this behavior consistent (e.g. -ffloat-store would keep all
1281 # floating-values in the memory, thus force them to be rounded
1282 # to its original precision) but they have significant runtime
1283 # performance penalty.
1284 #
1285 # -mfpmath=sse -msse2 makes the compiler use SSE instructions
1286 # which keep floating-point values in SSE registers in its
1287 # native precision (32-bit for single precision, and 64-bit for
1288 # double precision values). This means the floating-point value
1289 # used during computation does not change depending on how the
1290 # compiler optimized the code, since the value is always kept
1291 # in its specified precision.
[email protected]ffde7932009-05-29 00:39:061292 'conditions': [
[email protected]ac120ff2010-04-28 02:14:221293 ['branding=="Chromium" and disable_sse2==0', {
[email protected]ffde7932009-05-29 00:39:061294 'cflags': [
1295 '-march=pentium4',
1296 '-msse2',
1297 '-mfpmath=sse',
1298 ],
1299 }],
[email protected]06c756182010-04-27 18:31:311300 # ChromeOS targets Pinetrail, which is sse3, but most of the
[email protected]0183dbb2010-04-16 02:00:441301 # benefit comes from sse2 so this setting allows ChromeOS
1302 # to build on other CPUs. In the future -march=atom would help
1303 # but requires a newer compiler.
[email protected]ac120ff2010-04-28 02:14:221304 ['chromeos==1 and disable_sse2==0', {
[email protected]0183dbb2010-04-16 02:00:441305 'cflags': [
1306 '-msse2',
1307 ],
1308 }],
[email protected]34799f9d2010-07-08 17:51:331309 # Install packages have started cropping up with
1310 # different headers between the 32-bit and 64-bit
1311 # versions, so we have to shadow those differences off
1312 # and make sure a 32-bit-on-64-bit build picks up the
1313 # right files.
1314 ['host_arch!="ia32"', {
1315 'include_dirs+': [
1316 '/usr/include32',
1317 ],
1318 }],
[email protected]ffde7932009-05-29 00:39:061319 ],
[email protected]dc259ce52010-04-13 04:03:101320 # -mmmx allows mmintrin.h to be used for mmx intrinsics.
1321 # video playback is mmx and sse2 optimized.
[email protected]606116d22009-05-06 22:38:231322 'cflags': [
1323 '-m32',
[email protected]dc259ce52010-04-13 04:03:101324 '-mmmx',
[email protected]1c6560af2009-07-14 11:02:161325 ],
[email protected]606116d22009-05-06 22:38:231326 'ldflags': [
1327 '-m32',
1328 ],
1329 }],
[email protected]3dda8a962009-08-10 18:58:071330 ['target_arch=="arm"', {
[email protected]77c1b29392009-12-04 06:21:291331 'target_conditions': [
1332 ['_toolset=="target"', {
1333 'cflags_cc': [
1334 # The codesourcery arm-2009q3 toolchain warns at that the ABI
1335 # has changed whenever it encounters a varargs function. This
1336 # silences those warnings, as they are not helpful and
1337 # clutter legitimate warnings.
1338 '-Wno-abi',
1339 ],
1340 'conditions': [
1341 ['arm_thumb == 1', {
1342 'cflags': [
1343 '-mthumb',
[email protected]77c1b29392009-12-04 06:21:291344 ]
1345 }],
1346 ['armv7==1', {
[email protected]dc9711f2009-11-13 19:30:251347 'cflags': [
1348 '-march=armv7-a',
1349 '-mtune=cortex-a8',
[email protected]dc9711f2009-11-13 19:30:251350 '-mfloat-abi=softfp',
1351 ],
[email protected]eafc0b452010-02-26 21:53:431352 'conditions': [
1353 ['arm_neon==1', {
1354 'cflags': [ '-mfpu=neon', ],
1355 }, {
[email protected]53e0f642010-03-05 01:41:561356 'cflags': [ '-mfpu=<(arm_fpu)', ],
[email protected]eafc0b452010-02-26 21:53:431357 }]
1358 ],
[email protected]dc9711f2009-11-13 19:30:251359 }],
[email protected]3dda8a962009-08-10 18:58:071360 ],
1361 }],
1362 ],
1363 }],
[email protected]2fb843b2010-08-12 02:11:081364 ['linux_fpic==1', {
[email protected]c76723a2010-01-25 23:10:581365 'cflags': [
1366 '-fPIC',
1367 ],
1368 }],
[email protected]ee28c9f2009-09-04 01:53:011369 ['sysroot!=""', {
[email protected]fd36ce822009-10-28 20:13:571370 'target_conditions': [
1371 ['_toolset=="target"', {
1372 'cflags': [
1373 '--sysroot=<(sysroot)',
1374 ],
1375 'ldflags': [
1376 '--sysroot=<(sysroot)',
1377 ],
1378 }]]
[email protected]ee28c9f2009-09-04 01:53:011379 }],
[email protected]58680ce2010-09-18 00:09:151380 ['clang==1', {
[email protected]3e40c882011-02-10 21:03:351381 'target_conditions': [
1382 ['_toolset=="target"', {
1383 'cflags': [
[email protected]7f8d486f2011-04-05 19:49:071384 '-Wheader-hygiene',
[email protected]3e40c882011-02-10 21:03:351385 # Clang spots more unused functions.
1386 '-Wno-unused-function',
1387 # Don't die on dtoa code that uses a char as an array index.
1388 '-Wno-char-subscripts',
1389 # Survive EXPECT_EQ(unnamed_enum, unsigned int) -- see
1390 # http://code.google.com/p/googletest/source/detail?r=446 .
1391 # TODO(thakis): Use -isystem instead (http://crbug.com/58751 )
1392 '-Wno-unnamed-type-template-args',
[email protected]3e40c882011-02-10 21:03:351393 ],
1394 'cflags!': [
1395 # Clang doesn't seem to know know this flag.
1396 '-mfpmath=sse',
1397 ],
1398 }]],
[email protected]58680ce2010-09-18 00:09:151399 }],
[email protected]5d451ad2011-02-11 16:43:461400 ['clang==1 and clang_use_chrome_plugins==1', {
1401 'target_conditions': [
1402 ['_toolset=="target"', {
1403 'cflags': [
1404 '<(clang_chrome_plugins_flags)',
1405 ],
1406 }]],
1407 }],
[email protected]5e781232011-01-28 02:57:591408 ['clang==1 and clang_load!="" and clang_add_plugin!=""', {
[email protected]3e40c882011-02-10 21:03:351409 'target_conditions': [
1410 ['_toolset=="target"', {
1411 'cflags': [
1412 '-Xclang', '-load', '-Xclang', '<(clang_load)',
1413 '-Xclang', '-add-plugin', '-Xclang', '<(clang_add_plugin)',
1414 ],
1415 }]],
[email protected]5e781232011-01-28 02:57:591416 }],
[email protected]cc4219a2009-08-14 05:30:521417 ['no_strict_aliasing==1', {
1418 'cflags': [
1419 '-fno-strict-aliasing',
1420 ],
1421 }],
[email protected]cbd5fd52009-08-26 00:14:271422 ['linux_breakpad==1', {
[email protected]c87efd42010-08-26 18:28:171423 'cflags': [ '-g' ],
[email protected]cbd5fd52009-08-26 00:14:271424 'defines': ['USE_LINUX_BREAKPAD'],
1425 }],
[email protected]d8b60602010-03-26 09:41:221426 ['linux_use_heapchecker==1', {
1427 'variables': {'linux_use_tcmalloc%': 1},
1428 }],
[email protected]61a9b2d82010-02-26 00:31:081429 ['linux_use_tcmalloc==0', {
1430 'defines': ['NO_TCMALLOC'],
[email protected]01699e22009-11-11 19:24:241431 }],
[email protected]d8b60602010-03-26 09:41:221432 ['linux_use_heapchecker==0', {
1433 'defines': ['NO_HEAPCHECKER'],
1434 }],
[email protected]64e2d4a42010-08-27 10:13:211435 ['linux_keep_shadow_stacks==1', {
1436 'defines': ['KEEP_SHADOW_STACKS'],
1437 'cflags': ['-finstrument-functions'],
1438 }],
[email protected]606116d22009-05-06 22:38:231439 ],
[email protected]9d384032009-03-20 23:13:261440 },
1441 }],
[email protected]c51e8d52009-12-11 20:04:061442 # FreeBSD-specific options; note that most FreeBSD options are set above,
1443 # with Linux.
1444 ['OS=="freebsd"', {
1445 'target_defaults': {
1446 'ldflags': [
1447 '-Wl,--no-keep-memory',
1448 ],
1449 },
1450 }],
[email protected]93f21e42010-04-01 00:35:151451 ['OS=="solaris"', {
1452 'cflags!': ['-fvisibility=hidden'],
1453 'cflags_cc!': ['-fvisibility-inlines-hidden'],
1454 }],
[email protected]2f80c312009-02-25 21:26:551455 ['OS=="mac"', {
1456 'target_defaults': {
[email protected]24700642009-06-01 16:01:201457 'variables': {
[email protected]9a5e72862010-09-02 16:16:581458 # These should be 'mac_real_dsym%' and 'mac_strip%', but there
1459 # seems to be a bug with % in variables that are intended to be
1460 # set to different values in different targets, like these two.
1461 'mac_strip': 1, # Strip debugging symbols from the target.
[email protected]24700642009-06-01 16:01:201462 'mac_real_dsym': 0, # Fake .dSYMs are fine in most cases.
1463 },
[email protected]d92c7c012009-03-19 19:26:421464 'mac_bundle': 0,
[email protected]2f80c312009-02-25 21:26:551465 'xcode_settings': {
1466 'ALWAYS_SEARCH_USER_PATHS': 'NO',
[email protected]ab2956372009-08-13 18:11:041467 'GCC_C_LANGUAGE_STANDARD': 'c99', # -std=c99
1468 'GCC_CW_ASM_SYNTAX': 'NO', # No -fasm-blocks
1469 'GCC_DYNAMIC_NO_PIC': 'NO', # No -mdynamic-no-pic
1470 # (Equivalent to -fPIC)
1471 'GCC_ENABLE_CPP_EXCEPTIONS': 'NO', # -fno-exceptions
1472 'GCC_ENABLE_CPP_RTTI': 'NO', # -fno-rtti
1473 'GCC_ENABLE_PASCAL_STRINGS': 'NO', # No -mpascal-strings
[email protected]3224dcd2009-09-16 17:31:251474 # GCC_INLINES_ARE_PRIVATE_EXTERN maps to -fvisibility-inlines-hidden
1475 'GCC_INLINES_ARE_PRIVATE_EXTERN': 'YES',
[email protected]ab2956372009-08-13 18:11:041476 'GCC_OBJC_CALL_CXX_CDTORS': 'YES', # -fobjc-call-cxx-cdtors
1477 'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES', # -fvisibility=hidden
1478 'GCC_THREADSAFE_STATICS': 'NO', # -fno-threadsafe-statics
1479 'GCC_TREAT_WARNINGS_AS_ERRORS': 'YES', # -Werror
[email protected]2f80c312009-02-25 21:26:551480 'GCC_VERSION': '4.2',
[email protected]ab2956372009-08-13 18:11:041481 'GCC_WARN_ABOUT_MISSING_NEWLINE': 'YES', # -Wnewline-eof
[email protected]3224dcd2009-09-16 17:31:251482 # MACOSX_DEPLOYMENT_TARGET maps to -mmacosx-version-min
1483 'MACOSX_DEPLOYMENT_TARGET': '<(mac_deployment_target)',
[email protected]ab2956372009-08-13 18:11:041484 'PREBINDING': 'NO', # No -Wl,-prebind
[email protected]2f80c312009-02-25 21:26:551485 'USE_HEADERMAP': 'NO',
[email protected]57e94022011-05-04 15:33:191486 'OTHER_CFLAGS': [
1487 '-fno-strict-aliasing', # See http://crbug.com/32204
1488 ],
[email protected]080e86f2010-06-21 15:19:041489 'WARNING_CFLAGS': [
1490 '-Wall',
1491 '-Wendif-labels',
1492 '-Wextra',
1493 # Don't warn about unused function parameters.
1494 '-Wno-unused-parameter',
1495 # Don't warn about the "struct foo f = {0};" initialization
1496 # pattern.
1497 '-Wno-missing-field-initializers',
1498 ],
[email protected]b3fb8092009-03-12 19:09:241499 'conditions': [
1500 ['chromium_mac_pch', {'GCC_PRECOMPILE_PREFIX_HEADER': 'YES'},
[email protected]9543af052009-09-15 22:42:591501 {'GCC_PRECOMPILE_PREFIX_HEADER': 'NO'}
1502 ],
[email protected]66733172010-09-22 00:09:281503 ['clang==1', {
1504 'WARNING_CFLAGS': [
[email protected]7f8d486f2011-04-05 19:49:071505 '-Wheader-hygiene',
[email protected]66733172010-09-22 00:09:281506 # Don't die on dtoa code that uses a char as an array index.
1507 # This is required solely for base/third_party/dmg_fp/dtoa.cc.
1508 '-Wno-char-subscripts',
[email protected]25d3bb722010-11-22 14:31:451509 # Clang spots more unused functions.
1510 '-Wno-unused-function',
[email protected]0fa0fbc2010-10-12 04:32:051511 # Survive EXPECT_EQ(unnamed_enum, unsigned int) -- see
1512 # http://code.google.com/p/googletest/source/detail?r=446 .
1513 # TODO(thakis): Use -isystem instead (http://crbug.com/58751 ).
1514 '-Wno-unnamed-type-template-args',
[email protected]d53680932011-06-08 16:40:061515 # TODO(thakis): Reenable once the one instance this warns on
1516 # is fixed.
1517 '-Wno-parentheses',
[email protected]66733172010-09-22 00:09:281518 ],
[email protected]bddae312011-03-05 04:47:251519 'OTHER_CFLAGS': [
1520 # TODO(thakis): Causes many warnings - http://crbug.com/75001
1521 '-fobjc-exceptions',
1522 ],
[email protected]66733172010-09-22 00:09:281523 }],
[email protected]5d451ad2011-02-11 16:43:461524 ['clang==1 and clang_use_chrome_plugins==1', {
1525 'OTHER_CFLAGS': [
1526 '<(clang_chrome_plugins_flags)',
1527 ],
1528 }],
[email protected]5e781232011-01-28 02:57:591529 ['clang==1 and clang_load!="" and clang_add_plugin!=""', {
1530 'OTHER_CFLAGS': [
1531 '-Xclang', '-load', '-Xclang', '<(clang_load)',
1532 '-Xclang', '-add-plugin', '-Xclang', '<(clang_add_plugin)',
1533 ],
1534 }],
[email protected]b3fb8092009-03-12 19:09:241535 ],
[email protected]2f80c312009-02-25 21:26:551536 },
1537 'target_conditions': [
[email protected]2f80c312009-02-25 21:26:551538 ['_type!="static_library"', {
[email protected]5d7dc972009-04-16 15:30:461539 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-search_paths_first']},
1540 }],
1541 ['_mac_bundle', {
1542 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-ObjC']},
[email protected]87fde4a2009-02-28 00:50:081543 }],
[email protected]6a0242bc2011-07-01 00:34:461544 ['_type=="executable" and release_valgrind_build==0', {
1545 # Turn on position-independence (ASLR) for executables. When PIE
1546 # is on for the Chrome executables, the framework will also be
1547 # subject to ASLR.
1548 # Don't do this when building for Valgrind because Valgrind
1549 # doesn't understand slide. TODO: Make Valgrind on Mac OS X
1550 # understand slide, and get rid of the Valgrind check.
1551 'xcode_settings': {
1552 'OTHER_LDFLAGS': [
1553 '-Wl,-pie', # Position-independent executable (MH_PIE)
1554 ],
1555 },
1556 }],
[email protected]9a5e72862010-09-02 16:16:581557 ['(_type=="executable" or _type=="shared_library" or \
1558 _type=="loadable_module") and mac_strip!=0', {
[email protected]24700642009-06-01 16:01:201559 'target_conditions': [
1560 ['mac_real_dsym == 1', {
1561 # To get a real .dSYM bundle produced by dsymutil, set the
1562 # debug information format to dwarf-with-dsym. Since
1563 # strip_from_xcode will not be used, set Xcode to do the
1564 # stripping as well.
1565 'configurations': {
[email protected]5153767c2009-12-22 01:52:501566 'Release_Base': {
[email protected]24700642009-06-01 16:01:201567 'xcode_settings': {
1568 'DEBUG_INFORMATION_FORMAT': 'dwarf-with-dsym',
1569 'DEPLOYMENT_POSTPROCESSING': 'YES',
1570 'STRIP_INSTALLED_PRODUCT': 'YES',
[email protected]e14a9f92009-08-05 19:26:071571 'target_conditions': [
[email protected]c2111422010-06-01 18:30:251572 ['_type=="shared_library" or _type=="loadable_module"', {
[email protected]e14a9f92009-08-05 19:26:071573 # The Xcode default is to strip debugging symbols
1574 # only (-S). Local symbols should be stripped as
1575 # well, which will be handled by -x. Xcode will
1576 # continue to insert -S when stripping even when
1577 # additional flags are added with STRIPFLAGS.
1578 'STRIPFLAGS': '-x',
[email protected]c2111422010-06-01 18:30:251579 }], # _type=="shared_library" or _type=="loadable_module"'
[email protected]e14a9f92009-08-05 19:26:071580 ], # target_conditions
1581 }, # xcode_settings
1582 }, # configuration "Release"
1583 }, # configurations
[email protected]24700642009-06-01 16:01:201584 }, { # mac_real_dsym != 1
1585 # To get a fast fake .dSYM bundle, use a post-build step to
1586 # produce the .dSYM and strip the executable. strip_from_xcode
1587 # only operates in the Release configuration.
1588 'postbuilds': [
1589 {
1590 'variables': {
1591 # Define strip_from_xcode in a variable ending in _path
1592 # so that gyp understands it's a path and performs proper
1593 # relativization during dict merging.
1594 'strip_from_xcode_path': 'mac/strip_from_xcode',
1595 },
1596 'postbuild_name': 'Strip If Needed',
1597 'action': ['<(strip_from_xcode_path)'],
1598 },
[email protected]e14a9f92009-08-05 19:26:071599 ], # postbuilds
1600 }], # mac_real_dsym
1601 ], # target_conditions
[email protected]9a5e72862010-09-02 16:16:581602 }], # (_type=="executable" or _type=="shared_library" or
1603 # _type=="loadable_module") and mac_strip!=0
[email protected]e14a9f92009-08-05 19:26:071604 ], # target_conditions
1605 }, # target_defaults
1606 }], # OS=="mac"
[email protected]2f80c312009-02-25 21:26:551607 ['OS=="win"', {
1608 'target_defaults': {
1609 'defines': [
1610 '_WIN32_WINNT=0x0600',
1611 'WINVER=0x0600',
1612 'WIN32',
1613 '_WINDOWS',
[email protected]2f80c312009-02-25 21:26:551614 'NOMINMAX',
1615 '_CRT_RAND_S',
1616 'CERT_CHAIN_PARA_HAS_EXTRA_FIELDS',
1617 'WIN32_LEAN_AND_MEAN',
[email protected]7a812dd62010-06-30 18:52:271618 '_ATL_NO_OPENGL',
[email protected]adfb98c2009-06-23 20:08:451619 '_HAS_TR1=0',
[email protected]2f80c312009-02-25 21:26:551620 ],
[email protected]8974e042010-06-21 18:06:521621 'conditions': [
1622 ['component=="static_library"', {
1623 'defines': [
1624 '_HAS_EXCEPTIONS=0',
1625 ],
1626 }],
[email protected]3e2648a2011-03-21 20:58:501627 ['secure_atl', {
1628 'defines': [
1629 '_SECURE_ATL',
1630 ],
1631 }],
[email protected]8974e042010-06-21 18:06:521632 ],
[email protected]5b5ca7cb2009-07-20 23:00:201633 'msvs_system_include_dirs': [
[email protected]998b5152009-12-12 22:19:521634 '<(DEPTH)/third_party/platformsdk_win7/files/Include',
[email protected]a78da50e2010-06-09 21:31:371635 '<(DEPTH)/third_party/directxsdk/files/Include',
[email protected]2f80c312009-02-25 21:26:551636 '$(VSInstallDir)/VC/atlmfc/include',
1637 ],
[email protected]a8d99cef2009-08-26 20:47:491638 'msvs_cygwin_dirs': ['<(DEPTH)/third_party/cygwin'],
[email protected]942c3a60f2011-05-03 02:04:111639 'msvs_disabled_warnings': [4351, 4396, 4503, 4819,
1640 # TODO(maruel): These warnings are level 4. They will be slowly
1641 # removed as code is fixed.
1642 4100, 4121, 4125, 4127, 4130, 4131, 4189, 4201, 4238, 4244, 4245,
1643 4310, 4355, 4428, 4481, 4505, 4510, 4512, 4530, 4610, 4611, 4701,
1644 4702, 4706,
1645 ],
[email protected]2f80c312009-02-25 21:26:551646 'msvs_settings': {
1647 'VCCLCompilerTool': {
1648 'MinimalRebuild': 'false',
[email protected]2f80c312009-02-25 21:26:551649 'BufferSecurityCheck': 'true',
1650 'EnableFunctionLevelLinking': 'true',
1651 'RuntimeTypeInfo': 'false',
[email protected]942c3a60f2011-05-03 02:04:111652 'WarningLevel': '4',
[email protected]2f80c312009-02-25 21:26:551653 'WarnAsError': 'true',
1654 'DebugInformationFormat': '3',
[email protected]3fef6e62009-07-31 19:58:581655 'conditions': [
[email protected]3e2648a2011-03-21 20:58:501656 ['msvs_multi_core_compile', {
[email protected]1f9471a2010-01-04 06:40:161657 'AdditionalOptions': ['/MP'],
[email protected]912c55c2009-07-31 23:33:551658 }],
[email protected]3e2648a2011-03-21 20:58:501659 ['MSVS_VERSION=="2005e"', {
1660 'AdditionalOptions': ['/w44068'], # Unknown pragma to 4 (ATL)
1661 }],
[email protected]8974e042010-06-21 18:06:521662 ['component=="shared_library"', {
1663 'ExceptionHandling': '1', # /EHsc
1664 }, {
1665 'ExceptionHandling': '0',
1666 }],
[email protected]3fef6e62009-07-31 19:58:581667 ],
[email protected]2f80c312009-02-25 21:26:551668 },
1669 'VCLibrarianTool': {
[email protected]1f9471a2010-01-04 06:40:161670 'AdditionalOptions': ['/ignore:4221'],
[email protected]a78da50e2010-06-09 21:31:371671 'AdditionalLibraryDirectories': [
1672 '<(DEPTH)/third_party/platformsdk_win7/files/Lib',
1673 '<(DEPTH)/third_party/directxsdk/files/Lib/x86',
1674 ],
[email protected]2f80c312009-02-25 21:26:551675 },
1676 'VCLinkerTool': {
[email protected]2f80c312009-02-25 21:26:551677 'AdditionalDependencies': [
1678 'wininet.lib',
[email protected]b1d8c252011-01-13 20:27:501679 'dnsapi.lib',
[email protected]2f80c312009-02-25 21:26:551680 'version.lib',
1681 'msimg32.lib',
1682 'ws2_32.lib',
1683 'usp10.lib',
1684 'psapi.lib',
[email protected]96fd0032009-04-24 00:13:081685 'dbghelp.lib',
[email protected]dfdf7ee2011-04-28 18:51:481686 'winmm.lib',
1687 'shlwapi.lib',
[email protected]2f80c312009-02-25 21:26:551688 ],
[email protected]4de39f82011-03-28 12:01:291689 'conditions': [
[email protected]3e2648a2011-03-21 20:58:501690 ['msvs_express', {
1691 # Explicitly required when using the ATL with express
1692 'AdditionalDependencies': [
1693 'atlthunk.lib',
1694 ],
1695 }],
1696 ['MSVS_VERSION=="2005e"', {
1697 # Non-express versions link automatically to these
1698 'AdditionalDependencies': [
1699 'advapi32.lib',
1700 'comdlg32.lib',
1701 'ole32.lib',
1702 'shell32.lib',
1703 'user32.lib',
1704 'winspool.lib',
1705 ],
1706 }],
1707 ],
[email protected]a78da50e2010-06-09 21:31:371708 'AdditionalLibraryDirectories': [
1709 '<(DEPTH)/third_party/platformsdk_win7/files/Lib',
1710 '<(DEPTH)/third_party/directxsdk/files/Lib/x86',
1711 ],
[email protected]2f80c312009-02-25 21:26:551712 'GenerateDebugInformation': 'true',
1713 'MapFileName': '$(OutDir)\\$(TargetName).map',
1714 'ImportLibrary': '$(OutDir)\\lib\\$(TargetName).lib',
[email protected]2f80c312009-02-25 21:26:551715 'FixedBaseAddress': '1',
[email protected]825ff8d2009-05-22 01:40:481716 # SubSystem values:
1717 # 0 == not set
1718 # 1 == /SUBSYSTEM:CONSOLE
1719 # 2 == /SUBSYSTEM:WINDOWS
1720 # Most of the executables we'll ever create are tests
1721 # and utilities with console output.
1722 'SubSystem': '1',
[email protected]2f80c312009-02-25 21:26:551723 },
1724 'VCMIDLTool': {
1725 'GenerateStublessProxies': 'true',
1726 'TypeLibraryName': '$(InputName).tlb',
1727 'OutputDirectory': '$(IntDir)',
1728 'HeaderFileName': '$(InputName).h',
1729 'DLLDataFileName': 'dlldata.c',
1730 'InterfaceIdentifierFileName': '$(InputName)_i.c',
1731 'ProxyFileName': '$(InputName)_p.c',
1732 },
1733 'VCResourceCompilerTool': {
1734 'Culture' : '1033',
[email protected]4d91cbc2010-05-07 20:41:381735 'AdditionalIncludeDirectories': [
1736 '<(DEPTH)',
1737 '<(SHARED_INTERMEDIATE_DIR)',
1738 ],
[email protected]2f80c312009-02-25 21:26:551739 },
1740 },
1741 },
1742 }],
[email protected]79e2336c2011-05-12 18:18:341743 ['disable_nacl==1', {
[email protected]d8c7cbcc2009-10-02 19:00:311744 'target_defaults': {
1745 'defines': [
1746 'DISABLE_NACL',
1747 ],
1748 },
1749 }],
[email protected]cfbf9bc2009-12-07 22:07:561750 ['OS=="win" and msvs_use_common_linker_extras', {
[email protected]48c7af72009-07-03 22:00:191751 'target_defaults': {
1752 'msvs_settings': {
1753 'VCLinkerTool': {
[email protected]48c7af72009-07-03 22:00:191754 'DelayLoadDLLs': [
1755 'dbghelp.dll',
1756 'dwmapi.dll',
1757 'uxtheme.dll',
1758 ],
1759 },
1760 },
[email protected]ef4fa4072009-12-04 22:46:501761 'configurations': {
[email protected]5153767c2009-12-22 01:52:501762 'x86_Base': {
[email protected]ef4fa4072009-12-04 22:46:501763 'msvs_settings': {
1764 'VCLinkerTool': {
[email protected]1f9471a2010-01-04 06:40:161765 'AdditionalOptions': [
1766 '/safeseh',
1767 '/dynamicbase',
1768 '/ignore:4199',
1769 '/ignore:4221',
1770 '/nxcompat',
1771 ],
[email protected]ef4fa4072009-12-04 22:46:501772 },
1773 },
1774 },
[email protected]5153767c2009-12-22 01:52:501775 'x64_Base': {
[email protected]ef4fa4072009-12-04 22:46:501776 'msvs_settings': {
1777 'VCLinkerTool': {
[email protected]1f9471a2010-01-04 06:40:161778 'AdditionalOptions': [
[email protected]ef4fa4072009-12-04 22:46:501779 # safeseh is not compatible with x64
[email protected]1f9471a2010-01-04 06:40:161780 '/dynamicbase',
1781 '/ignore:4199',
1782 '/ignore:4221',
1783 '/nxcompat',
1784 ],
[email protected]ef4fa4072009-12-04 22:46:501785 },
1786 },
1787 },
1788 },
[email protected]48c7af72009-07-03 22:00:191789 },
1790 }],
[email protected]9821d0d2010-04-16 22:40:371791 ['enable_new_npdevice_api==1', {
1792 'target_defaults': {
1793 'defines': [
1794 'ENABLE_NEW_NPDEVICE_API',
1795 ],
1796 },
1797 }],
[email protected]2f80c312009-02-25 21:26:551798 ],
1799 'xcode_settings': {
[email protected]0c8ab452009-11-06 21:57:501800 # DON'T ADD ANYTHING NEW TO THIS BLOCK UNLESS YOU REALLY REALLY NEED IT!
1801 # This block adds *project-wide* configuration settings to each project
1802 # file. It's almost always wrong to put things here. Specify your
1803 # custom xcode_settings in target_defaults to add them to targets instead.
1804
1805 # In an Xcode Project Info window, the "Base SDK for All Configurations"
1806 # setting sets the SDK on a project-wide basis. In order to get the
1807 # configured SDK to show properly in the Xcode UI, SDKROOT must be set
1808 # here at the project level.
1809 'SDKROOT': 'macosx<(mac_sdk)', # -isysroot
1810
[email protected]2f80c312009-02-25 21:26:551811 # The Xcode generator will look for an xcode_settings section at the root
1812 # of each dict and use it to apply settings on a file-wide basis. Most
1813 # settings should not be here, they should be in target-specific
1814 # xcode_settings sections, or better yet, should use non-Xcode-specific
1815 # settings in target dicts. SYMROOT is a special case, because many other
1816 # Xcode variables depend on it, including variables such as
1817 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something
1818 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the
1819 # files to appear (when present) in the UI as actual files and not red
1820 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR,
1821 # and therefore SYMROOT, needs to be set at the project level.
[email protected]bfa24b962009-03-02 00:16:161822 'SYMROOT': '<(DEPTH)/xcodebuild',
[email protected]2f80c312009-02-25 21:26:551823 },
[email protected]ee28c9f2009-09-04 01:53:011824}
[email protected]f5c990c2009-10-06 03:02:381825
1826# Local Variables:
1827# tab-width:2
1828# indent-tabs-mode:nil
1829# End:
1830# vim: set expandtab tabstop=2 shiftwidth=2: