blob: ae5f41a7e206bc8bb5d216d3e4cdc6dbc604c45d [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]bb6aba32011-01-07 19:04:43122 'conditions': [
[email protected]63692212010-09-16 00:22:21123 # A flag to enable or disable our compile-time dependency
124 # on gnome-keyring. If that dependency is disabled, no gnome-keyring
125 # support will be available. This option is useful
126 # for Linux distributions.
127 ['chromeos==1', {
128 'use_gnome_keyring%': 0,
129 }, {
130 'use_gnome_keyring%': 1,
131 }],
[email protected]0afe5212010-10-01 18:56:11132
133 # Set to 1 compile with -fPIC cflag on linux. This is a must for shared
134 # libraries on linux x86-64 and arm.
135 ['host_arch=="ia32"', {
136 'linux_fpic%': 0,
137 }, {
138 'linux_fpic%': 1,
139 }],
[email protected]1b4209f2011-01-07 00:25:40140
[email protected]bb6aba32011-01-07 19:04:43141 ['toolkit_views==0 or OS=="mac"', {
142 # GTK+ and Mac wants Title Case strings
143 'use_titlecase_in_grd_files%': 1,
144 }],
145
[email protected]1b4209f2011-01-07 00:25:40146 # Enable some hacks to support Flapper only on Chrome OS.
147 ['chromeos==1', {
148 'enable_flapper_hacks%': 1,
149 }, {
150 'enable_flapper_hacks%': 0,
151 }],
[email protected]b3f23ba2010-04-26 22:58:17152 ],
[email protected]e14a9f92009-08-05 19:26:07153 },
154
[email protected]e72e55b2011-01-06 22:19:30155 # Copy conditionally-set variables out one scope.
[email protected]e14a9f92009-08-05 19:26:07156 'branding%': '<(branding)',
157 'buildtype%': '<(buildtype)',
[email protected]e0d00142009-09-18 22:10:27158 'target_arch%': '<(target_arch)',
[email protected]cf185b32010-01-12 04:29:59159 'host_arch%': '<(host_arch)',
[email protected]c153e5352009-09-22 12:37:44160 'toolkit_views%': '<(toolkit_views)',
[email protected]63692212010-09-16 00:22:21161 'use_gnome_keyring%': '<(use_gnome_keyring)',
[email protected]0afe5212010-10-01 18:56:11162 'linux_fpic%': '<(linux_fpic)',
[email protected]1b4209f2011-01-07 00:25:40163 'enable_flapper_hacks%': '<(enable_flapper_hacks)',
[email protected]c153e5352009-09-22 12:37:44164 'chromeos%': '<(chromeos)',
[email protected]93012ca2010-08-10 20:10:49165 'touchui%': '<(touchui)',
[email protected]b2f030c2009-09-24 20:36:21166 'inside_chromium_build%': '<(inside_chromium_build)',
[email protected]9c1949e2009-10-02 19:59:54167 'fastbuild%': '<(fastbuild)',
[email protected]a76fe1a2010-03-01 23:39:36168 'python_ver%': '<(python_ver)',
[email protected]eafc0b452010-02-26 21:53:43169 'armv7%': '<(armv7)',
170 'arm_neon%': '<(arm_neon)',
[email protected]4d83eb72010-03-04 16:42:23171 'sysroot%': '<(sysroot)',
[email protected]ac120ff2010-04-28 02:14:22172 'disable_sse2%': '<(disable_sse2)',
[email protected]8974e042010-06-21 18:06:52173 'library%': '<(library)',
174 'component%': '<(component)',
[email protected]bb6aba32011-01-07 19:04:43175 'use_titlecase_in_grd_files%': '<(use_titlecase_in_grd_files)',
[email protected]e14a9f92009-08-05 19:26:07176
[email protected]caa95c82009-11-23 22:39:32177 # The release channel that this build targets. This is used to restrict
178 # channel-specific build options, like which installer packages to create.
179 # The default is 'all', which does no channel-specific filtering.
180 'channel%': 'all',
181
[email protected]b3fb8092009-03-12 19:09:24182 # Override chromium_mac_pch and set it to 0 to suppress the use of
183 # precompiled headers on the Mac. Prefix header injection may still be
184 # used, but prefix headers will not be precompiled. This is useful when
185 # using distcc to distribute a build to compile slaves that don't
186 # share the same compiler executable as the system driving the compilation,
187 # because precompiled headers rely on pointers into a specific compiler
188 # executable's image. Setting this to 0 is needed to use an experimental
189 # Linux-Mac cross compiler distcc farm.
190 'chromium_mac_pch%': 1,
191
[email protected]3224dcd2009-09-16 17:31:25192 # Mac OS X SDK and deployment target support.
193 # The SDK identifies the version of the system headers that will be used,
194 # and corresponds to the MAC_OS_X_VERSION_MAX_ALLOWED compile-time macro.
195 # "Maximum allowed" refers to the operating system version whose APIs are
196 # available in the headers.
197 # The deployment target identifies the minimum system version that the
198 # built products are expected to function on. It corresponds to the
199 # MAC_OS_X_VERSION_MIN_REQUIRED compile-time macro.
200 # To ensure these macros are available, #include <AvailabilityMacros.h>.
201 # Additional documentation on these macros is available at
202 # http://developer.apple.com/mac/library/technotes/tn2002/tn2064.html#SECTION3
203 # Chrome normally builds with the Mac OS X 10.5 SDK and sets the
204 # deployment target to 10.5. Other projects, such as O3D, may override
205 # these defaults.
206 'mac_sdk%': '10.5',
207 'mac_deployment_target%': '10.5',
[email protected]9543af052009-09-15 22:42:59208
[email protected]f5ecbba12009-04-03 04:35:18209 # Set to 1 to enable code coverage. In addition to build changes
210 # (e.g. extra CFLAGS), also creates a new target in the src/chrome
211 # project file called "coverage".
212 # Currently ignored on Windows.
213 'coverage%': 0,
[email protected]653bd5f032009-04-08 12:55:49214
[email protected]c61f6432009-04-22 01:16:42215 # Overridable specification for potential use of alternative
216 # JavaScript engines.
217 'javascript_engine%': 'v8',
218
[email protected]7477ea6f2009-12-22 23:28:15219 # Although base/allocator lets you select a heap library via an
[email protected]7e0d664a2009-12-03 21:07:47220 # environment variable, the libcmt shim it uses sometimes gets in
221 # the way. To disable it entirely, and switch to normal msvcrt, do e.g.
222 # 'win_use_allocator_shim': 0,
223 # 'win_release_RuntimeLibrary': 2
224 # to ~/.gyp/include.gypi, gclient runhooks --force, and do a release build.
[email protected]8974e042010-06-21 18:06:52225 'win_use_allocator_shim%': 1, # 1 = shim allocator via libcmt; 0 = msvcrt
[email protected]279cd4212009-09-11 22:32:11226
[email protected]95ff8082009-11-13 22:21:01227 # Whether usage of OpenMAX is enabled.
228 'enable_openmax%': 0,
229
[email protected]d01120e62010-05-10 17:04:48230 # Whether proprietary audio/video codecs are assumed to be included with
231 # this build (only meaningful if branding!=Chrome).
232 'proprietary_codecs%': 0,
233
[email protected]e5b2eaa2009-04-14 01:39:12234 # TODO(bradnelson): eliminate this when possible.
235 # To allow local gyp files to prevent release.vsprops from being included.
236 # Yes(1) means include release.vsprops.
237 # Once all vsprops settings are migrated into gyp, this can go away.
238 'msvs_use_common_release%': 1,
[email protected]606116d22009-05-06 22:38:23239
[email protected]cbd5fd52009-08-26 00:14:27240 # TODO(bradnelson): eliminate this when possible.
241 # To allow local gyp files to override additional linker options for msvs.
242 # Yes(1) means set use the common linker options.
[email protected]48c7af72009-07-03 22:00:19243 'msvs_use_common_linker_extras%': 1,
244
[email protected]1ffb6502009-06-02 07:46:24245 # TODO(sgk): eliminate this if possible.
246 # It would be nicer to support this via a setting in 'target_defaults'
247 # in chrome/app/locales/locales.gypi overriding the setting in the
248 # 'Debug' configuration in the 'target_defaults' dict below,
249 # but that doesn't work as we'd like.
250 'msvs_debug_link_incremental%': '2',
251
[email protected]573136142009-07-15 22:48:37252 # This is the location of the sandbox binary. Chrome looks for this before
253 # running the zygote process. If found, and SUID, it will be used to
254 # sandbox the zygote process and, thus, all renderer processes.
255 'linux_sandbox_path%': '',
256
[email protected]ad6d2c42009-09-15 20:13:38257 # Set this to true to enable SELinux support.
258 'selinux%': 0,
[email protected]4c9cc6c2009-10-01 18:54:57259
[email protected]58680ce2010-09-18 00:09:15260 # Set this to true when building with Clang.
261 # See http://code.google.com/p/chromium/wiki/Clang for details.
262 # TODO: eventually clang should behave identically to gcc, and this
263 # won't be necessary.
264 'clang%': 0,
265
[email protected]36532f332010-08-25 00:22:01266 # Override whether we should use Breakpad on Linux. I.e. for Chrome bot.
267 'linux_breakpad%': 0,
268 # And if we want to dump symbols for Breakpad-enabled builds.
269 'linux_dump_symbols%': 0,
270 # And if we want to strip the binary after dumping symbols.
[email protected]05cb6962009-10-01 23:29:03271 'linux_strip_binary%': 0,
[email protected]1d87c282010-09-15 22:24:49272 # Strip the test binaries needed for Linux reliability tests.
273 'linux_strip_reliability_tests%': 0,
[email protected]05cb6962009-10-01 23:29:03274
[email protected]46ce5b562010-06-16 18:39:53275 # Enable TCMalloc.
276 'linux_use_tcmalloc%': 1,
[email protected]01699e22009-11-11 19:24:24277
[email protected]39ca7de2010-04-16 08:04:03278 # Disable TCMalloc's debugallocation.
279 'linux_use_debugallocation%': 0,
280
[email protected]d8b60602010-03-26 09:41:22281 # Disable TCMalloc's heapchecker.
282 'linux_use_heapchecker%': 0,
283
[email protected]64e2d4a42010-08-27 10:13:21284 # Disable shadow stack keeping used by heapcheck to unwind the stacks
285 # better.
286 'linux_keep_shadow_stacks%': 0,
287
[email protected]6def64a2010-10-28 20:40:34288 # Set to 1 to turn on seccomp sandbox by default.
289 # (Note: this is ignored for official builds.)
290 'linux_use_seccomp_sandbox%': 0,
[email protected]39c4e1a82010-03-30 19:47:41291
[email protected]556c5d72010-06-10 05:45:01292 # Set to 1 to link against libgnome-keyring instead of using dlopen().
293 'linux_link_gnome_keyring%': 0,
294
[email protected]d8c7cbcc2009-10-02 19:00:31295 # Used to disable Native Client at compile time, for platforms where it
296 # isn't supported
297 'disable_nacl%': 0,
298
[email protected]77c1b29392009-12-04 06:21:29299 # Set Thumb compilation flags.
300 'arm_thumb%': 0,
301
[email protected]53e0f642010-03-05 01:41:56302 # Set ARM fpu compilation flags (only meaningful if armv7==1 and
303 # arm_neon==0).
304 'arm_fpu%': 'vfpv3',
305
[email protected]9821d0d2010-04-16 22:40:37306 # Enable new NPDevice API.
307 'enable_new_npdevice_api%': 0,
[email protected]ed154592010-04-29 00:18:50308
309 # Enable EGLImage support in OpenMAX
310 'enable_eglimage%': 0,
311
[email protected]6f51b27e2010-06-22 20:43:53312 # Enable a variable used elsewhere throughout the GYP files to determine
313 # whether to compile in the sources for the GPU plugin / process.
314 'enable_gpu%': 1,
315
[email protected]6de53d42010-11-09 07:33:19316 # Use GConf, the GNOME configuration system.
317 'use_gconf%': 1,
318
[email protected]32e1dee2010-12-09 18:36:24319 # Use OpenSSL instead of NSS. Under development: see http://crbug.com/62803
[email protected]d518cd92010-09-29 12:27:44320 'use_openssl%': 0,
321
[email protected]e72e55b2011-01-06 22:19:30322 # .gyp files or targets should set chromium_code to 1 if they build
323 # Chromium-specific code, as opposed to external code. This variable is
324 # used to control such things as the set of warnings to enable, and
325 # whether warnings are treated as errors.
326 'chromium_code%': 0,
327
328 # Set to 1 to compile with the built in pdf viewer.
329 'internal_pdf%': 0,
330
331 # This allows to use libcros from the current system, ie. /usr/lib/
332 # The cros_api will be pulled in as a static library, and all headers
333 # from the system include dirs.
[email protected]bb6aba32011-01-07 19:04:43334 'system_libcros%': 0,
[email protected]e72e55b2011-01-06 22:19:30335
336 # Remoting compilation is enabled by default. Set to 0 to disable.
337 'remoting%': 1,
338
339 # NOTE: When these end up in the Mac bundle, we need to replace '-' for '_'
340 # so Cocoa is happy (http://crbug.com/20441).
341 'locales': [
342 'am', 'ar', 'bg', 'bn', 'ca', 'cs', 'da', 'de', 'el', 'en-GB',
343 'en-US', 'es-419', 'es', 'et', 'fa', 'fi', 'fil', 'fr', 'gu', 'he',
344 'hi', 'hr', 'hu', 'id', 'it', 'ja', 'kn', 'ko', 'lt', 'lv',
345 'ml', 'mr', 'nb', 'nl', 'pl', 'pt-BR', 'pt-PT', 'ro', 'ru',
346 'sk', 'sl', 'sr', 'sv', 'sw', 'ta', 'te', 'th', 'tr', 'uk',
347 'vi', 'zh-CN', 'zh-TW',
348 ],
349
[email protected]bb6aba32011-01-07 19:04:43350 'grit_defines': [],
351
[email protected]29c2daea2011-01-05 20:38:50352 # Use Harfbuzz-NG instead of Harfbuzz.
353 # Under development: http://crbug.com/68551
354 'use_harfbuzz_ng%': 0,
355
[email protected]912c55c2009-07-31 23:33:55356 'conditions': [
[email protected]47deeb62009-12-17 14:49:39357 ['OS=="linux" or OS=="freebsd" or OS=="openbsd"', {
[email protected]242a9e62009-11-03 17:32:10358 # This will set gcc_version to XY if you are running gcc X.Y.*.
359 # This is used to tweak build flags for gcc 4.4.
360 'gcc_version%': '<!(python <(DEPTH)/build/compiler_version.py)',
[email protected]4d83eb72010-03-04 16:42:23361 # Figure out the python architecture to decide if we build pyauto.
[email protected]efd68462010-03-04 17:07:54362 'python_arch%': '<!(<(DEPTH)/build/linux/python_arch.sh <(sysroot)/usr/lib/libpython<(python_ver).so.1.0)',
[email protected]cbd5fd52009-08-26 00:14:27363 'conditions': [
[email protected]2a77a9d2010-08-26 19:58:10364 ['branding=="Chrome"', {
[email protected]cbd5fd52009-08-26 00:14:27365 'linux_breakpad%': 1,
[email protected]cbd5fd52009-08-26 00:14:27366 }],
[email protected]4c9cc6c2009-10-01 18:54:57367 # All Chrome builds have breakpad symbols, but only process the
368 # symbols from official builds.
[email protected]c913cb82010-08-31 19:44:08369 ['(branding=="Chrome" and buildtype=="Official")', {
[email protected]4c9cc6c2009-10-01 18:54:57370 'linux_dump_symbols%': 1,
[email protected]4c9cc6c2009-10-01 18:54:57371 }],
[email protected]cbd5fd52009-08-26 00:14:27372 ],
[email protected]47deeb62009-12-17 14:49:39373 }], # OS=="linux" or OS=="freebsd" or OS=="openbsd"
[email protected]bb6aba32011-01-07 19:04:43374
[email protected]e14a9f92009-08-05 19:26:07375 ['OS=="mac"', {
[email protected]e14a9f92009-08-05 19:26:07376 'conditions': [
377 # mac_product_name is set to the name of the .app bundle as it should
378 # appear on disk. This duplicates data from
379 # chrome/app/theme/chromium/BRANDING and
380 # chrome/app/theme/google_chrome/BRANDING, but is necessary to get
381 # these names into the build system.
382 ['branding=="Chrome"', {
383 'mac_product_name%': 'Google Chrome',
384 }, { # else: branding!="Chrome"
385 'mac_product_name%': 'Chromium',
386 }],
387
388 # Feature variables for enabling Mac Breakpad and Keystone auto-update
389 # support. Both features are on by default in official builds with
390 # Chrome branding.
391 ['branding=="Chrome" and buildtype=="Official"', {
392 'mac_breakpad%': 1,
393 'mac_keystone%': 1,
394 }, { # else: branding!="Chrome" or buildtype!="Official"
395 'mac_breakpad%': 0,
396 'mac_keystone%': 0,
397 }],
398 ],
399 }], # OS=="mac"
[email protected]bb6aba32011-01-07 19:04:43400
[email protected]912c55c2009-07-31 23:33:55401 # Whether to use multiple cores to compile with visual studio. This is
402 # optional because it sometimes causes corruption on VS 2005.
403 # It is on by default on VS 2008 and off on VS 2005.
404 ['OS=="win"', {
405 'conditions': [
[email protected]8974e042010-06-21 18:06:52406 ['component=="shared_library"', {
407 'win_use_allocator_shim%': 0,
408 }],
[email protected]912c55c2009-07-31 23:33:55409 ['MSVS_VERSION=="2005"', {
[email protected]669795372009-08-14 17:51:13410 'msvs_multi_core_compile%': 0,
[email protected]912c55c2009-07-31 23:33:55411 },{
412 'msvs_multi_core_compile%': 1,
413 }],
[email protected]10bb8c92009-08-07 21:16:03414 # Don't do incremental linking for large modules on 32-bit.
415 ['MSVS_OS_BITS==32', {
416 'msvs_large_module_debug_link_mode%': '1', # No
417 },{
418 'msvs_large_module_debug_link_mode%': '2', # Yes
419 }],
[email protected]912c55c2009-07-31 23:33:55420 ],
[email protected]ef4fa4072009-12-04 22:46:50421 'nacl_win64_defines': [
422 # This flag is used to minimize dependencies when building
423 # Native Client loader for 64-bit Windows.
424 'NACL_WIN64',
425 ],
[email protected]912c55c2009-07-31 23:33:55426 }],
[email protected]bb6aba32011-01-07 19:04:43427
[email protected]6df3ebf2010-10-29 20:30:38428 ['OS=="mac" or (OS=="linux" and chromeos==0 and target_arch!="arm")', {
[email protected]8e553f42010-10-25 20:05:44429 'use_cups%': 1,
430 }, {
431 'use_cups%': 0,
432 }],
[email protected]bb6aba32011-01-07 19:04:43433
[email protected]19fe8f0b2010-12-07 07:27:27434 # Set the relative path from this file to the GYP file of the JPEG
435 # library used by Chromium.
436 ['use_libjpeg_turbo==1', {
437 'libjpeg_gyp_path': '../third_party/libjpeg_turbo/libjpeg.gyp',
438 }, {
439 'libjpeg_gyp_path': '../third_party/libjpeg/libjpeg.gyp',
440 }], # use_libjpeg_turbo==1
[email protected]bb6aba32011-01-07 19:04:43441
442 # Setup -D flags passed into grit.
443 ['chromeos==1', {
444 'grit_defines': ['-D', 'chromeos'],
445 }],
446 ['toolkit_views==1', {
447 'grit_defines': ['-D', 'toolkit_views'],
448 }],
449 ['touchui==1', {
450 'grit_defines': ['-D', 'touchui'],
451 }],
452 ['use_titlecase_in_grd_files==1', {
453 'grit_defines': ['-D', 'use_titlecase'],
454 }],
[email protected]912c55c2009-07-31 23:33:55455 ],
[email protected]2f80c312009-02-25 21:26:55456 },
457 'target_defaults': {
[email protected]1c966092009-08-20 21:19:26458 'variables': {
[email protected]a6e22132010-02-10 20:43:18459 # The condition that operates on chromium_code is in a target_conditions
460 # section, and will not have access to the default fallback value of
461 # chromium_code at the top of this file, or to the chromium_code
462 # variable placed at the root variables scope of .gyp files, because
463 # those variables are not set at target scope. As a workaround,
464 # if chromium_code is not set at target scope, define it in target scope
465 # to contain whatever value it has during early variable expansion.
466 # That's enough to make it available during target conditional
467 # processing.
468 'chromium_code%': '<(chromium_code)',
469
[email protected]7e0d664a2009-12-03 21:07:47470 # See http://gcc.gnu.org/onlinedocs/gcc-4.4.2/gcc/Optimize-Options.html
[email protected]d5d593a2009-08-28 23:23:29471 'mac_release_optimization%': '3', # Use -O3 unless overridden
[email protected]ffd984b12009-09-11 19:37:00472 'mac_debug_optimization%': '0', # Use -O0 unless overridden
[email protected]7e0d664a2009-12-03 21:07:47473 # See http://msdn.microsoft.com/en-us/library/aa652360(VS.71).aspx
474 'win_release_Optimization%': '2', # 2 = /Os
475 'win_debug_Optimization%': '0', # 0 = /Od
[email protected]6b0507b2010-05-07 07:41:21476 # See http://msdn.microsoft.com/en-us/library/8wtf2dfz(VS.71).aspx
477 'win_debug_RuntimeChecks%': '3', # 3 = all checks enabled, 0 = off
478 # See http://msdn.microsoft.com/en-us/library/47238hez(VS.71).aspx
[email protected]2ae6e022010-05-07 13:19:15479 'win_debug_InlineFunctionExpansion%': '', # empty = default, 0 = off,
480 'win_release_InlineFunctionExpansion%': '2', # 1 = only __inline, 2 = max
[email protected]fac10d12010-11-08 16:00:31481 # VS inserts quite a lot of extra checks to algorithms like
482 # std::partial_sort in Debug build which make them O(N^2)
483 # instead of O(N*logN). This is particularly slow under memory
484 # tools like ThreadSanitizer so we want it to be disablable.
485 # See http://msdn.microsoft.com/en-us/library/aa985982(v=VS.80).aspx
486 'win_debug_disable_iterator_debugging%': '0',
[email protected]7e0d664a2009-12-03 21:07:47487
[email protected]ffd984b12009-09-11 19:37:00488 'release_extra_cflags%': '',
489 'debug_extra_cflags%': '',
[email protected]92822e82009-09-18 14:26:56490 'release_valgrind_build%': 0,
[email protected]8974e042010-06-21 18:06:52491
492 'conditions': [
493 ['OS=="win" and component=="shared_library"', {
494 # See http://msdn.microsoft.com/en-us/library/aa652367.aspx
495 'win_release_RuntimeLibrary%': '2', # 2 = /MT (nondebug DLL)
496 'win_debug_RuntimeLibrary%': '3', # 3 = /MTd (debug DLL)
497 }, {
498 # See http://msdn.microsoft.com/en-us/library/aa652367.aspx
499 'win_release_RuntimeLibrary%': '0', # 0 = /MT (nondebug static)
500 'win_debug_RuntimeLibrary%': '1', # 1 = /MTd (debug static)
501 }],
502 ],
[email protected]1c966092009-08-20 21:19:26503 },
[email protected]32aa8cc2009-03-04 21:36:39504 'conditions': [
505 ['branding=="Chrome"', {
506 'defines': ['GOOGLE_CHROME_BUILD'],
507 }, { # else: branding!="Chrome"
508 'defines': ['CHROMIUM_BUILD'],
509 }],
[email protected]06c756182010-04-27 18:31:31510 ['toolkit_views==1', {
[email protected]e6970232009-05-12 23:51:17511 'defines': ['TOOLKIT_VIEWS=1'],
512 }],
[email protected]fdc5bed2010-01-09 01:16:57513 ['chromeos==1', {
[email protected]16779842009-07-08 23:45:29514 'defines': ['OS_CHROMEOS=1'],
[email protected]2b883b92009-06-02 22:57:50515 }],
[email protected]0094fbe2010-07-15 21:51:43516 ['touchui==1', {
517 'defines': ['TOUCH_UI=1'],
518 }],
[email protected]542bf24a2010-06-11 23:08:17519 ['remoting==1', {
520 'defines': ['ENABLE_REMOTING=1'],
[email protected]c0bac532010-06-11 00:39:00521 }],
[email protected]d01120e62010-05-10 17:04:48522 ['proprietary_codecs==1', {
523 'defines': ['USE_PROPRIETARY_CODECS'],
524 }],
[email protected]1b4209f2011-01-07 00:25:40525 ['enable_flapper_hacks==1', {
526 'defines': ['ENABLE_FLAPPER_HACKS=1'],
527 }],
[email protected]9c1949e2009-10-02 19:59:54528 ['fastbuild!=0', {
529 'conditions': [
[email protected]1cc2fa72010-07-03 08:49:24530 # For Windows, we don't genererate debug information.
[email protected]9c1949e2009-10-02 19:59:54531 ['OS=="win"', {
532 'msvs_settings': {
533 'VCLinkerTool': {
534 'GenerateDebugInformation': 'false',
535 },
536 'VCCLCompilerTool': {
537 'DebugInformationFormat': '0',
538 }
539 }
[email protected]1cc2fa72010-07-03 08:49:24540 }, { # else: OS != "win", generate less debug information.
541 'variables': {
542 'debug_extra_cflags': '-g1',
543 },
[email protected]37c84192010-04-14 21:37:40544 }],
[email protected]9c1949e2009-10-02 19:59:54545 ], # conditions for fastbuild.
546 }], # fastbuild!=0
[email protected]ad6d2c42009-09-15 20:13:38547 ['selinux==1', {
548 'defines': ['CHROMIUM_SELINUX=1'],
549 }],
[email protected]7e0d664a2009-12-03 21:07:47550 ['win_use_allocator_shim==0', {
551 'conditions': [
552 ['OS=="win"', {
553 'defines': ['NO_TCMALLOC'],
554 }],
555 ],
556 }],
[email protected]43f28f832010-02-03 02:28:48557 ['enable_gpu==1', {
[email protected]7477ea6f2009-12-22 23:28:15558 'defines': [
559 'ENABLE_GPU=1',
560 ],
561 }],
[email protected]b1c2a5542010-10-08 12:44:40562 ['use_openssl==1', {
563 'defines': [
564 'USE_OPENSSL=1',
565 ],
566 }],
[email protected]ed154592010-04-29 00:18:50567 ['enable_eglimage==1', {
568 'defines': [
569 'ENABLE_EGLIMAGE=1',
570 ],
571 }],
[email protected]f5ecbba12009-04-03 04:35:18572 ['coverage!=0', {
573 'conditions': [
574 ['OS=="mac"', {
575 'xcode_settings': {
[email protected]ab2956372009-08-13 18:11:04576 'GCC_INSTRUMENT_PROGRAM_FLOW_ARCS': 'YES', # -fprofile-arcs
577 'GCC_GENERATE_TEST_COVERAGE_FILES': 'YES', # -ftest-coverage
[email protected]5ae4f55e2009-04-13 23:19:47578 },
[email protected]e4fb84c2009-12-28 20:45:43579 # Add -lgcov for types executable, shared_library, and
[email protected]dc259ce52010-04-13 04:03:10580 # loadable_module; not for static_library.
[email protected]e4fb84c2009-12-28 20:45:43581 # This is a delayed conditional.
[email protected]f5ecbba12009-04-03 04:35:18582 'target_conditions': [
[email protected]e4fb84c2009-12-28 20:45:43583 ['_type!="static_library"', {
[email protected]f5ecbba12009-04-03 04:35:18584 'xcode_settings': { 'OTHER_LDFLAGS': [ '-lgcov' ] },
[email protected]5ae4f55e2009-04-13 23:19:47585 }],
586 ],
587 }],
[email protected]f5ecbba12009-04-03 04:35:18588 ['OS=="linux"', {
589 'cflags': [ '-ftest-coverage',
590 '-fprofile-arcs' ],
[email protected]7122ffd52009-04-30 23:19:00591 'link_settings': { 'libraries': [ '-lgcov' ] },
[email protected]f5ecbba12009-04-03 04:35:18592 }],
[email protected]e8f6ff42009-07-07 18:20:53593 # Finally, for Windows, we simply turn on profiling.
594 ['OS=="win"', {
595 'msvs_settings': {
596 'VCLinkerTool': {
597 'Profile': 'true',
598 },
[email protected]10bb8c92009-08-07 21:16:03599 'VCCLCompilerTool': {
[email protected]e8f6ff42009-07-07 18:20:53600 # /Z7, not /Zi, so coverage is happyb
601 'DebugInformationFormat': '1',
[email protected]1f9471a2010-01-04 06:40:16602 'AdditionalOptions': ['/Yd'],
[email protected]e8f6ff42009-07-07 18:20:53603 }
604 }
605 }], # OS==win
606 ], # conditions for coverage
607 }], # coverage!=0
[email protected]4e4d6042010-08-26 18:34:38608 ['OS=="win"', {
609 'defines': [
610 '__STD_C',
611 '_CRT_SECURE_NO_DEPRECATE',
612 '_SCL_SECURE_NO_DEPRECATE',
613 ],
614 'include_dirs': [
615 '<(DEPTH)/third_party/wtl/include',
616 ],
617 }], # OS==win
[email protected]a6e22132010-02-10 20:43:18618 ], # conditions for 'target_defaults'
619 'target_conditions': [
[email protected]c14d8e772010-02-09 22:06:15620 ['chromium_code==0', {
[email protected]d8543312010-02-10 17:43:28621 'conditions': [
622 [ 'OS=="linux" or OS=="freebsd" or OS=="openbsd"', {
623 'cflags!': [
624 '-Wall',
625 '-Wextra',
626 '-Werror',
627 ],
628 }],
629 [ 'OS=="win"', {
630 'defines': [
631 '_CRT_SECURE_NO_DEPRECATE',
632 '_CRT_NONSTDC_NO_WARNINGS',
633 '_CRT_NONSTDC_NO_DEPRECATE',
634 '_SCL_SECURE_NO_DEPRECATE',
635 ],
636 'msvs_disabled_warnings': [4800],
637 'msvs_settings': {
638 'VCCLCompilerTool': {
639 'WarnAsError': 'false',
640 'Detect64BitPortabilityProblems': 'false',
641 },
642 },
643 }],
644 [ 'OS=="mac"', {
645 'xcode_settings': {
646 'GCC_TREAT_WARNINGS_AS_ERRORS': 'NO',
[email protected]4c4c2e5332010-06-15 11:51:06647 'WARNING_CFLAGS!': ['-Wall', '-Wextra'],
[email protected]d8543312010-02-10 17:43:28648 },
649 }],
[email protected]c14d8e772010-02-09 22:06:15650 ],
651 }, {
652 # In Chromium code, we define __STDC_FORMAT_MACROS in order to get the
653 # C99 macros on Mac and Linux.
654 'defines': [
655 '__STDC_FORMAT_MACROS',
656 ],
657 'conditions': [
658 ['OS!="win"', {
[email protected]40519592010-11-16 15:23:30659 'sources/': [ ['exclude', '_win(_unittest)?\\.(h|cc)$'],
[email protected]a316ca532010-11-15 14:08:16660 ['exclude', '(^|/)win/'],
[email protected]40519592010-11-16 15:23:30661 ['exclude', '(^|/)win_[^/]*\\.(h|cc)$'] ],
[email protected]c14d8e772010-02-09 22:06:15662 }],
663 ['OS!="mac"', {
[email protected]40519592010-11-16 15:23:30664 'sources/': [ ['exclude', '_(cocoa|mac)(_unittest)?\\.(h|cc)$'],
[email protected]a316ca532010-11-15 14:08:16665 ['exclude', '(^|/)(cocoa|mac)/'],
666 ['exclude', '\\.mm?$' ] ],
[email protected]c14d8e772010-02-09 22:06:15667 }],
668 ['OS!="linux" and OS!="freebsd" and OS!="openbsd"', {
669 'sources/': [
[email protected]40519592010-11-16 15:23:30670 ['exclude', '_(chromeos|gtk|x|x11|xdg)(_unittest)?\\.(h|cc)$'],
[email protected]a316ca532010-11-15 14:08:16671 ['exclude', '(^|/)gtk/'],
[email protected]40519592010-11-16 15:23:30672 ['exclude', '(^|/)(gtk|x11)_[^/]*\\.(h|cc)$'],
[email protected]18cff3d2010-02-17 18:03:13673 ],
674 }],
675 ['OS!="linux"', {
676 'sources/': [
[email protected]40519592010-11-16 15:23:30677 ['exclude', '_linux(_unittest)?\\.(h|cc)$'],
[email protected]a316ca532010-11-15 14:08:16678 ['exclude', '(^|/)linux/'],
[email protected]18cff3d2010-02-17 18:03:13679 ],
[email protected]c14d8e772010-02-09 22:06:15680 }],
681 # We use "POSIX" to refer to all non-Windows operating systems.
682 ['OS=="win"', {
[email protected]40519592010-11-16 15:23:30683 'sources/': [ ['exclude', '_posix\\.(h|cc)$'] ],
[email protected]f55bd4862010-05-27 15:38:07684 # turn on warnings for signed/unsigned mismatch on chromium code.
685 'msvs_settings': {
686 'VCCLCompilerTool': {
687 'AdditionalOptions': ['/we4389'],
688 },
689 },
[email protected]c14d8e772010-02-09 22:06:15690 }],
[email protected]c14d8e772010-02-09 22:06:15691 ['chromeos!=1', {
[email protected]40519592010-11-16 15:23:30692 'sources/': [ ['exclude', '_chromeos\\.(h|cc)$'] ]
[email protected]c14d8e772010-02-09 22:06:15693 }],
[email protected]06c756182010-04-27 18:31:31694 ['toolkit_views==0', {
[email protected]40519592010-11-16 15:23:30695 'sources/': [ ['exclude', '_views\\.(h|cc)$'] ]
[email protected]c14d8e772010-02-09 22:06:15696 }],
697 ],
698 }],
[email protected]a6e22132010-02-10 20:43:18699 ], # target_conditions for 'target_defaults'
[email protected]2f80c312009-02-25 21:26:55700 'default_configuration': 'Debug',
701 'configurations': {
[email protected]5153767c2009-12-22 01:52:50702 # VCLinkerTool LinkIncremental values below:
703 # 0 == default
704 # 1 == /INCREMENTAL:NO
705 # 2 == /INCREMENTAL
706 # Debug links incremental, Release does not.
707 #
[email protected]7b99801e2010-11-03 17:26:23708 # Abstract base configurations to cover common attributes.
[email protected]5153767c2009-12-22 01:52:50709 #
710 'Common_Base': {
[email protected]bb05e452009-10-29 21:24:56711 'abstract': 1,
712 'msvs_configuration_attributes': {
713 'OutputDirectory': '$(SolutionDir)$(ConfigurationName)',
714 'IntermediateDirectory': '$(OutDir)\\obj\\$(ProjectName)',
715 'CharacterSet': '1',
716 },
[email protected]5153767c2009-12-22 01:52:50717 },
718 'x86_Base': {
719 'abstract': 1,
[email protected]ef4fa4072009-12-04 22:46:50720 'msvs_settings': {
721 'VCLinkerTool': {
722 'TargetMachine': '1',
723 },
724 },
[email protected]2fa40782009-11-01 21:17:34725 'msvs_configuration_platform': 'Win32',
[email protected]bb05e452009-10-29 21:24:56726 },
[email protected]5153767c2009-12-22 01:52:50727 'x64_Base': {
728 'abstract': 1,
729 'msvs_configuration_platform': 'x64',
730 'msvs_settings': {
731 'VCLinkerTool': {
732 'TargetMachine': '17', # x86 - 64
[email protected]5153767c2009-12-22 01:52:50733 'AdditionalLibraryDirectories!':
734 ['<(DEPTH)/third_party/platformsdk_win7/files/Lib'],
735 'AdditionalLibraryDirectories':
736 ['<(DEPTH)/third_party/platformsdk_win7/files/Lib/x64'],
737 },
[email protected]d26b4418ab2010-03-24 22:06:35738 'VCLibrarianTool': {
[email protected]5153767c2009-12-22 01:52:50739 'AdditionalLibraryDirectories!':
740 ['<(DEPTH)/third_party/platformsdk_win7/files/Lib'],
741 'AdditionalLibraryDirectories':
742 ['<(DEPTH)/third_party/platformsdk_win7/files/Lib/x64'],
743 },
744 },
745 'defines': [
746 # Not sure if tcmalloc works on 64-bit Windows.
747 'NO_TCMALLOC',
748 ],
749 },
750 'Debug_Base': {
751 'abstract': 1,
[email protected]ee857512010-05-14 08:24:42752 'defines': ['DYNAMIC_ANNOTATIONS_ENABLED=1'],
[email protected]1c966092009-08-20 21:19:26753 'xcode_settings': {
754 'COPY_PHASE_STRIP': 'NO',
[email protected]d5d593a2009-08-28 23:23:29755 'GCC_OPTIMIZATION_LEVEL': '<(mac_debug_optimization)',
[email protected]bd232ac2009-10-21 02:23:53756 'OTHER_CFLAGS': [ '<@(debug_extra_cflags)', ],
[email protected]1c966092009-08-20 21:19:26757 },
[email protected]bb05e452009-10-29 21:24:56758 'msvs_settings': {
759 'VCCLCompilerTool': {
[email protected]7e0d664a2009-12-03 21:07:47760 'Optimization': '<(win_debug_Optimization)',
[email protected]bb05e452009-10-29 21:24:56761 'PreprocessorDefinitions': ['_DEBUG'],
[email protected]6b0507b2010-05-07 07:41:21762 'BasicRuntimeChecks': '<(win_debug_RuntimeChecks)',
[email protected]7e0d664a2009-12-03 21:07:47763 'RuntimeLibrary': '<(win_debug_RuntimeLibrary)',
[email protected]2ae6e022010-05-07 13:19:15764 'conditions': [
765 # According to MSVS, InlineFunctionExpansion=0 means
766 # "default inlining", not "/Ob0".
767 # Thus, we have to handle InlineFunctionExpansion==0 separately.
768 ['win_debug_InlineFunctionExpansion==0', {
769 'AdditionalOptions': ['/Ob0'],
770 }],
771 ['win_debug_InlineFunctionExpansion!=""', {
772 'InlineFunctionExpansion':
773 '<(win_debug_InlineFunctionExpansion)',
774 }],
[email protected]fac10d12010-11-08 16:00:31775 ['win_debug_disable_iterator_debugging==1', {
776 'PreprocessorDefinitions': ['_HAS_ITERATOR_DEBUGGING=0'],
777 }],
[email protected]2ae6e022010-05-07 13:19:15778 ],
[email protected]bb05e452009-10-29 21:24:56779 },
780 'VCLinkerTool': {
781 'LinkIncremental': '<(msvs_debug_link_incremental)',
782 },
783 'VCResourceCompilerTool': {
784 'PreprocessorDefinitions': ['_DEBUG'],
785 },
786 },
[email protected]2f80c312009-02-25 21:26:55787 'conditions': [
[email protected]bb05e452009-10-29 21:24:56788 ['OS=="linux"', {
789 'cflags': [
790 '<@(debug_extra_cflags)',
791 ],
[email protected]2f80c312009-02-25 21:26:55792 }],
793 ],
794 },
[email protected]5153767c2009-12-22 01:52:50795 'Release_Base': {
796 'abstract': 1,
[email protected]2f80c312009-02-25 21:26:55797 'defines': [
798 'NDEBUG',
799 ],
[email protected]1c966092009-08-20 21:19:26800 'xcode_settings': {
801 'DEAD_CODE_STRIPPING': 'YES', # -Wl,-dead_strip
802 'GCC_OPTIMIZATION_LEVEL': '<(mac_release_optimization)',
[email protected]ffd984b12009-09-11 19:37:00803 'OTHER_CFLAGS': [ '<@(release_extra_cflags)', ],
[email protected]1c966092009-08-20 21:19:26804 },
[email protected]bb05e452009-10-29 21:24:56805 'msvs_settings': {
[email protected]7e0d664a2009-12-03 21:07:47806 'VCCLCompilerTool': {
807 'Optimization': '<(win_release_Optimization)',
808 'RuntimeLibrary': '<(win_release_RuntimeLibrary)',
[email protected]2ae6e022010-05-07 13:19:15809 'conditions': [
810 # According to MSVS, InlineFunctionExpansion=0 means
811 # "default inlining", not "/Ob0".
812 # Thus, we have to handle InlineFunctionExpansion==0 separately.
813 ['win_release_InlineFunctionExpansion==0', {
814 'AdditionalOptions': ['/Ob0'],
815 }],
816 ['win_release_InlineFunctionExpansion!=""', {
817 'InlineFunctionExpansion':
818 '<(win_release_InlineFunctionExpansion)',
819 }],
820 ],
[email protected]7e0d664a2009-12-03 21:07:47821 },
[email protected]bb05e452009-10-29 21:24:56822 'VCLinkerTool': {
823 'LinkIncremental': '1',
824 },
825 },
[email protected]2f80c312009-02-25 21:26:55826 'conditions': [
[email protected]92822e82009-09-18 14:26:56827 ['release_valgrind_build==0', {
[email protected]ee857512010-05-14 08:24:42828 'defines': ['NVALGRIND', 'DYNAMIC_ANNOTATIONS_ENABLED=0'],
829 }, {
830 'defines': ['DYNAMIC_ANNOTATIONS_ENABLED=1'],
[email protected]92822e82009-09-18 14:26:56831 }],
[email protected]7e0d664a2009-12-03 21:07:47832 ['win_use_allocator_shim==0', {
833 'defines': ['NO_TCMALLOC'],
834 }],
[email protected]bb05e452009-10-29 21:24:56835 ['OS=="linux"', {
836 'cflags': [
[email protected]ffd984b12009-09-11 19:37:00837 '<@(release_extra_cflags)',
[email protected]bb05e452009-10-29 21:24:56838 ],
839 }],
[email protected]2f80c312009-02-25 21:26:55840 ],
841 },
[email protected]5153767c2009-12-22 01:52:50842 'Purify_Base': {
843 'abstract': 1,
844 'defines': [
845 'PURIFY',
846 'NO_TCMALLOC',
847 ],
848 'msvs_settings': {
849 'VCCLCompilerTool': {
850 'Optimization': '0',
851 'RuntimeLibrary': '0',
852 'BufferSecurityCheck': 'false',
853 },
854 'VCLinkerTool': {
855 'EnableCOMDATFolding': '1',
856 'LinkIncremental': '1',
857 },
858 },
859 },
860 #
861 # Concrete configurations
862 #
863 'Debug': {
864 'inherit_from': ['Common_Base', 'x86_Base', 'Debug_Base'],
865 },
866 'Release': {
867 'inherit_from': ['Common_Base', 'x86_Base', 'Release_Base'],
868 'conditions': [
869 ['msvs_use_common_release', {
[email protected]1f9471a2010-01-04 06:40:16870 'includes': ['release.gypi'],
[email protected]5153767c2009-12-22 01:52:50871 }],
872 ]
873 },
[email protected]f926fa0a2009-08-04 22:50:13874 'conditions': [
875 [ 'OS=="win"', {
876 # TODO(bradnelson): add a gyp mechanism to make this more graceful.
877 'Purify': {
[email protected]5153767c2009-12-22 01:52:50878 'inherit_from': ['Common_Base', 'x86_Base', 'Release_Base', 'Purify'],
[email protected]ef4fa4072009-12-04 22:46:50879 },
880 'Debug_x64': {
[email protected]5153767c2009-12-22 01:52:50881 'inherit_from': ['Common_Base', 'x64_Base', 'Debug_Base'],
[email protected]78263c12009-11-01 23:45:30882 },
883 'Release_x64': {
[email protected]5153767c2009-12-22 01:52:50884 'inherit_from': ['Common_Base', 'x64_Base', 'Release_Base'],
[email protected]78263c12009-11-01 23:45:30885 },
886 'Purify_x64': {
[email protected]1f9471a2010-01-04 06:40:16887 'inherit_from': ['Common_Base', 'x64_Base', 'Release_Base', 'Purify_Base'],
[email protected]78263c12009-11-01 23:45:30888 },
[email protected]f926fa0a2009-08-04 22:50:13889 }],
890 ],
[email protected]2f80c312009-02-25 21:26:55891 },
892 },
893 'conditions': [
[email protected]93f21e42010-04-01 00:35:15894 ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris"', {
[email protected]9d384032009-03-20 23:13:26895 'target_defaults': {
[email protected]5315f2842009-04-28 00:43:27896 # Enable -Werror by default, but put it in a variable so it can
897 # be disabled in ~/.gyp/include.gypi on the valgrind builders.
898 'variables': {
[email protected]ecf52cb82010-01-13 19:25:42899 # Use -fno-strict-aliasing by default since gcc 4.4 has periodic
900 # issues that slip through the cracks. We could do this just for
901 # gcc 4.4 but it makes more sense to be consistent on all
902 # compilers in use. TODO(Craig): turn this off again when
903 # there is some 4.4 test infrastructure in place and existing
904 # aliasing issues have been fixed.
905 'no_strict_aliasing%': 1,
[email protected]47deeb62009-12-17 14:49:39906 'conditions': [['OS=="linux"', {'werror%': '-Werror',}],
907 ['OS=="freebsd"', {'werror%': '',}],
908 ['OS=="openbsd"', {'werror%': '',}],
909 ],
[email protected]5315f2842009-04-28 00:43:27910 },
[email protected]9d384032009-03-20 23:13:26911 'cflags': [
[email protected]1bba09c2009-08-13 12:53:16912 '<(werror)', # See note above about the werror variable.
913 '-pthread',
914 '-fno-exceptions',
915 '-Wall',
[email protected]0fa17082010-03-26 00:48:05916 # TODO(evan): turn this back on once all the builds work.
917 # '-Wextra',
[email protected]225c8f52010-02-05 22:23:20918 # Don't warn about unused function params. We use those everywhere.
919 '-Wno-unused-parameter',
920 # Don't warn about the "struct foo f = {0};" initialization pattern.
921 '-Wno-missing-field-initializers',
[email protected]1bba09c2009-08-13 12:53:16922 '-D_FILE_OFFSET_BITS=64',
[email protected]3df6e3a2010-01-21 20:23:12923 # Don't export any symbols (for example, to plugins we dlopen()).
924 # Note: this is *required* to make some plugins work.
925 '-fvisibility=hidden',
[email protected]7ca6ce12010-09-15 23:39:35926 '-pipe',
[email protected]8a2fcba2009-07-29 00:52:24927 ],
928 'cflags_cc': [
[email protected]832d0212009-10-28 19:12:22929 '-fno-rtti',
[email protected]8a2fcba2009-07-29 00:52:24930 '-fno-threadsafe-statics',
[email protected]f5986c42009-11-17 18:39:36931 # Make inline functions have hidden visiblity by default.
932 # Surprisingly, not covered by -fvisibility=hidden.
933 '-fvisibility-inlines-hidden',
[email protected]9d384032009-03-20 23:13:26934 ],
[email protected]a6cf87e2009-04-03 04:07:38935 'ldflags': [
[email protected]138241f2010-03-30 23:53:10936 '-pthread', '-Wl,-z,noexecstack',
[email protected]9d384032009-03-20 23:13:26937 ],
[email protected]3aacaf952009-04-02 15:34:09938 'configurations': {
[email protected]5153767c2009-12-22 01:52:50939 'Debug_Base': {
[email protected]c5bdc032009-04-20 19:11:31940 'variables': {
941 'debug_optimize%': '0',
942 },
[email protected]3aacaf952009-04-02 15:34:09943 'defines': [
944 '_DEBUG',
945 ],
946 'cflags': [
[email protected]22898f62009-10-26 22:14:01947 '-O>(debug_optimize)',
[email protected]3aacaf952009-04-02 15:34:09948 '-g',
949 ],
[email protected]5315f2842009-04-28 00:43:27950 },
[email protected]5153767c2009-12-22 01:52:50951 'Release_Base': {
[email protected]740e2de2009-07-21 11:41:01952 'variables': {
953 'release_optimize%': '2',
[email protected]1dd529642010-05-15 01:02:51954 # Binaries become big and gold is unable to perform GC
955 # and remove unused sections for some of test targets
956 # on 32 bit platform.
957 # (This is currently observed only in chromeos valgrind bots)
958 # The following flag is to disable --gc-sections linker
959 # option for these bots.
960 'no_gc_sections%': 0,
[email protected]740e2de2009-07-21 11:41:01961 },
[email protected]3aacaf952009-04-02 15:34:09962 'cflags': [
[email protected]22898f62009-10-26 22:14:01963 '-O>(release_optimize)',
[email protected]d8cc3a62009-04-08 18:29:53964 # Don't emit the GCC version ident directives, they just end up
965 # in the .comment section taking up binary size.
966 '-fno-ident',
967 # Put data and code in their own sections, so that unused symbols
968 # can be removed at link time with --gc-sections.
969 '-fdata-sections',
970 '-ffunction-sections',
[email protected]3aacaf952009-04-02 15:34:09971 ],
[email protected]c902f2c2010-08-06 20:04:18972 'ldflags': [
973 # Specifically tell the linker to perform optimizations.
974 # See http://lwn.net/Articles/192624/ .
975 '-Wl,-O1',
[email protected]27c2e492010-08-06 22:55:22976 '-Wl,--as-needed',
[email protected]c902f2c2010-08-06 20:04:18977 ],
[email protected]1dd529642010-05-15 01:02:51978 'conditions' : [
979 ['no_gc_sections==0', {
980 'ldflags': [
981 '-Wl,--gc-sections',
982 ],
983 }],
[email protected]ecf7b6482010-10-13 09:15:20984 ['clang==1', {
985 'cflags!': [
986 '-fno-ident',
987 ],
988 }],
[email protected]1dd529642010-05-15 01:02:51989 ]
[email protected]3aacaf952009-04-02 15:34:09990 },
991 },
[email protected]601b540222009-04-03 21:32:04992 'variants': {
993 'coverage': {
994 'cflags': ['-fprofile-arcs', '-ftest-coverage'],
995 'ldflags': ['-fprofile-arcs'],
996 },
997 'profile': {
998 'cflags': ['-pg', '-g'],
999 'ldflags': ['-pg'],
1000 },
1001 'symbols': {
1002 'cflags': ['-g'],
1003 },
1004 },
[email protected]606116d22009-05-06 22:38:231005 'conditions': [
[email protected]7e8eb7612009-07-29 15:56:001006 [ 'target_arch=="ia32"', {
[email protected]606116d22009-05-06 22:38:231007 'asflags': [
1008 # Needed so that libs with .s files (e.g. libicudata.a)
1009 # are compatible with the general 32-bit-ness.
1010 '-32',
1011 ],
1012 # All floating-point computations on x87 happens in 80-bit
1013 # precision. Because the C and C++ language standards allow
1014 # the compiler to keep the floating-point values in higher
1015 # precision than what's specified in the source and doing so
1016 # is more efficient than constantly rounding up to 64-bit or
1017 # 32-bit precision as specified in the source, the compiler,
1018 # especially in the optimized mode, tries very hard to keep
1019 # values in x87 floating-point stack (in 80-bit precision)
1020 # as long as possible. This has important side effects, that
1021 # the real value used in computation may change depending on
1022 # how the compiler did the optimization - that is, the value
1023 # kept in 80-bit is different than the value rounded down to
1024 # 64-bit or 32-bit. There are possible compiler options to make
1025 # this behavior consistent (e.g. -ffloat-store would keep all
1026 # floating-values in the memory, thus force them to be rounded
1027 # to its original precision) but they have significant runtime
1028 # performance penalty.
1029 #
1030 # -mfpmath=sse -msse2 makes the compiler use SSE instructions
1031 # which keep floating-point values in SSE registers in its
1032 # native precision (32-bit for single precision, and 64-bit for
1033 # double precision values). This means the floating-point value
1034 # used during computation does not change depending on how the
1035 # compiler optimized the code, since the value is always kept
1036 # in its specified precision.
[email protected]ffde7932009-05-29 00:39:061037 'conditions': [
[email protected]ac120ff2010-04-28 02:14:221038 ['branding=="Chromium" and disable_sse2==0', {
[email protected]ffde7932009-05-29 00:39:061039 'cflags': [
1040 '-march=pentium4',
1041 '-msse2',
1042 '-mfpmath=sse',
1043 ],
1044 }],
[email protected]06c756182010-04-27 18:31:311045 # ChromeOS targets Pinetrail, which is sse3, but most of the
[email protected]0183dbb2010-04-16 02:00:441046 # benefit comes from sse2 so this setting allows ChromeOS
1047 # to build on other CPUs. In the future -march=atom would help
1048 # but requires a newer compiler.
[email protected]ac120ff2010-04-28 02:14:221049 ['chromeos==1 and disable_sse2==0', {
[email protected]0183dbb2010-04-16 02:00:441050 'cflags': [
1051 '-msse2',
1052 ],
1053 }],
[email protected]34799f9d2010-07-08 17:51:331054 # Install packages have started cropping up with
1055 # different headers between the 32-bit and 64-bit
1056 # versions, so we have to shadow those differences off
1057 # and make sure a 32-bit-on-64-bit build picks up the
1058 # right files.
1059 ['host_arch!="ia32"', {
1060 'include_dirs+': [
1061 '/usr/include32',
1062 ],
1063 }],
[email protected]ffde7932009-05-29 00:39:061064 ],
[email protected]dc259ce52010-04-13 04:03:101065 # -mmmx allows mmintrin.h to be used for mmx intrinsics.
1066 # video playback is mmx and sse2 optimized.
[email protected]606116d22009-05-06 22:38:231067 'cflags': [
1068 '-m32',
[email protected]dc259ce52010-04-13 04:03:101069 '-mmmx',
[email protected]1c6560af2009-07-14 11:02:161070 ],
[email protected]606116d22009-05-06 22:38:231071 'ldflags': [
1072 '-m32',
1073 ],
1074 }],
[email protected]3dda8a962009-08-10 18:58:071075 ['target_arch=="arm"', {
[email protected]77c1b29392009-12-04 06:21:291076 'target_conditions': [
1077 ['_toolset=="target"', {
1078 'cflags_cc': [
1079 # The codesourcery arm-2009q3 toolchain warns at that the ABI
1080 # has changed whenever it encounters a varargs function. This
1081 # silences those warnings, as they are not helpful and
1082 # clutter legitimate warnings.
1083 '-Wno-abi',
1084 ],
1085 'conditions': [
1086 ['arm_thumb == 1', {
1087 'cflags': [
1088 '-mthumb',
1089 # TODO(piman): -Wa,-mimplicit-it=thumb is needed for
1090 # inline assembly that uses condition codes but it's
1091 # suboptimal. Better would be to #ifdef __thumb__ at the
1092 # right place and have a separate thumb path.
1093 '-Wa,-mimplicit-it=thumb',
1094 ]
1095 }],
1096 ['armv7==1', {
[email protected]dc9711f2009-11-13 19:30:251097 'cflags': [
1098 '-march=armv7-a',
1099 '-mtune=cortex-a8',
[email protected]dc9711f2009-11-13 19:30:251100 '-mfloat-abi=softfp',
1101 ],
[email protected]eafc0b452010-02-26 21:53:431102 'conditions': [
1103 ['arm_neon==1', {
1104 'cflags': [ '-mfpu=neon', ],
1105 }, {
[email protected]53e0f642010-03-05 01:41:561106 'cflags': [ '-mfpu=<(arm_fpu)', ],
[email protected]eafc0b452010-02-26 21:53:431107 }]
1108 ],
[email protected]dc9711f2009-11-13 19:30:251109 }],
[email protected]3dda8a962009-08-10 18:58:071110 ],
1111 }],
1112 ],
1113 }],
[email protected]2fb843b2010-08-12 02:11:081114 ['linux_fpic==1', {
[email protected]c76723a2010-01-25 23:10:581115 'cflags': [
1116 '-fPIC',
1117 ],
1118 }],
[email protected]ee28c9f2009-09-04 01:53:011119 ['sysroot!=""', {
[email protected]fd36ce822009-10-28 20:13:571120 'target_conditions': [
1121 ['_toolset=="target"', {
1122 'cflags': [
1123 '--sysroot=<(sysroot)',
1124 ],
1125 'ldflags': [
1126 '--sysroot=<(sysroot)',
1127 ],
1128 }]]
[email protected]ee28c9f2009-09-04 01:53:011129 }],
[email protected]58680ce2010-09-18 00:09:151130 ['clang==1', {
1131 'cflags': [
1132 # Don't warn about unused variables, due to a common pattern:
1133 # scoped_deleter unused_variable(&thing_to_delete);
1134 '-Wno-unused-variable',
1135 # Clang spots more unused functions.
1136 '-Wno-unused-function',
1137 # gtest confuses clang.
1138 '-Wno-bool-conversions',
1139 # Don't die on dtoa code that uses a char as an array index.
1140 '-Wno-char-subscripts',
[email protected]0fa0fbc2010-10-12 04:32:051141 # Survive EXPECT_EQ(unnamed_enum, unsigned int) -- see
1142 # http://code.google.com/p/googletest/source/detail?r=446 .
1143 # TODO(thakis): Use -isystem instead (http://crbug.com/58751 ).
1144 '-Wno-unnamed-type-template-args',
[email protected]58680ce2010-09-18 00:09:151145 ],
1146 'cflags!': [
1147 # Clang doesn't seem to know know this flag.
1148 '-mfpmath=sse',
1149 ],
1150 }],
[email protected]cc4219a2009-08-14 05:30:521151 ['no_strict_aliasing==1', {
1152 'cflags': [
1153 '-fno-strict-aliasing',
1154 ],
1155 }],
[email protected]cbd5fd52009-08-26 00:14:271156 ['linux_breakpad==1', {
[email protected]c87efd42010-08-26 18:28:171157 'cflags': [ '-g' ],
[email protected]cbd5fd52009-08-26 00:14:271158 'defines': ['USE_LINUX_BREAKPAD'],
1159 }],
[email protected]7cd2afd2009-10-27 21:40:261160 ['library=="shared_library"', {
1161 # When building with shared libraries, remove the visiblity-hiding
1162 # flag.
1163 'cflags!': [ '-fvisibility=hidden' ],
[email protected]2fb843b2010-08-12 02:11:081164 'conditions': [
1165 ['target_arch=="x64" or target_arch=="arm"', {
1166 # Shared libraries need -fPIC on x86-64 and arm
1167 'cflags': ['-fPIC']
1168 }]
1169 ],
[email protected]f192fa992010-12-08 00:45:291170 'ldflags!': [
1171 # --as-needed confuses library interdependencies.
1172 # See http://code.google.com/p/chromium/issues/detail?id=61430
1173 '-Wl,--as-needed',
1174 ],
[email protected]7cd2afd2009-10-27 21:40:261175 }],
[email protected]d8b60602010-03-26 09:41:221176 ['linux_use_heapchecker==1', {
1177 'variables': {'linux_use_tcmalloc%': 1},
1178 }],
[email protected]61a9b2d82010-02-26 00:31:081179 ['linux_use_tcmalloc==0', {
1180 'defines': ['NO_TCMALLOC'],
[email protected]01699e22009-11-11 19:24:241181 }],
[email protected]d8b60602010-03-26 09:41:221182 ['linux_use_heapchecker==0', {
1183 'defines': ['NO_HEAPCHECKER'],
1184 }],
[email protected]64e2d4a42010-08-27 10:13:211185 ['linux_keep_shadow_stacks==1', {
1186 'defines': ['KEEP_SHADOW_STACKS'],
1187 'cflags': ['-finstrument-functions'],
1188 }],
[email protected]606116d22009-05-06 22:38:231189 ],
[email protected]9d384032009-03-20 23:13:261190 },
1191 }],
[email protected]c51e8d52009-12-11 20:04:061192 # FreeBSD-specific options; note that most FreeBSD options are set above,
1193 # with Linux.
1194 ['OS=="freebsd"', {
1195 'target_defaults': {
1196 'ldflags': [
1197 '-Wl,--no-keep-memory',
1198 ],
1199 },
1200 }],
[email protected]93f21e42010-04-01 00:35:151201 ['OS=="solaris"', {
1202 'cflags!': ['-fvisibility=hidden'],
1203 'cflags_cc!': ['-fvisibility-inlines-hidden'],
1204 }],
[email protected]2f80c312009-02-25 21:26:551205 ['OS=="mac"', {
1206 'target_defaults': {
[email protected]24700642009-06-01 16:01:201207 'variables': {
[email protected]9a5e72862010-09-02 16:16:581208 # These should be 'mac_real_dsym%' and 'mac_strip%', but there
1209 # seems to be a bug with % in variables that are intended to be
1210 # set to different values in different targets, like these two.
1211 'mac_strip': 1, # Strip debugging symbols from the target.
[email protected]24700642009-06-01 16:01:201212 'mac_real_dsym': 0, # Fake .dSYMs are fine in most cases.
1213 },
[email protected]d92c7c012009-03-19 19:26:421214 'mac_bundle': 0,
[email protected]2f80c312009-02-25 21:26:551215 'xcode_settings': {
1216 'ALWAYS_SEARCH_USER_PATHS': 'NO',
[email protected]ab2956372009-08-13 18:11:041217 'GCC_C_LANGUAGE_STANDARD': 'c99', # -std=c99
1218 'GCC_CW_ASM_SYNTAX': 'NO', # No -fasm-blocks
1219 'GCC_DYNAMIC_NO_PIC': 'NO', # No -mdynamic-no-pic
1220 # (Equivalent to -fPIC)
1221 'GCC_ENABLE_CPP_EXCEPTIONS': 'NO', # -fno-exceptions
1222 'GCC_ENABLE_CPP_RTTI': 'NO', # -fno-rtti
1223 'GCC_ENABLE_PASCAL_STRINGS': 'NO', # No -mpascal-strings
[email protected]3224dcd2009-09-16 17:31:251224 # GCC_INLINES_ARE_PRIVATE_EXTERN maps to -fvisibility-inlines-hidden
1225 'GCC_INLINES_ARE_PRIVATE_EXTERN': 'YES',
[email protected]ab2956372009-08-13 18:11:041226 'GCC_OBJC_CALL_CXX_CDTORS': 'YES', # -fobjc-call-cxx-cdtors
1227 'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES', # -fvisibility=hidden
1228 'GCC_THREADSAFE_STATICS': 'NO', # -fno-threadsafe-statics
1229 'GCC_TREAT_WARNINGS_AS_ERRORS': 'YES', # -Werror
[email protected]2f80c312009-02-25 21:26:551230 'GCC_VERSION': '4.2',
[email protected]ab2956372009-08-13 18:11:041231 'GCC_WARN_ABOUT_MISSING_NEWLINE': 'YES', # -Wnewline-eof
[email protected]3224dcd2009-09-16 17:31:251232 # MACOSX_DEPLOYMENT_TARGET maps to -mmacosx-version-min
1233 'MACOSX_DEPLOYMENT_TARGET': '<(mac_deployment_target)',
[email protected]ab2956372009-08-13 18:11:041234 'PREBINDING': 'NO', # No -Wl,-prebind
[email protected]2f80c312009-02-25 21:26:551235 'USE_HEADERMAP': 'NO',
[email protected]080e86f2010-06-21 15:19:041236 'WARNING_CFLAGS': [
1237 '-Wall',
1238 '-Wendif-labels',
1239 '-Wextra',
1240 # Don't warn about unused function parameters.
1241 '-Wno-unused-parameter',
1242 # Don't warn about the "struct foo f = {0};" initialization
1243 # pattern.
1244 '-Wno-missing-field-initializers',
1245 ],
[email protected]b3fb8092009-03-12 19:09:241246 'conditions': [
1247 ['chromium_mac_pch', {'GCC_PRECOMPILE_PREFIX_HEADER': 'YES'},
[email protected]9543af052009-09-15 22:42:591248 {'GCC_PRECOMPILE_PREFIX_HEADER': 'NO'}
1249 ],
[email protected]66733172010-09-22 00:09:281250 ['clang==1', {
1251 'WARNING_CFLAGS': [
1252 # Don't die on dtoa code that uses a char as an array index.
1253 # This is required solely for base/third_party/dmg_fp/dtoa.cc.
1254 '-Wno-char-subscripts',
[email protected]25d3bb722010-11-22 14:31:451255 # Clang spots more unused functions.
1256 '-Wno-unused-function',
[email protected]0fa0fbc2010-10-12 04:32:051257 # Survive EXPECT_EQ(unnamed_enum, unsigned int) -- see
1258 # http://code.google.com/p/googletest/source/detail?r=446 .
1259 # TODO(thakis): Use -isystem instead (http://crbug.com/58751 ).
1260 '-Wno-unnamed-type-template-args',
[email protected]66733172010-09-22 00:09:281261 ],
1262 }],
[email protected]b3fb8092009-03-12 19:09:241263 ],
[email protected]2f80c312009-02-25 21:26:551264 },
1265 'target_conditions': [
[email protected]2f80c312009-02-25 21:26:551266 ['_type!="static_library"', {
[email protected]5d7dc972009-04-16 15:30:461267 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-search_paths_first']},
1268 }],
1269 ['_mac_bundle', {
1270 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-ObjC']},
[email protected]87fde4a2009-02-28 00:50:081271 }],
[email protected]9a5e72862010-09-02 16:16:581272 ['(_type=="executable" or _type=="shared_library" or \
1273 _type=="loadable_module") and mac_strip!=0', {
[email protected]24700642009-06-01 16:01:201274 'target_conditions': [
1275 ['mac_real_dsym == 1', {
1276 # To get a real .dSYM bundle produced by dsymutil, set the
1277 # debug information format to dwarf-with-dsym. Since
1278 # strip_from_xcode will not be used, set Xcode to do the
1279 # stripping as well.
1280 'configurations': {
[email protected]5153767c2009-12-22 01:52:501281 'Release_Base': {
[email protected]24700642009-06-01 16:01:201282 'xcode_settings': {
1283 'DEBUG_INFORMATION_FORMAT': 'dwarf-with-dsym',
1284 'DEPLOYMENT_POSTPROCESSING': 'YES',
1285 'STRIP_INSTALLED_PRODUCT': 'YES',
[email protected]e14a9f92009-08-05 19:26:071286 'target_conditions': [
[email protected]c2111422010-06-01 18:30:251287 ['_type=="shared_library" or _type=="loadable_module"', {
[email protected]e14a9f92009-08-05 19:26:071288 # The Xcode default is to strip debugging symbols
1289 # only (-S). Local symbols should be stripped as
1290 # well, which will be handled by -x. Xcode will
1291 # continue to insert -S when stripping even when
1292 # additional flags are added with STRIPFLAGS.
1293 'STRIPFLAGS': '-x',
[email protected]c2111422010-06-01 18:30:251294 }], # _type=="shared_library" or _type=="loadable_module"'
[email protected]e14a9f92009-08-05 19:26:071295 ], # target_conditions
1296 }, # xcode_settings
1297 }, # configuration "Release"
1298 }, # configurations
[email protected]24700642009-06-01 16:01:201299 }, { # mac_real_dsym != 1
1300 # To get a fast fake .dSYM bundle, use a post-build step to
1301 # produce the .dSYM and strip the executable. strip_from_xcode
1302 # only operates in the Release configuration.
1303 'postbuilds': [
1304 {
1305 'variables': {
1306 # Define strip_from_xcode in a variable ending in _path
1307 # so that gyp understands it's a path and performs proper
1308 # relativization during dict merging.
1309 'strip_from_xcode_path': 'mac/strip_from_xcode',
1310 },
1311 'postbuild_name': 'Strip If Needed',
1312 'action': ['<(strip_from_xcode_path)'],
1313 },
[email protected]e14a9f92009-08-05 19:26:071314 ], # postbuilds
1315 }], # mac_real_dsym
1316 ], # target_conditions
[email protected]9a5e72862010-09-02 16:16:581317 }], # (_type=="executable" or _type=="shared_library" or
1318 # _type=="loadable_module") and mac_strip!=0
[email protected]e14a9f92009-08-05 19:26:071319 ], # target_conditions
1320 }, # target_defaults
1321 }], # OS=="mac"
[email protected]2f80c312009-02-25 21:26:551322 ['OS=="win"', {
1323 'target_defaults': {
1324 'defines': [
1325 '_WIN32_WINNT=0x0600',
1326 'WINVER=0x0600',
1327 'WIN32',
1328 '_WINDOWS',
[email protected]2f80c312009-02-25 21:26:551329 'NOMINMAX',
1330 '_CRT_RAND_S',
1331 'CERT_CHAIN_PARA_HAS_EXTRA_FIELDS',
1332 'WIN32_LEAN_AND_MEAN',
1333 '_SECURE_ATL',
[email protected]7a812dd62010-06-30 18:52:271334 '_ATL_NO_OPENGL',
[email protected]adfb98c2009-06-23 20:08:451335 '_HAS_TR1=0',
[email protected]2f80c312009-02-25 21:26:551336 ],
[email protected]8974e042010-06-21 18:06:521337 'conditions': [
1338 ['component=="static_library"', {
1339 'defines': [
1340 '_HAS_EXCEPTIONS=0',
1341 ],
1342 }],
1343 ],
[email protected]5b5ca7cb2009-07-20 23:00:201344 'msvs_system_include_dirs': [
[email protected]998b5152009-12-12 22:19:521345 '<(DEPTH)/third_party/platformsdk_win7/files/Include',
[email protected]a78da50e2010-06-09 21:31:371346 '<(DEPTH)/third_party/directxsdk/files/Include',
[email protected]2f80c312009-02-25 21:26:551347 '$(VSInstallDir)/VC/atlmfc/include',
1348 ],
[email protected]a8d99cef2009-08-26 20:47:491349 'msvs_cygwin_dirs': ['<(DEPTH)/third_party/cygwin'],
[email protected]365632b2010-06-22 02:01:571350 'msvs_disabled_warnings': [4351, 4396, 4503, 4819],
[email protected]2f80c312009-02-25 21:26:551351 'msvs_settings': {
1352 'VCCLCompilerTool': {
1353 'MinimalRebuild': 'false',
[email protected]2f80c312009-02-25 21:26:551354 'BufferSecurityCheck': 'true',
1355 'EnableFunctionLevelLinking': 'true',
1356 'RuntimeTypeInfo': 'false',
1357 'WarningLevel': '3',
1358 'WarnAsError': 'true',
1359 'DebugInformationFormat': '3',
[email protected]3fef6e62009-07-31 19:58:581360 'conditions': [
[email protected]912c55c2009-07-31 23:33:551361 [ 'msvs_multi_core_compile', {
[email protected]1f9471a2010-01-04 06:40:161362 'AdditionalOptions': ['/MP'],
[email protected]912c55c2009-07-31 23:33:551363 }],
[email protected]8974e042010-06-21 18:06:521364 ['component=="shared_library"', {
1365 'ExceptionHandling': '1', # /EHsc
1366 }, {
1367 'ExceptionHandling': '0',
1368 }],
[email protected]3fef6e62009-07-31 19:58:581369 ],
[email protected]2f80c312009-02-25 21:26:551370 },
1371 'VCLibrarianTool': {
[email protected]1f9471a2010-01-04 06:40:161372 'AdditionalOptions': ['/ignore:4221'],
[email protected]a78da50e2010-06-09 21:31:371373 'AdditionalLibraryDirectories': [
1374 '<(DEPTH)/third_party/platformsdk_win7/files/Lib',
1375 '<(DEPTH)/third_party/directxsdk/files/Lib/x86',
1376 ],
[email protected]2f80c312009-02-25 21:26:551377 },
1378 'VCLinkerTool': {
[email protected]2f80c312009-02-25 21:26:551379 'AdditionalDependencies': [
1380 'wininet.lib',
1381 'version.lib',
1382 'msimg32.lib',
1383 'ws2_32.lib',
1384 'usp10.lib',
1385 'psapi.lib',
[email protected]96fd0032009-04-24 00:13:081386 'dbghelp.lib',
[email protected]2f80c312009-02-25 21:26:551387 ],
[email protected]a78da50e2010-06-09 21:31:371388 'AdditionalLibraryDirectories': [
1389 '<(DEPTH)/third_party/platformsdk_win7/files/Lib',
1390 '<(DEPTH)/third_party/directxsdk/files/Lib/x86',
1391 ],
[email protected]2f80c312009-02-25 21:26:551392 'GenerateDebugInformation': 'true',
1393 'MapFileName': '$(OutDir)\\$(TargetName).map',
1394 'ImportLibrary': '$(OutDir)\\lib\\$(TargetName).lib',
[email protected]2f80c312009-02-25 21:26:551395 'FixedBaseAddress': '1',
[email protected]825ff8d2009-05-22 01:40:481396 # SubSystem values:
1397 # 0 == not set
1398 # 1 == /SUBSYSTEM:CONSOLE
1399 # 2 == /SUBSYSTEM:WINDOWS
1400 # Most of the executables we'll ever create are tests
1401 # and utilities with console output.
1402 'SubSystem': '1',
[email protected]2f80c312009-02-25 21:26:551403 },
1404 'VCMIDLTool': {
1405 'GenerateStublessProxies': 'true',
1406 'TypeLibraryName': '$(InputName).tlb',
1407 'OutputDirectory': '$(IntDir)',
1408 'HeaderFileName': '$(InputName).h',
1409 'DLLDataFileName': 'dlldata.c',
1410 'InterfaceIdentifierFileName': '$(InputName)_i.c',
1411 'ProxyFileName': '$(InputName)_p.c',
1412 },
1413 'VCResourceCompilerTool': {
1414 'Culture' : '1033',
[email protected]4d91cbc2010-05-07 20:41:381415 'AdditionalIncludeDirectories': [
1416 '<(DEPTH)',
1417 '<(SHARED_INTERMEDIATE_DIR)',
1418 ],
[email protected]2f80c312009-02-25 21:26:551419 },
1420 },
1421 },
1422 }],
[email protected]93f21e42010-04-01 00:35:151423 ['disable_nacl==1 or OS=="freebsd" or OS=="openbsd" or OS=="solaris"', {
[email protected]d8c7cbcc2009-10-02 19:00:311424 'target_defaults': {
1425 'defines': [
1426 'DISABLE_NACL',
1427 ],
1428 },
1429 }],
[email protected]cfbf9bc2009-12-07 22:07:561430 ['OS=="win" and msvs_use_common_linker_extras', {
[email protected]48c7af72009-07-03 22:00:191431 'target_defaults': {
1432 'msvs_settings': {
1433 'VCLinkerTool': {
[email protected]48c7af72009-07-03 22:00:191434 'DelayLoadDLLs': [
1435 'dbghelp.dll',
1436 'dwmapi.dll',
1437 'uxtheme.dll',
1438 ],
1439 },
1440 },
[email protected]ef4fa4072009-12-04 22:46:501441 'configurations': {
[email protected]5153767c2009-12-22 01:52:501442 'x86_Base': {
[email protected]ef4fa4072009-12-04 22:46:501443 'msvs_settings': {
1444 'VCLinkerTool': {
[email protected]1f9471a2010-01-04 06:40:161445 'AdditionalOptions': [
1446 '/safeseh',
1447 '/dynamicbase',
1448 '/ignore:4199',
1449 '/ignore:4221',
1450 '/nxcompat',
1451 ],
[email protected]ef4fa4072009-12-04 22:46:501452 },
1453 },
1454 },
[email protected]5153767c2009-12-22 01:52:501455 'x64_Base': {
[email protected]ef4fa4072009-12-04 22:46:501456 'msvs_settings': {
1457 'VCLinkerTool': {
[email protected]1f9471a2010-01-04 06:40:161458 'AdditionalOptions': [
[email protected]ef4fa4072009-12-04 22:46:501459 # safeseh is not compatible with x64
[email protected]1f9471a2010-01-04 06:40:161460 '/dynamicbase',
1461 '/ignore:4199',
1462 '/ignore:4221',
1463 '/nxcompat',
1464 ],
[email protected]ef4fa4072009-12-04 22:46:501465 },
1466 },
1467 },
1468 },
[email protected]48c7af72009-07-03 22:00:191469 },
1470 }],
[email protected]9821d0d2010-04-16 22:40:371471 ['enable_new_npdevice_api==1', {
1472 'target_defaults': {
1473 'defines': [
1474 'ENABLE_NEW_NPDEVICE_API',
1475 ],
1476 },
1477 }],
[email protected]2f80c312009-02-25 21:26:551478 ],
1479 'xcode_settings': {
[email protected]0c8ab452009-11-06 21:57:501480 # DON'T ADD ANYTHING NEW TO THIS BLOCK UNLESS YOU REALLY REALLY NEED IT!
1481 # This block adds *project-wide* configuration settings to each project
1482 # file. It's almost always wrong to put things here. Specify your
1483 # custom xcode_settings in target_defaults to add them to targets instead.
1484
1485 # In an Xcode Project Info window, the "Base SDK for All Configurations"
1486 # setting sets the SDK on a project-wide basis. In order to get the
1487 # configured SDK to show properly in the Xcode UI, SDKROOT must be set
1488 # here at the project level.
1489 'SDKROOT': 'macosx<(mac_sdk)', # -isysroot
1490
[email protected]2f80c312009-02-25 21:26:551491 # The Xcode generator will look for an xcode_settings section at the root
1492 # of each dict and use it to apply settings on a file-wide basis. Most
1493 # settings should not be here, they should be in target-specific
1494 # xcode_settings sections, or better yet, should use non-Xcode-specific
1495 # settings in target dicts. SYMROOT is a special case, because many other
1496 # Xcode variables depend on it, including variables such as
1497 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something
1498 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the
1499 # files to appear (when present) in the UI as actual files and not red
1500 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR,
1501 # and therefore SYMROOT, needs to be set at the project level.
[email protected]bfa24b962009-03-02 00:16:161502 'SYMROOT': '<(DEPTH)/xcodebuild',
[email protected]2f80c312009-02-25 21:26:551503 },
[email protected]ee28c9f2009-09-04 01:53:011504}
[email protected]f5c990c2009-10-06 03:02:381505
1506# Local Variables:
1507# tab-width:2
1508# indent-tabs-mode:nil
1509# End:
1510# vim: set expandtab tabstop=2 shiftwidth=2: