blob: 45446f638b7968531e81185a148dd393851e853e [file] [log] [blame]
[email protected]225c8f52010-02-05 22:23:201# Copyright (c) 2010 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]bb6aba32011-01-07 19:04:4324 # Disable touch support by default.
25 'touchui%': 0,
26 },
27 # Copy conditionally-set variables out one scope.
28 'chromeos%': '<(chromeos)',
29 'touchui%': '<(touchui)',
[email protected]e72e55b2011-01-06 22:19:3030
31 # To do a shared build on linux we need to be able to choose between
32 # type static_library and shared_library. We default to doing a static
33 # build but you can override this with "gyp -Dlibrary=shared_library"
34 # or you can add the following line (without the #) to
35 # ~/.gyp/include.gypi {'variables': {'library': 'shared_library'}}
36 # to compile as shared by default
37 'library%': 'static_library',
38
39 # Compute the architecture that we're building on.
40 'conditions': [
41 [ 'OS=="linux" or OS=="freebsd" or OS=="openbsd"', {
42 # This handles the Linux platforms we generally deal with. Anything
43 # else gets passed through, which probably won't work very well; such
44 # hosts should pass an explicit target_arch to gyp.
45 'host_arch%':
46 '<!(uname -m | sed -e "s/i.86/ia32/;s/x86_64/x64/;s/amd64/x64/;s/arm.*/arm/")',
47 }, { # OS!="linux"
48 'host_arch%': 'ia32',
49 }],
[email protected]bb6aba32011-01-07 19:04:4350
51 # Set default value of toolkit_views on for Windows, Chrome OS
52 # and the touch UI.
53 ['OS=="win" or chromeos==1 or touchui==1', {
54 'toolkit_views%': 1,
55 }, {
56 'toolkit_views%': 0,
57 }],
[email protected]e72e55b2011-01-06 22:19:3058 ],
59 },
60
61 # Copy conditionally-set variables out one scope.
62 'chromeos%': '<(chromeos)',
63 'touchui%': '<(touchui)',
64 'host_arch%': '<(host_arch)',
65 'library%': '<(library)',
[email protected]bb6aba32011-01-07 19:04:4366 'toolkit_views%': '<(toolkit_views)',
[email protected]e72e55b2011-01-06 22:19:3067
[email protected]e14a9f92009-08-05 19:26:0768 # Override branding to select the desired branding flavor.
69 'branding%': 'Chromium',
70
71 # Override buildtype to select the desired build flavor.
72 # Dev - everyday build for development/testing
73 # Official - release build (generally implies additional processing)
74 # TODO(mmoss) Once 'buildtype' is fully supported (e.g. Windows gyp
75 # conversion is done), some of the things which are now controlled by
76 # 'branding', such as symbol generation, will need to be refactored based
77 # on 'buildtype' (i.e. we don't care about saving symbols for non-Official
78 # builds).
79 'buildtype%': 'Dev',
[email protected]cbd5fd52009-08-26 00:14:2780
[email protected]e72e55b2011-01-06 22:19:3081 # Default architecture we're building for is the architecture we're
82 # building on.
83 'target_arch%': '<(host_arch)',
[email protected]b3f23ba2010-04-26 22:58:1784
[email protected]e72e55b2011-01-06 22:19:3085 # This variable tells WebCore.gyp and JavaScriptCore.gyp whether they are
86 # are built under a chromium full build (1) or a webkit.org chromium
87 # build (0).
88 'inside_chromium_build%': 1,
[email protected]8974e042010-06-21 18:06:5289
[email protected]e72e55b2011-01-06 22:19:3090 # Set to 1 to enable fast builds. It disables debug info for fastest
91 # compilation.
92 'fastbuild%': 0,
[email protected]93012ca2010-08-10 20:10:4993
[email protected]e72e55b2011-01-06 22:19:3094 # Python version.
95 'python_ver%': '2.5',
[email protected]b3f23ba2010-04-26 22:58:1796
[email protected]e72e55b2011-01-06 22:19:3097 # Set ARM-v7 compilation flags
98 'armv7%': 0,
99
100 # Set Neon compilation flags (only meaningful if armv7==1).
101 'arm_neon%': 1,
102
103 # The system root for cross-compiles. Default: none.
104 'sysroot%': '',
105
106 # On Linux, we build with sse2 for Chromium builds.
107 'disable_sse2%': 0,
108
109 # Use libjpeg-turbo as the JPEG codec used by Chromium.
110 'use_libjpeg_turbo%': 0,
111
112 # Variable 'component' is for cases where we would like to build some
113 # components as dynamic shared libraries but still need variable
114 # 'library' for static libraries.
115 # By default, component is set to whatever library is set to and
116 # it can be overriden by the GYP command line or by ~/.gyp/include.gypi.
117 'component%': '<(library)',
118
[email protected]bb6aba32011-01-07 19:04:43119 # Set to select the Title Case versions of strings in GRD files.
120 'use_titlecase_in_grd_files%': 0,
[email protected]63692212010-09-16 00:22:21121
[email protected]00dc155832011-02-01 18:51:19122 # Use translations provided by volunteers at launchpad.net.
123 'use_third_party_translations%': 0,
124
[email protected]9a425422011-01-11 00:53:18125 # Remoting compilation is enabled by default. Set to 0 to disable.
126 'remoting%': 1,
127
[email protected]bb6aba32011-01-07 19:04:43128 'conditions': [
[email protected]63692212010-09-16 00:22:21129 # A flag to enable or disable our compile-time dependency
130 # on gnome-keyring. If that dependency is disabled, no gnome-keyring
131 # support will be available. This option is useful
132 # for Linux distributions.
133 ['chromeos==1', {
134 'use_gnome_keyring%': 0,
135 }, {
136 'use_gnome_keyring%': 1,
137 }],
[email protected]0afe5212010-10-01 18:56:11138
139 # Set to 1 compile with -fPIC cflag on linux. This is a must for shared
140 # libraries on linux x86-64 and arm.
141 ['host_arch=="ia32"', {
142 'linux_fpic%': 0,
143 }, {
144 'linux_fpic%': 1,
145 }],
[email protected]1b4209f2011-01-07 00:25:40146
[email protected]bb6aba32011-01-07 19:04:43147 ['toolkit_views==0 or OS=="mac"', {
148 # GTK+ and Mac wants Title Case strings
149 'use_titlecase_in_grd_files%': 1,
150 }],
151
[email protected]1b4209f2011-01-07 00:25:40152 # Enable some hacks to support Flapper only on Chrome OS.
153 ['chromeos==1', {
154 'enable_flapper_hacks%': 1,
155 }, {
156 'enable_flapper_hacks%': 0,
157 }],
[email protected]b3f23ba2010-04-26 22:58:17158 ],
[email protected]e14a9f92009-08-05 19:26:07159 },
160
[email protected]e72e55b2011-01-06 22:19:30161 # Copy conditionally-set variables out one scope.
[email protected]e14a9f92009-08-05 19:26:07162 'branding%': '<(branding)',
163 'buildtype%': '<(buildtype)',
[email protected]e0d00142009-09-18 22:10:27164 'target_arch%': '<(target_arch)',
[email protected]cf185b32010-01-12 04:29:59165 'host_arch%': '<(host_arch)',
[email protected]c153e5352009-09-22 12:37:44166 'toolkit_views%': '<(toolkit_views)',
[email protected]63692212010-09-16 00:22:21167 'use_gnome_keyring%': '<(use_gnome_keyring)',
[email protected]0afe5212010-10-01 18:56:11168 'linux_fpic%': '<(linux_fpic)',
[email protected]1b4209f2011-01-07 00:25:40169 'enable_flapper_hacks%': '<(enable_flapper_hacks)',
[email protected]c153e5352009-09-22 12:37:44170 'chromeos%': '<(chromeos)',
[email protected]93012ca2010-08-10 20:10:49171 'touchui%': '<(touchui)',
[email protected]b2f030c2009-09-24 20:36:21172 'inside_chromium_build%': '<(inside_chromium_build)',
[email protected]9c1949e2009-10-02 19:59:54173 'fastbuild%': '<(fastbuild)',
[email protected]a76fe1a2010-03-01 23:39:36174 'python_ver%': '<(python_ver)',
[email protected]eafc0b452010-02-26 21:53:43175 'armv7%': '<(armv7)',
176 'arm_neon%': '<(arm_neon)',
[email protected]4d83eb72010-03-04 16:42:23177 'sysroot%': '<(sysroot)',
[email protected]ac120ff2010-04-28 02:14:22178 'disable_sse2%': '<(disable_sse2)',
[email protected]8974e042010-06-21 18:06:52179 'library%': '<(library)',
180 'component%': '<(component)',
[email protected]bb6aba32011-01-07 19:04:43181 'use_titlecase_in_grd_files%': '<(use_titlecase_in_grd_files)',
[email protected]9a425422011-01-11 00:53:18182 'remoting%': '<(remoting)',
[email protected]e14a9f92009-08-05 19:26:07183
[email protected]caa95c82009-11-23 22:39:32184 # The release channel that this build targets. This is used to restrict
185 # channel-specific build options, like which installer packages to create.
186 # The default is 'all', which does no channel-specific filtering.
187 'channel%': 'all',
188
[email protected]b3fb8092009-03-12 19:09:24189 # Override chromium_mac_pch and set it to 0 to suppress the use of
190 # precompiled headers on the Mac. Prefix header injection may still be
191 # used, but prefix headers will not be precompiled. This is useful when
192 # using distcc to distribute a build to compile slaves that don't
193 # share the same compiler executable as the system driving the compilation,
194 # because precompiled headers rely on pointers into a specific compiler
195 # executable's image. Setting this to 0 is needed to use an experimental
196 # Linux-Mac cross compiler distcc farm.
197 'chromium_mac_pch%': 1,
198
[email protected]3224dcd2009-09-16 17:31:25199 # Mac OS X SDK and deployment target support.
200 # The SDK identifies the version of the system headers that will be used,
201 # and corresponds to the MAC_OS_X_VERSION_MAX_ALLOWED compile-time macro.
202 # "Maximum allowed" refers to the operating system version whose APIs are
203 # available in the headers.
204 # The deployment target identifies the minimum system version that the
205 # built products are expected to function on. It corresponds to the
206 # MAC_OS_X_VERSION_MIN_REQUIRED compile-time macro.
207 # To ensure these macros are available, #include <AvailabilityMacros.h>.
208 # Additional documentation on these macros is available at
209 # http://developer.apple.com/mac/library/technotes/tn2002/tn2064.html#SECTION3
210 # Chrome normally builds with the Mac OS X 10.5 SDK and sets the
211 # deployment target to 10.5. Other projects, such as O3D, may override
212 # these defaults.
213 'mac_sdk%': '10.5',
214 'mac_deployment_target%': '10.5',
[email protected]9543af052009-09-15 22:42:59215
[email protected]f5ecbba12009-04-03 04:35:18216 # Set to 1 to enable code coverage. In addition to build changes
217 # (e.g. extra CFLAGS), also creates a new target in the src/chrome
218 # project file called "coverage".
219 # Currently ignored on Windows.
220 'coverage%': 0,
[email protected]653bd5f032009-04-08 12:55:49221
[email protected]c61f6432009-04-22 01:16:42222 # Overridable specification for potential use of alternative
223 # JavaScript engines.
224 'javascript_engine%': 'v8',
225
[email protected]7477ea6f2009-12-22 23:28:15226 # Although base/allocator lets you select a heap library via an
[email protected]7e0d664a2009-12-03 21:07:47227 # environment variable, the libcmt shim it uses sometimes gets in
228 # the way. To disable it entirely, and switch to normal msvcrt, do e.g.
229 # 'win_use_allocator_shim': 0,
230 # 'win_release_RuntimeLibrary': 2
231 # to ~/.gyp/include.gypi, gclient runhooks --force, and do a release build.
[email protected]8974e042010-06-21 18:06:52232 'win_use_allocator_shim%': 1, # 1 = shim allocator via libcmt; 0 = msvcrt
[email protected]279cd4212009-09-11 22:32:11233
[email protected]95ff8082009-11-13 22:21:01234 # Whether usage of OpenMAX is enabled.
235 'enable_openmax%': 0,
236
[email protected]d01120e62010-05-10 17:04:48237 # Whether proprietary audio/video codecs are assumed to be included with
238 # this build (only meaningful if branding!=Chrome).
239 'proprietary_codecs%': 0,
240
[email protected]e5b2eaa2009-04-14 01:39:12241 # TODO(bradnelson): eliminate this when possible.
242 # To allow local gyp files to prevent release.vsprops from being included.
243 # Yes(1) means include release.vsprops.
244 # Once all vsprops settings are migrated into gyp, this can go away.
245 'msvs_use_common_release%': 1,
[email protected]606116d22009-05-06 22:38:23246
[email protected]cbd5fd52009-08-26 00:14:27247 # TODO(bradnelson): eliminate this when possible.
248 # To allow local gyp files to override additional linker options for msvs.
249 # Yes(1) means set use the common linker options.
[email protected]48c7af72009-07-03 22:00:19250 'msvs_use_common_linker_extras%': 1,
251
[email protected]1ffb6502009-06-02 07:46:24252 # TODO(sgk): eliminate this if possible.
253 # It would be nicer to support this via a setting in 'target_defaults'
254 # in chrome/app/locales/locales.gypi overriding the setting in the
255 # 'Debug' configuration in the 'target_defaults' dict below,
256 # but that doesn't work as we'd like.
257 'msvs_debug_link_incremental%': '2',
258
[email protected]1f790ef2011-01-11 20:45:36259 # Needed for some of the largest modules.
260 'msvs_debug_link_nonincremental%': '1',
261
[email protected]573136142009-07-15 22:48:37262 # This is the location of the sandbox binary. Chrome looks for this before
263 # running the zygote process. If found, and SUID, it will be used to
264 # sandbox the zygote process and, thus, all renderer processes.
265 'linux_sandbox_path%': '',
266
[email protected]ad6d2c42009-09-15 20:13:38267 # Set this to true to enable SELinux support.
268 'selinux%': 0,
[email protected]4c9cc6c2009-10-01 18:54:57269
[email protected]58680ce2010-09-18 00:09:15270 # Set this to true when building with Clang.
271 # See http://code.google.com/p/chromium/wiki/Clang for details.
272 # TODO: eventually clang should behave identically to gcc, and this
273 # won't be necessary.
274 'clang%': 0,
275
[email protected]5e781232011-01-28 02:57:59276 # These two variables can be set in GYP_DEFINES while running
277 # |gclient runhooks| to let clang run a plugin in every compilation.
278 # Only has an effect if 'clang=1' is in GYP_DEFINES as well.
279 # Example:
280 # GYP_DEFINES='clang=1 clang_load=/abs/path/to/libPrintFunctionNames.dylib clang_plugin=print-fns' gclient runhooks
281
282 'clang_load%': '',
283 'clang_add_plugin%': '',
284
[email protected]7664ab32011-02-01 23:35:25285 # Enable sampling based profiler.
286 # See http://google-perftools.googlecode.com/svn/trunk/doc/cpuprofile.html
287 'profiling%': '0',
288
[email protected]36532f332010-08-25 00:22:01289 # Override whether we should use Breakpad on Linux. I.e. for Chrome bot.
290 'linux_breakpad%': 0,
291 # And if we want to dump symbols for Breakpad-enabled builds.
292 'linux_dump_symbols%': 0,
293 # And if we want to strip the binary after dumping symbols.
[email protected]05cb6962009-10-01 23:29:03294 'linux_strip_binary%': 0,
[email protected]1d87c282010-09-15 22:24:49295 # Strip the test binaries needed for Linux reliability tests.
296 'linux_strip_reliability_tests%': 0,
[email protected]05cb6962009-10-01 23:29:03297
[email protected]46ce5b562010-06-16 18:39:53298 # Enable TCMalloc.
299 'linux_use_tcmalloc%': 1,
[email protected]01699e22009-11-11 19:24:24300
[email protected]39ca7de2010-04-16 08:04:03301 # Disable TCMalloc's debugallocation.
302 'linux_use_debugallocation%': 0,
303
[email protected]d8b60602010-03-26 09:41:22304 # Disable TCMalloc's heapchecker.
305 'linux_use_heapchecker%': 0,
306
[email protected]64e2d4a42010-08-27 10:13:21307 # Disable shadow stack keeping used by heapcheck to unwind the stacks
308 # better.
309 'linux_keep_shadow_stacks%': 0,
310
[email protected]6def64a2010-10-28 20:40:34311 # Set to 1 to turn on seccomp sandbox by default.
312 # (Note: this is ignored for official builds.)
313 'linux_use_seccomp_sandbox%': 0,
[email protected]39c4e1a82010-03-30 19:47:41314
[email protected]556c5d72010-06-10 05:45:01315 # Set to 1 to link against libgnome-keyring instead of using dlopen().
316 'linux_link_gnome_keyring%': 0,
317
[email protected]d8c7cbcc2009-10-02 19:00:31318 # Used to disable Native Client at compile time, for platforms where it
319 # isn't supported
320 'disable_nacl%': 0,
321
[email protected]77c1b29392009-12-04 06:21:29322 # Set Thumb compilation flags.
323 'arm_thumb%': 0,
324
[email protected]53e0f642010-03-05 01:41:56325 # Set ARM fpu compilation flags (only meaningful if armv7==1 and
326 # arm_neon==0).
327 'arm_fpu%': 'vfpv3',
328
[email protected]9821d0d2010-04-16 22:40:37329 # Enable new NPDevice API.
330 'enable_new_npdevice_api%': 0,
[email protected]ed154592010-04-29 00:18:50331
332 # Enable EGLImage support in OpenMAX
333 'enable_eglimage%': 0,
334
[email protected]6f51b27e2010-06-22 20:43:53335 # Enable a variable used elsewhere throughout the GYP files to determine
336 # whether to compile in the sources for the GPU plugin / process.
337 'enable_gpu%': 1,
338
[email protected]32e1dee2010-12-09 18:36:24339 # Use OpenSSL instead of NSS. Under development: see http://crbug.com/62803
[email protected]d518cd92010-09-29 12:27:44340 'use_openssl%': 0,
341
[email protected]e72e55b2011-01-06 22:19:30342 # .gyp files or targets should set chromium_code to 1 if they build
343 # Chromium-specific code, as opposed to external code. This variable is
344 # used to control such things as the set of warnings to enable, and
345 # whether warnings are treated as errors.
346 'chromium_code%': 0,
347
348 # Set to 1 to compile with the built in pdf viewer.
349 'internal_pdf%': 0,
350
351 # This allows to use libcros from the current system, ie. /usr/lib/
352 # The cros_api will be pulled in as a static library, and all headers
353 # from the system include dirs.
[email protected]bb6aba32011-01-07 19:04:43354 'system_libcros%': 0,
[email protected]e72e55b2011-01-06 22:19:30355
[email protected]e72e55b2011-01-06 22:19:30356 # NOTE: When these end up in the Mac bundle, we need to replace '-' for '_'
357 # so Cocoa is happy (http://crbug.com/20441).
358 'locales': [
359 'am', 'ar', 'bg', 'bn', 'ca', 'cs', 'da', 'de', 'el', 'en-GB',
360 'en-US', 'es-419', 'es', 'et', 'fa', 'fi', 'fil', 'fr', 'gu', 'he',
361 'hi', 'hr', 'hu', 'id', 'it', 'ja', 'kn', 'ko', 'lt', 'lv',
362 'ml', 'mr', 'nb', 'nl', 'pl', 'pt-BR', 'pt-PT', 'ro', 'ru',
363 'sk', 'sl', 'sr', 'sv', 'sw', 'ta', 'te', 'th', 'tr', 'uk',
364 'vi', 'zh-CN', 'zh-TW',
365 ],
366
[email protected]bb6aba32011-01-07 19:04:43367 'grit_defines': [],
368
[email protected]29c2daea2011-01-05 20:38:50369 # Use Harfbuzz-NG instead of Harfbuzz.
370 # Under development: http://crbug.com/68551
371 'use_harfbuzz_ng%': 0,
372
[email protected]912c55c2009-07-31 23:33:55373 'conditions': [
[email protected]47deeb62009-12-17 14:49:39374 ['OS=="linux" or OS=="freebsd" or OS=="openbsd"', {
[email protected]242a9e62009-11-03 17:32:10375 # This will set gcc_version to XY if you are running gcc X.Y.*.
376 # This is used to tweak build flags for gcc 4.4.
377 'gcc_version%': '<!(python <(DEPTH)/build/compiler_version.py)',
[email protected]4d83eb72010-03-04 16:42:23378 # Figure out the python architecture to decide if we build pyauto.
[email protected]efd68462010-03-04 17:07:54379 'python_arch%': '<!(<(DEPTH)/build/linux/python_arch.sh <(sysroot)/usr/lib/libpython<(python_ver).so.1.0)',
[email protected]cbd5fd52009-08-26 00:14:27380 'conditions': [
[email protected]2a77a9d2010-08-26 19:58:10381 ['branding=="Chrome"', {
[email protected]cbd5fd52009-08-26 00:14:27382 'linux_breakpad%': 1,
[email protected]cbd5fd52009-08-26 00:14:27383 }],
[email protected]4c9cc6c2009-10-01 18:54:57384 # All Chrome builds have breakpad symbols, but only process the
385 # symbols from official builds.
[email protected]c913cb82010-08-31 19:44:08386 ['(branding=="Chrome" and buildtype=="Official")', {
[email protected]4c9cc6c2009-10-01 18:54:57387 'linux_dump_symbols%': 1,
[email protected]4c9cc6c2009-10-01 18:54:57388 }],
[email protected]cbd5fd52009-08-26 00:14:27389 ],
[email protected]47deeb62009-12-17 14:49:39390 }], # OS=="linux" or OS=="freebsd" or OS=="openbsd"
[email protected]bb6aba32011-01-07 19:04:43391
[email protected]e14a9f92009-08-05 19:26:07392 ['OS=="mac"', {
393 'conditions': [
394 # mac_product_name is set to the name of the .app bundle as it should
395 # appear on disk. This duplicates data from
396 # chrome/app/theme/chromium/BRANDING and
397 # chrome/app/theme/google_chrome/BRANDING, but is necessary to get
398 # these names into the build system.
399 ['branding=="Chrome"', {
400 'mac_product_name%': 'Google Chrome',
401 }, { # else: branding!="Chrome"
402 'mac_product_name%': 'Chromium',
403 }],
404
405 # Feature variables for enabling Mac Breakpad and Keystone auto-update
406 # support. Both features are on by default in official builds with
407 # Chrome branding.
408 ['branding=="Chrome" and buildtype=="Official"', {
409 'mac_breakpad%': 1,
410 'mac_keystone%': 1,
411 }, { # else: branding!="Chrome" or buildtype!="Official"
412 'mac_breakpad%': 0,
413 'mac_keystone%': 0,
414 }],
415 ],
416 }], # OS=="mac"
[email protected]bb6aba32011-01-07 19:04:43417
[email protected]912c55c2009-07-31 23:33:55418 # Whether to use multiple cores to compile with visual studio. This is
419 # optional because it sometimes causes corruption on VS 2005.
420 # It is on by default on VS 2008 and off on VS 2005.
421 ['OS=="win"', {
422 'conditions': [
[email protected]8974e042010-06-21 18:06:52423 ['component=="shared_library"', {
424 'win_use_allocator_shim%': 0,
425 }],
[email protected]912c55c2009-07-31 23:33:55426 ['MSVS_VERSION=="2005"', {
[email protected]669795372009-08-14 17:51:13427 'msvs_multi_core_compile%': 0,
[email protected]912c55c2009-07-31 23:33:55428 },{
429 'msvs_multi_core_compile%': 1,
430 }],
[email protected]10bb8c92009-08-07 21:16:03431 # Don't do incremental linking for large modules on 32-bit.
432 ['MSVS_OS_BITS==32', {
433 'msvs_large_module_debug_link_mode%': '1', # No
434 },{
435 'msvs_large_module_debug_link_mode%': '2', # Yes
436 }],
[email protected]912c55c2009-07-31 23:33:55437 ],
[email protected]ef4fa4072009-12-04 22:46:50438 'nacl_win64_defines': [
439 # This flag is used to minimize dependencies when building
440 # Native Client loader for 64-bit Windows.
441 'NACL_WIN64',
442 ],
[email protected]912c55c2009-07-31 23:33:55443 }],
[email protected]bb6aba32011-01-07 19:04:43444
[email protected]6df3ebf2010-10-29 20:30:38445 ['OS=="mac" or (OS=="linux" and chromeos==0 and target_arch!="arm")', {
[email protected]8e553f42010-10-25 20:05:44446 'use_cups%': 1,
447 }, {
448 'use_cups%': 0,
449 }],
[email protected]bb6aba32011-01-07 19:04:43450
[email protected]19fe8f0b2010-12-07 07:27:27451 # Set the relative path from this file to the GYP file of the JPEG
452 # library used by Chromium.
453 ['use_libjpeg_turbo==1', {
454 'libjpeg_gyp_path': '../third_party/libjpeg_turbo/libjpeg.gyp',
455 }, {
456 'libjpeg_gyp_path': '../third_party/libjpeg/libjpeg.gyp',
457 }], # use_libjpeg_turbo==1
[email protected]bb6aba32011-01-07 19:04:43458
[email protected]1c6fe29302011-01-20 22:14:31459 # Use GConf, the GNOME configuration system.
460 ['chromeos==1', {
461 'use_gconf%': 0,
462 }, {
463 'use_gconf%': 1,
464 }],
465
[email protected]bb6aba32011-01-07 19:04:43466 # Setup -D flags passed into grit.
467 ['chromeos==1', {
468 'grit_defines': ['-D', 'chromeos'],
469 }],
470 ['toolkit_views==1', {
471 'grit_defines': ['-D', 'toolkit_views'],
472 }],
473 ['touchui==1', {
474 'grit_defines': ['-D', 'touchui'],
475 }],
[email protected]9a425422011-01-11 00:53:18476 ['remoting==1', {
477 'grit_defines': ['-D', 'remoting'],
478 }],
[email protected]bb6aba32011-01-07 19:04:43479 ['use_titlecase_in_grd_files==1', {
480 'grit_defines': ['-D', 'use_titlecase'],
481 }],
[email protected]00dc155832011-02-01 18:51:19482 ['use_third_party_translations==1', {
483 'grit_defines': ['-D', 'use_third_party_translations'],
484 }],
[email protected]912c55c2009-07-31 23:33:55485 ],
[email protected]2f80c312009-02-25 21:26:55486 },
487 'target_defaults': {
[email protected]1c966092009-08-20 21:19:26488 'variables': {
[email protected]a6e22132010-02-10 20:43:18489 # The condition that operates on chromium_code is in a target_conditions
490 # section, and will not have access to the default fallback value of
491 # chromium_code at the top of this file, or to the chromium_code
492 # variable placed at the root variables scope of .gyp files, because
493 # those variables are not set at target scope. As a workaround,
494 # if chromium_code is not set at target scope, define it in target scope
495 # to contain whatever value it has during early variable expansion.
496 # That's enough to make it available during target conditional
497 # processing.
498 'chromium_code%': '<(chromium_code)',
499
[email protected]7e0d664a2009-12-03 21:07:47500 # See http://gcc.gnu.org/onlinedocs/gcc-4.4.2/gcc/Optimize-Options.html
[email protected]d5d593a2009-08-28 23:23:29501 'mac_release_optimization%': '3', # Use -O3 unless overridden
[email protected]ffd984b12009-09-11 19:37:00502 'mac_debug_optimization%': '0', # Use -O0 unless overridden
[email protected]7e0d664a2009-12-03 21:07:47503 # See http://msdn.microsoft.com/en-us/library/aa652360(VS.71).aspx
504 'win_release_Optimization%': '2', # 2 = /Os
505 'win_debug_Optimization%': '0', # 0 = /Od
[email protected]6b0507b2010-05-07 07:41:21506 # See http://msdn.microsoft.com/en-us/library/8wtf2dfz(VS.71).aspx
507 'win_debug_RuntimeChecks%': '3', # 3 = all checks enabled, 0 = off
508 # See http://msdn.microsoft.com/en-us/library/47238hez(VS.71).aspx
[email protected]2ae6e022010-05-07 13:19:15509 'win_debug_InlineFunctionExpansion%': '', # empty = default, 0 = off,
510 'win_release_InlineFunctionExpansion%': '2', # 1 = only __inline, 2 = max
[email protected]fac10d12010-11-08 16:00:31511 # VS inserts quite a lot of extra checks to algorithms like
512 # std::partial_sort in Debug build which make them O(N^2)
513 # instead of O(N*logN). This is particularly slow under memory
514 # tools like ThreadSanitizer so we want it to be disablable.
515 # See http://msdn.microsoft.com/en-us/library/aa985982(v=VS.80).aspx
516 'win_debug_disable_iterator_debugging%': '0',
[email protected]7e0d664a2009-12-03 21:07:47517
[email protected]ffd984b12009-09-11 19:37:00518 'release_extra_cflags%': '',
519 'debug_extra_cflags%': '',
[email protected]92822e82009-09-18 14:26:56520 'release_valgrind_build%': 0,
[email protected]8974e042010-06-21 18:06:52521
522 'conditions': [
523 ['OS=="win" and component=="shared_library"', {
524 # See http://msdn.microsoft.com/en-us/library/aa652367.aspx
525 'win_release_RuntimeLibrary%': '2', # 2 = /MT (nondebug DLL)
526 'win_debug_RuntimeLibrary%': '3', # 3 = /MTd (debug DLL)
527 }, {
528 # See http://msdn.microsoft.com/en-us/library/aa652367.aspx
529 'win_release_RuntimeLibrary%': '0', # 0 = /MT (nondebug static)
530 'win_debug_RuntimeLibrary%': '1', # 1 = /MTd (debug static)
531 }],
532 ],
[email protected]1c966092009-08-20 21:19:26533 },
[email protected]32aa8cc2009-03-04 21:36:39534 'conditions': [
535 ['branding=="Chrome"', {
536 'defines': ['GOOGLE_CHROME_BUILD'],
537 }, { # else: branding!="Chrome"
538 'defines': ['CHROMIUM_BUILD'],
539 }],
[email protected]06c756182010-04-27 18:31:31540 ['toolkit_views==1', {
[email protected]e6970232009-05-12 23:51:17541 'defines': ['TOOLKIT_VIEWS=1'],
542 }],
[email protected]fdc5bed2010-01-09 01:16:57543 ['chromeos==1', {
[email protected]16779842009-07-08 23:45:29544 'defines': ['OS_CHROMEOS=1'],
[email protected]2b883b92009-06-02 22:57:50545 }],
[email protected]0094fbe2010-07-15 21:51:43546 ['touchui==1', {
547 'defines': ['TOUCH_UI=1'],
548 }],
[email protected]7664ab32011-02-01 23:35:25549 ['profiling==1', {
550 'defines': ['ENABLE_PROFILING=1'],
551 }],
[email protected]542bf24a2010-06-11 23:08:17552 ['remoting==1', {
553 'defines': ['ENABLE_REMOTING=1'],
[email protected]c0bac532010-06-11 00:39:00554 }],
[email protected]d01120e62010-05-10 17:04:48555 ['proprietary_codecs==1', {
556 'defines': ['USE_PROPRIETARY_CODECS'],
557 }],
[email protected]1b4209f2011-01-07 00:25:40558 ['enable_flapper_hacks==1', {
559 'defines': ['ENABLE_FLAPPER_HACKS=1'],
560 }],
[email protected]9c1949e2009-10-02 19:59:54561 ['fastbuild!=0', {
562 'conditions': [
[email protected]1cc2fa72010-07-03 08:49:24563 # For Windows, we don't genererate debug information.
[email protected]9c1949e2009-10-02 19:59:54564 ['OS=="win"', {
565 'msvs_settings': {
566 'VCLinkerTool': {
567 'GenerateDebugInformation': 'false',
568 },
569 'VCCLCompilerTool': {
570 'DebugInformationFormat': '0',
571 }
572 }
[email protected]1cc2fa72010-07-03 08:49:24573 }, { # else: OS != "win", generate less debug information.
574 'variables': {
575 'debug_extra_cflags': '-g1',
576 },
[email protected]37c84192010-04-14 21:37:40577 }],
[email protected]aecc4d12011-01-19 05:32:33578 # Clang creates chubby debug information, which makes linking very
579 # slow. For now, don't create debug information with clang. See
580 # http://crbug.com/70000
581 ['OS=="linux" and clang==1', {
582 'variables': {
583 'debug_extra_cflags': '-g0',
584 },
585 }],
[email protected]9c1949e2009-10-02 19:59:54586 ], # conditions for fastbuild.
587 }], # fastbuild!=0
[email protected]ad6d2c42009-09-15 20:13:38588 ['selinux==1', {
589 'defines': ['CHROMIUM_SELINUX=1'],
590 }],
[email protected]7e0d664a2009-12-03 21:07:47591 ['win_use_allocator_shim==0', {
592 'conditions': [
593 ['OS=="win"', {
594 'defines': ['NO_TCMALLOC'],
595 }],
596 ],
597 }],
[email protected]43f28f832010-02-03 02:28:48598 ['enable_gpu==1', {
[email protected]7477ea6f2009-12-22 23:28:15599 'defines': [
600 'ENABLE_GPU=1',
601 ],
602 }],
[email protected]b1c2a5542010-10-08 12:44:40603 ['use_openssl==1', {
604 'defines': [
605 'USE_OPENSSL=1',
606 ],
607 }],
[email protected]ed154592010-04-29 00:18:50608 ['enable_eglimage==1', {
609 'defines': [
610 'ENABLE_EGLIMAGE=1',
611 ],
612 }],
[email protected]f5ecbba12009-04-03 04:35:18613 ['coverage!=0', {
614 'conditions': [
615 ['OS=="mac"', {
616 'xcode_settings': {
[email protected]ab2956372009-08-13 18:11:04617 'GCC_INSTRUMENT_PROGRAM_FLOW_ARCS': 'YES', # -fprofile-arcs
618 'GCC_GENERATE_TEST_COVERAGE_FILES': 'YES', # -ftest-coverage
[email protected]5ae4f55e2009-04-13 23:19:47619 },
[email protected]e4fb84c2009-12-28 20:45:43620 # Add -lgcov for types executable, shared_library, and
[email protected]dc259ce52010-04-13 04:03:10621 # loadable_module; not for static_library.
[email protected]e4fb84c2009-12-28 20:45:43622 # This is a delayed conditional.
[email protected]f5ecbba12009-04-03 04:35:18623 'target_conditions': [
[email protected]e4fb84c2009-12-28 20:45:43624 ['_type!="static_library"', {
[email protected]f5ecbba12009-04-03 04:35:18625 'xcode_settings': { 'OTHER_LDFLAGS': [ '-lgcov' ] },
[email protected]5ae4f55e2009-04-13 23:19:47626 }],
627 ],
628 }],
[email protected]f5ecbba12009-04-03 04:35:18629 ['OS=="linux"', {
630 'cflags': [ '-ftest-coverage',
631 '-fprofile-arcs' ],
[email protected]7122ffd52009-04-30 23:19:00632 'link_settings': { 'libraries': [ '-lgcov' ] },
[email protected]f5ecbba12009-04-03 04:35:18633 }],
[email protected]e8f6ff42009-07-07 18:20:53634 # Finally, for Windows, we simply turn on profiling.
635 ['OS=="win"', {
636 'msvs_settings': {
637 'VCLinkerTool': {
638 'Profile': 'true',
639 },
[email protected]10bb8c92009-08-07 21:16:03640 'VCCLCompilerTool': {
[email protected]e8f6ff42009-07-07 18:20:53641 # /Z7, not /Zi, so coverage is happyb
642 'DebugInformationFormat': '1',
[email protected]1f9471a2010-01-04 06:40:16643 'AdditionalOptions': ['/Yd'],
[email protected]e8f6ff42009-07-07 18:20:53644 }
645 }
646 }], # OS==win
647 ], # conditions for coverage
648 }], # coverage!=0
[email protected]4e4d6042010-08-26 18:34:38649 ['OS=="win"', {
650 'defines': [
651 '__STD_C',
652 '_CRT_SECURE_NO_DEPRECATE',
653 '_SCL_SECURE_NO_DEPRECATE',
654 ],
655 'include_dirs': [
656 '<(DEPTH)/third_party/wtl/include',
657 ],
658 }], # OS==win
[email protected]a6e22132010-02-10 20:43:18659 ], # conditions for 'target_defaults'
660 'target_conditions': [
[email protected]c14d8e772010-02-09 22:06:15661 ['chromium_code==0', {
[email protected]d8543312010-02-10 17:43:28662 'conditions': [
663 [ 'OS=="linux" or OS=="freebsd" or OS=="openbsd"', {
664 'cflags!': [
665 '-Wall',
666 '-Wextra',
667 '-Werror',
668 ],
669 }],
670 [ 'OS=="win"', {
671 'defines': [
672 '_CRT_SECURE_NO_DEPRECATE',
673 '_CRT_NONSTDC_NO_WARNINGS',
674 '_CRT_NONSTDC_NO_DEPRECATE',
675 '_SCL_SECURE_NO_DEPRECATE',
676 ],
677 'msvs_disabled_warnings': [4800],
678 'msvs_settings': {
679 'VCCLCompilerTool': {
680 'WarnAsError': 'false',
681 'Detect64BitPortabilityProblems': 'false',
682 },
683 },
684 }],
685 [ 'OS=="mac"', {
686 'xcode_settings': {
687 'GCC_TREAT_WARNINGS_AS_ERRORS': 'NO',
[email protected]4c4c2e5332010-06-15 11:51:06688 'WARNING_CFLAGS!': ['-Wall', '-Wextra'],
[email protected]d8543312010-02-10 17:43:28689 },
690 }],
[email protected]c14d8e772010-02-09 22:06:15691 ],
692 }, {
693 # In Chromium code, we define __STDC_FORMAT_MACROS in order to get the
694 # C99 macros on Mac and Linux.
695 'defines': [
696 '__STDC_FORMAT_MACROS',
697 ],
698 'conditions': [
699 ['OS!="win"', {
[email protected]40519592010-11-16 15:23:30700 'sources/': [ ['exclude', '_win(_unittest)?\\.(h|cc)$'],
[email protected]a316ca532010-11-15 14:08:16701 ['exclude', '(^|/)win/'],
[email protected]40519592010-11-16 15:23:30702 ['exclude', '(^|/)win_[^/]*\\.(h|cc)$'] ],
[email protected]c14d8e772010-02-09 22:06:15703 }],
704 ['OS!="mac"', {
[email protected]40519592010-11-16 15:23:30705 'sources/': [ ['exclude', '_(cocoa|mac)(_unittest)?\\.(h|cc)$'],
[email protected]a316ca532010-11-15 14:08:16706 ['exclude', '(^|/)(cocoa|mac)/'],
707 ['exclude', '\\.mm?$' ] ],
[email protected]c14d8e772010-02-09 22:06:15708 }],
709 ['OS!="linux" and OS!="freebsd" and OS!="openbsd"', {
710 'sources/': [
[email protected]40519592010-11-16 15:23:30711 ['exclude', '_(chromeos|gtk|x|x11|xdg)(_unittest)?\\.(h|cc)$'],
[email protected]a316ca532010-11-15 14:08:16712 ['exclude', '(^|/)gtk/'],
[email protected]40519592010-11-16 15:23:30713 ['exclude', '(^|/)(gtk|x11)_[^/]*\\.(h|cc)$'],
[email protected]18cff3d2010-02-17 18:03:13714 ],
715 }],
716 ['OS!="linux"', {
717 'sources/': [
[email protected]40519592010-11-16 15:23:30718 ['exclude', '_linux(_unittest)?\\.(h|cc)$'],
[email protected]a316ca532010-11-15 14:08:16719 ['exclude', '(^|/)linux/'],
[email protected]18cff3d2010-02-17 18:03:13720 ],
[email protected]c14d8e772010-02-09 22:06:15721 }],
722 # We use "POSIX" to refer to all non-Windows operating systems.
723 ['OS=="win"', {
[email protected]40519592010-11-16 15:23:30724 'sources/': [ ['exclude', '_posix\\.(h|cc)$'] ],
[email protected]f55bd4862010-05-27 15:38:07725 # turn on warnings for signed/unsigned mismatch on chromium code.
726 'msvs_settings': {
727 'VCCLCompilerTool': {
728 'AdditionalOptions': ['/we4389'],
729 },
730 },
[email protected]c14d8e772010-02-09 22:06:15731 }],
[email protected]c14d8e772010-02-09 22:06:15732 ['chromeos!=1', {
[email protected]40519592010-11-16 15:23:30733 'sources/': [ ['exclude', '_chromeos\\.(h|cc)$'] ]
[email protected]c14d8e772010-02-09 22:06:15734 }],
[email protected]06c756182010-04-27 18:31:31735 ['toolkit_views==0', {
[email protected]40519592010-11-16 15:23:30736 'sources/': [ ['exclude', '_views\\.(h|cc)$'] ]
[email protected]c14d8e772010-02-09 22:06:15737 }],
738 ],
739 }],
[email protected]a6e22132010-02-10 20:43:18740 ], # target_conditions for 'target_defaults'
[email protected]2f80c312009-02-25 21:26:55741 'default_configuration': 'Debug',
742 'configurations': {
[email protected]5153767c2009-12-22 01:52:50743 # VCLinkerTool LinkIncremental values below:
744 # 0 == default
745 # 1 == /INCREMENTAL:NO
746 # 2 == /INCREMENTAL
747 # Debug links incremental, Release does not.
748 #
[email protected]7b99801e2010-11-03 17:26:23749 # Abstract base configurations to cover common attributes.
[email protected]5153767c2009-12-22 01:52:50750 #
751 'Common_Base': {
[email protected]bb05e452009-10-29 21:24:56752 'abstract': 1,
753 'msvs_configuration_attributes': {
754 'OutputDirectory': '$(SolutionDir)$(ConfigurationName)',
755 'IntermediateDirectory': '$(OutDir)\\obj\\$(ProjectName)',
756 'CharacterSet': '1',
757 },
[email protected]5153767c2009-12-22 01:52:50758 },
759 'x86_Base': {
760 'abstract': 1,
[email protected]ef4fa4072009-12-04 22:46:50761 'msvs_settings': {
762 'VCLinkerTool': {
763 'TargetMachine': '1',
764 },
765 },
[email protected]2fa40782009-11-01 21:17:34766 'msvs_configuration_platform': 'Win32',
[email protected]bb05e452009-10-29 21:24:56767 },
[email protected]5153767c2009-12-22 01:52:50768 'x64_Base': {
769 'abstract': 1,
770 'msvs_configuration_platform': 'x64',
771 'msvs_settings': {
772 'VCLinkerTool': {
773 'TargetMachine': '17', # x86 - 64
[email protected]5153767c2009-12-22 01:52:50774 'AdditionalLibraryDirectories!':
775 ['<(DEPTH)/third_party/platformsdk_win7/files/Lib'],
776 'AdditionalLibraryDirectories':
777 ['<(DEPTH)/third_party/platformsdk_win7/files/Lib/x64'],
778 },
[email protected]d26b4418ab2010-03-24 22:06:35779 'VCLibrarianTool': {
[email protected]5153767c2009-12-22 01:52:50780 'AdditionalLibraryDirectories!':
781 ['<(DEPTH)/third_party/platformsdk_win7/files/Lib'],
782 'AdditionalLibraryDirectories':
783 ['<(DEPTH)/third_party/platformsdk_win7/files/Lib/x64'],
784 },
785 },
786 'defines': [
787 # Not sure if tcmalloc works on 64-bit Windows.
788 'NO_TCMALLOC',
789 ],
790 },
791 'Debug_Base': {
792 'abstract': 1,
[email protected]ee857512010-05-14 08:24:42793 'defines': ['DYNAMIC_ANNOTATIONS_ENABLED=1'],
[email protected]1c966092009-08-20 21:19:26794 'xcode_settings': {
795 'COPY_PHASE_STRIP': 'NO',
[email protected]d5d593a2009-08-28 23:23:29796 'GCC_OPTIMIZATION_LEVEL': '<(mac_debug_optimization)',
[email protected]bd232ac2009-10-21 02:23:53797 'OTHER_CFLAGS': [ '<@(debug_extra_cflags)', ],
[email protected]1c966092009-08-20 21:19:26798 },
[email protected]bb05e452009-10-29 21:24:56799 'msvs_settings': {
800 'VCCLCompilerTool': {
[email protected]7e0d664a2009-12-03 21:07:47801 'Optimization': '<(win_debug_Optimization)',
[email protected]bb05e452009-10-29 21:24:56802 'PreprocessorDefinitions': ['_DEBUG'],
[email protected]6b0507b2010-05-07 07:41:21803 'BasicRuntimeChecks': '<(win_debug_RuntimeChecks)',
[email protected]7e0d664a2009-12-03 21:07:47804 'RuntimeLibrary': '<(win_debug_RuntimeLibrary)',
[email protected]2ae6e022010-05-07 13:19:15805 'conditions': [
806 # According to MSVS, InlineFunctionExpansion=0 means
807 # "default inlining", not "/Ob0".
808 # Thus, we have to handle InlineFunctionExpansion==0 separately.
809 ['win_debug_InlineFunctionExpansion==0', {
810 'AdditionalOptions': ['/Ob0'],
811 }],
812 ['win_debug_InlineFunctionExpansion!=""', {
813 'InlineFunctionExpansion':
814 '<(win_debug_InlineFunctionExpansion)',
815 }],
[email protected]fac10d12010-11-08 16:00:31816 ['win_debug_disable_iterator_debugging==1', {
817 'PreprocessorDefinitions': ['_HAS_ITERATOR_DEBUGGING=0'],
818 }],
[email protected]2ae6e022010-05-07 13:19:15819 ],
[email protected]bb05e452009-10-29 21:24:56820 },
821 'VCLinkerTool': {
822 'LinkIncremental': '<(msvs_debug_link_incremental)',
823 },
824 'VCResourceCompilerTool': {
825 'PreprocessorDefinitions': ['_DEBUG'],
826 },
827 },
[email protected]2f80c312009-02-25 21:26:55828 'conditions': [
[email protected]bb05e452009-10-29 21:24:56829 ['OS=="linux"', {
830 'cflags': [
831 '<@(debug_extra_cflags)',
832 ],
[email protected]2f80c312009-02-25 21:26:55833 }],
834 ],
835 },
[email protected]5153767c2009-12-22 01:52:50836 'Release_Base': {
837 'abstract': 1,
[email protected]2f80c312009-02-25 21:26:55838 'defines': [
839 'NDEBUG',
840 ],
[email protected]1c966092009-08-20 21:19:26841 'xcode_settings': {
842 'DEAD_CODE_STRIPPING': 'YES', # -Wl,-dead_strip
843 'GCC_OPTIMIZATION_LEVEL': '<(mac_release_optimization)',
[email protected]ffd984b12009-09-11 19:37:00844 'OTHER_CFLAGS': [ '<@(release_extra_cflags)', ],
[email protected]1c966092009-08-20 21:19:26845 },
[email protected]bb05e452009-10-29 21:24:56846 'msvs_settings': {
[email protected]7e0d664a2009-12-03 21:07:47847 'VCCLCompilerTool': {
848 'Optimization': '<(win_release_Optimization)',
849 'RuntimeLibrary': '<(win_release_RuntimeLibrary)',
[email protected]2ae6e022010-05-07 13:19:15850 'conditions': [
851 # According to MSVS, InlineFunctionExpansion=0 means
852 # "default inlining", not "/Ob0".
853 # Thus, we have to handle InlineFunctionExpansion==0 separately.
854 ['win_release_InlineFunctionExpansion==0', {
855 'AdditionalOptions': ['/Ob0'],
856 }],
857 ['win_release_InlineFunctionExpansion!=""', {
858 'InlineFunctionExpansion':
859 '<(win_release_InlineFunctionExpansion)',
860 }],
861 ],
[email protected]7e0d664a2009-12-03 21:07:47862 },
[email protected]bb05e452009-10-29 21:24:56863 'VCLinkerTool': {
864 'LinkIncremental': '1',
865 },
866 },
[email protected]2f80c312009-02-25 21:26:55867 'conditions': [
[email protected]92822e82009-09-18 14:26:56868 ['release_valgrind_build==0', {
[email protected]ee857512010-05-14 08:24:42869 'defines': ['NVALGRIND', 'DYNAMIC_ANNOTATIONS_ENABLED=0'],
870 }, {
871 'defines': ['DYNAMIC_ANNOTATIONS_ENABLED=1'],
[email protected]92822e82009-09-18 14:26:56872 }],
[email protected]7e0d664a2009-12-03 21:07:47873 ['win_use_allocator_shim==0', {
874 'defines': ['NO_TCMALLOC'],
875 }],
[email protected]bb05e452009-10-29 21:24:56876 ['OS=="linux"', {
877 'cflags': [
[email protected]ffd984b12009-09-11 19:37:00878 '<@(release_extra_cflags)',
[email protected]bb05e452009-10-29 21:24:56879 ],
880 }],
[email protected]2f80c312009-02-25 21:26:55881 ],
882 },
[email protected]5153767c2009-12-22 01:52:50883 'Purify_Base': {
884 'abstract': 1,
885 'defines': [
886 'PURIFY',
887 'NO_TCMALLOC',
888 ],
889 'msvs_settings': {
890 'VCCLCompilerTool': {
891 'Optimization': '0',
892 'RuntimeLibrary': '0',
893 'BufferSecurityCheck': 'false',
894 },
895 'VCLinkerTool': {
896 'EnableCOMDATFolding': '1',
897 'LinkIncremental': '1',
898 },
899 },
900 },
901 #
902 # Concrete configurations
903 #
904 'Debug': {
905 'inherit_from': ['Common_Base', 'x86_Base', 'Debug_Base'],
906 },
907 'Release': {
908 'inherit_from': ['Common_Base', 'x86_Base', 'Release_Base'],
909 'conditions': [
910 ['msvs_use_common_release', {
[email protected]1f9471a2010-01-04 06:40:16911 'includes': ['release.gypi'],
[email protected]5153767c2009-12-22 01:52:50912 }],
913 ]
914 },
[email protected]f926fa0a2009-08-04 22:50:13915 'conditions': [
916 [ 'OS=="win"', {
917 # TODO(bradnelson): add a gyp mechanism to make this more graceful.
918 'Purify': {
[email protected]5153767c2009-12-22 01:52:50919 'inherit_from': ['Common_Base', 'x86_Base', 'Release_Base', 'Purify'],
[email protected]ef4fa4072009-12-04 22:46:50920 },
921 'Debug_x64': {
[email protected]5153767c2009-12-22 01:52:50922 'inherit_from': ['Common_Base', 'x64_Base', 'Debug_Base'],
[email protected]78263c12009-11-01 23:45:30923 },
924 'Release_x64': {
[email protected]5153767c2009-12-22 01:52:50925 'inherit_from': ['Common_Base', 'x64_Base', 'Release_Base'],
[email protected]78263c12009-11-01 23:45:30926 },
927 'Purify_x64': {
[email protected]1f9471a2010-01-04 06:40:16928 'inherit_from': ['Common_Base', 'x64_Base', 'Release_Base', 'Purify_Base'],
[email protected]78263c12009-11-01 23:45:30929 },
[email protected]f926fa0a2009-08-04 22:50:13930 }],
931 ],
[email protected]2f80c312009-02-25 21:26:55932 },
933 },
934 'conditions': [
[email protected]93f21e42010-04-01 00:35:15935 ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris"', {
[email protected]9d384032009-03-20 23:13:26936 'target_defaults': {
[email protected]5315f2842009-04-28 00:43:27937 # Enable -Werror by default, but put it in a variable so it can
938 # be disabled in ~/.gyp/include.gypi on the valgrind builders.
939 'variables': {
[email protected]ecf52cb82010-01-13 19:25:42940 # Use -fno-strict-aliasing by default since gcc 4.4 has periodic
941 # issues that slip through the cracks. We could do this just for
942 # gcc 4.4 but it makes more sense to be consistent on all
943 # compilers in use. TODO(Craig): turn this off again when
944 # there is some 4.4 test infrastructure in place and existing
945 # aliasing issues have been fixed.
946 'no_strict_aliasing%': 1,
[email protected]47deeb62009-12-17 14:49:39947 'conditions': [['OS=="linux"', {'werror%': '-Werror',}],
948 ['OS=="freebsd"', {'werror%': '',}],
949 ['OS=="openbsd"', {'werror%': '',}],
950 ],
[email protected]5315f2842009-04-28 00:43:27951 },
[email protected]9d384032009-03-20 23:13:26952 'cflags': [
[email protected]1bba09c2009-08-13 12:53:16953 '<(werror)', # See note above about the werror variable.
954 '-pthread',
955 '-fno-exceptions',
956 '-Wall',
[email protected]0fa17082010-03-26 00:48:05957 # TODO(evan): turn this back on once all the builds work.
958 # '-Wextra',
[email protected]225c8f52010-02-05 22:23:20959 # Don't warn about unused function params. We use those everywhere.
960 '-Wno-unused-parameter',
961 # Don't warn about the "struct foo f = {0};" initialization pattern.
962 '-Wno-missing-field-initializers',
[email protected]1bba09c2009-08-13 12:53:16963 '-D_FILE_OFFSET_BITS=64',
[email protected]3df6e3a2010-01-21 20:23:12964 # Don't export any symbols (for example, to plugins we dlopen()).
965 # Note: this is *required* to make some plugins work.
966 '-fvisibility=hidden',
[email protected]7ca6ce12010-09-15 23:39:35967 '-pipe',
[email protected]8a2fcba2009-07-29 00:52:24968 ],
969 'cflags_cc': [
[email protected]832d0212009-10-28 19:12:22970 '-fno-rtti',
[email protected]8a2fcba2009-07-29 00:52:24971 '-fno-threadsafe-statics',
[email protected]f5986c42009-11-17 18:39:36972 # Make inline functions have hidden visiblity by default.
973 # Surprisingly, not covered by -fvisibility=hidden.
974 '-fvisibility-inlines-hidden',
[email protected]9d384032009-03-20 23:13:26975 ],
[email protected]a6cf87e2009-04-03 04:07:38976 'ldflags': [
[email protected]138241f2010-03-30 23:53:10977 '-pthread', '-Wl,-z,noexecstack',
[email protected]9d384032009-03-20 23:13:26978 ],
[email protected]3aacaf952009-04-02 15:34:09979 'configurations': {
[email protected]5153767c2009-12-22 01:52:50980 'Debug_Base': {
[email protected]c5bdc032009-04-20 19:11:31981 'variables': {
982 'debug_optimize%': '0',
983 },
[email protected]3aacaf952009-04-02 15:34:09984 'defines': [
985 '_DEBUG',
986 ],
987 'cflags': [
[email protected]9cb5cc702011-02-01 19:56:04988 '-O>(debug_optimize)',
[email protected]3aacaf952009-04-02 15:34:09989 '-g',
990 ],
[email protected]5315f2842009-04-28 00:43:27991 },
[email protected]5153767c2009-12-22 01:52:50992 'Release_Base': {
[email protected]740e2de2009-07-21 11:41:01993 'variables': {
994 'release_optimize%': '2',
[email protected]1dd529642010-05-15 01:02:51995 # Binaries become big and gold is unable to perform GC
996 # and remove unused sections for some of test targets
997 # on 32 bit platform.
998 # (This is currently observed only in chromeos valgrind bots)
999 # The following flag is to disable --gc-sections linker
1000 # option for these bots.
1001 'no_gc_sections%': 0,
[email protected]740e2de2009-07-21 11:41:011002 },
[email protected]3aacaf952009-04-02 15:34:091003 'cflags': [
[email protected]9cb5cc702011-02-01 19:56:041004 '-O>(release_optimize)',
[email protected]d8cc3a62009-04-08 18:29:531005 # Don't emit the GCC version ident directives, they just end up
1006 # in the .comment section taking up binary size.
1007 '-fno-ident',
1008 # Put data and code in their own sections, so that unused symbols
1009 # can be removed at link time with --gc-sections.
1010 '-fdata-sections',
1011 '-ffunction-sections',
[email protected]3aacaf952009-04-02 15:34:091012 ],
[email protected]c902f2c2010-08-06 20:04:181013 'ldflags': [
1014 # Specifically tell the linker to perform optimizations.
1015 # See http://lwn.net/Articles/192624/ .
1016 '-Wl,-O1',
[email protected]27c2e492010-08-06 22:55:221017 '-Wl,--as-needed',
[email protected]c902f2c2010-08-06 20:04:181018 ],
[email protected]1dd529642010-05-15 01:02:511019 'conditions' : [
1020 ['no_gc_sections==0', {
1021 'ldflags': [
1022 '-Wl,--gc-sections',
1023 ],
1024 }],
[email protected]ecf7b6482010-10-13 09:15:201025 ['clang==1', {
1026 'cflags!': [
1027 '-fno-ident',
1028 ],
1029 }],
[email protected]7664ab32011-02-01 23:35:251030 ['profiling==1', {
1031 'cflags': [
1032 '-fno-omit-frame-pointer',
1033 '-g',
1034 ],
1035 }],
[email protected]1dd529642010-05-15 01:02:511036 ]
[email protected]3aacaf952009-04-02 15:34:091037 },
1038 },
[email protected]601b540222009-04-03 21:32:041039 'variants': {
1040 'coverage': {
1041 'cflags': ['-fprofile-arcs', '-ftest-coverage'],
1042 'ldflags': ['-fprofile-arcs'],
1043 },
1044 'profile': {
1045 'cflags': ['-pg', '-g'],
1046 'ldflags': ['-pg'],
1047 },
1048 'symbols': {
1049 'cflags': ['-g'],
1050 },
1051 },
[email protected]606116d22009-05-06 22:38:231052 'conditions': [
[email protected]7e8eb7612009-07-29 15:56:001053 [ 'target_arch=="ia32"', {
[email protected]606116d22009-05-06 22:38:231054 'asflags': [
1055 # Needed so that libs with .s files (e.g. libicudata.a)
1056 # are compatible with the general 32-bit-ness.
1057 '-32',
1058 ],
1059 # All floating-point computations on x87 happens in 80-bit
1060 # precision. Because the C and C++ language standards allow
1061 # the compiler to keep the floating-point values in higher
1062 # precision than what's specified in the source and doing so
1063 # is more efficient than constantly rounding up to 64-bit or
1064 # 32-bit precision as specified in the source, the compiler,
1065 # especially in the optimized mode, tries very hard to keep
1066 # values in x87 floating-point stack (in 80-bit precision)
1067 # as long as possible. This has important side effects, that
1068 # the real value used in computation may change depending on
1069 # how the compiler did the optimization - that is, the value
1070 # kept in 80-bit is different than the value rounded down to
1071 # 64-bit or 32-bit. There are possible compiler options to make
1072 # this behavior consistent (e.g. -ffloat-store would keep all
1073 # floating-values in the memory, thus force them to be rounded
1074 # to its original precision) but they have significant runtime
1075 # performance penalty.
1076 #
1077 # -mfpmath=sse -msse2 makes the compiler use SSE instructions
1078 # which keep floating-point values in SSE registers in its
1079 # native precision (32-bit for single precision, and 64-bit for
1080 # double precision values). This means the floating-point value
1081 # used during computation does not change depending on how the
1082 # compiler optimized the code, since the value is always kept
1083 # in its specified precision.
[email protected]ffde7932009-05-29 00:39:061084 'conditions': [
[email protected]ac120ff2010-04-28 02:14:221085 ['branding=="Chromium" and disable_sse2==0', {
[email protected]ffde7932009-05-29 00:39:061086 'cflags': [
1087 '-march=pentium4',
1088 '-msse2',
1089 '-mfpmath=sse',
1090 ],
1091 }],
[email protected]06c756182010-04-27 18:31:311092 # ChromeOS targets Pinetrail, which is sse3, but most of the
[email protected]0183dbb2010-04-16 02:00:441093 # benefit comes from sse2 so this setting allows ChromeOS
1094 # to build on other CPUs. In the future -march=atom would help
1095 # but requires a newer compiler.
[email protected]ac120ff2010-04-28 02:14:221096 ['chromeos==1 and disable_sse2==0', {
[email protected]0183dbb2010-04-16 02:00:441097 'cflags': [
1098 '-msse2',
1099 ],
1100 }],
[email protected]34799f9d2010-07-08 17:51:331101 # Install packages have started cropping up with
1102 # different headers between the 32-bit and 64-bit
1103 # versions, so we have to shadow those differences off
1104 # and make sure a 32-bit-on-64-bit build picks up the
1105 # right files.
1106 ['host_arch!="ia32"', {
1107 'include_dirs+': [
1108 '/usr/include32',
1109 ],
1110 }],
[email protected]ffde7932009-05-29 00:39:061111 ],
[email protected]dc259ce52010-04-13 04:03:101112 # -mmmx allows mmintrin.h to be used for mmx intrinsics.
1113 # video playback is mmx and sse2 optimized.
[email protected]606116d22009-05-06 22:38:231114 'cflags': [
1115 '-m32',
[email protected]dc259ce52010-04-13 04:03:101116 '-mmmx',
[email protected]1c6560af2009-07-14 11:02:161117 ],
[email protected]606116d22009-05-06 22:38:231118 'ldflags': [
1119 '-m32',
1120 ],
1121 }],
[email protected]3dda8a962009-08-10 18:58:071122 ['target_arch=="arm"', {
[email protected]77c1b29392009-12-04 06:21:291123 'target_conditions': [
1124 ['_toolset=="target"', {
1125 'cflags_cc': [
1126 # The codesourcery arm-2009q3 toolchain warns at that the ABI
1127 # has changed whenever it encounters a varargs function. This
1128 # silences those warnings, as they are not helpful and
1129 # clutter legitimate warnings.
1130 '-Wno-abi',
1131 ],
1132 'conditions': [
1133 ['arm_thumb == 1', {
1134 'cflags': [
1135 '-mthumb',
1136 # TODO(piman): -Wa,-mimplicit-it=thumb is needed for
1137 # inline assembly that uses condition codes but it's
1138 # suboptimal. Better would be to #ifdef __thumb__ at the
1139 # right place and have a separate thumb path.
1140 '-Wa,-mimplicit-it=thumb',
1141 ]
1142 }],
1143 ['armv7==1', {
[email protected]dc9711f2009-11-13 19:30:251144 'cflags': [
1145 '-march=armv7-a',
1146 '-mtune=cortex-a8',
[email protected]dc9711f2009-11-13 19:30:251147 '-mfloat-abi=softfp',
1148 ],
[email protected]eafc0b452010-02-26 21:53:431149 'conditions': [
1150 ['arm_neon==1', {
1151 'cflags': [ '-mfpu=neon', ],
1152 }, {
[email protected]53e0f642010-03-05 01:41:561153 'cflags': [ '-mfpu=<(arm_fpu)', ],
[email protected]eafc0b452010-02-26 21:53:431154 }]
1155 ],
[email protected]dc9711f2009-11-13 19:30:251156 }],
[email protected]3dda8a962009-08-10 18:58:071157 ],
1158 }],
1159 ],
1160 }],
[email protected]2fb843b2010-08-12 02:11:081161 ['linux_fpic==1', {
[email protected]c76723a2010-01-25 23:10:581162 'cflags': [
1163 '-fPIC',
1164 ],
1165 }],
[email protected]ee28c9f2009-09-04 01:53:011166 ['sysroot!=""', {
[email protected]fd36ce822009-10-28 20:13:571167 'target_conditions': [
1168 ['_toolset=="target"', {
1169 'cflags': [
1170 '--sysroot=<(sysroot)',
1171 ],
1172 'ldflags': [
1173 '--sysroot=<(sysroot)',
1174 ],
1175 }]]
[email protected]ee28c9f2009-09-04 01:53:011176 }],
[email protected]58680ce2010-09-18 00:09:151177 ['clang==1', {
1178 'cflags': [
[email protected]58680ce2010-09-18 00:09:151179 # Clang spots more unused functions.
1180 '-Wno-unused-function',
[email protected]58680ce2010-09-18 00:09:151181 # Don't die on dtoa code that uses a char as an array index.
1182 '-Wno-char-subscripts',
[email protected]0fa0fbc2010-10-12 04:32:051183 # Survive EXPECT_EQ(unnamed_enum, unsigned int) -- see
1184 # http://code.google.com/p/googletest/source/detail?r=446 .
1185 # TODO(thakis): Use -isystem instead (http://crbug.com/58751 ).
1186 '-Wno-unnamed-type-template-args',
[email protected]2bf708f2011-01-31 16:21:361187 # TODO(thakis): Reenable, http://crbug.com/71375
1188 '-Wno-uninitialized',
[email protected]58680ce2010-09-18 00:09:151189 ],
1190 'cflags!': [
1191 # Clang doesn't seem to know know this flag.
1192 '-mfpmath=sse',
1193 ],
1194 }],
[email protected]5e781232011-01-28 02:57:591195 ['clang==1 and clang_load!="" and clang_add_plugin!=""', {
1196 'cflags': [
1197 '-Xclang', '-load', '-Xclang', '<(clang_load)',
1198 '-Xclang', '-add-plugin', '-Xclang', '<(clang_add_plugin)',
1199 ],
1200 }],
[email protected]cc4219a2009-08-14 05:30:521201 ['no_strict_aliasing==1', {
1202 'cflags': [
1203 '-fno-strict-aliasing',
1204 ],
1205 }],
[email protected]cbd5fd52009-08-26 00:14:271206 ['linux_breakpad==1', {
[email protected]c87efd42010-08-26 18:28:171207 'cflags': [ '-g' ],
[email protected]cbd5fd52009-08-26 00:14:271208 'defines': ['USE_LINUX_BREAKPAD'],
1209 }],
[email protected]7cd2afd2009-10-27 21:40:261210 ['library=="shared_library"', {
1211 # When building with shared libraries, remove the visiblity-hiding
1212 # flag.
1213 'cflags!': [ '-fvisibility=hidden' ],
[email protected]2fb843b2010-08-12 02:11:081214 'conditions': [
1215 ['target_arch=="x64" or target_arch=="arm"', {
1216 # Shared libraries need -fPIC on x86-64 and arm
1217 'cflags': ['-fPIC']
1218 }]
1219 ],
[email protected]f192fa992010-12-08 00:45:291220 'ldflags!': [
1221 # --as-needed confuses library interdependencies.
1222 # See http://code.google.com/p/chromium/issues/detail?id=61430
1223 '-Wl,--as-needed',
1224 ],
[email protected]7cd2afd2009-10-27 21:40:261225 }],
[email protected]d8b60602010-03-26 09:41:221226 ['linux_use_heapchecker==1', {
1227 'variables': {'linux_use_tcmalloc%': 1},
1228 }],
[email protected]61a9b2d82010-02-26 00:31:081229 ['linux_use_tcmalloc==0', {
1230 'defines': ['NO_TCMALLOC'],
[email protected]01699e22009-11-11 19:24:241231 }],
[email protected]d8b60602010-03-26 09:41:221232 ['linux_use_heapchecker==0', {
1233 'defines': ['NO_HEAPCHECKER'],
1234 }],
[email protected]64e2d4a42010-08-27 10:13:211235 ['linux_keep_shadow_stacks==1', {
1236 'defines': ['KEEP_SHADOW_STACKS'],
1237 'cflags': ['-finstrument-functions'],
1238 }],
[email protected]606116d22009-05-06 22:38:231239 ],
[email protected]9d384032009-03-20 23:13:261240 },
1241 }],
[email protected]c51e8d52009-12-11 20:04:061242 # FreeBSD-specific options; note that most FreeBSD options are set above,
1243 # with Linux.
1244 ['OS=="freebsd"', {
1245 'target_defaults': {
1246 'ldflags': [
1247 '-Wl,--no-keep-memory',
1248 ],
1249 },
1250 }],
[email protected]93f21e42010-04-01 00:35:151251 ['OS=="solaris"', {
1252 'cflags!': ['-fvisibility=hidden'],
1253 'cflags_cc!': ['-fvisibility-inlines-hidden'],
1254 }],
[email protected]2f80c312009-02-25 21:26:551255 ['OS=="mac"', {
1256 'target_defaults': {
[email protected]24700642009-06-01 16:01:201257 'variables': {
[email protected]9a5e72862010-09-02 16:16:581258 # These should be 'mac_real_dsym%' and 'mac_strip%', but there
1259 # seems to be a bug with % in variables that are intended to be
1260 # set to different values in different targets, like these two.
1261 'mac_strip': 1, # Strip debugging symbols from the target.
[email protected]24700642009-06-01 16:01:201262 'mac_real_dsym': 0, # Fake .dSYMs are fine in most cases.
1263 },
[email protected]d92c7c012009-03-19 19:26:421264 'mac_bundle': 0,
[email protected]2f80c312009-02-25 21:26:551265 'xcode_settings': {
1266 'ALWAYS_SEARCH_USER_PATHS': 'NO',
[email protected]ab2956372009-08-13 18:11:041267 'GCC_C_LANGUAGE_STANDARD': 'c99', # -std=c99
1268 'GCC_CW_ASM_SYNTAX': 'NO', # No -fasm-blocks
1269 'GCC_DYNAMIC_NO_PIC': 'NO', # No -mdynamic-no-pic
1270 # (Equivalent to -fPIC)
1271 'GCC_ENABLE_CPP_EXCEPTIONS': 'NO', # -fno-exceptions
1272 'GCC_ENABLE_CPP_RTTI': 'NO', # -fno-rtti
1273 'GCC_ENABLE_PASCAL_STRINGS': 'NO', # No -mpascal-strings
[email protected]3224dcd2009-09-16 17:31:251274 # GCC_INLINES_ARE_PRIVATE_EXTERN maps to -fvisibility-inlines-hidden
1275 'GCC_INLINES_ARE_PRIVATE_EXTERN': 'YES',
[email protected]ab2956372009-08-13 18:11:041276 'GCC_OBJC_CALL_CXX_CDTORS': 'YES', # -fobjc-call-cxx-cdtors
1277 'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES', # -fvisibility=hidden
1278 'GCC_THREADSAFE_STATICS': 'NO', # -fno-threadsafe-statics
1279 'GCC_TREAT_WARNINGS_AS_ERRORS': 'YES', # -Werror
[email protected]2f80c312009-02-25 21:26:551280 'GCC_VERSION': '4.2',
[email protected]ab2956372009-08-13 18:11:041281 'GCC_WARN_ABOUT_MISSING_NEWLINE': 'YES', # -Wnewline-eof
[email protected]3224dcd2009-09-16 17:31:251282 # MACOSX_DEPLOYMENT_TARGET maps to -mmacosx-version-min
1283 'MACOSX_DEPLOYMENT_TARGET': '<(mac_deployment_target)',
[email protected]ab2956372009-08-13 18:11:041284 'PREBINDING': 'NO', # No -Wl,-prebind
[email protected]2f80c312009-02-25 21:26:551285 'USE_HEADERMAP': 'NO',
[email protected]080e86f2010-06-21 15:19:041286 'WARNING_CFLAGS': [
1287 '-Wall',
1288 '-Wendif-labels',
1289 '-Wextra',
1290 # Don't warn about unused function parameters.
1291 '-Wno-unused-parameter',
1292 # Don't warn about the "struct foo f = {0};" initialization
1293 # pattern.
1294 '-Wno-missing-field-initializers',
1295 ],
[email protected]b3fb8092009-03-12 19:09:241296 'conditions': [
1297 ['chromium_mac_pch', {'GCC_PRECOMPILE_PREFIX_HEADER': 'YES'},
[email protected]9543af052009-09-15 22:42:591298 {'GCC_PRECOMPILE_PREFIX_HEADER': 'NO'}
1299 ],
[email protected]66733172010-09-22 00:09:281300 ['clang==1', {
1301 'WARNING_CFLAGS': [
1302 # Don't die on dtoa code that uses a char as an array index.
1303 # This is required solely for base/third_party/dmg_fp/dtoa.cc.
1304 '-Wno-char-subscripts',
[email protected]25d3bb722010-11-22 14:31:451305 # Clang spots more unused functions.
1306 '-Wno-unused-function',
[email protected]0fa0fbc2010-10-12 04:32:051307 # Survive EXPECT_EQ(unnamed_enum, unsigned int) -- see
1308 # http://code.google.com/p/googletest/source/detail?r=446 .
1309 # TODO(thakis): Use -isystem instead (http://crbug.com/58751 ).
1310 '-Wno-unnamed-type-template-args',
[email protected]2bf708f2011-01-31 16:21:361311 # TODO(thakis): Reenable, http://crbug.com/71375
1312 '-Wno-uninitialized',
[email protected]66733172010-09-22 00:09:281313 ],
1314 }],
[email protected]5e781232011-01-28 02:57:591315 ['clang==1 and clang_load!="" and clang_add_plugin!=""', {
1316 'OTHER_CFLAGS': [
1317 '-Xclang', '-load', '-Xclang', '<(clang_load)',
1318 '-Xclang', '-add-plugin', '-Xclang', '<(clang_add_plugin)',
1319 ],
1320 }],
[email protected]b3fb8092009-03-12 19:09:241321 ],
[email protected]2f80c312009-02-25 21:26:551322 },
1323 'target_conditions': [
[email protected]2f80c312009-02-25 21:26:551324 ['_type!="static_library"', {
[email protected]5d7dc972009-04-16 15:30:461325 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-search_paths_first']},
1326 }],
1327 ['_mac_bundle', {
1328 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-ObjC']},
[email protected]87fde4a2009-02-28 00:50:081329 }],
[email protected]9a5e72862010-09-02 16:16:581330 ['(_type=="executable" or _type=="shared_library" or \
1331 _type=="loadable_module") and mac_strip!=0', {
[email protected]24700642009-06-01 16:01:201332 'target_conditions': [
1333 ['mac_real_dsym == 1', {
1334 # To get a real .dSYM bundle produced by dsymutil, set the
1335 # debug information format to dwarf-with-dsym. Since
1336 # strip_from_xcode will not be used, set Xcode to do the
1337 # stripping as well.
1338 'configurations': {
[email protected]5153767c2009-12-22 01:52:501339 'Release_Base': {
[email protected]24700642009-06-01 16:01:201340 'xcode_settings': {
1341 'DEBUG_INFORMATION_FORMAT': 'dwarf-with-dsym',
1342 'DEPLOYMENT_POSTPROCESSING': 'YES',
1343 'STRIP_INSTALLED_PRODUCT': 'YES',
[email protected]e14a9f92009-08-05 19:26:071344 'target_conditions': [
[email protected]c2111422010-06-01 18:30:251345 ['_type=="shared_library" or _type=="loadable_module"', {
[email protected]e14a9f92009-08-05 19:26:071346 # The Xcode default is to strip debugging symbols
1347 # only (-S). Local symbols should be stripped as
1348 # well, which will be handled by -x. Xcode will
1349 # continue to insert -S when stripping even when
1350 # additional flags are added with STRIPFLAGS.
1351 'STRIPFLAGS': '-x',
[email protected]c2111422010-06-01 18:30:251352 }], # _type=="shared_library" or _type=="loadable_module"'
[email protected]e14a9f92009-08-05 19:26:071353 ], # target_conditions
1354 }, # xcode_settings
1355 }, # configuration "Release"
1356 }, # configurations
[email protected]24700642009-06-01 16:01:201357 }, { # mac_real_dsym != 1
1358 # To get a fast fake .dSYM bundle, use a post-build step to
1359 # produce the .dSYM and strip the executable. strip_from_xcode
1360 # only operates in the Release configuration.
1361 'postbuilds': [
1362 {
1363 'variables': {
1364 # Define strip_from_xcode in a variable ending in _path
1365 # so that gyp understands it's a path and performs proper
1366 # relativization during dict merging.
1367 'strip_from_xcode_path': 'mac/strip_from_xcode',
1368 },
1369 'postbuild_name': 'Strip If Needed',
1370 'action': ['<(strip_from_xcode_path)'],
1371 },
[email protected]e14a9f92009-08-05 19:26:071372 ], # postbuilds
1373 }], # mac_real_dsym
1374 ], # target_conditions
[email protected]9a5e72862010-09-02 16:16:581375 }], # (_type=="executable" or _type=="shared_library" or
1376 # _type=="loadable_module") and mac_strip!=0
[email protected]e14a9f92009-08-05 19:26:071377 ], # target_conditions
1378 }, # target_defaults
1379 }], # OS=="mac"
[email protected]2f80c312009-02-25 21:26:551380 ['OS=="win"', {
1381 'target_defaults': {
1382 'defines': [
1383 '_WIN32_WINNT=0x0600',
1384 'WINVER=0x0600',
1385 'WIN32',
1386 '_WINDOWS',
[email protected]2f80c312009-02-25 21:26:551387 'NOMINMAX',
1388 '_CRT_RAND_S',
1389 'CERT_CHAIN_PARA_HAS_EXTRA_FIELDS',
1390 'WIN32_LEAN_AND_MEAN',
1391 '_SECURE_ATL',
[email protected]7a812dd62010-06-30 18:52:271392 '_ATL_NO_OPENGL',
[email protected]adfb98c2009-06-23 20:08:451393 '_HAS_TR1=0',
[email protected]2f80c312009-02-25 21:26:551394 ],
[email protected]8974e042010-06-21 18:06:521395 'conditions': [
1396 ['component=="static_library"', {
1397 'defines': [
1398 '_HAS_EXCEPTIONS=0',
1399 ],
1400 }],
1401 ],
[email protected]5b5ca7cb2009-07-20 23:00:201402 'msvs_system_include_dirs': [
[email protected]998b5152009-12-12 22:19:521403 '<(DEPTH)/third_party/platformsdk_win7/files/Include',
[email protected]a78da50e2010-06-09 21:31:371404 '<(DEPTH)/third_party/directxsdk/files/Include',
[email protected]2f80c312009-02-25 21:26:551405 '$(VSInstallDir)/VC/atlmfc/include',
1406 ],
[email protected]a8d99cef2009-08-26 20:47:491407 'msvs_cygwin_dirs': ['<(DEPTH)/third_party/cygwin'],
[email protected]365632b2010-06-22 02:01:571408 'msvs_disabled_warnings': [4351, 4396, 4503, 4819],
[email protected]2f80c312009-02-25 21:26:551409 'msvs_settings': {
1410 'VCCLCompilerTool': {
1411 'MinimalRebuild': 'false',
[email protected]2f80c312009-02-25 21:26:551412 'BufferSecurityCheck': 'true',
1413 'EnableFunctionLevelLinking': 'true',
1414 'RuntimeTypeInfo': 'false',
1415 'WarningLevel': '3',
1416 'WarnAsError': 'true',
1417 'DebugInformationFormat': '3',
[email protected]3fef6e62009-07-31 19:58:581418 'conditions': [
[email protected]912c55c2009-07-31 23:33:551419 [ 'msvs_multi_core_compile', {
[email protected]1f9471a2010-01-04 06:40:161420 'AdditionalOptions': ['/MP'],
[email protected]912c55c2009-07-31 23:33:551421 }],
[email protected]8974e042010-06-21 18:06:521422 ['component=="shared_library"', {
1423 'ExceptionHandling': '1', # /EHsc
1424 }, {
1425 'ExceptionHandling': '0',
1426 }],
[email protected]3fef6e62009-07-31 19:58:581427 ],
[email protected]2f80c312009-02-25 21:26:551428 },
1429 'VCLibrarianTool': {
[email protected]1f9471a2010-01-04 06:40:161430 'AdditionalOptions': ['/ignore:4221'],
[email protected]a78da50e2010-06-09 21:31:371431 'AdditionalLibraryDirectories': [
1432 '<(DEPTH)/third_party/platformsdk_win7/files/Lib',
1433 '<(DEPTH)/third_party/directxsdk/files/Lib/x86',
1434 ],
[email protected]2f80c312009-02-25 21:26:551435 },
1436 'VCLinkerTool': {
[email protected]2f80c312009-02-25 21:26:551437 'AdditionalDependencies': [
1438 'wininet.lib',
[email protected]b1d8c252011-01-13 20:27:501439 'dnsapi.lib',
[email protected]2f80c312009-02-25 21:26:551440 'version.lib',
1441 'msimg32.lib',
1442 'ws2_32.lib',
1443 'usp10.lib',
1444 'psapi.lib',
[email protected]96fd0032009-04-24 00:13:081445 'dbghelp.lib',
[email protected]2f80c312009-02-25 21:26:551446 ],
[email protected]a78da50e2010-06-09 21:31:371447 'AdditionalLibraryDirectories': [
1448 '<(DEPTH)/third_party/platformsdk_win7/files/Lib',
1449 '<(DEPTH)/third_party/directxsdk/files/Lib/x86',
1450 ],
[email protected]2f80c312009-02-25 21:26:551451 'GenerateDebugInformation': 'true',
1452 'MapFileName': '$(OutDir)\\$(TargetName).map',
1453 'ImportLibrary': '$(OutDir)\\lib\\$(TargetName).lib',
[email protected]2f80c312009-02-25 21:26:551454 'FixedBaseAddress': '1',
[email protected]825ff8d2009-05-22 01:40:481455 # SubSystem values:
1456 # 0 == not set
1457 # 1 == /SUBSYSTEM:CONSOLE
1458 # 2 == /SUBSYSTEM:WINDOWS
1459 # Most of the executables we'll ever create are tests
1460 # and utilities with console output.
1461 'SubSystem': '1',
[email protected]2f80c312009-02-25 21:26:551462 },
1463 'VCMIDLTool': {
1464 'GenerateStublessProxies': 'true',
1465 'TypeLibraryName': '$(InputName).tlb',
1466 'OutputDirectory': '$(IntDir)',
1467 'HeaderFileName': '$(InputName).h',
1468 'DLLDataFileName': 'dlldata.c',
1469 'InterfaceIdentifierFileName': '$(InputName)_i.c',
1470 'ProxyFileName': '$(InputName)_p.c',
1471 },
1472 'VCResourceCompilerTool': {
1473 'Culture' : '1033',
[email protected]4d91cbc2010-05-07 20:41:381474 'AdditionalIncludeDirectories': [
1475 '<(DEPTH)',
1476 '<(SHARED_INTERMEDIATE_DIR)',
1477 ],
[email protected]2f80c312009-02-25 21:26:551478 },
1479 },
1480 },
1481 }],
[email protected]93f21e42010-04-01 00:35:151482 ['disable_nacl==1 or OS=="freebsd" or OS=="openbsd" or OS=="solaris"', {
[email protected]d8c7cbcc2009-10-02 19:00:311483 'target_defaults': {
1484 'defines': [
1485 'DISABLE_NACL',
1486 ],
1487 },
1488 }],
[email protected]cfbf9bc2009-12-07 22:07:561489 ['OS=="win" and msvs_use_common_linker_extras', {
[email protected]48c7af72009-07-03 22:00:191490 'target_defaults': {
1491 'msvs_settings': {
1492 'VCLinkerTool': {
[email protected]48c7af72009-07-03 22:00:191493 'DelayLoadDLLs': [
1494 'dbghelp.dll',
1495 'dwmapi.dll',
1496 'uxtheme.dll',
1497 ],
1498 },
1499 },
[email protected]ef4fa4072009-12-04 22:46:501500 'configurations': {
[email protected]5153767c2009-12-22 01:52:501501 'x86_Base': {
[email protected]ef4fa4072009-12-04 22:46:501502 'msvs_settings': {
1503 'VCLinkerTool': {
[email protected]1f9471a2010-01-04 06:40:161504 'AdditionalOptions': [
1505 '/safeseh',
1506 '/dynamicbase',
1507 '/ignore:4199',
1508 '/ignore:4221',
1509 '/nxcompat',
1510 ],
[email protected]ef4fa4072009-12-04 22:46:501511 },
1512 },
1513 },
[email protected]5153767c2009-12-22 01:52:501514 'x64_Base': {
[email protected]ef4fa4072009-12-04 22:46:501515 'msvs_settings': {
1516 'VCLinkerTool': {
[email protected]1f9471a2010-01-04 06:40:161517 'AdditionalOptions': [
[email protected]ef4fa4072009-12-04 22:46:501518 # safeseh is not compatible with x64
[email protected]1f9471a2010-01-04 06:40:161519 '/dynamicbase',
1520 '/ignore:4199',
1521 '/ignore:4221',
1522 '/nxcompat',
1523 ],
[email protected]ef4fa4072009-12-04 22:46:501524 },
1525 },
1526 },
1527 },
[email protected]48c7af72009-07-03 22:00:191528 },
1529 }],
[email protected]9821d0d2010-04-16 22:40:371530 ['enable_new_npdevice_api==1', {
1531 'target_defaults': {
1532 'defines': [
1533 'ENABLE_NEW_NPDEVICE_API',
1534 ],
1535 },
1536 }],
[email protected]2f80c312009-02-25 21:26:551537 ],
1538 'xcode_settings': {
[email protected]0c8ab452009-11-06 21:57:501539 # DON'T ADD ANYTHING NEW TO THIS BLOCK UNLESS YOU REALLY REALLY NEED IT!
1540 # This block adds *project-wide* configuration settings to each project
1541 # file. It's almost always wrong to put things here. Specify your
1542 # custom xcode_settings in target_defaults to add them to targets instead.
1543
1544 # In an Xcode Project Info window, the "Base SDK for All Configurations"
1545 # setting sets the SDK on a project-wide basis. In order to get the
1546 # configured SDK to show properly in the Xcode UI, SDKROOT must be set
1547 # here at the project level.
1548 'SDKROOT': 'macosx<(mac_sdk)', # -isysroot
1549
[email protected]2f80c312009-02-25 21:26:551550 # The Xcode generator will look for an xcode_settings section at the root
1551 # of each dict and use it to apply settings on a file-wide basis. Most
1552 # settings should not be here, they should be in target-specific
1553 # xcode_settings sections, or better yet, should use non-Xcode-specific
1554 # settings in target dicts. SYMROOT is a special case, because many other
1555 # Xcode variables depend on it, including variables such as
1556 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something
1557 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the
1558 # files to appear (when present) in the UI as actual files and not red
1559 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR,
1560 # and therefore SYMROOT, needs to be set at the project level.
[email protected]bfa24b962009-03-02 00:16:161561 'SYMROOT': '<(DEPTH)/xcodebuild',
[email protected]2f80c312009-02-25 21:26:551562 },
[email protected]ee28c9f2009-09-04 01:53:011563}
[email protected]f5c990c2009-10-06 03:02:381564
1565# Local Variables:
1566# tab-width:2
1567# indent-tabs-mode:nil
1568# End:
1569# vim: set expandtab tabstop=2 shiftwidth=2: