blob: 6215c51d5145bdd0d36550376550d327d50fcee2 [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]9a425422011-01-11 00:53:18122 # Remoting compilation is enabled by default. Set to 0 to disable.
123 'remoting%': 1,
124
[email protected]bb6aba32011-01-07 19:04:43125 'conditions': [
[email protected]63692212010-09-16 00:22:21126 # A flag to enable or disable our compile-time dependency
127 # on gnome-keyring. If that dependency is disabled, no gnome-keyring
128 # support will be available. This option is useful
129 # for Linux distributions.
130 ['chromeos==1', {
131 'use_gnome_keyring%': 0,
132 }, {
133 'use_gnome_keyring%': 1,
134 }],
[email protected]0afe5212010-10-01 18:56:11135
136 # Set to 1 compile with -fPIC cflag on linux. This is a must for shared
137 # libraries on linux x86-64 and arm.
138 ['host_arch=="ia32"', {
139 'linux_fpic%': 0,
140 }, {
141 'linux_fpic%': 1,
142 }],
[email protected]1b4209f2011-01-07 00:25:40143
[email protected]bb6aba32011-01-07 19:04:43144 ['toolkit_views==0 or OS=="mac"', {
145 # GTK+ and Mac wants Title Case strings
146 'use_titlecase_in_grd_files%': 1,
147 }],
148
[email protected]1b4209f2011-01-07 00:25:40149 # Enable some hacks to support Flapper only on Chrome OS.
150 ['chromeos==1', {
151 'enable_flapper_hacks%': 1,
152 }, {
153 'enable_flapper_hacks%': 0,
154 }],
[email protected]b3f23ba2010-04-26 22:58:17155 ],
[email protected]e14a9f92009-08-05 19:26:07156 },
157
[email protected]e72e55b2011-01-06 22:19:30158 # Copy conditionally-set variables out one scope.
[email protected]e14a9f92009-08-05 19:26:07159 'branding%': '<(branding)',
160 'buildtype%': '<(buildtype)',
[email protected]e0d00142009-09-18 22:10:27161 'target_arch%': '<(target_arch)',
[email protected]cf185b32010-01-12 04:29:59162 'host_arch%': '<(host_arch)',
[email protected]c153e5352009-09-22 12:37:44163 'toolkit_views%': '<(toolkit_views)',
[email protected]63692212010-09-16 00:22:21164 'use_gnome_keyring%': '<(use_gnome_keyring)',
[email protected]0afe5212010-10-01 18:56:11165 'linux_fpic%': '<(linux_fpic)',
[email protected]1b4209f2011-01-07 00:25:40166 'enable_flapper_hacks%': '<(enable_flapper_hacks)',
[email protected]c153e5352009-09-22 12:37:44167 'chromeos%': '<(chromeos)',
[email protected]93012ca2010-08-10 20:10:49168 'touchui%': '<(touchui)',
[email protected]b2f030c2009-09-24 20:36:21169 'inside_chromium_build%': '<(inside_chromium_build)',
[email protected]9c1949e2009-10-02 19:59:54170 'fastbuild%': '<(fastbuild)',
[email protected]a76fe1a2010-03-01 23:39:36171 'python_ver%': '<(python_ver)',
[email protected]eafc0b452010-02-26 21:53:43172 'armv7%': '<(armv7)',
173 'arm_neon%': '<(arm_neon)',
[email protected]4d83eb72010-03-04 16:42:23174 'sysroot%': '<(sysroot)',
[email protected]ac120ff2010-04-28 02:14:22175 'disable_sse2%': '<(disable_sse2)',
[email protected]8974e042010-06-21 18:06:52176 'library%': '<(library)',
177 'component%': '<(component)',
[email protected]bb6aba32011-01-07 19:04:43178 'use_titlecase_in_grd_files%': '<(use_titlecase_in_grd_files)',
[email protected]9a425422011-01-11 00:53:18179 'remoting%': '<(remoting)',
[email protected]e14a9f92009-08-05 19:26:07180
[email protected]caa95c82009-11-23 22:39:32181 # The release channel that this build targets. This is used to restrict
182 # channel-specific build options, like which installer packages to create.
183 # The default is 'all', which does no channel-specific filtering.
184 'channel%': 'all',
185
[email protected]b3fb8092009-03-12 19:09:24186 # Override chromium_mac_pch and set it to 0 to suppress the use of
187 # precompiled headers on the Mac. Prefix header injection may still be
188 # used, but prefix headers will not be precompiled. This is useful when
189 # using distcc to distribute a build to compile slaves that don't
190 # share the same compiler executable as the system driving the compilation,
191 # because precompiled headers rely on pointers into a specific compiler
192 # executable's image. Setting this to 0 is needed to use an experimental
193 # Linux-Mac cross compiler distcc farm.
194 'chromium_mac_pch%': 1,
195
[email protected]3224dcd2009-09-16 17:31:25196 # Mac OS X SDK and deployment target support.
197 # The SDK identifies the version of the system headers that will be used,
198 # and corresponds to the MAC_OS_X_VERSION_MAX_ALLOWED compile-time macro.
199 # "Maximum allowed" refers to the operating system version whose APIs are
200 # available in the headers.
201 # The deployment target identifies the minimum system version that the
202 # built products are expected to function on. It corresponds to the
203 # MAC_OS_X_VERSION_MIN_REQUIRED compile-time macro.
204 # To ensure these macros are available, #include <AvailabilityMacros.h>.
205 # Additional documentation on these macros is available at
206 # http://developer.apple.com/mac/library/technotes/tn2002/tn2064.html#SECTION3
207 # Chrome normally builds with the Mac OS X 10.5 SDK and sets the
208 # deployment target to 10.5. Other projects, such as O3D, may override
209 # these defaults.
210 'mac_sdk%': '10.5',
211 'mac_deployment_target%': '10.5',
[email protected]9543af052009-09-15 22:42:59212
[email protected]f5ecbba12009-04-03 04:35:18213 # Set to 1 to enable code coverage. In addition to build changes
214 # (e.g. extra CFLAGS), also creates a new target in the src/chrome
215 # project file called "coverage".
216 # Currently ignored on Windows.
217 'coverage%': 0,
[email protected]653bd5f032009-04-08 12:55:49218
[email protected]c61f6432009-04-22 01:16:42219 # Overridable specification for potential use of alternative
220 # JavaScript engines.
221 'javascript_engine%': 'v8',
222
[email protected]7477ea6f2009-12-22 23:28:15223 # Although base/allocator lets you select a heap library via an
[email protected]7e0d664a2009-12-03 21:07:47224 # environment variable, the libcmt shim it uses sometimes gets in
225 # the way. To disable it entirely, and switch to normal msvcrt, do e.g.
226 # 'win_use_allocator_shim': 0,
227 # 'win_release_RuntimeLibrary': 2
228 # to ~/.gyp/include.gypi, gclient runhooks --force, and do a release build.
[email protected]8974e042010-06-21 18:06:52229 'win_use_allocator_shim%': 1, # 1 = shim allocator via libcmt; 0 = msvcrt
[email protected]279cd4212009-09-11 22:32:11230
[email protected]95ff8082009-11-13 22:21:01231 # Whether usage of OpenMAX is enabled.
232 'enable_openmax%': 0,
233
[email protected]d01120e62010-05-10 17:04:48234 # Whether proprietary audio/video codecs are assumed to be included with
235 # this build (only meaningful if branding!=Chrome).
236 'proprietary_codecs%': 0,
237
[email protected]e5b2eaa2009-04-14 01:39:12238 # TODO(bradnelson): eliminate this when possible.
239 # To allow local gyp files to prevent release.vsprops from being included.
240 # Yes(1) means include release.vsprops.
241 # Once all vsprops settings are migrated into gyp, this can go away.
242 'msvs_use_common_release%': 1,
[email protected]606116d22009-05-06 22:38:23243
[email protected]cbd5fd52009-08-26 00:14:27244 # TODO(bradnelson): eliminate this when possible.
245 # To allow local gyp files to override additional linker options for msvs.
246 # Yes(1) means set use the common linker options.
[email protected]48c7af72009-07-03 22:00:19247 'msvs_use_common_linker_extras%': 1,
248
[email protected]1ffb6502009-06-02 07:46:24249 # TODO(sgk): eliminate this if possible.
250 # It would be nicer to support this via a setting in 'target_defaults'
251 # in chrome/app/locales/locales.gypi overriding the setting in the
252 # 'Debug' configuration in the 'target_defaults' dict below,
253 # but that doesn't work as we'd like.
254 'msvs_debug_link_incremental%': '2',
255
[email protected]573136142009-07-15 22:48:37256 # This is the location of the sandbox binary. Chrome looks for this before
257 # running the zygote process. If found, and SUID, it will be used to
258 # sandbox the zygote process and, thus, all renderer processes.
259 'linux_sandbox_path%': '',
260
[email protected]ad6d2c42009-09-15 20:13:38261 # Set this to true to enable SELinux support.
262 'selinux%': 0,
[email protected]4c9cc6c2009-10-01 18:54:57263
[email protected]58680ce2010-09-18 00:09:15264 # Set this to true when building with Clang.
265 # See http://code.google.com/p/chromium/wiki/Clang for details.
266 # TODO: eventually clang should behave identically to gcc, and this
267 # won't be necessary.
268 'clang%': 0,
269
[email protected]36532f332010-08-25 00:22:01270 # Override whether we should use Breakpad on Linux. I.e. for Chrome bot.
271 'linux_breakpad%': 0,
272 # And if we want to dump symbols for Breakpad-enabled builds.
273 'linux_dump_symbols%': 0,
274 # And if we want to strip the binary after dumping symbols.
[email protected]05cb6962009-10-01 23:29:03275 'linux_strip_binary%': 0,
[email protected]1d87c282010-09-15 22:24:49276 # Strip the test binaries needed for Linux reliability tests.
277 'linux_strip_reliability_tests%': 0,
[email protected]05cb6962009-10-01 23:29:03278
[email protected]46ce5b562010-06-16 18:39:53279 # Enable TCMalloc.
280 'linux_use_tcmalloc%': 1,
[email protected]01699e22009-11-11 19:24:24281
[email protected]39ca7de2010-04-16 08:04:03282 # Disable TCMalloc's debugallocation.
283 'linux_use_debugallocation%': 0,
284
[email protected]d8b60602010-03-26 09:41:22285 # Disable TCMalloc's heapchecker.
286 'linux_use_heapchecker%': 0,
287
[email protected]64e2d4a42010-08-27 10:13:21288 # Disable shadow stack keeping used by heapcheck to unwind the stacks
289 # better.
290 'linux_keep_shadow_stacks%': 0,
291
[email protected]6def64a2010-10-28 20:40:34292 # Set to 1 to turn on seccomp sandbox by default.
293 # (Note: this is ignored for official builds.)
294 'linux_use_seccomp_sandbox%': 0,
[email protected]39c4e1a82010-03-30 19:47:41295
[email protected]556c5d72010-06-10 05:45:01296 # Set to 1 to link against libgnome-keyring instead of using dlopen().
297 'linux_link_gnome_keyring%': 0,
298
[email protected]d8c7cbcc2009-10-02 19:00:31299 # Used to disable Native Client at compile time, for platforms where it
300 # isn't supported
301 'disable_nacl%': 0,
302
[email protected]77c1b29392009-12-04 06:21:29303 # Set Thumb compilation flags.
304 'arm_thumb%': 0,
305
[email protected]53e0f642010-03-05 01:41:56306 # Set ARM fpu compilation flags (only meaningful if armv7==1 and
307 # arm_neon==0).
308 'arm_fpu%': 'vfpv3',
309
[email protected]9821d0d2010-04-16 22:40:37310 # Enable new NPDevice API.
311 'enable_new_npdevice_api%': 0,
[email protected]ed154592010-04-29 00:18:50312
313 # Enable EGLImage support in OpenMAX
314 'enable_eglimage%': 0,
315
[email protected]6f51b27e2010-06-22 20:43:53316 # Enable a variable used elsewhere throughout the GYP files to determine
317 # whether to compile in the sources for the GPU plugin / process.
318 'enable_gpu%': 1,
319
[email protected]6de53d42010-11-09 07:33:19320 # Use GConf, the GNOME configuration system.
321 'use_gconf%': 1,
322
[email protected]32e1dee2010-12-09 18:36:24323 # Use OpenSSL instead of NSS. Under development: see http://crbug.com/62803
[email protected]d518cd92010-09-29 12:27:44324 'use_openssl%': 0,
325
[email protected]e72e55b2011-01-06 22:19:30326 # .gyp files or targets should set chromium_code to 1 if they build
327 # Chromium-specific code, as opposed to external code. This variable is
328 # used to control such things as the set of warnings to enable, and
329 # whether warnings are treated as errors.
330 'chromium_code%': 0,
331
332 # Set to 1 to compile with the built in pdf viewer.
333 'internal_pdf%': 0,
334
335 # This allows to use libcros from the current system, ie. /usr/lib/
336 # The cros_api will be pulled in as a static library, and all headers
337 # from the system include dirs.
[email protected]bb6aba32011-01-07 19:04:43338 'system_libcros%': 0,
[email protected]e72e55b2011-01-06 22:19:30339
[email protected]e72e55b2011-01-06 22:19:30340 # NOTE: When these end up in the Mac bundle, we need to replace '-' for '_'
341 # so Cocoa is happy (http://crbug.com/20441).
342 'locales': [
343 'am', 'ar', 'bg', 'bn', 'ca', 'cs', 'da', 'de', 'el', 'en-GB',
344 'en-US', 'es-419', 'es', 'et', 'fa', 'fi', 'fil', 'fr', 'gu', 'he',
345 'hi', 'hr', 'hu', 'id', 'it', 'ja', 'kn', 'ko', 'lt', 'lv',
346 'ml', 'mr', 'nb', 'nl', 'pl', 'pt-BR', 'pt-PT', 'ro', 'ru',
347 'sk', 'sl', 'sr', 'sv', 'sw', 'ta', 'te', 'th', 'tr', 'uk',
348 'vi', 'zh-CN', 'zh-TW',
349 ],
350
[email protected]bb6aba32011-01-07 19:04:43351 'grit_defines': [],
352
[email protected]29c2daea2011-01-05 20:38:50353 # Use Harfbuzz-NG instead of Harfbuzz.
354 # Under development: http://crbug.com/68551
355 'use_harfbuzz_ng%': 0,
356
[email protected]912c55c2009-07-31 23:33:55357 'conditions': [
[email protected]47deeb62009-12-17 14:49:39358 ['OS=="linux" or OS=="freebsd" or OS=="openbsd"', {
[email protected]242a9e62009-11-03 17:32:10359 # This will set gcc_version to XY if you are running gcc X.Y.*.
360 # This is used to tweak build flags for gcc 4.4.
361 'gcc_version%': '<!(python <(DEPTH)/build/compiler_version.py)',
[email protected]4d83eb72010-03-04 16:42:23362 # Figure out the python architecture to decide if we build pyauto.
[email protected]efd68462010-03-04 17:07:54363 'python_arch%': '<!(<(DEPTH)/build/linux/python_arch.sh <(sysroot)/usr/lib/libpython<(python_ver).so.1.0)',
[email protected]cbd5fd52009-08-26 00:14:27364 'conditions': [
[email protected]2a77a9d2010-08-26 19:58:10365 ['branding=="Chrome"', {
[email protected]cbd5fd52009-08-26 00:14:27366 'linux_breakpad%': 1,
[email protected]cbd5fd52009-08-26 00:14:27367 }],
[email protected]4c9cc6c2009-10-01 18:54:57368 # All Chrome builds have breakpad symbols, but only process the
369 # symbols from official builds.
[email protected]c913cb82010-08-31 19:44:08370 ['(branding=="Chrome" and buildtype=="Official")', {
[email protected]4c9cc6c2009-10-01 18:54:57371 'linux_dump_symbols%': 1,
[email protected]4c9cc6c2009-10-01 18:54:57372 }],
[email protected]cbd5fd52009-08-26 00:14:27373 ],
[email protected]47deeb62009-12-17 14:49:39374 }], # OS=="linux" or OS=="freebsd" or OS=="openbsd"
[email protected]bb6aba32011-01-07 19:04:43375
[email protected]e14a9f92009-08-05 19:26:07376 ['OS=="mac"', {
377 'conditions': [
378 # mac_product_name is set to the name of the .app bundle as it should
379 # appear on disk. This duplicates data from
380 # chrome/app/theme/chromium/BRANDING and
381 # chrome/app/theme/google_chrome/BRANDING, but is necessary to get
382 # these names into the build system.
383 ['branding=="Chrome"', {
384 'mac_product_name%': 'Google Chrome',
385 }, { # else: branding!="Chrome"
386 'mac_product_name%': 'Chromium',
387 }],
388
389 # Feature variables for enabling Mac Breakpad and Keystone auto-update
390 # support. Both features are on by default in official builds with
391 # Chrome branding.
392 ['branding=="Chrome" and buildtype=="Official"', {
393 'mac_breakpad%': 1,
394 'mac_keystone%': 1,
395 }, { # else: branding!="Chrome" or buildtype!="Official"
396 'mac_breakpad%': 0,
397 'mac_keystone%': 0,
398 }],
399 ],
400 }], # OS=="mac"
[email protected]bb6aba32011-01-07 19:04:43401
[email protected]912c55c2009-07-31 23:33:55402 # Whether to use multiple cores to compile with visual studio. This is
403 # optional because it sometimes causes corruption on VS 2005.
404 # It is on by default on VS 2008 and off on VS 2005.
405 ['OS=="win"', {
406 'conditions': [
[email protected]8974e042010-06-21 18:06:52407 ['component=="shared_library"', {
408 'win_use_allocator_shim%': 0,
409 }],
[email protected]912c55c2009-07-31 23:33:55410 ['MSVS_VERSION=="2005"', {
[email protected]669795372009-08-14 17:51:13411 'msvs_multi_core_compile%': 0,
[email protected]912c55c2009-07-31 23:33:55412 },{
413 'msvs_multi_core_compile%': 1,
414 }],
[email protected]10bb8c92009-08-07 21:16:03415 # Don't do incremental linking for large modules on 32-bit.
416 ['MSVS_OS_BITS==32', {
417 'msvs_large_module_debug_link_mode%': '1', # No
418 },{
419 'msvs_large_module_debug_link_mode%': '2', # Yes
420 }],
[email protected]912c55c2009-07-31 23:33:55421 ],
[email protected]ef4fa4072009-12-04 22:46:50422 'nacl_win64_defines': [
423 # This flag is used to minimize dependencies when building
424 # Native Client loader for 64-bit Windows.
425 'NACL_WIN64',
426 ],
[email protected]912c55c2009-07-31 23:33:55427 }],
[email protected]bb6aba32011-01-07 19:04:43428
[email protected]6df3ebf2010-10-29 20:30:38429 ['OS=="mac" or (OS=="linux" and chromeos==0 and target_arch!="arm")', {
[email protected]8e553f492010-10-25 20:05:44430 'use_cups%': 1,
431 }, {
432 'use_cups%': 0,
433 }],
[email protected]bb6aba32011-01-07 19:04:43434
[email protected]19fe8f0b2010-12-07 07:27:27435 # Set the relative path from this file to the GYP file of the JPEG
436 # library used by Chromium.
437 ['use_libjpeg_turbo==1', {
438 'libjpeg_gyp_path': '../third_party/libjpeg_turbo/libjpeg.gyp',
439 }, {
440 'libjpeg_gyp_path': '../third_party/libjpeg/libjpeg.gyp',
441 }], # use_libjpeg_turbo==1
[email protected]bb6aba32011-01-07 19:04:43442
443 # Setup -D flags passed into grit.
444 ['chromeos==1', {
445 'grit_defines': ['-D', 'chromeos'],
446 }],
447 ['toolkit_views==1', {
448 'grit_defines': ['-D', 'toolkit_views'],
449 }],
450 ['touchui==1', {
451 'grit_defines': ['-D', 'touchui'],
452 }],
[email protected]9a425422011-01-11 00:53:18453 ['remoting==1', {
454 'grit_defines': ['-D', 'remoting'],
455 }],
[email protected]bb6aba32011-01-07 19:04:43456 ['use_titlecase_in_grd_files==1', {
457 'grit_defines': ['-D', 'use_titlecase'],
458 }],
[email protected]912c55c2009-07-31 23:33:55459 ],
[email protected]2f80c312009-02-25 21:26:55460 },
461 'target_defaults': {
[email protected]1c966092009-08-20 21:19:26462 'variables': {
[email protected]a6e22132010-02-10 20:43:18463 # The condition that operates on chromium_code is in a target_conditions
464 # section, and will not have access to the default fallback value of
465 # chromium_code at the top of this file, or to the chromium_code
466 # variable placed at the root variables scope of .gyp files, because
467 # those variables are not set at target scope. As a workaround,
468 # if chromium_code is not set at target scope, define it in target scope
469 # to contain whatever value it has during early variable expansion.
470 # That's enough to make it available during target conditional
471 # processing.
472 'chromium_code%': '<(chromium_code)',
473
[email protected]7e0d664a2009-12-03 21:07:47474 # See http://gcc.gnu.org/onlinedocs/gcc-4.4.2/gcc/Optimize-Options.html
[email protected]d5d593a2009-08-28 23:23:29475 'mac_release_optimization%': '3', # Use -O3 unless overridden
[email protected]ffd984b12009-09-11 19:37:00476 'mac_debug_optimization%': '0', # Use -O0 unless overridden
[email protected]7e0d664a2009-12-03 21:07:47477 # See http://msdn.microsoft.com/en-us/library/aa652360(VS.71).aspx
478 'win_release_Optimization%': '2', # 2 = /Os
479 'win_debug_Optimization%': '0', # 0 = /Od
[email protected]6b0507b2010-05-07 07:41:21480 # See http://msdn.microsoft.com/en-us/library/8wtf2dfz(VS.71).aspx
481 'win_debug_RuntimeChecks%': '3', # 3 = all checks enabled, 0 = off
482 # See http://msdn.microsoft.com/en-us/library/47238hez(VS.71).aspx
[email protected]2ae6e022010-05-07 13:19:15483 'win_debug_InlineFunctionExpansion%': '', # empty = default, 0 = off,
484 'win_release_InlineFunctionExpansion%': '2', # 1 = only __inline, 2 = max
[email protected]fac10d12010-11-08 16:00:31485 # VS inserts quite a lot of extra checks to algorithms like
486 # std::partial_sort in Debug build which make them O(N^2)
487 # instead of O(N*logN). This is particularly slow under memory
488 # tools like ThreadSanitizer so we want it to be disablable.
489 # See http://msdn.microsoft.com/en-us/library/aa985982(v=VS.80).aspx
490 'win_debug_disable_iterator_debugging%': '0',
[email protected]7e0d664a2009-12-03 21:07:47491
[email protected]ffd984b12009-09-11 19:37:00492 'release_extra_cflags%': '',
493 'debug_extra_cflags%': '',
[email protected]92822e82009-09-18 14:26:56494 'release_valgrind_build%': 0,
[email protected]8974e042010-06-21 18:06:52495
496 'conditions': [
497 ['OS=="win" and component=="shared_library"', {
498 # See http://msdn.microsoft.com/en-us/library/aa652367.aspx
499 'win_release_RuntimeLibrary%': '2', # 2 = /MT (nondebug DLL)
500 'win_debug_RuntimeLibrary%': '3', # 3 = /MTd (debug DLL)
501 }, {
502 # See http://msdn.microsoft.com/en-us/library/aa652367.aspx
503 'win_release_RuntimeLibrary%': '0', # 0 = /MT (nondebug static)
504 'win_debug_RuntimeLibrary%': '1', # 1 = /MTd (debug static)
505 }],
506 ],
[email protected]1c966092009-08-20 21:19:26507 },
[email protected]32aa8cc2009-03-04 21:36:39508 'conditions': [
509 ['branding=="Chrome"', {
510 'defines': ['GOOGLE_CHROME_BUILD'],
511 }, { # else: branding!="Chrome"
512 'defines': ['CHROMIUM_BUILD'],
513 }],
[email protected]06c756182010-04-27 18:31:31514 ['toolkit_views==1', {
[email protected]e6970232009-05-12 23:51:17515 'defines': ['TOOLKIT_VIEWS=1'],
516 }],
[email protected]fdc5bed2010-01-09 01:16:57517 ['chromeos==1', {
[email protected]16779842009-07-08 23:45:29518 'defines': ['OS_CHROMEOS=1'],
[email protected]2b883b92009-06-02 22:57:50519 }],
[email protected]0094fbe2010-07-15 21:51:43520 ['touchui==1', {
521 'defines': ['TOUCH_UI=1'],
522 }],
[email protected]542bf24a2010-06-11 23:08:17523 ['remoting==1', {
524 'defines': ['ENABLE_REMOTING=1'],
[email protected]c0bac532010-06-11 00:39:00525 }],
[email protected]d01120e62010-05-10 17:04:48526 ['proprietary_codecs==1', {
527 'defines': ['USE_PROPRIETARY_CODECS'],
528 }],
[email protected]1b4209f2011-01-07 00:25:40529 ['enable_flapper_hacks==1', {
530 'defines': ['ENABLE_FLAPPER_HACKS=1'],
531 }],
[email protected]9c1949e2009-10-02 19:59:54532 ['fastbuild!=0', {
533 'conditions': [
[email protected]1cc2fa72010-07-03 08:49:24534 # For Windows, we don't genererate debug information.
[email protected]9c1949e2009-10-02 19:59:54535 ['OS=="win"', {
536 'msvs_settings': {
537 'VCLinkerTool': {
538 'GenerateDebugInformation': 'false',
539 },
540 'VCCLCompilerTool': {
541 'DebugInformationFormat': '0',
542 }
543 }
[email protected]1cc2fa72010-07-03 08:49:24544 }, { # else: OS != "win", generate less debug information.
545 'variables': {
546 'debug_extra_cflags': '-g1',
547 },
[email protected]37c84192010-04-14 21:37:40548 }],
[email protected]9c1949e2009-10-02 19:59:54549 ], # conditions for fastbuild.
550 }], # fastbuild!=0
[email protected]ad6d2c42009-09-15 20:13:38551 ['selinux==1', {
552 'defines': ['CHROMIUM_SELINUX=1'],
553 }],
[email protected]7e0d664a2009-12-03 21:07:47554 ['win_use_allocator_shim==0', {
555 'conditions': [
556 ['OS=="win"', {
557 'defines': ['NO_TCMALLOC'],
558 }],
559 ],
560 }],
[email protected]43f28f832010-02-03 02:28:48561 ['enable_gpu==1', {
[email protected]7477ea6f2009-12-22 23:28:15562 'defines': [
563 'ENABLE_GPU=1',
564 ],
565 }],
[email protected]b1c2a5542010-10-08 12:44:40566 ['use_openssl==1', {
567 'defines': [
568 'USE_OPENSSL=1',
569 ],
570 }],
[email protected]ed154592010-04-29 00:18:50571 ['enable_eglimage==1', {
572 'defines': [
573 'ENABLE_EGLIMAGE=1',
574 ],
575 }],
[email protected]f5ecbba12009-04-03 04:35:18576 ['coverage!=0', {
577 'conditions': [
578 ['OS=="mac"', {
579 'xcode_settings': {
[email protected]ab2956372009-08-13 18:11:04580 'GCC_INSTRUMENT_PROGRAM_FLOW_ARCS': 'YES', # -fprofile-arcs
581 'GCC_GENERATE_TEST_COVERAGE_FILES': 'YES', # -ftest-coverage
[email protected]5ae4f55e2009-04-13 23:19:47582 },
[email protected]e4fb84c2009-12-28 20:45:43583 # Add -lgcov for types executable, shared_library, and
[email protected]dc259ce52010-04-13 04:03:10584 # loadable_module; not for static_library.
[email protected]e4fb84c2009-12-28 20:45:43585 # This is a delayed conditional.
[email protected]f5ecbba12009-04-03 04:35:18586 'target_conditions': [
[email protected]e4fb84c2009-12-28 20:45:43587 ['_type!="static_library"', {
[email protected]f5ecbba12009-04-03 04:35:18588 'xcode_settings': { 'OTHER_LDFLAGS': [ '-lgcov' ] },
[email protected]5ae4f55e2009-04-13 23:19:47589 }],
590 ],
591 }],
[email protected]f5ecbba12009-04-03 04:35:18592 ['OS=="linux"', {
593 'cflags': [ '-ftest-coverage',
594 '-fprofile-arcs' ],
[email protected]7122ffd52009-04-30 23:19:00595 'link_settings': { 'libraries': [ '-lgcov' ] },
[email protected]f5ecbba12009-04-03 04:35:18596 }],
[email protected]e8f6ff42009-07-07 18:20:53597 # Finally, for Windows, we simply turn on profiling.
598 ['OS=="win"', {
599 'msvs_settings': {
600 'VCLinkerTool': {
601 'Profile': 'true',
602 },
[email protected]10bb8c92009-08-07 21:16:03603 'VCCLCompilerTool': {
[email protected]e8f6ff42009-07-07 18:20:53604 # /Z7, not /Zi, so coverage is happyb
605 'DebugInformationFormat': '1',
[email protected]1f9471a2010-01-04 06:40:16606 'AdditionalOptions': ['/Yd'],
[email protected]e8f6ff42009-07-07 18:20:53607 }
608 }
609 }], # OS==win
610 ], # conditions for coverage
611 }], # coverage!=0
[email protected]4e4d6042010-08-26 18:34:38612 ['OS=="win"', {
613 'defines': [
614 '__STD_C',
615 '_CRT_SECURE_NO_DEPRECATE',
616 '_SCL_SECURE_NO_DEPRECATE',
617 ],
618 'include_dirs': [
619 '<(DEPTH)/third_party/wtl/include',
620 ],
621 }], # OS==win
[email protected]a6e22132010-02-10 20:43:18622 ], # conditions for 'target_defaults'
623 'target_conditions': [
[email protected]c14d8e772010-02-09 22:06:15624 ['chromium_code==0', {
[email protected]d8543312010-02-10 17:43:28625 'conditions': [
626 [ 'OS=="linux" or OS=="freebsd" or OS=="openbsd"', {
627 'cflags!': [
628 '-Wall',
629 '-Wextra',
630 '-Werror',
631 ],
632 }],
633 [ 'OS=="win"', {
634 'defines': [
635 '_CRT_SECURE_NO_DEPRECATE',
636 '_CRT_NONSTDC_NO_WARNINGS',
637 '_CRT_NONSTDC_NO_DEPRECATE',
638 '_SCL_SECURE_NO_DEPRECATE',
639 ],
640 'msvs_disabled_warnings': [4800],
641 'msvs_settings': {
642 'VCCLCompilerTool': {
643 'WarnAsError': 'false',
644 'Detect64BitPortabilityProblems': 'false',
645 },
646 },
647 }],
648 [ 'OS=="mac"', {
649 'xcode_settings': {
650 'GCC_TREAT_WARNINGS_AS_ERRORS': 'NO',
[email protected]4c4c2e5332010-06-15 11:51:06651 'WARNING_CFLAGS!': ['-Wall', '-Wextra'],
[email protected]d8543312010-02-10 17:43:28652 },
653 }],
[email protected]c14d8e772010-02-09 22:06:15654 ],
655 }, {
656 # In Chromium code, we define __STDC_FORMAT_MACROS in order to get the
657 # C99 macros on Mac and Linux.
658 'defines': [
659 '__STDC_FORMAT_MACROS',
660 ],
661 'conditions': [
662 ['OS!="win"', {
[email protected]40519592010-11-16 15:23:30663 'sources/': [ ['exclude', '_win(_unittest)?\\.(h|cc)$'],
[email protected]a316ca532010-11-15 14:08:16664 ['exclude', '(^|/)win/'],
[email protected]40519592010-11-16 15:23:30665 ['exclude', '(^|/)win_[^/]*\\.(h|cc)$'] ],
[email protected]c14d8e772010-02-09 22:06:15666 }],
667 ['OS!="mac"', {
[email protected]40519592010-11-16 15:23:30668 'sources/': [ ['exclude', '_(cocoa|mac)(_unittest)?\\.(h|cc)$'],
[email protected]a316ca532010-11-15 14:08:16669 ['exclude', '(^|/)(cocoa|mac)/'],
670 ['exclude', '\\.mm?$' ] ],
[email protected]c14d8e772010-02-09 22:06:15671 }],
672 ['OS!="linux" and OS!="freebsd" and OS!="openbsd"', {
673 'sources/': [
[email protected]40519592010-11-16 15:23:30674 ['exclude', '_(chromeos|gtk|x|x11|xdg)(_unittest)?\\.(h|cc)$'],
[email protected]a316ca532010-11-15 14:08:16675 ['exclude', '(^|/)gtk/'],
[email protected]40519592010-11-16 15:23:30676 ['exclude', '(^|/)(gtk|x11)_[^/]*\\.(h|cc)$'],
[email protected]18cff3d2010-02-17 18:03:13677 ],
678 }],
679 ['OS!="linux"', {
680 'sources/': [
[email protected]40519592010-11-16 15:23:30681 ['exclude', '_linux(_unittest)?\\.(h|cc)$'],
[email protected]a316ca532010-11-15 14:08:16682 ['exclude', '(^|/)linux/'],
[email protected]18cff3d2010-02-17 18:03:13683 ],
[email protected]c14d8e772010-02-09 22:06:15684 }],
685 # We use "POSIX" to refer to all non-Windows operating systems.
686 ['OS=="win"', {
[email protected]40519592010-11-16 15:23:30687 'sources/': [ ['exclude', '_posix\\.(h|cc)$'] ],
[email protected]f55bd4862010-05-27 15:38:07688 # turn on warnings for signed/unsigned mismatch on chromium code.
689 'msvs_settings': {
690 'VCCLCompilerTool': {
691 'AdditionalOptions': ['/we4389'],
692 },
693 },
[email protected]c14d8e772010-02-09 22:06:15694 }],
[email protected]c14d8e772010-02-09 22:06:15695 ['chromeos!=1', {
[email protected]40519592010-11-16 15:23:30696 'sources/': [ ['exclude', '_chromeos\\.(h|cc)$'] ]
[email protected]c14d8e772010-02-09 22:06:15697 }],
[email protected]06c756182010-04-27 18:31:31698 ['toolkit_views==0', {
[email protected]40519592010-11-16 15:23:30699 'sources/': [ ['exclude', '_views\\.(h|cc)$'] ]
[email protected]c14d8e772010-02-09 22:06:15700 }],
701 ],
702 }],
[email protected]a6e22132010-02-10 20:43:18703 ], # target_conditions for 'target_defaults'
[email protected]2f80c312009-02-25 21:26:55704 'default_configuration': 'Debug',
705 'configurations': {
[email protected]5153767c2009-12-22 01:52:50706 # VCLinkerTool LinkIncremental values below:
707 # 0 == default
708 # 1 == /INCREMENTAL:NO
709 # 2 == /INCREMENTAL
710 # Debug links incremental, Release does not.
711 #
[email protected]7b99801e2010-11-03 17:26:23712 # Abstract base configurations to cover common attributes.
[email protected]5153767c2009-12-22 01:52:50713 #
714 'Common_Base': {
[email protected]bb05e452009-10-29 21:24:56715 'abstract': 1,
716 'msvs_configuration_attributes': {
717 'OutputDirectory': '$(SolutionDir)$(ConfigurationName)',
718 'IntermediateDirectory': '$(OutDir)\\obj\\$(ProjectName)',
719 'CharacterSet': '1',
720 },
[email protected]5153767c2009-12-22 01:52:50721 },
722 'x86_Base': {
723 'abstract': 1,
[email protected]ef4fa4072009-12-04 22:46:50724 'msvs_settings': {
725 'VCLinkerTool': {
726 'TargetMachine': '1',
727 },
728 },
[email protected]2fa40782009-11-01 21:17:34729 'msvs_configuration_platform': 'Win32',
[email protected]bb05e452009-10-29 21:24:56730 },
[email protected]5153767c2009-12-22 01:52:50731 'x64_Base': {
732 'abstract': 1,
733 'msvs_configuration_platform': 'x64',
734 'msvs_settings': {
735 'VCLinkerTool': {
736 'TargetMachine': '17', # x86 - 64
[email protected]5153767c2009-12-22 01:52:50737 'AdditionalLibraryDirectories!':
738 ['<(DEPTH)/third_party/platformsdk_win7/files/Lib'],
739 'AdditionalLibraryDirectories':
740 ['<(DEPTH)/third_party/platformsdk_win7/files/Lib/x64'],
741 },
[email protected]d26b4418ab2010-03-24 22:06:35742 'VCLibrarianTool': {
[email protected]5153767c2009-12-22 01:52:50743 'AdditionalLibraryDirectories!':
744 ['<(DEPTH)/third_party/platformsdk_win7/files/Lib'],
745 'AdditionalLibraryDirectories':
746 ['<(DEPTH)/third_party/platformsdk_win7/files/Lib/x64'],
747 },
748 },
749 'defines': [
750 # Not sure if tcmalloc works on 64-bit Windows.
751 'NO_TCMALLOC',
752 ],
753 },
754 'Debug_Base': {
755 'abstract': 1,
[email protected]ee857512010-05-14 08:24:42756 'defines': ['DYNAMIC_ANNOTATIONS_ENABLED=1'],
[email protected]1c966092009-08-20 21:19:26757 'xcode_settings': {
758 'COPY_PHASE_STRIP': 'NO',
[email protected]d5d593a2009-08-28 23:23:29759 'GCC_OPTIMIZATION_LEVEL': '<(mac_debug_optimization)',
[email protected]bd232ac2009-10-21 02:23:53760 'OTHER_CFLAGS': [ '<@(debug_extra_cflags)', ],
[email protected]1c966092009-08-20 21:19:26761 },
[email protected]bb05e452009-10-29 21:24:56762 'msvs_settings': {
763 'VCCLCompilerTool': {
[email protected]7e0d664a2009-12-03 21:07:47764 'Optimization': '<(win_debug_Optimization)',
[email protected]bb05e452009-10-29 21:24:56765 'PreprocessorDefinitions': ['_DEBUG'],
[email protected]6b0507b2010-05-07 07:41:21766 'BasicRuntimeChecks': '<(win_debug_RuntimeChecks)',
[email protected]7e0d664a2009-12-03 21:07:47767 'RuntimeLibrary': '<(win_debug_RuntimeLibrary)',
[email protected]2ae6e022010-05-07 13:19:15768 'conditions': [
769 # According to MSVS, InlineFunctionExpansion=0 means
770 # "default inlining", not "/Ob0".
771 # Thus, we have to handle InlineFunctionExpansion==0 separately.
772 ['win_debug_InlineFunctionExpansion==0', {
773 'AdditionalOptions': ['/Ob0'],
774 }],
775 ['win_debug_InlineFunctionExpansion!=""', {
776 'InlineFunctionExpansion':
777 '<(win_debug_InlineFunctionExpansion)',
778 }],
[email protected]fac10d12010-11-08 16:00:31779 ['win_debug_disable_iterator_debugging==1', {
780 'PreprocessorDefinitions': ['_HAS_ITERATOR_DEBUGGING=0'],
781 }],
[email protected]2ae6e022010-05-07 13:19:15782 ],
[email protected]bb05e452009-10-29 21:24:56783 },
784 'VCLinkerTool': {
785 'LinkIncremental': '<(msvs_debug_link_incremental)',
786 },
787 'VCResourceCompilerTool': {
788 'PreprocessorDefinitions': ['_DEBUG'],
789 },
790 },
[email protected]2f80c312009-02-25 21:26:55791 'conditions': [
[email protected]bb05e452009-10-29 21:24:56792 ['OS=="linux"', {
793 'cflags': [
794 '<@(debug_extra_cflags)',
795 ],
[email protected]2f80c312009-02-25 21:26:55796 }],
797 ],
798 },
[email protected]5153767c2009-12-22 01:52:50799 'Release_Base': {
800 'abstract': 1,
[email protected]2f80c312009-02-25 21:26:55801 'defines': [
802 'NDEBUG',
803 ],
[email protected]1c966092009-08-20 21:19:26804 'xcode_settings': {
805 'DEAD_CODE_STRIPPING': 'YES', # -Wl,-dead_strip
806 'GCC_OPTIMIZATION_LEVEL': '<(mac_release_optimization)',
[email protected]ffd984b12009-09-11 19:37:00807 'OTHER_CFLAGS': [ '<@(release_extra_cflags)', ],
[email protected]1c966092009-08-20 21:19:26808 },
[email protected]bb05e452009-10-29 21:24:56809 'msvs_settings': {
[email protected]7e0d664a2009-12-03 21:07:47810 'VCCLCompilerTool': {
811 'Optimization': '<(win_release_Optimization)',
812 'RuntimeLibrary': '<(win_release_RuntimeLibrary)',
[email protected]2ae6e022010-05-07 13:19:15813 'conditions': [
814 # According to MSVS, InlineFunctionExpansion=0 means
815 # "default inlining", not "/Ob0".
816 # Thus, we have to handle InlineFunctionExpansion==0 separately.
817 ['win_release_InlineFunctionExpansion==0', {
818 'AdditionalOptions': ['/Ob0'],
819 }],
820 ['win_release_InlineFunctionExpansion!=""', {
821 'InlineFunctionExpansion':
822 '<(win_release_InlineFunctionExpansion)',
823 }],
824 ],
[email protected]7e0d664a2009-12-03 21:07:47825 },
[email protected]bb05e452009-10-29 21:24:56826 'VCLinkerTool': {
827 'LinkIncremental': '1',
828 },
829 },
[email protected]2f80c312009-02-25 21:26:55830 'conditions': [
[email protected]92822e82009-09-18 14:26:56831 ['release_valgrind_build==0', {
[email protected]ee857512010-05-14 08:24:42832 'defines': ['NVALGRIND', 'DYNAMIC_ANNOTATIONS_ENABLED=0'],
833 }, {
834 'defines': ['DYNAMIC_ANNOTATIONS_ENABLED=1'],
[email protected]92822e82009-09-18 14:26:56835 }],
[email protected]7e0d664a2009-12-03 21:07:47836 ['win_use_allocator_shim==0', {
837 'defines': ['NO_TCMALLOC'],
838 }],
[email protected]bb05e452009-10-29 21:24:56839 ['OS=="linux"', {
840 'cflags': [
[email protected]ffd984b12009-09-11 19:37:00841 '<@(release_extra_cflags)',
[email protected]bb05e452009-10-29 21:24:56842 ],
843 }],
[email protected]2f80c312009-02-25 21:26:55844 ],
845 },
[email protected]5153767c2009-12-22 01:52:50846 'Purify_Base': {
847 'abstract': 1,
848 'defines': [
849 'PURIFY',
850 'NO_TCMALLOC',
851 ],
852 'msvs_settings': {
853 'VCCLCompilerTool': {
854 'Optimization': '0',
855 'RuntimeLibrary': '0',
856 'BufferSecurityCheck': 'false',
857 },
858 'VCLinkerTool': {
859 'EnableCOMDATFolding': '1',
860 'LinkIncremental': '1',
861 },
862 },
863 },
864 #
865 # Concrete configurations
866 #
867 'Debug': {
868 'inherit_from': ['Common_Base', 'x86_Base', 'Debug_Base'],
869 },
870 'Release': {
871 'inherit_from': ['Common_Base', 'x86_Base', 'Release_Base'],
872 'conditions': [
873 ['msvs_use_common_release', {
[email protected]1f9471a2010-01-04 06:40:16874 'includes': ['release.gypi'],
[email protected]5153767c2009-12-22 01:52:50875 }],
876 ]
877 },
[email protected]f926fa0a2009-08-04 22:50:13878 'conditions': [
879 [ 'OS=="win"', {
880 # TODO(bradnelson): add a gyp mechanism to make this more graceful.
881 'Purify': {
[email protected]5153767c2009-12-22 01:52:50882 'inherit_from': ['Common_Base', 'x86_Base', 'Release_Base', 'Purify'],
[email protected]ef4fa4072009-12-04 22:46:50883 },
884 'Debug_x64': {
[email protected]5153767c2009-12-22 01:52:50885 'inherit_from': ['Common_Base', 'x64_Base', 'Debug_Base'],
[email protected]78263c12009-11-01 23:45:30886 },
887 'Release_x64': {
[email protected]5153767c2009-12-22 01:52:50888 'inherit_from': ['Common_Base', 'x64_Base', 'Release_Base'],
[email protected]78263c12009-11-01 23:45:30889 },
890 'Purify_x64': {
[email protected]1f9471a2010-01-04 06:40:16891 'inherit_from': ['Common_Base', 'x64_Base', 'Release_Base', 'Purify_Base'],
[email protected]78263c12009-11-01 23:45:30892 },
[email protected]f926fa0a2009-08-04 22:50:13893 }],
894 ],
[email protected]2f80c312009-02-25 21:26:55895 },
896 },
897 'conditions': [
[email protected]93f21e42010-04-01 00:35:15898 ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris"', {
[email protected]9d384032009-03-20 23:13:26899 'target_defaults': {
[email protected]5315f2842009-04-28 00:43:27900 # Enable -Werror by default, but put it in a variable so it can
901 # be disabled in ~/.gyp/include.gypi on the valgrind builders.
902 'variables': {
[email protected]ecf52cb82010-01-13 19:25:42903 # Use -fno-strict-aliasing by default since gcc 4.4 has periodic
904 # issues that slip through the cracks. We could do this just for
905 # gcc 4.4 but it makes more sense to be consistent on all
906 # compilers in use. TODO(Craig): turn this off again when
907 # there is some 4.4 test infrastructure in place and existing
908 # aliasing issues have been fixed.
909 'no_strict_aliasing%': 1,
[email protected]47deeb62009-12-17 14:49:39910 'conditions': [['OS=="linux"', {'werror%': '-Werror',}],
911 ['OS=="freebsd"', {'werror%': '',}],
912 ['OS=="openbsd"', {'werror%': '',}],
913 ],
[email protected]5315f2842009-04-28 00:43:27914 },
[email protected]9d384032009-03-20 23:13:26915 'cflags': [
[email protected]1bba09c2009-08-13 12:53:16916 '<(werror)', # See note above about the werror variable.
917 '-pthread',
918 '-fno-exceptions',
919 '-Wall',
[email protected]0fa17082010-03-26 00:48:05920 # TODO(evan): turn this back on once all the builds work.
921 # '-Wextra',
[email protected]225c8f52010-02-05 22:23:20922 # Don't warn about unused function params. We use those everywhere.
923 '-Wno-unused-parameter',
924 # Don't warn about the "struct foo f = {0};" initialization pattern.
925 '-Wno-missing-field-initializers',
[email protected]1bba09c2009-08-13 12:53:16926 '-D_FILE_OFFSET_BITS=64',
[email protected]3df6e3a2010-01-21 20:23:12927 # Don't export any symbols (for example, to plugins we dlopen()).
928 # Note: this is *required* to make some plugins work.
929 '-fvisibility=hidden',
[email protected]7ca6ce12010-09-15 23:39:35930 '-pipe',
[email protected]8a2fcba2009-07-29 00:52:24931 ],
932 'cflags_cc': [
[email protected]832d0212009-10-28 19:12:22933 '-fno-rtti',
[email protected]8a2fcba2009-07-29 00:52:24934 '-fno-threadsafe-statics',
[email protected]f5986c42009-11-17 18:39:36935 # Make inline functions have hidden visiblity by default.
936 # Surprisingly, not covered by -fvisibility=hidden.
937 '-fvisibility-inlines-hidden',
[email protected]9d384032009-03-20 23:13:26938 ],
[email protected]a6cf87e2009-04-03 04:07:38939 'ldflags': [
[email protected]138241f2010-03-30 23:53:10940 '-pthread', '-Wl,-z,noexecstack',
[email protected]9d384032009-03-20 23:13:26941 ],
[email protected]3aacaf952009-04-02 15:34:09942 'configurations': {
[email protected]5153767c2009-12-22 01:52:50943 'Debug_Base': {
[email protected]c5bdc032009-04-20 19:11:31944 'variables': {
945 'debug_optimize%': '0',
946 },
[email protected]3aacaf952009-04-02 15:34:09947 'defines': [
948 '_DEBUG',
949 ],
950 'cflags': [
[email protected]22898f62009-10-26 22:14:01951 '-O>(debug_optimize)',
[email protected]3aacaf952009-04-02 15:34:09952 '-g',
953 ],
[email protected]5315f2842009-04-28 00:43:27954 },
[email protected]5153767c2009-12-22 01:52:50955 'Release_Base': {
[email protected]740e2de2009-07-21 11:41:01956 'variables': {
957 'release_optimize%': '2',
[email protected]1dd529642010-05-15 01:02:51958 # Binaries become big and gold is unable to perform GC
959 # and remove unused sections for some of test targets
960 # on 32 bit platform.
961 # (This is currently observed only in chromeos valgrind bots)
962 # The following flag is to disable --gc-sections linker
963 # option for these bots.
964 'no_gc_sections%': 0,
[email protected]740e2de2009-07-21 11:41:01965 },
[email protected]3aacaf952009-04-02 15:34:09966 'cflags': [
[email protected]22898f62009-10-26 22:14:01967 '-O>(release_optimize)',
[email protected]d8cc3a62009-04-08 18:29:53968 # Don't emit the GCC version ident directives, they just end up
969 # in the .comment section taking up binary size.
970 '-fno-ident',
971 # Put data and code in their own sections, so that unused symbols
972 # can be removed at link time with --gc-sections.
973 '-fdata-sections',
974 '-ffunction-sections',
[email protected]3aacaf952009-04-02 15:34:09975 ],
[email protected]c902f2cba2010-08-06 20:04:18976 'ldflags': [
977 # Specifically tell the linker to perform optimizations.
978 # See http://lwn.net/Articles/192624/ .
979 '-Wl,-O1',
[email protected]27c2e492010-08-06 22:55:22980 '-Wl,--as-needed',
[email protected]c902f2cba2010-08-06 20:04:18981 ],
[email protected]1dd529642010-05-15 01:02:51982 'conditions' : [
983 ['no_gc_sections==0', {
984 'ldflags': [
985 '-Wl,--gc-sections',
986 ],
987 }],
[email protected]ecf7b6482010-10-13 09:15:20988 ['clang==1', {
989 'cflags!': [
990 '-fno-ident',
991 ],
992 }],
[email protected]1dd529642010-05-15 01:02:51993 ]
[email protected]3aacaf952009-04-02 15:34:09994 },
995 },
[email protected]601b540222009-04-03 21:32:04996 'variants': {
997 'coverage': {
998 'cflags': ['-fprofile-arcs', '-ftest-coverage'],
999 'ldflags': ['-fprofile-arcs'],
1000 },
1001 'profile': {
1002 'cflags': ['-pg', '-g'],
1003 'ldflags': ['-pg'],
1004 },
1005 'symbols': {
1006 'cflags': ['-g'],
1007 },
1008 },
[email protected]606116d22009-05-06 22:38:231009 'conditions': [
[email protected]7e8eb7612009-07-29 15:56:001010 [ 'target_arch=="ia32"', {
[email protected]606116d22009-05-06 22:38:231011 'asflags': [
1012 # Needed so that libs with .s files (e.g. libicudata.a)
1013 # are compatible with the general 32-bit-ness.
1014 '-32',
1015 ],
1016 # All floating-point computations on x87 happens in 80-bit
1017 # precision. Because the C and C++ language standards allow
1018 # the compiler to keep the floating-point values in higher
1019 # precision than what's specified in the source and doing so
1020 # is more efficient than constantly rounding up to 64-bit or
1021 # 32-bit precision as specified in the source, the compiler,
1022 # especially in the optimized mode, tries very hard to keep
1023 # values in x87 floating-point stack (in 80-bit precision)
1024 # as long as possible. This has important side effects, that
1025 # the real value used in computation may change depending on
1026 # how the compiler did the optimization - that is, the value
1027 # kept in 80-bit is different than the value rounded down to
1028 # 64-bit or 32-bit. There are possible compiler options to make
1029 # this behavior consistent (e.g. -ffloat-store would keep all
1030 # floating-values in the memory, thus force them to be rounded
1031 # to its original precision) but they have significant runtime
1032 # performance penalty.
1033 #
1034 # -mfpmath=sse -msse2 makes the compiler use SSE instructions
1035 # which keep floating-point values in SSE registers in its
1036 # native precision (32-bit for single precision, and 64-bit for
1037 # double precision values). This means the floating-point value
1038 # used during computation does not change depending on how the
1039 # compiler optimized the code, since the value is always kept
1040 # in its specified precision.
[email protected]ffde7932009-05-29 00:39:061041 'conditions': [
[email protected]ac120ff2010-04-28 02:14:221042 ['branding=="Chromium" and disable_sse2==0', {
[email protected]ffde7932009-05-29 00:39:061043 'cflags': [
1044 '-march=pentium4',
1045 '-msse2',
1046 '-mfpmath=sse',
1047 ],
1048 }],
[email protected]06c756182010-04-27 18:31:311049 # ChromeOS targets Pinetrail, which is sse3, but most of the
[email protected]0183dbb2010-04-16 02:00:441050 # benefit comes from sse2 so this setting allows ChromeOS
1051 # to build on other CPUs. In the future -march=atom would help
1052 # but requires a newer compiler.
[email protected]ac120ff2010-04-28 02:14:221053 ['chromeos==1 and disable_sse2==0', {
[email protected]0183dbb2010-04-16 02:00:441054 'cflags': [
1055 '-msse2',
1056 ],
1057 }],
[email protected]34799f9d2010-07-08 17:51:331058 # Install packages have started cropping up with
1059 # different headers between the 32-bit and 64-bit
1060 # versions, so we have to shadow those differences off
1061 # and make sure a 32-bit-on-64-bit build picks up the
1062 # right files.
1063 ['host_arch!="ia32"', {
1064 'include_dirs+': [
1065 '/usr/include32',
1066 ],
1067 }],
[email protected]ffde7932009-05-29 00:39:061068 ],
[email protected]dc259ce52010-04-13 04:03:101069 # -mmmx allows mmintrin.h to be used for mmx intrinsics.
1070 # video playback is mmx and sse2 optimized.
[email protected]606116d22009-05-06 22:38:231071 'cflags': [
1072 '-m32',
[email protected]dc259ce52010-04-13 04:03:101073 '-mmmx',
[email protected]1c6560af2009-07-14 11:02:161074 ],
[email protected]606116d22009-05-06 22:38:231075 'ldflags': [
1076 '-m32',
1077 ],
1078 }],
[email protected]3dda8a962009-08-10 18:58:071079 ['target_arch=="arm"', {
[email protected]77c1b29392009-12-04 06:21:291080 'target_conditions': [
1081 ['_toolset=="target"', {
1082 'cflags_cc': [
1083 # The codesourcery arm-2009q3 toolchain warns at that the ABI
1084 # has changed whenever it encounters a varargs function. This
1085 # silences those warnings, as they are not helpful and
1086 # clutter legitimate warnings.
1087 '-Wno-abi',
1088 ],
1089 'conditions': [
1090 ['arm_thumb == 1', {
1091 'cflags': [
1092 '-mthumb',
1093 # TODO(piman): -Wa,-mimplicit-it=thumb is needed for
1094 # inline assembly that uses condition codes but it's
1095 # suboptimal. Better would be to #ifdef __thumb__ at the
1096 # right place and have a separate thumb path.
1097 '-Wa,-mimplicit-it=thumb',
1098 ]
1099 }],
1100 ['armv7==1', {
[email protected]dc9711f2009-11-13 19:30:251101 'cflags': [
1102 '-march=armv7-a',
1103 '-mtune=cortex-a8',
[email protected]dc9711f2009-11-13 19:30:251104 '-mfloat-abi=softfp',
1105 ],
[email protected]eafc0b452010-02-26 21:53:431106 'conditions': [
1107 ['arm_neon==1', {
1108 'cflags': [ '-mfpu=neon', ],
1109 }, {
[email protected]53e0f642010-03-05 01:41:561110 'cflags': [ '-mfpu=<(arm_fpu)', ],
[email protected]eafc0b452010-02-26 21:53:431111 }]
1112 ],
[email protected]dc9711f2009-11-13 19:30:251113 }],
[email protected]3dda8a962009-08-10 18:58:071114 ],
1115 }],
1116 ],
1117 }],
[email protected]2fb843b2010-08-12 02:11:081118 ['linux_fpic==1', {
[email protected]c76723a2010-01-25 23:10:581119 'cflags': [
1120 '-fPIC',
1121 ],
1122 }],
[email protected]ee28c9f2009-09-04 01:53:011123 ['sysroot!=""', {
[email protected]fd36ce822009-10-28 20:13:571124 'target_conditions': [
1125 ['_toolset=="target"', {
1126 'cflags': [
1127 '--sysroot=<(sysroot)',
1128 ],
1129 'ldflags': [
1130 '--sysroot=<(sysroot)',
1131 ],
1132 }]]
[email protected]ee28c9f2009-09-04 01:53:011133 }],
[email protected]58680ce2010-09-18 00:09:151134 ['clang==1', {
1135 'cflags': [
1136 # Don't warn about unused variables, due to a common pattern:
1137 # scoped_deleter unused_variable(&thing_to_delete);
1138 '-Wno-unused-variable',
1139 # Clang spots more unused functions.
1140 '-Wno-unused-function',
1141 # gtest confuses clang.
1142 '-Wno-bool-conversions',
1143 # Don't die on dtoa code that uses a char as an array index.
1144 '-Wno-char-subscripts',
[email protected]0fa0fbc2010-10-12 04:32:051145 # Survive EXPECT_EQ(unnamed_enum, unsigned int) -- see
1146 # http://code.google.com/p/googletest/source/detail?r=446 .
1147 # TODO(thakis): Use -isystem instead (http://crbug.com/58751 ).
1148 '-Wno-unnamed-type-template-args',
[email protected]58680ce2010-09-18 00:09:151149 ],
1150 'cflags!': [
1151 # Clang doesn't seem to know know this flag.
1152 '-mfpmath=sse',
1153 ],
1154 }],
[email protected]cc4219a2009-08-14 05:30:521155 ['no_strict_aliasing==1', {
1156 'cflags': [
1157 '-fno-strict-aliasing',
1158 ],
1159 }],
[email protected]cbd5fd52009-08-26 00:14:271160 ['linux_breakpad==1', {
[email protected]c87efd42010-08-26 18:28:171161 'cflags': [ '-g' ],
[email protected]cbd5fd52009-08-26 00:14:271162 'defines': ['USE_LINUX_BREAKPAD'],
1163 }],
[email protected]7cd2afd2009-10-27 21:40:261164 ['library=="shared_library"', {
1165 # When building with shared libraries, remove the visiblity-hiding
1166 # flag.
1167 'cflags!': [ '-fvisibility=hidden' ],
[email protected]2fb843b2010-08-12 02:11:081168 'conditions': [
1169 ['target_arch=="x64" or target_arch=="arm"', {
1170 # Shared libraries need -fPIC on x86-64 and arm
1171 'cflags': ['-fPIC']
1172 }]
1173 ],
[email protected]f192fa992010-12-08 00:45:291174 'ldflags!': [
1175 # --as-needed confuses library interdependencies.
1176 # See http://code.google.com/p/chromium/issues/detail?id=61430
1177 '-Wl,--as-needed',
1178 ],
[email protected]7cd2afd2009-10-27 21:40:261179 }],
[email protected]d8b60602010-03-26 09:41:221180 ['linux_use_heapchecker==1', {
1181 'variables': {'linux_use_tcmalloc%': 1},
1182 }],
[email protected]61a9b2d82010-02-26 00:31:081183 ['linux_use_tcmalloc==0', {
1184 'defines': ['NO_TCMALLOC'],
[email protected]01699e22009-11-11 19:24:241185 }],
[email protected]d8b60602010-03-26 09:41:221186 ['linux_use_heapchecker==0', {
1187 'defines': ['NO_HEAPCHECKER'],
1188 }],
[email protected]64e2d4a42010-08-27 10:13:211189 ['linux_keep_shadow_stacks==1', {
1190 'defines': ['KEEP_SHADOW_STACKS'],
1191 'cflags': ['-finstrument-functions'],
1192 }],
[email protected]606116d22009-05-06 22:38:231193 ],
[email protected]9d384032009-03-20 23:13:261194 },
1195 }],
[email protected]c51e8d52009-12-11 20:04:061196 # FreeBSD-specific options; note that most FreeBSD options are set above,
1197 # with Linux.
1198 ['OS=="freebsd"', {
1199 'target_defaults': {
1200 'ldflags': [
1201 '-Wl,--no-keep-memory',
1202 ],
1203 },
1204 }],
[email protected]93f21e42010-04-01 00:35:151205 ['OS=="solaris"', {
1206 'cflags!': ['-fvisibility=hidden'],
1207 'cflags_cc!': ['-fvisibility-inlines-hidden'],
1208 }],
[email protected]2f80c312009-02-25 21:26:551209 ['OS=="mac"', {
1210 'target_defaults': {
[email protected]24700642009-06-01 16:01:201211 'variables': {
[email protected]9a5e72862010-09-02 16:16:581212 # These should be 'mac_real_dsym%' and 'mac_strip%', but there
1213 # seems to be a bug with % in variables that are intended to be
1214 # set to different values in different targets, like these two.
1215 'mac_strip': 1, # Strip debugging symbols from the target.
[email protected]24700642009-06-01 16:01:201216 'mac_real_dsym': 0, # Fake .dSYMs are fine in most cases.
1217 },
[email protected]d92c7c012009-03-19 19:26:421218 'mac_bundle': 0,
[email protected]2f80c312009-02-25 21:26:551219 'xcode_settings': {
1220 'ALWAYS_SEARCH_USER_PATHS': 'NO',
[email protected]ab2956372009-08-13 18:11:041221 'GCC_C_LANGUAGE_STANDARD': 'c99', # -std=c99
1222 'GCC_CW_ASM_SYNTAX': 'NO', # No -fasm-blocks
1223 'GCC_DYNAMIC_NO_PIC': 'NO', # No -mdynamic-no-pic
1224 # (Equivalent to -fPIC)
1225 'GCC_ENABLE_CPP_EXCEPTIONS': 'NO', # -fno-exceptions
1226 'GCC_ENABLE_CPP_RTTI': 'NO', # -fno-rtti
1227 'GCC_ENABLE_PASCAL_STRINGS': 'NO', # No -mpascal-strings
[email protected]3224dcd2009-09-16 17:31:251228 # GCC_INLINES_ARE_PRIVATE_EXTERN maps to -fvisibility-inlines-hidden
1229 'GCC_INLINES_ARE_PRIVATE_EXTERN': 'YES',
[email protected]ab2956372009-08-13 18:11:041230 'GCC_OBJC_CALL_CXX_CDTORS': 'YES', # -fobjc-call-cxx-cdtors
1231 'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES', # -fvisibility=hidden
1232 'GCC_THREADSAFE_STATICS': 'NO', # -fno-threadsafe-statics
1233 'GCC_TREAT_WARNINGS_AS_ERRORS': 'YES', # -Werror
[email protected]2f80c312009-02-25 21:26:551234 'GCC_VERSION': '4.2',
[email protected]ab2956372009-08-13 18:11:041235 'GCC_WARN_ABOUT_MISSING_NEWLINE': 'YES', # -Wnewline-eof
[email protected]3224dcd2009-09-16 17:31:251236 # MACOSX_DEPLOYMENT_TARGET maps to -mmacosx-version-min
1237 'MACOSX_DEPLOYMENT_TARGET': '<(mac_deployment_target)',
[email protected]ab2956372009-08-13 18:11:041238 'PREBINDING': 'NO', # No -Wl,-prebind
[email protected]2f80c312009-02-25 21:26:551239 'USE_HEADERMAP': 'NO',
[email protected]080e86f2010-06-21 15:19:041240 'WARNING_CFLAGS': [
1241 '-Wall',
1242 '-Wendif-labels',
1243 '-Wextra',
1244 # Don't warn about unused function parameters.
1245 '-Wno-unused-parameter',
1246 # Don't warn about the "struct foo f = {0};" initialization
1247 # pattern.
1248 '-Wno-missing-field-initializers',
1249 ],
[email protected]b3fb8092009-03-12 19:09:241250 'conditions': [
1251 ['chromium_mac_pch', {'GCC_PRECOMPILE_PREFIX_HEADER': 'YES'},
[email protected]9543af052009-09-15 22:42:591252 {'GCC_PRECOMPILE_PREFIX_HEADER': 'NO'}
1253 ],
[email protected]66733172010-09-22 00:09:281254 ['clang==1', {
1255 'WARNING_CFLAGS': [
1256 # Don't die on dtoa code that uses a char as an array index.
1257 # This is required solely for base/third_party/dmg_fp/dtoa.cc.
1258 '-Wno-char-subscripts',
[email protected]25d3bb722010-11-22 14:31:451259 # Clang spots more unused functions.
1260 '-Wno-unused-function',
[email protected]0fa0fbc2010-10-12 04:32:051261 # Survive EXPECT_EQ(unnamed_enum, unsigned int) -- see
1262 # http://code.google.com/p/googletest/source/detail?r=446 .
1263 # TODO(thakis): Use -isystem instead (http://crbug.com/58751 ).
1264 '-Wno-unnamed-type-template-args',
[email protected]66733172010-09-22 00:09:281265 ],
1266 }],
[email protected]b3fb8092009-03-12 19:09:241267 ],
[email protected]2f80c312009-02-25 21:26:551268 },
1269 'target_conditions': [
[email protected]2f80c312009-02-25 21:26:551270 ['_type!="static_library"', {
[email protected]5d7dc972009-04-16 15:30:461271 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-search_paths_first']},
1272 }],
1273 ['_mac_bundle', {
1274 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-ObjC']},
[email protected]87fde4a2009-02-28 00:50:081275 }],
[email protected]9a5e72862010-09-02 16:16:581276 ['(_type=="executable" or _type=="shared_library" or \
1277 _type=="loadable_module") and mac_strip!=0', {
[email protected]24700642009-06-01 16:01:201278 'target_conditions': [
1279 ['mac_real_dsym == 1', {
1280 # To get a real .dSYM bundle produced by dsymutil, set the
1281 # debug information format to dwarf-with-dsym. Since
1282 # strip_from_xcode will not be used, set Xcode to do the
1283 # stripping as well.
1284 'configurations': {
[email protected]5153767c2009-12-22 01:52:501285 'Release_Base': {
[email protected]24700642009-06-01 16:01:201286 'xcode_settings': {
1287 'DEBUG_INFORMATION_FORMAT': 'dwarf-with-dsym',
1288 'DEPLOYMENT_POSTPROCESSING': 'YES',
1289 'STRIP_INSTALLED_PRODUCT': 'YES',
[email protected]e14a9f92009-08-05 19:26:071290 'target_conditions': [
[email protected]c2111422010-06-01 18:30:251291 ['_type=="shared_library" or _type=="loadable_module"', {
[email protected]e14a9f92009-08-05 19:26:071292 # The Xcode default is to strip debugging symbols
1293 # only (-S). Local symbols should be stripped as
1294 # well, which will be handled by -x. Xcode will
1295 # continue to insert -S when stripping even when
1296 # additional flags are added with STRIPFLAGS.
1297 'STRIPFLAGS': '-x',
[email protected]c2111422010-06-01 18:30:251298 }], # _type=="shared_library" or _type=="loadable_module"'
[email protected]e14a9f92009-08-05 19:26:071299 ], # target_conditions
1300 }, # xcode_settings
1301 }, # configuration "Release"
1302 }, # configurations
[email protected]24700642009-06-01 16:01:201303 }, { # mac_real_dsym != 1
1304 # To get a fast fake .dSYM bundle, use a post-build step to
1305 # produce the .dSYM and strip the executable. strip_from_xcode
1306 # only operates in the Release configuration.
1307 'postbuilds': [
1308 {
1309 'variables': {
1310 # Define strip_from_xcode in a variable ending in _path
1311 # so that gyp understands it's a path and performs proper
1312 # relativization during dict merging.
1313 'strip_from_xcode_path': 'mac/strip_from_xcode',
1314 },
1315 'postbuild_name': 'Strip If Needed',
1316 'action': ['<(strip_from_xcode_path)'],
1317 },
[email protected]e14a9f92009-08-05 19:26:071318 ], # postbuilds
1319 }], # mac_real_dsym
1320 ], # target_conditions
[email protected]9a5e72862010-09-02 16:16:581321 }], # (_type=="executable" or _type=="shared_library" or
1322 # _type=="loadable_module") and mac_strip!=0
[email protected]e14a9f92009-08-05 19:26:071323 ], # target_conditions
1324 }, # target_defaults
1325 }], # OS=="mac"
[email protected]2f80c312009-02-25 21:26:551326 ['OS=="win"', {
1327 'target_defaults': {
1328 'defines': [
1329 '_WIN32_WINNT=0x0600',
1330 'WINVER=0x0600',
1331 'WIN32',
1332 '_WINDOWS',
[email protected]2f80c312009-02-25 21:26:551333 'NOMINMAX',
1334 '_CRT_RAND_S',
1335 'CERT_CHAIN_PARA_HAS_EXTRA_FIELDS',
1336 'WIN32_LEAN_AND_MEAN',
1337 '_SECURE_ATL',
[email protected]7a812dd62010-06-30 18:52:271338 '_ATL_NO_OPENGL',
[email protected]adfb98c2009-06-23 20:08:451339 '_HAS_TR1=0',
[email protected]2f80c312009-02-25 21:26:551340 ],
[email protected]8974e042010-06-21 18:06:521341 'conditions': [
1342 ['component=="static_library"', {
1343 'defines': [
1344 '_HAS_EXCEPTIONS=0',
1345 ],
1346 }],
1347 ],
[email protected]5b5ca7cb2009-07-20 23:00:201348 'msvs_system_include_dirs': [
[email protected]998b5152009-12-12 22:19:521349 '<(DEPTH)/third_party/platformsdk_win7/files/Include',
[email protected]a78da50e2010-06-09 21:31:371350 '<(DEPTH)/third_party/directxsdk/files/Include',
[email protected]2f80c312009-02-25 21:26:551351 '$(VSInstallDir)/VC/atlmfc/include',
1352 ],
[email protected]a8d99cef2009-08-26 20:47:491353 'msvs_cygwin_dirs': ['<(DEPTH)/third_party/cygwin'],
[email protected]365632b2010-06-22 02:01:571354 'msvs_disabled_warnings': [4351, 4396, 4503, 4819],
[email protected]2f80c312009-02-25 21:26:551355 'msvs_settings': {
1356 'VCCLCompilerTool': {
1357 'MinimalRebuild': 'false',
[email protected]2f80c312009-02-25 21:26:551358 'BufferSecurityCheck': 'true',
1359 'EnableFunctionLevelLinking': 'true',
1360 'RuntimeTypeInfo': 'false',
1361 'WarningLevel': '3',
1362 'WarnAsError': 'true',
1363 'DebugInformationFormat': '3',
[email protected]3fef6e62009-07-31 19:58:581364 'conditions': [
[email protected]912c55c2009-07-31 23:33:551365 [ 'msvs_multi_core_compile', {
[email protected]1f9471a2010-01-04 06:40:161366 'AdditionalOptions': ['/MP'],
[email protected]912c55c2009-07-31 23:33:551367 }],
[email protected]8974e042010-06-21 18:06:521368 ['component=="shared_library"', {
1369 'ExceptionHandling': '1', # /EHsc
1370 }, {
1371 'ExceptionHandling': '0',
1372 }],
[email protected]3fef6e62009-07-31 19:58:581373 ],
[email protected]2f80c312009-02-25 21:26:551374 },
1375 'VCLibrarianTool': {
[email protected]1f9471a2010-01-04 06:40:161376 'AdditionalOptions': ['/ignore:4221'],
[email protected]a78da50e2010-06-09 21:31:371377 'AdditionalLibraryDirectories': [
1378 '<(DEPTH)/third_party/platformsdk_win7/files/Lib',
1379 '<(DEPTH)/third_party/directxsdk/files/Lib/x86',
1380 ],
[email protected]2f80c312009-02-25 21:26:551381 },
1382 'VCLinkerTool': {
[email protected]2f80c312009-02-25 21:26:551383 'AdditionalDependencies': [
1384 'wininet.lib',
1385 'version.lib',
1386 'msimg32.lib',
1387 'ws2_32.lib',
1388 'usp10.lib',
1389 'psapi.lib',
[email protected]96fd0032009-04-24 00:13:081390 'dbghelp.lib',
[email protected]2f80c312009-02-25 21:26:551391 ],
[email protected]a78da50e2010-06-09 21:31:371392 'AdditionalLibraryDirectories': [
1393 '<(DEPTH)/third_party/platformsdk_win7/files/Lib',
1394 '<(DEPTH)/third_party/directxsdk/files/Lib/x86',
1395 ],
[email protected]2f80c312009-02-25 21:26:551396 'GenerateDebugInformation': 'true',
1397 'MapFileName': '$(OutDir)\\$(TargetName).map',
1398 'ImportLibrary': '$(OutDir)\\lib\\$(TargetName).lib',
[email protected]2f80c312009-02-25 21:26:551399 'FixedBaseAddress': '1',
[email protected]825ff8d2009-05-22 01:40:481400 # SubSystem values:
1401 # 0 == not set
1402 # 1 == /SUBSYSTEM:CONSOLE
1403 # 2 == /SUBSYSTEM:WINDOWS
1404 # Most of the executables we'll ever create are tests
1405 # and utilities with console output.
1406 'SubSystem': '1',
[email protected]2f80c312009-02-25 21:26:551407 },
1408 'VCMIDLTool': {
1409 'GenerateStublessProxies': 'true',
1410 'TypeLibraryName': '$(InputName).tlb',
1411 'OutputDirectory': '$(IntDir)',
1412 'HeaderFileName': '$(InputName).h',
1413 'DLLDataFileName': 'dlldata.c',
1414 'InterfaceIdentifierFileName': '$(InputName)_i.c',
1415 'ProxyFileName': '$(InputName)_p.c',
1416 },
1417 'VCResourceCompilerTool': {
1418 'Culture' : '1033',
[email protected]4d91cbc2010-05-07 20:41:381419 'AdditionalIncludeDirectories': [
1420 '<(DEPTH)',
1421 '<(SHARED_INTERMEDIATE_DIR)',
1422 ],
[email protected]2f80c312009-02-25 21:26:551423 },
1424 },
1425 },
1426 }],
[email protected]93f21e42010-04-01 00:35:151427 ['disable_nacl==1 or OS=="freebsd" or OS=="openbsd" or OS=="solaris"', {
[email protected]d8c7cbcc2009-10-02 19:00:311428 'target_defaults': {
1429 'defines': [
1430 'DISABLE_NACL',
1431 ],
1432 },
1433 }],
[email protected]cfbf9bc2009-12-07 22:07:561434 ['OS=="win" and msvs_use_common_linker_extras', {
[email protected]48c7af72009-07-03 22:00:191435 'target_defaults': {
1436 'msvs_settings': {
1437 'VCLinkerTool': {
[email protected]48c7af72009-07-03 22:00:191438 'DelayLoadDLLs': [
1439 'dbghelp.dll',
1440 'dwmapi.dll',
1441 'uxtheme.dll',
1442 ],
1443 },
1444 },
[email protected]ef4fa4072009-12-04 22:46:501445 'configurations': {
[email protected]5153767c2009-12-22 01:52:501446 'x86_Base': {
[email protected]ef4fa4072009-12-04 22:46:501447 'msvs_settings': {
1448 'VCLinkerTool': {
[email protected]1f9471a2010-01-04 06:40:161449 'AdditionalOptions': [
1450 '/safeseh',
1451 '/dynamicbase',
1452 '/ignore:4199',
1453 '/ignore:4221',
1454 '/nxcompat',
1455 ],
[email protected]ef4fa4072009-12-04 22:46:501456 },
1457 },
1458 },
[email protected]5153767c2009-12-22 01:52:501459 'x64_Base': {
[email protected]ef4fa4072009-12-04 22:46:501460 'msvs_settings': {
1461 'VCLinkerTool': {
[email protected]1f9471a2010-01-04 06:40:161462 'AdditionalOptions': [
[email protected]ef4fa4072009-12-04 22:46:501463 # safeseh is not compatible with x64
[email protected]1f9471a2010-01-04 06:40:161464 '/dynamicbase',
1465 '/ignore:4199',
1466 '/ignore:4221',
1467 '/nxcompat',
1468 ],
[email protected]ef4fa4072009-12-04 22:46:501469 },
1470 },
1471 },
1472 },
[email protected]48c7af72009-07-03 22:00:191473 },
1474 }],
[email protected]9821d0d2010-04-16 22:40:371475 ['enable_new_npdevice_api==1', {
1476 'target_defaults': {
1477 'defines': [
1478 'ENABLE_NEW_NPDEVICE_API',
1479 ],
1480 },
1481 }],
[email protected]2f80c312009-02-25 21:26:551482 ],
1483 'xcode_settings': {
[email protected]0c8ab452009-11-06 21:57:501484 # DON'T ADD ANYTHING NEW TO THIS BLOCK UNLESS YOU REALLY REALLY NEED IT!
1485 # This block adds *project-wide* configuration settings to each project
1486 # file. It's almost always wrong to put things here. Specify your
1487 # custom xcode_settings in target_defaults to add them to targets instead.
1488
1489 # In an Xcode Project Info window, the "Base SDK for All Configurations"
1490 # setting sets the SDK on a project-wide basis. In order to get the
1491 # configured SDK to show properly in the Xcode UI, SDKROOT must be set
1492 # here at the project level.
1493 'SDKROOT': 'macosx<(mac_sdk)', # -isysroot
1494
[email protected]2f80c312009-02-25 21:26:551495 # The Xcode generator will look for an xcode_settings section at the root
1496 # of each dict and use it to apply settings on a file-wide basis. Most
1497 # settings should not be here, they should be in target-specific
1498 # xcode_settings sections, or better yet, should use non-Xcode-specific
1499 # settings in target dicts. SYMROOT is a special case, because many other
1500 # Xcode variables depend on it, including variables such as
1501 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something
1502 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the
1503 # files to appear (when present) in the UI as actual files and not red
1504 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR,
1505 # and therefore SYMROOT, needs to be set at the project level.
[email protected]bfa24b962009-03-02 00:16:161506 'SYMROOT': '<(DEPTH)/xcodebuild',
[email protected]2f80c312009-02-25 21:26:551507 },
[email protected]ee28c9f2009-09-04 01:53:011508}
[email protected]f5c990c2009-10-06 03:02:381509
1510# Local Variables:
1511# tab-width:2
1512# indent-tabs-mode:nil
1513# End:
1514# vim: set expandtab tabstop=2 shiftwidth=2: