blob: 23a47531e533c8bf5341740d7beaa7227fef5b08 [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.
[email protected]90142dd2011-02-08 09:00:45110 'use_libjpeg_turbo%': 1,
[email protected]e72e55b2011-01-06 22:19:30111
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]98da0042011-02-02 00:10:27122 # Use translations provided by volunteers at launchpad.net. This
123 # currently only works on Linux.
[email protected]00dc155832011-02-01 18:51:19124 'use_third_party_translations%': 0,
125
[email protected]9a425422011-01-11 00:53:18126 # Remoting compilation is enabled by default. Set to 0 to disable.
127 'remoting%': 1,
128
[email protected]bb6aba32011-01-07 19:04:43129 'conditions': [
[email protected]63692212010-09-16 00:22:21130 # A flag to enable or disable our compile-time dependency
131 # on gnome-keyring. If that dependency is disabled, no gnome-keyring
132 # support will be available. This option is useful
133 # for Linux distributions.
134 ['chromeos==1', {
135 'use_gnome_keyring%': 0,
136 }, {
137 'use_gnome_keyring%': 1,
138 }],
[email protected]0afe5212010-10-01 18:56:11139
140 # Set to 1 compile with -fPIC cflag on linux. This is a must for shared
141 # libraries on linux x86-64 and arm.
142 ['host_arch=="ia32"', {
143 'linux_fpic%': 0,
144 }, {
145 'linux_fpic%': 1,
146 }],
[email protected]1b4209f2011-01-07 00:25:40147
[email protected]bb6aba32011-01-07 19:04:43148 ['toolkit_views==0 or OS=="mac"', {
149 # GTK+ and Mac wants Title Case strings
150 'use_titlecase_in_grd_files%': 1,
151 }],
152
[email protected]1b4209f2011-01-07 00:25:40153 # Enable some hacks to support Flapper only on Chrome OS.
154 ['chromeos==1', {
155 'enable_flapper_hacks%': 1,
156 }, {
157 'enable_flapper_hacks%': 0,
158 }],
[email protected]b3f23ba2010-04-26 22:58:17159 ],
[email protected]e14a9f92009-08-05 19:26:07160 },
161
[email protected]e72e55b2011-01-06 22:19:30162 # Copy conditionally-set variables out one scope.
[email protected]e14a9f92009-08-05 19:26:07163 'branding%': '<(branding)',
164 'buildtype%': '<(buildtype)',
[email protected]e0d00142009-09-18 22:10:27165 'target_arch%': '<(target_arch)',
[email protected]cf185b32010-01-12 04:29:59166 'host_arch%': '<(host_arch)',
[email protected]c153e5352009-09-22 12:37:44167 'toolkit_views%': '<(toolkit_views)',
[email protected]63692212010-09-16 00:22:21168 'use_gnome_keyring%': '<(use_gnome_keyring)',
[email protected]0afe5212010-10-01 18:56:11169 'linux_fpic%': '<(linux_fpic)',
[email protected]1b4209f2011-01-07 00:25:40170 'enable_flapper_hacks%': '<(enable_flapper_hacks)',
[email protected]c153e5352009-09-22 12:37:44171 'chromeos%': '<(chromeos)',
[email protected]93012ca2010-08-10 20:10:49172 'touchui%': '<(touchui)',
[email protected]b2f030c2009-09-24 20:36:21173 'inside_chromium_build%': '<(inside_chromium_build)',
[email protected]9c1949e2009-10-02 19:59:54174 'fastbuild%': '<(fastbuild)',
[email protected]a76fe1a2010-03-01 23:39:36175 'python_ver%': '<(python_ver)',
[email protected]eafc0b452010-02-26 21:53:43176 'armv7%': '<(armv7)',
177 'arm_neon%': '<(arm_neon)',
[email protected]4d83eb72010-03-04 16:42:23178 'sysroot%': '<(sysroot)',
[email protected]ac120ff2010-04-28 02:14:22179 'disable_sse2%': '<(disable_sse2)',
[email protected]8974e042010-06-21 18:06:52180 'library%': '<(library)',
181 'component%': '<(component)',
[email protected]bb6aba32011-01-07 19:04:43182 'use_titlecase_in_grd_files%': '<(use_titlecase_in_grd_files)',
[email protected]9e94cca2011-02-04 17:38:17183 'use_third_party_translations%': '<(use_third_party_translations)',
[email protected]9a425422011-01-11 00:53:18184 'remoting%': '<(remoting)',
[email protected]e14a9f92009-08-05 19:26:07185
[email protected]caa95c82009-11-23 22:39:32186 # The release channel that this build targets. This is used to restrict
187 # channel-specific build options, like which installer packages to create.
188 # The default is 'all', which does no channel-specific filtering.
189 'channel%': 'all',
190
[email protected]b3fb8092009-03-12 19:09:24191 # Override chromium_mac_pch and set it to 0 to suppress the use of
192 # precompiled headers on the Mac. Prefix header injection may still be
193 # used, but prefix headers will not be precompiled. This is useful when
194 # using distcc to distribute a build to compile slaves that don't
195 # share the same compiler executable as the system driving the compilation,
196 # because precompiled headers rely on pointers into a specific compiler
197 # executable's image. Setting this to 0 is needed to use an experimental
198 # Linux-Mac cross compiler distcc farm.
199 'chromium_mac_pch%': 1,
200
[email protected]3224dcd2009-09-16 17:31:25201 # Mac OS X SDK and deployment target support.
202 # The SDK identifies the version of the system headers that will be used,
203 # and corresponds to the MAC_OS_X_VERSION_MAX_ALLOWED compile-time macro.
204 # "Maximum allowed" refers to the operating system version whose APIs are
205 # available in the headers.
206 # The deployment target identifies the minimum system version that the
207 # built products are expected to function on. It corresponds to the
208 # MAC_OS_X_VERSION_MIN_REQUIRED compile-time macro.
209 # To ensure these macros are available, #include <AvailabilityMacros.h>.
210 # Additional documentation on these macros is available at
211 # http://developer.apple.com/mac/library/technotes/tn2002/tn2064.html#SECTION3
212 # Chrome normally builds with the Mac OS X 10.5 SDK and sets the
213 # deployment target to 10.5. Other projects, such as O3D, may override
214 # these defaults.
215 'mac_sdk%': '10.5',
216 'mac_deployment_target%': '10.5',
[email protected]9543af052009-09-15 22:42:59217
[email protected]f5ecbba12009-04-03 04:35:18218 # Set to 1 to enable code coverage. In addition to build changes
219 # (e.g. extra CFLAGS), also creates a new target in the src/chrome
220 # project file called "coverage".
221 # Currently ignored on Windows.
222 'coverage%': 0,
[email protected]653bd5f032009-04-08 12:55:49223
[email protected]c61f6432009-04-22 01:16:42224 # Overridable specification for potential use of alternative
225 # JavaScript engines.
226 'javascript_engine%': 'v8',
227
[email protected]7477ea6f2009-12-22 23:28:15228 # Although base/allocator lets you select a heap library via an
[email protected]7e0d664a2009-12-03 21:07:47229 # environment variable, the libcmt shim it uses sometimes gets in
230 # the way. To disable it entirely, and switch to normal msvcrt, do e.g.
231 # 'win_use_allocator_shim': 0,
232 # 'win_release_RuntimeLibrary': 2
233 # to ~/.gyp/include.gypi, gclient runhooks --force, and do a release build.
[email protected]8974e042010-06-21 18:06:52234 'win_use_allocator_shim%': 1, # 1 = shim allocator via libcmt; 0 = msvcrt
[email protected]279cd4212009-09-11 22:32:11235
[email protected]95ff8082009-11-13 22:21:01236 # Whether usage of OpenMAX is enabled.
237 'enable_openmax%': 0,
238
[email protected]d01120e62010-05-10 17:04:48239 # Whether proprietary audio/video codecs are assumed to be included with
240 # this build (only meaningful if branding!=Chrome).
241 'proprietary_codecs%': 0,
242
[email protected]e5b2eaa2009-04-14 01:39:12243 # TODO(bradnelson): eliminate this when possible.
244 # To allow local gyp files to prevent release.vsprops from being included.
245 # Yes(1) means include release.vsprops.
246 # Once all vsprops settings are migrated into gyp, this can go away.
247 'msvs_use_common_release%': 1,
[email protected]606116d22009-05-06 22:38:23248
[email protected]cbd5fd52009-08-26 00:14:27249 # TODO(bradnelson): eliminate this when possible.
250 # To allow local gyp files to override additional linker options for msvs.
251 # Yes(1) means set use the common linker options.
[email protected]48c7af72009-07-03 22:00:19252 'msvs_use_common_linker_extras%': 1,
253
[email protected]1ffb6502009-06-02 07:46:24254 # TODO(sgk): eliminate this if possible.
255 # It would be nicer to support this via a setting in 'target_defaults'
256 # in chrome/app/locales/locales.gypi overriding the setting in the
257 # 'Debug' configuration in the 'target_defaults' dict below,
258 # but that doesn't work as we'd like.
259 'msvs_debug_link_incremental%': '2',
260
[email protected]1f790ef2011-01-11 20:45:36261 # Needed for some of the largest modules.
262 'msvs_debug_link_nonincremental%': '1',
263
[email protected]573136142009-07-15 22:48:37264 # This is the location of the sandbox binary. Chrome looks for this before
265 # running the zygote process. If found, and SUID, it will be used to
266 # sandbox the zygote process and, thus, all renderer processes.
267 'linux_sandbox_path%': '',
268
[email protected]ad6d2c42009-09-15 20:13:38269 # Set this to true to enable SELinux support.
270 'selinux%': 0,
[email protected]4c9cc6c2009-10-01 18:54:57271
[email protected]58680ce2010-09-18 00:09:15272 # Set this to true when building with Clang.
273 # See http://code.google.com/p/chromium/wiki/Clang for details.
274 # TODO: eventually clang should behave identically to gcc, and this
275 # won't be necessary.
276 'clang%': 0,
277
[email protected]5e781232011-01-28 02:57:59278 # These two variables can be set in GYP_DEFINES while running
279 # |gclient runhooks| to let clang run a plugin in every compilation.
280 # Only has an effect if 'clang=1' is in GYP_DEFINES as well.
281 # Example:
[email protected]93120fe2011-02-03 20:46:42282 # GYP_DEFINES='clang=1 clang_load=/abs/path/to/libPrintFunctionNames.dylib clang_add_plugin=print-fns' gclient runhooks
[email protected]5e781232011-01-28 02:57:59283
284 'clang_load%': '',
285 'clang_add_plugin%': '',
286
[email protected]7664ab32011-02-01 23:35:25287 # Enable sampling based profiler.
288 # See http://google-perftools.googlecode.com/svn/trunk/doc/cpuprofile.html
289 'profiling%': '0',
290
[email protected]36532f332010-08-25 00:22:01291 # Override whether we should use Breakpad on Linux. I.e. for Chrome bot.
292 'linux_breakpad%': 0,
293 # And if we want to dump symbols for Breakpad-enabled builds.
294 'linux_dump_symbols%': 0,
295 # And if we want to strip the binary after dumping symbols.
[email protected]05cb6962009-10-01 23:29:03296 'linux_strip_binary%': 0,
[email protected]1d87c282010-09-15 22:24:49297 # Strip the test binaries needed for Linux reliability tests.
298 'linux_strip_reliability_tests%': 0,
[email protected]05cb6962009-10-01 23:29:03299
[email protected]46ce5b562010-06-16 18:39:53300 # Enable TCMalloc.
301 'linux_use_tcmalloc%': 1,
[email protected]01699e22009-11-11 19:24:24302
[email protected]39ca7de2010-04-16 08:04:03303 # Disable TCMalloc's debugallocation.
304 'linux_use_debugallocation%': 0,
305
[email protected]d8b60602010-03-26 09:41:22306 # Disable TCMalloc's heapchecker.
307 'linux_use_heapchecker%': 0,
308
[email protected]64e2d4a42010-08-27 10:13:21309 # Disable shadow stack keeping used by heapcheck to unwind the stacks
310 # better.
311 'linux_keep_shadow_stacks%': 0,
312
[email protected]6def64a2010-10-28 20:40:34313 # Set to 1 to turn on seccomp sandbox by default.
314 # (Note: this is ignored for official builds.)
315 'linux_use_seccomp_sandbox%': 0,
[email protected]39c4e1a82010-03-30 19:47:41316
[email protected]556c5d72010-06-10 05:45:01317 # Set to 1 to link against libgnome-keyring instead of using dlopen().
318 'linux_link_gnome_keyring%': 0,
319
[email protected]d8c7cbcc2009-10-02 19:00:31320 # Used to disable Native Client at compile time, for platforms where it
321 # isn't supported
322 'disable_nacl%': 0,
323
[email protected]77c1b29392009-12-04 06:21:29324 # Set Thumb compilation flags.
325 'arm_thumb%': 0,
326
[email protected]53e0f642010-03-05 01:41:56327 # Set ARM fpu compilation flags (only meaningful if armv7==1 and
328 # arm_neon==0).
329 'arm_fpu%': 'vfpv3',
330
[email protected]9821d0d2010-04-16 22:40:37331 # Enable new NPDevice API.
332 'enable_new_npdevice_api%': 0,
[email protected]ed154592010-04-29 00:18:50333
334 # Enable EGLImage support in OpenMAX
[email protected]58023be2011-02-04 20:34:14335 'enable_eglimage%': 1,
[email protected]ed154592010-04-29 00:18:50336
[email protected]6f51b27e2010-06-22 20:43:53337 # Enable a variable used elsewhere throughout the GYP files to determine
338 # whether to compile in the sources for the GPU plugin / process.
339 'enable_gpu%': 1,
340
[email protected]32e1dee2010-12-09 18:36:24341 # Use OpenSSL instead of NSS. Under development: see http://crbug.com/62803
[email protected]d518cd92010-09-29 12:27:44342 'use_openssl%': 0,
343
[email protected]e72e55b2011-01-06 22:19:30344 # .gyp files or targets should set chromium_code to 1 if they build
345 # Chromium-specific code, as opposed to external code. This variable is
346 # used to control such things as the set of warnings to enable, and
347 # whether warnings are treated as errors.
348 'chromium_code%': 0,
349
350 # Set to 1 to compile with the built in pdf viewer.
351 'internal_pdf%': 0,
352
353 # This allows to use libcros from the current system, ie. /usr/lib/
354 # The cros_api will be pulled in as a static library, and all headers
355 # from the system include dirs.
[email protected]bb6aba32011-01-07 19:04:43356 'system_libcros%': 0,
[email protected]e72e55b2011-01-06 22:19:30357
[email protected]e72e55b2011-01-06 22:19:30358 # NOTE: When these end up in the Mac bundle, we need to replace '-' for '_'
359 # so Cocoa is happy (http://crbug.com/20441).
360 'locales': [
361 'am', 'ar', 'bg', 'bn', 'ca', 'cs', 'da', 'de', 'el', 'en-GB',
362 'en-US', 'es-419', 'es', 'et', 'fa', 'fi', 'fil', 'fr', 'gu', 'he',
363 'hi', 'hr', 'hu', 'id', 'it', 'ja', 'kn', 'ko', 'lt', 'lv',
364 'ml', 'mr', 'nb', 'nl', 'pl', 'pt-BR', 'pt-PT', 'ro', 'ru',
365 'sk', 'sl', 'sr', 'sv', 'sw', 'ta', 'te', 'th', 'tr', 'uk',
366 'vi', 'zh-CN', 'zh-TW',
367 ],
368
[email protected]bb6aba32011-01-07 19:04:43369 'grit_defines': [],
370
[email protected]29c2daea2011-01-05 20:38:50371 # Use Harfbuzz-NG instead of Harfbuzz.
372 # Under development: http://crbug.com/68551
373 'use_harfbuzz_ng%': 0,
374
[email protected]912c55c2009-07-31 23:33:55375 'conditions': [
[email protected]47deeb62009-12-17 14:49:39376 ['OS=="linux" or OS=="freebsd" or OS=="openbsd"', {
[email protected]242a9e62009-11-03 17:32:10377 # This will set gcc_version to XY if you are running gcc X.Y.*.
378 # This is used to tweak build flags for gcc 4.4.
379 'gcc_version%': '<!(python <(DEPTH)/build/compiler_version.py)',
[email protected]4d83eb72010-03-04 16:42:23380 # Figure out the python architecture to decide if we build pyauto.
[email protected]efd68462010-03-04 17:07:54381 'python_arch%': '<!(<(DEPTH)/build/linux/python_arch.sh <(sysroot)/usr/lib/libpython<(python_ver).so.1.0)',
[email protected]cbd5fd52009-08-26 00:14:27382 'conditions': [
[email protected]2a77a9d2010-08-26 19:58:10383 ['branding=="Chrome"', {
[email protected]cbd5fd52009-08-26 00:14:27384 'linux_breakpad%': 1,
[email protected]cbd5fd52009-08-26 00:14:27385 }],
[email protected]4c9cc6c2009-10-01 18:54:57386 # All Chrome builds have breakpad symbols, but only process the
387 # symbols from official builds.
[email protected]c913cb82010-08-31 19:44:08388 ['(branding=="Chrome" and buildtype=="Official")', {
[email protected]4c9cc6c2009-10-01 18:54:57389 'linux_dump_symbols%': 1,
[email protected]4c9cc6c2009-10-01 18:54:57390 }],
[email protected]cbd5fd52009-08-26 00:14:27391 ],
[email protected]47deeb62009-12-17 14:49:39392 }], # OS=="linux" or OS=="freebsd" or OS=="openbsd"
[email protected]bb6aba32011-01-07 19:04:43393
[email protected]e14a9f92009-08-05 19:26:07394 ['OS=="mac"', {
395 'conditions': [
396 # mac_product_name is set to the name of the .app bundle as it should
397 # appear on disk. This duplicates data from
398 # chrome/app/theme/chromium/BRANDING and
399 # chrome/app/theme/google_chrome/BRANDING, but is necessary to get
400 # these names into the build system.
401 ['branding=="Chrome"', {
402 'mac_product_name%': 'Google Chrome',
403 }, { # else: branding!="Chrome"
404 'mac_product_name%': 'Chromium',
405 }],
406
407 # Feature variables for enabling Mac Breakpad and Keystone auto-update
408 # support. Both features are on by default in official builds with
409 # Chrome branding.
410 ['branding=="Chrome" and buildtype=="Official"', {
411 'mac_breakpad%': 1,
412 'mac_keystone%': 1,
413 }, { # else: branding!="Chrome" or buildtype!="Official"
414 'mac_breakpad%': 0,
415 'mac_keystone%': 0,
416 }],
417 ],
418 }], # OS=="mac"
[email protected]bb6aba32011-01-07 19:04:43419
[email protected]912c55c2009-07-31 23:33:55420 # Whether to use multiple cores to compile with visual studio. This is
421 # optional because it sometimes causes corruption on VS 2005.
422 # It is on by default on VS 2008 and off on VS 2005.
423 ['OS=="win"', {
424 'conditions': [
[email protected]8974e042010-06-21 18:06:52425 ['component=="shared_library"', {
426 'win_use_allocator_shim%': 0,
427 }],
[email protected]912c55c2009-07-31 23:33:55428 ['MSVS_VERSION=="2005"', {
[email protected]669795372009-08-14 17:51:13429 'msvs_multi_core_compile%': 0,
[email protected]912c55c2009-07-31 23:33:55430 },{
431 'msvs_multi_core_compile%': 1,
432 }],
[email protected]10bb8c92009-08-07 21:16:03433 # Don't do incremental linking for large modules on 32-bit.
434 ['MSVS_OS_BITS==32', {
435 'msvs_large_module_debug_link_mode%': '1', # No
436 },{
437 'msvs_large_module_debug_link_mode%': '2', # Yes
438 }],
[email protected]912c55c2009-07-31 23:33:55439 ],
[email protected]ef4fa4072009-12-04 22:46:50440 'nacl_win64_defines': [
441 # This flag is used to minimize dependencies when building
442 # Native Client loader for 64-bit Windows.
443 'NACL_WIN64',
444 ],
[email protected]912c55c2009-07-31 23:33:55445 }],
[email protected]bb6aba32011-01-07 19:04:43446
[email protected]6df3ebf2010-10-29 20:30:38447 ['OS=="mac" or (OS=="linux" and chromeos==0 and target_arch!="arm")', {
[email protected]8e553f492010-10-25 20:05:44448 'use_cups%': 1,
449 }, {
450 'use_cups%': 0,
451 }],
[email protected]bb6aba32011-01-07 19:04:43452
[email protected]19fe8f0b2010-12-07 07:27:27453 # Set the relative path from this file to the GYP file of the JPEG
454 # library used by Chromium.
455 ['use_libjpeg_turbo==1', {
456 'libjpeg_gyp_path': '../third_party/libjpeg_turbo/libjpeg.gyp',
457 }, {
458 'libjpeg_gyp_path': '../third_party/libjpeg/libjpeg.gyp',
459 }], # use_libjpeg_turbo==1
[email protected]bb6aba32011-01-07 19:04:43460
[email protected]1c6fe29302011-01-20 22:14:31461 # Use GConf, the GNOME configuration system.
462 ['chromeos==1', {
463 'use_gconf%': 0,
464 }, {
465 'use_gconf%': 1,
466 }],
467
[email protected]bb6aba32011-01-07 19:04:43468 # Setup -D flags passed into grit.
469 ['chromeos==1', {
470 'grit_defines': ['-D', 'chromeos'],
471 }],
472 ['toolkit_views==1', {
473 'grit_defines': ['-D', 'toolkit_views'],
474 }],
475 ['touchui==1', {
476 'grit_defines': ['-D', 'touchui'],
477 }],
[email protected]9a425422011-01-11 00:53:18478 ['remoting==1', {
479 'grit_defines': ['-D', 'remoting'],
480 }],
[email protected]bb6aba32011-01-07 19:04:43481 ['use_titlecase_in_grd_files==1', {
482 'grit_defines': ['-D', 'use_titlecase'],
483 }],
[email protected]00dc155832011-02-01 18:51:19484 ['use_third_party_translations==1', {
485 'grit_defines': ['-D', 'use_third_party_translations'],
[email protected]98da0042011-02-02 00:10:27486 'locales': ['ast', 'eu', 'gl', 'ka', 'ku', 'ug'],
[email protected]00dc155832011-02-01 18:51:19487 }],
[email protected]912c55c2009-07-31 23:33:55488 ],
[email protected]2f80c312009-02-25 21:26:55489 },
490 'target_defaults': {
[email protected]1c966092009-08-20 21:19:26491 'variables': {
[email protected]a6e22132010-02-10 20:43:18492 # The condition that operates on chromium_code is in a target_conditions
493 # section, and will not have access to the default fallback value of
494 # chromium_code at the top of this file, or to the chromium_code
495 # variable placed at the root variables scope of .gyp files, because
496 # those variables are not set at target scope. As a workaround,
497 # if chromium_code is not set at target scope, define it in target scope
498 # to contain whatever value it has during early variable expansion.
499 # That's enough to make it available during target conditional
500 # processing.
501 'chromium_code%': '<(chromium_code)',
502
[email protected]7e0d664a2009-12-03 21:07:47503 # See http://gcc.gnu.org/onlinedocs/gcc-4.4.2/gcc/Optimize-Options.html
[email protected]d5d593a2009-08-28 23:23:29504 'mac_release_optimization%': '3', # Use -O3 unless overridden
[email protected]ffd984b12009-09-11 19:37:00505 'mac_debug_optimization%': '0', # Use -O0 unless overridden
[email protected]7e0d664a2009-12-03 21:07:47506 # See http://msdn.microsoft.com/en-us/library/aa652360(VS.71).aspx
507 'win_release_Optimization%': '2', # 2 = /Os
508 'win_debug_Optimization%': '0', # 0 = /Od
[email protected]6b0507b2010-05-07 07:41:21509 # See http://msdn.microsoft.com/en-us/library/8wtf2dfz(VS.71).aspx
510 'win_debug_RuntimeChecks%': '3', # 3 = all checks enabled, 0 = off
511 # See http://msdn.microsoft.com/en-us/library/47238hez(VS.71).aspx
[email protected]2ae6e022010-05-07 13:19:15512 'win_debug_InlineFunctionExpansion%': '', # empty = default, 0 = off,
513 'win_release_InlineFunctionExpansion%': '2', # 1 = only __inline, 2 = max
[email protected]fac10d12010-11-08 16:00:31514 # VS inserts quite a lot of extra checks to algorithms like
515 # std::partial_sort in Debug build which make them O(N^2)
516 # instead of O(N*logN). This is particularly slow under memory
517 # tools like ThreadSanitizer so we want it to be disablable.
518 # See http://msdn.microsoft.com/en-us/library/aa985982(v=VS.80).aspx
519 'win_debug_disable_iterator_debugging%': '0',
[email protected]7e0d664a2009-12-03 21:07:47520
[email protected]ffd984b12009-09-11 19:37:00521 'release_extra_cflags%': '',
522 'debug_extra_cflags%': '',
[email protected]92822e82009-09-18 14:26:56523 'release_valgrind_build%': 0,
[email protected]8974e042010-06-21 18:06:52524
525 'conditions': [
526 ['OS=="win" and component=="shared_library"', {
527 # See http://msdn.microsoft.com/en-us/library/aa652367.aspx
528 'win_release_RuntimeLibrary%': '2', # 2 = /MT (nondebug DLL)
529 'win_debug_RuntimeLibrary%': '3', # 3 = /MTd (debug DLL)
530 }, {
531 # See http://msdn.microsoft.com/en-us/library/aa652367.aspx
532 'win_release_RuntimeLibrary%': '0', # 0 = /MT (nondebug static)
533 'win_debug_RuntimeLibrary%': '1', # 1 = /MTd (debug static)
534 }],
535 ],
[email protected]1c966092009-08-20 21:19:26536 },
[email protected]32aa8cc2009-03-04 21:36:39537 'conditions': [
538 ['branding=="Chrome"', {
539 'defines': ['GOOGLE_CHROME_BUILD'],
540 }, { # else: branding!="Chrome"
541 'defines': ['CHROMIUM_BUILD'],
542 }],
[email protected]06c756182010-04-27 18:31:31543 ['toolkit_views==1', {
[email protected]e6970232009-05-12 23:51:17544 'defines': ['TOOLKIT_VIEWS=1'],
545 }],
[email protected]fdc5bed2010-01-09 01:16:57546 ['chromeos==1', {
[email protected]16779842009-07-08 23:45:29547 'defines': ['OS_CHROMEOS=1'],
[email protected]2b883b92009-06-02 22:57:50548 }],
[email protected]0094fbe2010-07-15 21:51:43549 ['touchui==1', {
550 'defines': ['TOUCH_UI=1'],
551 }],
[email protected]7664ab32011-02-01 23:35:25552 ['profiling==1', {
553 'defines': ['ENABLE_PROFILING=1'],
554 }],
[email protected]542bf24a2010-06-11 23:08:17555 ['remoting==1', {
556 'defines': ['ENABLE_REMOTING=1'],
[email protected]c0bac532010-06-11 00:39:00557 }],
[email protected]d01120e62010-05-10 17:04:48558 ['proprietary_codecs==1', {
559 'defines': ['USE_PROPRIETARY_CODECS'],
560 }],
[email protected]1b4209f2011-01-07 00:25:40561 ['enable_flapper_hacks==1', {
562 'defines': ['ENABLE_FLAPPER_HACKS=1'],
563 }],
[email protected]9c1949e2009-10-02 19:59:54564 ['fastbuild!=0', {
565 'conditions': [
[email protected]1cc2fa72010-07-03 08:49:24566 # For Windows, we don't genererate debug information.
[email protected]9c1949e2009-10-02 19:59:54567 ['OS=="win"', {
568 'msvs_settings': {
569 'VCLinkerTool': {
570 'GenerateDebugInformation': 'false',
571 },
572 'VCCLCompilerTool': {
573 'DebugInformationFormat': '0',
574 }
575 }
[email protected]1cc2fa72010-07-03 08:49:24576 }, { # else: OS != "win", generate less debug information.
577 'variables': {
578 'debug_extra_cflags': '-g1',
579 },
[email protected]37c84192010-04-14 21:37:40580 }],
[email protected]aecc4d12011-01-19 05:32:33581 # Clang creates chubby debug information, which makes linking very
582 # slow. For now, don't create debug information with clang. See
583 # http://crbug.com/70000
584 ['OS=="linux" and clang==1', {
585 'variables': {
586 'debug_extra_cflags': '-g0',
587 },
588 }],
[email protected]9c1949e2009-10-02 19:59:54589 ], # conditions for fastbuild.
590 }], # fastbuild!=0
[email protected]ad6d2c42009-09-15 20:13:38591 ['selinux==1', {
592 'defines': ['CHROMIUM_SELINUX=1'],
593 }],
[email protected]7e0d664a2009-12-03 21:07:47594 ['win_use_allocator_shim==0', {
595 'conditions': [
596 ['OS=="win"', {
597 'defines': ['NO_TCMALLOC'],
598 }],
599 ],
600 }],
[email protected]43f28f832010-02-03 02:28:48601 ['enable_gpu==1', {
[email protected]7477ea6f2009-12-22 23:28:15602 'defines': [
603 'ENABLE_GPU=1',
604 ],
605 }],
[email protected]b1c2a5542010-10-08 12:44:40606 ['use_openssl==1', {
607 'defines': [
608 'USE_OPENSSL=1',
609 ],
610 }],
[email protected]ed154592010-04-29 00:18:50611 ['enable_eglimage==1', {
612 'defines': [
613 'ENABLE_EGLIMAGE=1',
614 ],
615 }],
[email protected]f5ecbba12009-04-03 04:35:18616 ['coverage!=0', {
617 'conditions': [
618 ['OS=="mac"', {
619 'xcode_settings': {
[email protected]ab2956372009-08-13 18:11:04620 'GCC_INSTRUMENT_PROGRAM_FLOW_ARCS': 'YES', # -fprofile-arcs
621 'GCC_GENERATE_TEST_COVERAGE_FILES': 'YES', # -ftest-coverage
[email protected]5ae4f55e2009-04-13 23:19:47622 },
[email protected]e4fb84c2009-12-28 20:45:43623 # Add -lgcov for types executable, shared_library, and
[email protected]dc259ce52010-04-13 04:03:10624 # loadable_module; not for static_library.
[email protected]e4fb84c2009-12-28 20:45:43625 # This is a delayed conditional.
[email protected]f5ecbba12009-04-03 04:35:18626 'target_conditions': [
[email protected]e4fb84c2009-12-28 20:45:43627 ['_type!="static_library"', {
[email protected]f5ecbba12009-04-03 04:35:18628 'xcode_settings': { 'OTHER_LDFLAGS': [ '-lgcov' ] },
[email protected]5ae4f55e2009-04-13 23:19:47629 }],
630 ],
631 }],
[email protected]f5ecbba12009-04-03 04:35:18632 ['OS=="linux"', {
633 'cflags': [ '-ftest-coverage',
634 '-fprofile-arcs' ],
[email protected]7122ffd52009-04-30 23:19:00635 'link_settings': { 'libraries': [ '-lgcov' ] },
[email protected]f5ecbba12009-04-03 04:35:18636 }],
[email protected]e8f6ff42009-07-07 18:20:53637 # Finally, for Windows, we simply turn on profiling.
638 ['OS=="win"', {
639 'msvs_settings': {
640 'VCLinkerTool': {
641 'Profile': 'true',
642 },
[email protected]10bb8c92009-08-07 21:16:03643 'VCCLCompilerTool': {
[email protected]e8f6ff42009-07-07 18:20:53644 # /Z7, not /Zi, so coverage is happyb
645 'DebugInformationFormat': '1',
[email protected]1f9471a2010-01-04 06:40:16646 'AdditionalOptions': ['/Yd'],
[email protected]e8f6ff42009-07-07 18:20:53647 }
648 }
649 }], # OS==win
650 ], # conditions for coverage
651 }], # coverage!=0
[email protected]4e4d6042010-08-26 18:34:38652 ['OS=="win"', {
653 'defines': [
654 '__STD_C',
655 '_CRT_SECURE_NO_DEPRECATE',
656 '_SCL_SECURE_NO_DEPRECATE',
657 ],
658 'include_dirs': [
659 '<(DEPTH)/third_party/wtl/include',
660 ],
661 }], # OS==win
[email protected]a6e22132010-02-10 20:43:18662 ], # conditions for 'target_defaults'
663 'target_conditions': [
[email protected]c14d8e772010-02-09 22:06:15664 ['chromium_code==0', {
[email protected]d8543312010-02-10 17:43:28665 'conditions': [
666 [ 'OS=="linux" or OS=="freebsd" or OS=="openbsd"', {
[email protected]c0a6b272011-02-09 22:32:33667 # We don't want to get warnings from third-party code,
668 # so remove any existing warning-enabling flags like -Wall.
[email protected]d8543312010-02-10 17:43:28669 'cflags!': [
670 '-Wall',
671 '-Wextra',
672 '-Werror',
673 ],
[email protected]ec1d155be2011-02-08 22:19:00674 'cflags': [
675 # Don't warn about hash_map in third-party code.
676 '-Wno-deprecated',
[email protected]c0a6b272011-02-09 22:32:33677 # Don't warn about printf format problems.
678 # This is off by default in gcc but on in Ubuntu's gcc(!).
679 '-Wformat=0',
[email protected]ec1d155be2011-02-08 22:19:00680 ],
[email protected]d8543312010-02-10 17:43:28681 }],
682 [ 'OS=="win"', {
683 'defines': [
684 '_CRT_SECURE_NO_DEPRECATE',
685 '_CRT_NONSTDC_NO_WARNINGS',
686 '_CRT_NONSTDC_NO_DEPRECATE',
687 '_SCL_SECURE_NO_DEPRECATE',
688 ],
689 'msvs_disabled_warnings': [4800],
690 'msvs_settings': {
691 'VCCLCompilerTool': {
692 'WarnAsError': 'false',
693 'Detect64BitPortabilityProblems': 'false',
694 },
695 },
696 }],
697 [ 'OS=="mac"', {
698 'xcode_settings': {
699 'GCC_TREAT_WARNINGS_AS_ERRORS': 'NO',
[email protected]4c4c2e5332010-06-15 11:51:06700 'WARNING_CFLAGS!': ['-Wall', '-Wextra'],
[email protected]d8543312010-02-10 17:43:28701 },
702 }],
[email protected]c14d8e772010-02-09 22:06:15703 ],
704 }, {
705 # In Chromium code, we define __STDC_FORMAT_MACROS in order to get the
706 # C99 macros on Mac and Linux.
707 'defines': [
708 '__STDC_FORMAT_MACROS',
709 ],
710 'conditions': [
711 ['OS!="win"', {
[email protected]40519592010-11-16 15:23:30712 'sources/': [ ['exclude', '_win(_unittest)?\\.(h|cc)$'],
[email protected]a316ca532010-11-15 14:08:16713 ['exclude', '(^|/)win/'],
[email protected]40519592010-11-16 15:23:30714 ['exclude', '(^|/)win_[^/]*\\.(h|cc)$'] ],
[email protected]c14d8e772010-02-09 22:06:15715 }],
716 ['OS!="mac"', {
[email protected]40519592010-11-16 15:23:30717 'sources/': [ ['exclude', '_(cocoa|mac)(_unittest)?\\.(h|cc)$'],
[email protected]a316ca532010-11-15 14:08:16718 ['exclude', '(^|/)(cocoa|mac)/'],
719 ['exclude', '\\.mm?$' ] ],
[email protected]c14d8e772010-02-09 22:06:15720 }],
721 ['OS!="linux" and OS!="freebsd" and OS!="openbsd"', {
722 'sources/': [
[email protected]40519592010-11-16 15:23:30723 ['exclude', '_(chromeos|gtk|x|x11|xdg)(_unittest)?\\.(h|cc)$'],
[email protected]a316ca532010-11-15 14:08:16724 ['exclude', '(^|/)gtk/'],
[email protected]40519592010-11-16 15:23:30725 ['exclude', '(^|/)(gtk|x11)_[^/]*\\.(h|cc)$'],
[email protected]18cff3d2010-02-17 18:03:13726 ],
727 }],
728 ['OS!="linux"', {
729 'sources/': [
[email protected]40519592010-11-16 15:23:30730 ['exclude', '_linux(_unittest)?\\.(h|cc)$'],
[email protected]a316ca532010-11-15 14:08:16731 ['exclude', '(^|/)linux/'],
[email protected]18cff3d2010-02-17 18:03:13732 ],
[email protected]c14d8e772010-02-09 22:06:15733 }],
734 # We use "POSIX" to refer to all non-Windows operating systems.
735 ['OS=="win"', {
[email protected]40519592010-11-16 15:23:30736 'sources/': [ ['exclude', '_posix\\.(h|cc)$'] ],
[email protected]f55bd4862010-05-27 15:38:07737 # turn on warnings for signed/unsigned mismatch on chromium code.
738 'msvs_settings': {
739 'VCCLCompilerTool': {
740 'AdditionalOptions': ['/we4389'],
741 },
742 },
[email protected]c14d8e772010-02-09 22:06:15743 }],
[email protected]c14d8e772010-02-09 22:06:15744 ['chromeos!=1', {
[email protected]40519592010-11-16 15:23:30745 'sources/': [ ['exclude', '_chromeos\\.(h|cc)$'] ]
[email protected]c14d8e772010-02-09 22:06:15746 }],
[email protected]06c756182010-04-27 18:31:31747 ['toolkit_views==0', {
[email protected]40519592010-11-16 15:23:30748 'sources/': [ ['exclude', '_views\\.(h|cc)$'] ]
[email protected]c14d8e772010-02-09 22:06:15749 }],
750 ],
751 }],
[email protected]a6e22132010-02-10 20:43:18752 ], # target_conditions for 'target_defaults'
[email protected]2f80c312009-02-25 21:26:55753 'default_configuration': 'Debug',
754 'configurations': {
[email protected]5153767c2009-12-22 01:52:50755 # VCLinkerTool LinkIncremental values below:
756 # 0 == default
757 # 1 == /INCREMENTAL:NO
758 # 2 == /INCREMENTAL
759 # Debug links incremental, Release does not.
760 #
[email protected]7b99801e2010-11-03 17:26:23761 # Abstract base configurations to cover common attributes.
[email protected]5153767c2009-12-22 01:52:50762 #
763 'Common_Base': {
[email protected]bb05e452009-10-29 21:24:56764 'abstract': 1,
765 'msvs_configuration_attributes': {
766 'OutputDirectory': '$(SolutionDir)$(ConfigurationName)',
767 'IntermediateDirectory': '$(OutDir)\\obj\\$(ProjectName)',
768 'CharacterSet': '1',
769 },
[email protected]5153767c2009-12-22 01:52:50770 },
771 'x86_Base': {
772 'abstract': 1,
[email protected]ef4fa4072009-12-04 22:46:50773 'msvs_settings': {
774 'VCLinkerTool': {
775 'TargetMachine': '1',
776 },
777 },
[email protected]2fa40782009-11-01 21:17:34778 'msvs_configuration_platform': 'Win32',
[email protected]bb05e452009-10-29 21:24:56779 },
[email protected]5153767c2009-12-22 01:52:50780 'x64_Base': {
781 'abstract': 1,
782 'msvs_configuration_platform': 'x64',
783 'msvs_settings': {
784 'VCLinkerTool': {
785 'TargetMachine': '17', # x86 - 64
[email protected]5153767c2009-12-22 01:52:50786 'AdditionalLibraryDirectories!':
787 ['<(DEPTH)/third_party/platformsdk_win7/files/Lib'],
788 'AdditionalLibraryDirectories':
789 ['<(DEPTH)/third_party/platformsdk_win7/files/Lib/x64'],
790 },
[email protected]d26b4418ab2010-03-24 22:06:35791 'VCLibrarianTool': {
[email protected]5153767c2009-12-22 01:52:50792 'AdditionalLibraryDirectories!':
793 ['<(DEPTH)/third_party/platformsdk_win7/files/Lib'],
794 'AdditionalLibraryDirectories':
795 ['<(DEPTH)/third_party/platformsdk_win7/files/Lib/x64'],
796 },
797 },
798 'defines': [
799 # Not sure if tcmalloc works on 64-bit Windows.
800 'NO_TCMALLOC',
801 ],
802 },
803 'Debug_Base': {
804 'abstract': 1,
[email protected]ee857512010-05-14 08:24:42805 'defines': ['DYNAMIC_ANNOTATIONS_ENABLED=1'],
[email protected]1c966092009-08-20 21:19:26806 'xcode_settings': {
807 'COPY_PHASE_STRIP': 'NO',
[email protected]d5d593a2009-08-28 23:23:29808 'GCC_OPTIMIZATION_LEVEL': '<(mac_debug_optimization)',
[email protected]bd232ac2009-10-21 02:23:53809 'OTHER_CFLAGS': [ '<@(debug_extra_cflags)', ],
[email protected]1c966092009-08-20 21:19:26810 },
[email protected]bb05e452009-10-29 21:24:56811 'msvs_settings': {
812 'VCCLCompilerTool': {
[email protected]7e0d664a2009-12-03 21:07:47813 'Optimization': '<(win_debug_Optimization)',
[email protected]bb05e452009-10-29 21:24:56814 'PreprocessorDefinitions': ['_DEBUG'],
[email protected]6b0507b2010-05-07 07:41:21815 'BasicRuntimeChecks': '<(win_debug_RuntimeChecks)',
[email protected]7e0d664a2009-12-03 21:07:47816 'RuntimeLibrary': '<(win_debug_RuntimeLibrary)',
[email protected]2ae6e022010-05-07 13:19:15817 'conditions': [
818 # According to MSVS, InlineFunctionExpansion=0 means
819 # "default inlining", not "/Ob0".
820 # Thus, we have to handle InlineFunctionExpansion==0 separately.
821 ['win_debug_InlineFunctionExpansion==0', {
822 'AdditionalOptions': ['/Ob0'],
823 }],
824 ['win_debug_InlineFunctionExpansion!=""', {
825 'InlineFunctionExpansion':
826 '<(win_debug_InlineFunctionExpansion)',
827 }],
[email protected]fac10d12010-11-08 16:00:31828 ['win_debug_disable_iterator_debugging==1', {
829 'PreprocessorDefinitions': ['_HAS_ITERATOR_DEBUGGING=0'],
830 }],
[email protected]2ae6e022010-05-07 13:19:15831 ],
[email protected]bb05e452009-10-29 21:24:56832 },
833 'VCLinkerTool': {
834 'LinkIncremental': '<(msvs_debug_link_incremental)',
835 },
836 'VCResourceCompilerTool': {
837 'PreprocessorDefinitions': ['_DEBUG'],
838 },
839 },
[email protected]2f80c312009-02-25 21:26:55840 'conditions': [
[email protected]bb05e452009-10-29 21:24:56841 ['OS=="linux"', {
842 'cflags': [
843 '<@(debug_extra_cflags)',
844 ],
[email protected]2f80c312009-02-25 21:26:55845 }],
846 ],
847 },
[email protected]5153767c2009-12-22 01:52:50848 'Release_Base': {
849 'abstract': 1,
[email protected]2f80c312009-02-25 21:26:55850 'defines': [
851 'NDEBUG',
852 ],
[email protected]1c966092009-08-20 21:19:26853 'xcode_settings': {
854 'DEAD_CODE_STRIPPING': 'YES', # -Wl,-dead_strip
855 'GCC_OPTIMIZATION_LEVEL': '<(mac_release_optimization)',
[email protected]ffd984b12009-09-11 19:37:00856 'OTHER_CFLAGS': [ '<@(release_extra_cflags)', ],
[email protected]1c966092009-08-20 21:19:26857 },
[email protected]bb05e452009-10-29 21:24:56858 'msvs_settings': {
[email protected]7e0d664a2009-12-03 21:07:47859 'VCCLCompilerTool': {
860 'Optimization': '<(win_release_Optimization)',
861 'RuntimeLibrary': '<(win_release_RuntimeLibrary)',
[email protected]2ae6e022010-05-07 13:19:15862 'conditions': [
863 # According to MSVS, InlineFunctionExpansion=0 means
864 # "default inlining", not "/Ob0".
865 # Thus, we have to handle InlineFunctionExpansion==0 separately.
866 ['win_release_InlineFunctionExpansion==0', {
867 'AdditionalOptions': ['/Ob0'],
868 }],
869 ['win_release_InlineFunctionExpansion!=""', {
870 'InlineFunctionExpansion':
871 '<(win_release_InlineFunctionExpansion)',
872 }],
873 ],
[email protected]7e0d664a2009-12-03 21:07:47874 },
[email protected]bb05e452009-10-29 21:24:56875 'VCLinkerTool': {
876 'LinkIncremental': '1',
877 },
878 },
[email protected]2f80c312009-02-25 21:26:55879 'conditions': [
[email protected]92822e82009-09-18 14:26:56880 ['release_valgrind_build==0', {
[email protected]ee857512010-05-14 08:24:42881 'defines': ['NVALGRIND', 'DYNAMIC_ANNOTATIONS_ENABLED=0'],
882 }, {
883 'defines': ['DYNAMIC_ANNOTATIONS_ENABLED=1'],
[email protected]92822e82009-09-18 14:26:56884 }],
[email protected]7e0d664a2009-12-03 21:07:47885 ['win_use_allocator_shim==0', {
886 'defines': ['NO_TCMALLOC'],
887 }],
[email protected]bb05e452009-10-29 21:24:56888 ['OS=="linux"', {
889 'cflags': [
[email protected]ffd984b12009-09-11 19:37:00890 '<@(release_extra_cflags)',
[email protected]bb05e452009-10-29 21:24:56891 ],
892 }],
[email protected]2f80c312009-02-25 21:26:55893 ],
894 },
[email protected]5153767c2009-12-22 01:52:50895 'Purify_Base': {
896 'abstract': 1,
897 'defines': [
898 'PURIFY',
899 'NO_TCMALLOC',
900 ],
901 'msvs_settings': {
902 'VCCLCompilerTool': {
903 'Optimization': '0',
904 'RuntimeLibrary': '0',
905 'BufferSecurityCheck': 'false',
906 },
907 'VCLinkerTool': {
908 'EnableCOMDATFolding': '1',
909 'LinkIncremental': '1',
910 },
911 },
912 },
913 #
914 # Concrete configurations
915 #
916 'Debug': {
917 'inherit_from': ['Common_Base', 'x86_Base', 'Debug_Base'],
918 },
919 'Release': {
920 'inherit_from': ['Common_Base', 'x86_Base', 'Release_Base'],
921 'conditions': [
922 ['msvs_use_common_release', {
[email protected]1f9471a2010-01-04 06:40:16923 'includes': ['release.gypi'],
[email protected]5153767c2009-12-22 01:52:50924 }],
925 ]
926 },
[email protected]f926fa0a2009-08-04 22:50:13927 'conditions': [
928 [ 'OS=="win"', {
929 # TODO(bradnelson): add a gyp mechanism to make this more graceful.
930 'Purify': {
[email protected]5153767c2009-12-22 01:52:50931 'inherit_from': ['Common_Base', 'x86_Base', 'Release_Base', 'Purify'],
[email protected]ef4fa4072009-12-04 22:46:50932 },
933 'Debug_x64': {
[email protected]5153767c2009-12-22 01:52:50934 'inherit_from': ['Common_Base', 'x64_Base', 'Debug_Base'],
[email protected]78263c12009-11-01 23:45:30935 },
936 'Release_x64': {
[email protected]5153767c2009-12-22 01:52:50937 'inherit_from': ['Common_Base', 'x64_Base', 'Release_Base'],
[email protected]78263c12009-11-01 23:45:30938 },
939 'Purify_x64': {
[email protected]1f9471a2010-01-04 06:40:16940 'inherit_from': ['Common_Base', 'x64_Base', 'Release_Base', 'Purify_Base'],
[email protected]78263c12009-11-01 23:45:30941 },
[email protected]f926fa0a2009-08-04 22:50:13942 }],
943 ],
[email protected]2f80c312009-02-25 21:26:55944 },
945 },
946 'conditions': [
[email protected]93f21e42010-04-01 00:35:15947 ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris"', {
[email protected]9d384032009-03-20 23:13:26948 'target_defaults': {
[email protected]5315f2842009-04-28 00:43:27949 # Enable -Werror by default, but put it in a variable so it can
950 # be disabled in ~/.gyp/include.gypi on the valgrind builders.
951 'variables': {
[email protected]ecf52cb82010-01-13 19:25:42952 # Use -fno-strict-aliasing by default since gcc 4.4 has periodic
953 # issues that slip through the cracks. We could do this just for
954 # gcc 4.4 but it makes more sense to be consistent on all
955 # compilers in use. TODO(Craig): turn this off again when
956 # there is some 4.4 test infrastructure in place and existing
957 # aliasing issues have been fixed.
958 'no_strict_aliasing%': 1,
[email protected]47deeb62009-12-17 14:49:39959 'conditions': [['OS=="linux"', {'werror%': '-Werror',}],
960 ['OS=="freebsd"', {'werror%': '',}],
961 ['OS=="openbsd"', {'werror%': '',}],
962 ],
[email protected]5315f2842009-04-28 00:43:27963 },
[email protected]9d384032009-03-20 23:13:26964 'cflags': [
[email protected]1bba09c2009-08-13 12:53:16965 '<(werror)', # See note above about the werror variable.
966 '-pthread',
967 '-fno-exceptions',
968 '-Wall',
[email protected]0fa17082010-03-26 00:48:05969 # TODO(evan): turn this back on once all the builds work.
970 # '-Wextra',
[email protected]225c8f52010-02-05 22:23:20971 # Don't warn about unused function params. We use those everywhere.
972 '-Wno-unused-parameter',
973 # Don't warn about the "struct foo f = {0};" initialization pattern.
974 '-Wno-missing-field-initializers',
[email protected]1bba09c2009-08-13 12:53:16975 '-D_FILE_OFFSET_BITS=64',
[email protected]3df6e3a2010-01-21 20:23:12976 # Don't export any symbols (for example, to plugins we dlopen()).
977 # Note: this is *required* to make some plugins work.
978 '-fvisibility=hidden',
[email protected]7ca6ce12010-09-15 23:39:35979 '-pipe',
[email protected]8a2fcba2009-07-29 00:52:24980 ],
981 'cflags_cc': [
[email protected]832d0212009-10-28 19:12:22982 '-fno-rtti',
[email protected]8a2fcba2009-07-29 00:52:24983 '-fno-threadsafe-statics',
[email protected]f5986c42009-11-17 18:39:36984 # Make inline functions have hidden visiblity by default.
985 # Surprisingly, not covered by -fvisibility=hidden.
986 '-fvisibility-inlines-hidden',
[email protected]9d384032009-03-20 23:13:26987 ],
[email protected]a6cf87e2009-04-03 04:07:38988 'ldflags': [
[email protected]138241f2010-03-30 23:53:10989 '-pthread', '-Wl,-z,noexecstack',
[email protected]9d384032009-03-20 23:13:26990 ],
[email protected]3aacaf952009-04-02 15:34:09991 'configurations': {
[email protected]5153767c2009-12-22 01:52:50992 'Debug_Base': {
[email protected]c5bdc032009-04-20 19:11:31993 'variables': {
994 'debug_optimize%': '0',
995 },
[email protected]3aacaf952009-04-02 15:34:09996 'defines': [
997 '_DEBUG',
998 ],
999 'cflags': [
[email protected]9cb5cc702011-02-01 19:56:041000 '-O>(debug_optimize)',
[email protected]3aacaf952009-04-02 15:34:091001 '-g',
1002 ],
[email protected]5315f2842009-04-28 00:43:271003 },
[email protected]5153767c2009-12-22 01:52:501004 'Release_Base': {
[email protected]740e2de2009-07-21 11:41:011005 'variables': {
1006 'release_optimize%': '2',
[email protected]1dd529642010-05-15 01:02:511007 # Binaries become big and gold is unable to perform GC
1008 # and remove unused sections for some of test targets
1009 # on 32 bit platform.
1010 # (This is currently observed only in chromeos valgrind bots)
1011 # The following flag is to disable --gc-sections linker
1012 # option for these bots.
1013 'no_gc_sections%': 0,
[email protected]740e2de2009-07-21 11:41:011014 },
[email protected]3aacaf952009-04-02 15:34:091015 'cflags': [
[email protected]9cb5cc702011-02-01 19:56:041016 '-O>(release_optimize)',
[email protected]d8cc3a62009-04-08 18:29:531017 # Don't emit the GCC version ident directives, they just end up
1018 # in the .comment section taking up binary size.
1019 '-fno-ident',
1020 # Put data and code in their own sections, so that unused symbols
1021 # can be removed at link time with --gc-sections.
1022 '-fdata-sections',
1023 '-ffunction-sections',
[email protected]3aacaf952009-04-02 15:34:091024 ],
[email protected]c902f2cba2010-08-06 20:04:181025 'ldflags': [
1026 # Specifically tell the linker to perform optimizations.
1027 # See http://lwn.net/Articles/192624/ .
1028 '-Wl,-O1',
[email protected]27c2e492010-08-06 22:55:221029 '-Wl,--as-needed',
[email protected]c902f2cba2010-08-06 20:04:181030 ],
[email protected]1dd529642010-05-15 01:02:511031 'conditions' : [
1032 ['no_gc_sections==0', {
1033 'ldflags': [
1034 '-Wl,--gc-sections',
1035 ],
1036 }],
[email protected]ecf7b6482010-10-13 09:15:201037 ['clang==1', {
1038 'cflags!': [
1039 '-fno-ident',
1040 ],
1041 }],
[email protected]7664ab32011-02-01 23:35:251042 ['profiling==1', {
1043 'cflags': [
1044 '-fno-omit-frame-pointer',
1045 '-g',
1046 ],
1047 }],
[email protected]1dd529642010-05-15 01:02:511048 ]
[email protected]3aacaf952009-04-02 15:34:091049 },
1050 },
[email protected]601b540222009-04-03 21:32:041051 'variants': {
1052 'coverage': {
1053 'cflags': ['-fprofile-arcs', '-ftest-coverage'],
1054 'ldflags': ['-fprofile-arcs'],
1055 },
1056 'profile': {
1057 'cflags': ['-pg', '-g'],
1058 'ldflags': ['-pg'],
1059 },
1060 'symbols': {
1061 'cflags': ['-g'],
1062 },
1063 },
[email protected]606116d22009-05-06 22:38:231064 'conditions': [
[email protected]7e8eb7612009-07-29 15:56:001065 [ 'target_arch=="ia32"', {
[email protected]606116d22009-05-06 22:38:231066 'asflags': [
1067 # Needed so that libs with .s files (e.g. libicudata.a)
1068 # are compatible with the general 32-bit-ness.
1069 '-32',
1070 ],
1071 # All floating-point computations on x87 happens in 80-bit
1072 # precision. Because the C and C++ language standards allow
1073 # the compiler to keep the floating-point values in higher
1074 # precision than what's specified in the source and doing so
1075 # is more efficient than constantly rounding up to 64-bit or
1076 # 32-bit precision as specified in the source, the compiler,
1077 # especially in the optimized mode, tries very hard to keep
1078 # values in x87 floating-point stack (in 80-bit precision)
1079 # as long as possible. This has important side effects, that
1080 # the real value used in computation may change depending on
1081 # how the compiler did the optimization - that is, the value
1082 # kept in 80-bit is different than the value rounded down to
1083 # 64-bit or 32-bit. There are possible compiler options to make
1084 # this behavior consistent (e.g. -ffloat-store would keep all
1085 # floating-values in the memory, thus force them to be rounded
1086 # to its original precision) but they have significant runtime
1087 # performance penalty.
1088 #
1089 # -mfpmath=sse -msse2 makes the compiler use SSE instructions
1090 # which keep floating-point values in SSE registers in its
1091 # native precision (32-bit for single precision, and 64-bit for
1092 # double precision values). This means the floating-point value
1093 # used during computation does not change depending on how the
1094 # compiler optimized the code, since the value is always kept
1095 # in its specified precision.
[email protected]ffde7932009-05-29 00:39:061096 'conditions': [
[email protected]ac120ff2010-04-28 02:14:221097 ['branding=="Chromium" and disable_sse2==0', {
[email protected]ffde7932009-05-29 00:39:061098 'cflags': [
1099 '-march=pentium4',
1100 '-msse2',
1101 '-mfpmath=sse',
1102 ],
1103 }],
[email protected]06c756182010-04-27 18:31:311104 # ChromeOS targets Pinetrail, which is sse3, but most of the
[email protected]0183dbb2010-04-16 02:00:441105 # benefit comes from sse2 so this setting allows ChromeOS
1106 # to build on other CPUs. In the future -march=atom would help
1107 # but requires a newer compiler.
[email protected]ac120ff2010-04-28 02:14:221108 ['chromeos==1 and disable_sse2==0', {
[email protected]0183dbb2010-04-16 02:00:441109 'cflags': [
1110 '-msse2',
1111 ],
1112 }],
[email protected]34799f9d2010-07-08 17:51:331113 # Install packages have started cropping up with
1114 # different headers between the 32-bit and 64-bit
1115 # versions, so we have to shadow those differences off
1116 # and make sure a 32-bit-on-64-bit build picks up the
1117 # right files.
1118 ['host_arch!="ia32"', {
1119 'include_dirs+': [
1120 '/usr/include32',
1121 ],
1122 }],
[email protected]ffde7932009-05-29 00:39:061123 ],
[email protected]dc259ce52010-04-13 04:03:101124 # -mmmx allows mmintrin.h to be used for mmx intrinsics.
1125 # video playback is mmx and sse2 optimized.
[email protected]606116d22009-05-06 22:38:231126 'cflags': [
1127 '-m32',
[email protected]dc259ce52010-04-13 04:03:101128 '-mmmx',
[email protected]1c6560af2009-07-14 11:02:161129 ],
[email protected]606116d22009-05-06 22:38:231130 'ldflags': [
1131 '-m32',
1132 ],
1133 }],
[email protected]3dda8a962009-08-10 18:58:071134 ['target_arch=="arm"', {
[email protected]77c1b29392009-12-04 06:21:291135 'target_conditions': [
1136 ['_toolset=="target"', {
1137 'cflags_cc': [
1138 # The codesourcery arm-2009q3 toolchain warns at that the ABI
1139 # has changed whenever it encounters a varargs function. This
1140 # silences those warnings, as they are not helpful and
1141 # clutter legitimate warnings.
1142 '-Wno-abi',
1143 ],
1144 'conditions': [
1145 ['arm_thumb == 1', {
1146 'cflags': [
1147 '-mthumb',
1148 # TODO(piman): -Wa,-mimplicit-it=thumb is needed for
1149 # inline assembly that uses condition codes but it's
1150 # suboptimal. Better would be to #ifdef __thumb__ at the
1151 # right place and have a separate thumb path.
1152 '-Wa,-mimplicit-it=thumb',
1153 ]
1154 }],
1155 ['armv7==1', {
[email protected]dc9711f2009-11-13 19:30:251156 'cflags': [
1157 '-march=armv7-a',
1158 '-mtune=cortex-a8',
[email protected]dc9711f2009-11-13 19:30:251159 '-mfloat-abi=softfp',
1160 ],
[email protected]eafc0b452010-02-26 21:53:431161 'conditions': [
1162 ['arm_neon==1', {
1163 'cflags': [ '-mfpu=neon', ],
1164 }, {
[email protected]53e0f642010-03-05 01:41:561165 'cflags': [ '-mfpu=<(arm_fpu)', ],
[email protected]eafc0b452010-02-26 21:53:431166 }]
1167 ],
[email protected]dc9711f2009-11-13 19:30:251168 }],
[email protected]3dda8a962009-08-10 18:58:071169 ],
1170 }],
1171 ],
1172 }],
[email protected]2fb843b2010-08-12 02:11:081173 ['linux_fpic==1', {
[email protected]c76723a2010-01-25 23:10:581174 'cflags': [
1175 '-fPIC',
1176 ],
1177 }],
[email protected]ee28c9f2009-09-04 01:53:011178 ['sysroot!=""', {
[email protected]fd36ce822009-10-28 20:13:571179 'target_conditions': [
1180 ['_toolset=="target"', {
1181 'cflags': [
1182 '--sysroot=<(sysroot)',
1183 ],
1184 'ldflags': [
1185 '--sysroot=<(sysroot)',
1186 ],
1187 }]]
[email protected]ee28c9f2009-09-04 01:53:011188 }],
[email protected]58680ce2010-09-18 00:09:151189 ['clang==1', {
1190 'cflags': [
[email protected]58680ce2010-09-18 00:09:151191 # Clang spots more unused functions.
1192 '-Wno-unused-function',
[email protected]58680ce2010-09-18 00:09:151193 # Don't die on dtoa code that uses a char as an array index.
1194 '-Wno-char-subscripts',
[email protected]0fa0fbc2010-10-12 04:32:051195 # Survive EXPECT_EQ(unnamed_enum, unsigned int) -- see
1196 # http://code.google.com/p/googletest/source/detail?r=446 .
1197 # TODO(thakis): Use -isystem instead (http://crbug.com/58751 ).
1198 '-Wno-unnamed-type-template-args',
[email protected]c76dd0f22011-02-07 22:09:371199 # TODO(thakis): Turn on -- http://crbug.com/72205
1200 '-Wno-overloaded-virtual',
[email protected]58680ce2010-09-18 00:09:151201 ],
1202 'cflags!': [
1203 # Clang doesn't seem to know know this flag.
1204 '-mfpmath=sse',
1205 ],
1206 }],
[email protected]5e781232011-01-28 02:57:591207 ['clang==1 and clang_load!="" and clang_add_plugin!=""', {
1208 'cflags': [
1209 '-Xclang', '-load', '-Xclang', '<(clang_load)',
1210 '-Xclang', '-add-plugin', '-Xclang', '<(clang_add_plugin)',
1211 ],
1212 }],
[email protected]cc4219a2009-08-14 05:30:521213 ['no_strict_aliasing==1', {
1214 'cflags': [
1215 '-fno-strict-aliasing',
1216 ],
1217 }],
[email protected]cbd5fd52009-08-26 00:14:271218 ['linux_breakpad==1', {
[email protected]c87efd42010-08-26 18:28:171219 'cflags': [ '-g' ],
[email protected]cbd5fd52009-08-26 00:14:271220 'defines': ['USE_LINUX_BREAKPAD'],
1221 }],
[email protected]7cd2afd2009-10-27 21:40:261222 ['library=="shared_library"', {
1223 # When building with shared libraries, remove the visiblity-hiding
1224 # flag.
1225 'cflags!': [ '-fvisibility=hidden' ],
[email protected]2fb843b2010-08-12 02:11:081226 'conditions': [
1227 ['target_arch=="x64" or target_arch=="arm"', {
1228 # Shared libraries need -fPIC on x86-64 and arm
1229 'cflags': ['-fPIC']
1230 }]
1231 ],
[email protected]f192fa992010-12-08 00:45:291232 'ldflags!': [
1233 # --as-needed confuses library interdependencies.
1234 # See http://code.google.com/p/chromium/issues/detail?id=61430
1235 '-Wl,--as-needed',
1236 ],
[email protected]7cd2afd2009-10-27 21:40:261237 }],
[email protected]d8b60602010-03-26 09:41:221238 ['linux_use_heapchecker==1', {
1239 'variables': {'linux_use_tcmalloc%': 1},
1240 }],
[email protected]61a9b2d82010-02-26 00:31:081241 ['linux_use_tcmalloc==0', {
1242 'defines': ['NO_TCMALLOC'],
[email protected]01699e22009-11-11 19:24:241243 }],
[email protected]d8b60602010-03-26 09:41:221244 ['linux_use_heapchecker==0', {
1245 'defines': ['NO_HEAPCHECKER'],
1246 }],
[email protected]64e2d4a42010-08-27 10:13:211247 ['linux_keep_shadow_stacks==1', {
1248 'defines': ['KEEP_SHADOW_STACKS'],
1249 'cflags': ['-finstrument-functions'],
1250 }],
[email protected]606116d22009-05-06 22:38:231251 ],
[email protected]9d384032009-03-20 23:13:261252 },
1253 }],
[email protected]c51e8d52009-12-11 20:04:061254 # FreeBSD-specific options; note that most FreeBSD options are set above,
1255 # with Linux.
1256 ['OS=="freebsd"', {
1257 'target_defaults': {
1258 'ldflags': [
1259 '-Wl,--no-keep-memory',
1260 ],
1261 },
1262 }],
[email protected]93f21e42010-04-01 00:35:151263 ['OS=="solaris"', {
1264 'cflags!': ['-fvisibility=hidden'],
1265 'cflags_cc!': ['-fvisibility-inlines-hidden'],
1266 }],
[email protected]2f80c312009-02-25 21:26:551267 ['OS=="mac"', {
1268 'target_defaults': {
[email protected]24700642009-06-01 16:01:201269 'variables': {
[email protected]9a5e72862010-09-02 16:16:581270 # These should be 'mac_real_dsym%' and 'mac_strip%', but there
1271 # seems to be a bug with % in variables that are intended to be
1272 # set to different values in different targets, like these two.
1273 'mac_strip': 1, # Strip debugging symbols from the target.
[email protected]24700642009-06-01 16:01:201274 'mac_real_dsym': 0, # Fake .dSYMs are fine in most cases.
1275 },
[email protected]d92c7c012009-03-19 19:26:421276 'mac_bundle': 0,
[email protected]2f80c312009-02-25 21:26:551277 'xcode_settings': {
1278 'ALWAYS_SEARCH_USER_PATHS': 'NO',
[email protected]ab2956372009-08-13 18:11:041279 'GCC_C_LANGUAGE_STANDARD': 'c99', # -std=c99
1280 'GCC_CW_ASM_SYNTAX': 'NO', # No -fasm-blocks
1281 'GCC_DYNAMIC_NO_PIC': 'NO', # No -mdynamic-no-pic
1282 # (Equivalent to -fPIC)
1283 'GCC_ENABLE_CPP_EXCEPTIONS': 'NO', # -fno-exceptions
1284 'GCC_ENABLE_CPP_RTTI': 'NO', # -fno-rtti
1285 'GCC_ENABLE_PASCAL_STRINGS': 'NO', # No -mpascal-strings
[email protected]3224dcd2009-09-16 17:31:251286 # GCC_INLINES_ARE_PRIVATE_EXTERN maps to -fvisibility-inlines-hidden
1287 'GCC_INLINES_ARE_PRIVATE_EXTERN': 'YES',
[email protected]ab2956372009-08-13 18:11:041288 'GCC_OBJC_CALL_CXX_CDTORS': 'YES', # -fobjc-call-cxx-cdtors
1289 'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES', # -fvisibility=hidden
1290 'GCC_THREADSAFE_STATICS': 'NO', # -fno-threadsafe-statics
1291 'GCC_TREAT_WARNINGS_AS_ERRORS': 'YES', # -Werror
[email protected]2f80c312009-02-25 21:26:551292 'GCC_VERSION': '4.2',
[email protected]ab2956372009-08-13 18:11:041293 'GCC_WARN_ABOUT_MISSING_NEWLINE': 'YES', # -Wnewline-eof
[email protected]3224dcd2009-09-16 17:31:251294 # MACOSX_DEPLOYMENT_TARGET maps to -mmacosx-version-min
1295 'MACOSX_DEPLOYMENT_TARGET': '<(mac_deployment_target)',
[email protected]ab2956372009-08-13 18:11:041296 'PREBINDING': 'NO', # No -Wl,-prebind
[email protected]2f80c312009-02-25 21:26:551297 'USE_HEADERMAP': 'NO',
[email protected]080e86f2010-06-21 15:19:041298 'WARNING_CFLAGS': [
1299 '-Wall',
1300 '-Wendif-labels',
1301 '-Wextra',
1302 # Don't warn about unused function parameters.
1303 '-Wno-unused-parameter',
1304 # Don't warn about the "struct foo f = {0};" initialization
1305 # pattern.
1306 '-Wno-missing-field-initializers',
1307 ],
[email protected]b3fb8092009-03-12 19:09:241308 'conditions': [
1309 ['chromium_mac_pch', {'GCC_PRECOMPILE_PREFIX_HEADER': 'YES'},
[email protected]9543af052009-09-15 22:42:591310 {'GCC_PRECOMPILE_PREFIX_HEADER': 'NO'}
1311 ],
[email protected]66733172010-09-22 00:09:281312 ['clang==1', {
1313 'WARNING_CFLAGS': [
1314 # Don't die on dtoa code that uses a char as an array index.
1315 # This is required solely for base/third_party/dmg_fp/dtoa.cc.
1316 '-Wno-char-subscripts',
[email protected]25d3bb722010-11-22 14:31:451317 # Clang spots more unused functions.
1318 '-Wno-unused-function',
[email protected]0fa0fbc2010-10-12 04:32:051319 # Survive EXPECT_EQ(unnamed_enum, unsigned int) -- see
1320 # http://code.google.com/p/googletest/source/detail?r=446 .
1321 # TODO(thakis): Use -isystem instead (http://crbug.com/58751 ).
1322 '-Wno-unnamed-type-template-args',
[email protected]c76dd0f22011-02-07 22:09:371323 # TODO(thakis): Turn on -- http://crbug.com/72205
1324 '-Wno-overloaded-virtual',
[email protected]66733172010-09-22 00:09:281325 ],
1326 }],
[email protected]5e781232011-01-28 02:57:591327 ['clang==1 and clang_load!="" and clang_add_plugin!=""', {
1328 'OTHER_CFLAGS': [
1329 '-Xclang', '-load', '-Xclang', '<(clang_load)',
1330 '-Xclang', '-add-plugin', '-Xclang', '<(clang_add_plugin)',
1331 ],
1332 }],
[email protected]b3fb8092009-03-12 19:09:241333 ],
[email protected]2f80c312009-02-25 21:26:551334 },
1335 'target_conditions': [
[email protected]2f80c312009-02-25 21:26:551336 ['_type!="static_library"', {
[email protected]5d7dc972009-04-16 15:30:461337 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-search_paths_first']},
1338 }],
1339 ['_mac_bundle', {
1340 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-ObjC']},
[email protected]87fde4a2009-02-28 00:50:081341 }],
[email protected]9a5e72862010-09-02 16:16:581342 ['(_type=="executable" or _type=="shared_library" or \
1343 _type=="loadable_module") and mac_strip!=0', {
[email protected]24700642009-06-01 16:01:201344 'target_conditions': [
1345 ['mac_real_dsym == 1', {
1346 # To get a real .dSYM bundle produced by dsymutil, set the
1347 # debug information format to dwarf-with-dsym. Since
1348 # strip_from_xcode will not be used, set Xcode to do the
1349 # stripping as well.
1350 'configurations': {
[email protected]5153767c2009-12-22 01:52:501351 'Release_Base': {
[email protected]24700642009-06-01 16:01:201352 'xcode_settings': {
1353 'DEBUG_INFORMATION_FORMAT': 'dwarf-with-dsym',
1354 'DEPLOYMENT_POSTPROCESSING': 'YES',
1355 'STRIP_INSTALLED_PRODUCT': 'YES',
[email protected]e14a9f92009-08-05 19:26:071356 'target_conditions': [
[email protected]c2111422010-06-01 18:30:251357 ['_type=="shared_library" or _type=="loadable_module"', {
[email protected]e14a9f92009-08-05 19:26:071358 # The Xcode default is to strip debugging symbols
1359 # only (-S). Local symbols should be stripped as
1360 # well, which will be handled by -x. Xcode will
1361 # continue to insert -S when stripping even when
1362 # additional flags are added with STRIPFLAGS.
1363 'STRIPFLAGS': '-x',
[email protected]c2111422010-06-01 18:30:251364 }], # _type=="shared_library" or _type=="loadable_module"'
[email protected]e14a9f92009-08-05 19:26:071365 ], # target_conditions
1366 }, # xcode_settings
1367 }, # configuration "Release"
1368 }, # configurations
[email protected]24700642009-06-01 16:01:201369 }, { # mac_real_dsym != 1
1370 # To get a fast fake .dSYM bundle, use a post-build step to
1371 # produce the .dSYM and strip the executable. strip_from_xcode
1372 # only operates in the Release configuration.
1373 'postbuilds': [
1374 {
1375 'variables': {
1376 # Define strip_from_xcode in a variable ending in _path
1377 # so that gyp understands it's a path and performs proper
1378 # relativization during dict merging.
1379 'strip_from_xcode_path': 'mac/strip_from_xcode',
1380 },
1381 'postbuild_name': 'Strip If Needed',
1382 'action': ['<(strip_from_xcode_path)'],
1383 },
[email protected]e14a9f92009-08-05 19:26:071384 ], # postbuilds
1385 }], # mac_real_dsym
1386 ], # target_conditions
[email protected]9a5e72862010-09-02 16:16:581387 }], # (_type=="executable" or _type=="shared_library" or
1388 # _type=="loadable_module") and mac_strip!=0
[email protected]e14a9f92009-08-05 19:26:071389 ], # target_conditions
1390 }, # target_defaults
1391 }], # OS=="mac"
[email protected]2f80c312009-02-25 21:26:551392 ['OS=="win"', {
1393 'target_defaults': {
1394 'defines': [
1395 '_WIN32_WINNT=0x0600',
1396 'WINVER=0x0600',
1397 'WIN32',
1398 '_WINDOWS',
[email protected]2f80c312009-02-25 21:26:551399 'NOMINMAX',
1400 '_CRT_RAND_S',
1401 'CERT_CHAIN_PARA_HAS_EXTRA_FIELDS',
1402 'WIN32_LEAN_AND_MEAN',
1403 '_SECURE_ATL',
[email protected]7a812dd62010-06-30 18:52:271404 '_ATL_NO_OPENGL',
[email protected]adfb98c2009-06-23 20:08:451405 '_HAS_TR1=0',
[email protected]2f80c312009-02-25 21:26:551406 ],
[email protected]8974e042010-06-21 18:06:521407 'conditions': [
1408 ['component=="static_library"', {
1409 'defines': [
1410 '_HAS_EXCEPTIONS=0',
1411 ],
1412 }],
1413 ],
[email protected]5b5ca7cb2009-07-20 23:00:201414 'msvs_system_include_dirs': [
[email protected]998b5152009-12-12 22:19:521415 '<(DEPTH)/third_party/platformsdk_win7/files/Include',
[email protected]a78da50e2010-06-09 21:31:371416 '<(DEPTH)/third_party/directxsdk/files/Include',
[email protected]2f80c312009-02-25 21:26:551417 '$(VSInstallDir)/VC/atlmfc/include',
1418 ],
[email protected]a8d99cef2009-08-26 20:47:491419 'msvs_cygwin_dirs': ['<(DEPTH)/third_party/cygwin'],
[email protected]365632b2010-06-22 02:01:571420 'msvs_disabled_warnings': [4351, 4396, 4503, 4819],
[email protected]2f80c312009-02-25 21:26:551421 'msvs_settings': {
1422 'VCCLCompilerTool': {
1423 'MinimalRebuild': 'false',
[email protected]2f80c312009-02-25 21:26:551424 'BufferSecurityCheck': 'true',
1425 'EnableFunctionLevelLinking': 'true',
1426 'RuntimeTypeInfo': 'false',
1427 'WarningLevel': '3',
1428 'WarnAsError': 'true',
1429 'DebugInformationFormat': '3',
[email protected]3fef6e62009-07-31 19:58:581430 'conditions': [
[email protected]912c55c2009-07-31 23:33:551431 [ 'msvs_multi_core_compile', {
[email protected]1f9471a2010-01-04 06:40:161432 'AdditionalOptions': ['/MP'],
[email protected]912c55c2009-07-31 23:33:551433 }],
[email protected]8974e042010-06-21 18:06:521434 ['component=="shared_library"', {
1435 'ExceptionHandling': '1', # /EHsc
1436 }, {
1437 'ExceptionHandling': '0',
1438 }],
[email protected]3fef6e62009-07-31 19:58:581439 ],
[email protected]2f80c312009-02-25 21:26:551440 },
1441 'VCLibrarianTool': {
[email protected]1f9471a2010-01-04 06:40:161442 'AdditionalOptions': ['/ignore:4221'],
[email protected]a78da50e2010-06-09 21:31:371443 'AdditionalLibraryDirectories': [
1444 '<(DEPTH)/third_party/platformsdk_win7/files/Lib',
1445 '<(DEPTH)/third_party/directxsdk/files/Lib/x86',
1446 ],
[email protected]2f80c312009-02-25 21:26:551447 },
1448 'VCLinkerTool': {
[email protected]2f80c312009-02-25 21:26:551449 'AdditionalDependencies': [
1450 'wininet.lib',
[email protected]b1d8c252011-01-13 20:27:501451 'dnsapi.lib',
[email protected]2f80c312009-02-25 21:26:551452 'version.lib',
1453 'msimg32.lib',
1454 'ws2_32.lib',
1455 'usp10.lib',
1456 'psapi.lib',
[email protected]96fd0032009-04-24 00:13:081457 'dbghelp.lib',
[email protected]2f80c312009-02-25 21:26:551458 ],
[email protected]a78da50e2010-06-09 21:31:371459 'AdditionalLibraryDirectories': [
1460 '<(DEPTH)/third_party/platformsdk_win7/files/Lib',
1461 '<(DEPTH)/third_party/directxsdk/files/Lib/x86',
1462 ],
[email protected]2f80c312009-02-25 21:26:551463 'GenerateDebugInformation': 'true',
1464 'MapFileName': '$(OutDir)\\$(TargetName).map',
1465 'ImportLibrary': '$(OutDir)\\lib\\$(TargetName).lib',
[email protected]2f80c312009-02-25 21:26:551466 'FixedBaseAddress': '1',
[email protected]825ff8d2009-05-22 01:40:481467 # SubSystem values:
1468 # 0 == not set
1469 # 1 == /SUBSYSTEM:CONSOLE
1470 # 2 == /SUBSYSTEM:WINDOWS
1471 # Most of the executables we'll ever create are tests
1472 # and utilities with console output.
1473 'SubSystem': '1',
[email protected]2f80c312009-02-25 21:26:551474 },
1475 'VCMIDLTool': {
1476 'GenerateStublessProxies': 'true',
1477 'TypeLibraryName': '$(InputName).tlb',
1478 'OutputDirectory': '$(IntDir)',
1479 'HeaderFileName': '$(InputName).h',
1480 'DLLDataFileName': 'dlldata.c',
1481 'InterfaceIdentifierFileName': '$(InputName)_i.c',
1482 'ProxyFileName': '$(InputName)_p.c',
1483 },
1484 'VCResourceCompilerTool': {
1485 'Culture' : '1033',
[email protected]4d91cbc2010-05-07 20:41:381486 'AdditionalIncludeDirectories': [
1487 '<(DEPTH)',
1488 '<(SHARED_INTERMEDIATE_DIR)',
1489 ],
[email protected]2f80c312009-02-25 21:26:551490 },
1491 },
1492 },
1493 }],
[email protected]93f21e42010-04-01 00:35:151494 ['disable_nacl==1 or OS=="freebsd" or OS=="openbsd" or OS=="solaris"', {
[email protected]d8c7cbcc2009-10-02 19:00:311495 'target_defaults': {
1496 'defines': [
1497 'DISABLE_NACL',
1498 ],
1499 },
1500 }],
[email protected]cfbf9bc2009-12-07 22:07:561501 ['OS=="win" and msvs_use_common_linker_extras', {
[email protected]48c7af72009-07-03 22:00:191502 'target_defaults': {
1503 'msvs_settings': {
1504 'VCLinkerTool': {
[email protected]48c7af72009-07-03 22:00:191505 'DelayLoadDLLs': [
1506 'dbghelp.dll',
1507 'dwmapi.dll',
1508 'uxtheme.dll',
1509 ],
1510 },
1511 },
[email protected]ef4fa4072009-12-04 22:46:501512 'configurations': {
[email protected]5153767c2009-12-22 01:52:501513 'x86_Base': {
[email protected]ef4fa4072009-12-04 22:46:501514 'msvs_settings': {
1515 'VCLinkerTool': {
[email protected]1f9471a2010-01-04 06:40:161516 'AdditionalOptions': [
1517 '/safeseh',
1518 '/dynamicbase',
1519 '/ignore:4199',
1520 '/ignore:4221',
1521 '/nxcompat',
1522 ],
[email protected]ef4fa4072009-12-04 22:46:501523 },
1524 },
1525 },
[email protected]5153767c2009-12-22 01:52:501526 'x64_Base': {
[email protected]ef4fa4072009-12-04 22:46:501527 'msvs_settings': {
1528 'VCLinkerTool': {
[email protected]1f9471a2010-01-04 06:40:161529 'AdditionalOptions': [
[email protected]ef4fa4072009-12-04 22:46:501530 # safeseh is not compatible with x64
[email protected]1f9471a2010-01-04 06:40:161531 '/dynamicbase',
1532 '/ignore:4199',
1533 '/ignore:4221',
1534 '/nxcompat',
1535 ],
[email protected]ef4fa4072009-12-04 22:46:501536 },
1537 },
1538 },
1539 },
[email protected]48c7af72009-07-03 22:00:191540 },
1541 }],
[email protected]9821d0d2010-04-16 22:40:371542 ['enable_new_npdevice_api==1', {
1543 'target_defaults': {
1544 'defines': [
1545 'ENABLE_NEW_NPDEVICE_API',
1546 ],
1547 },
1548 }],
[email protected]2f80c312009-02-25 21:26:551549 ],
1550 'xcode_settings': {
[email protected]0c8ab452009-11-06 21:57:501551 # DON'T ADD ANYTHING NEW TO THIS BLOCK UNLESS YOU REALLY REALLY NEED IT!
1552 # This block adds *project-wide* configuration settings to each project
1553 # file. It's almost always wrong to put things here. Specify your
1554 # custom xcode_settings in target_defaults to add them to targets instead.
1555
1556 # In an Xcode Project Info window, the "Base SDK for All Configurations"
1557 # setting sets the SDK on a project-wide basis. In order to get the
1558 # configured SDK to show properly in the Xcode UI, SDKROOT must be set
1559 # here at the project level.
1560 'SDKROOT': 'macosx<(mac_sdk)', # -isysroot
1561
[email protected]2f80c312009-02-25 21:26:551562 # The Xcode generator will look for an xcode_settings section at the root
1563 # of each dict and use it to apply settings on a file-wide basis. Most
1564 # settings should not be here, they should be in target-specific
1565 # xcode_settings sections, or better yet, should use non-Xcode-specific
1566 # settings in target dicts. SYMROOT is a special case, because many other
1567 # Xcode variables depend on it, including variables such as
1568 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something
1569 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the
1570 # files to appear (when present) in the UI as actual files and not red
1571 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR,
1572 # and therefore SYMROOT, needs to be set at the project level.
[email protected]bfa24b962009-03-02 00:16:161573 'SYMROOT': '<(DEPTH)/xcodebuild',
[email protected]2f80c312009-02-25 21:26:551574 },
[email protected]ee28c9f2009-09-04 01:53:011575}
[email protected]f5c990c2009-10-06 03:02:381576
1577# Local Variables:
1578# tab-width:2
1579# indent-tabs-mode:nil
1580# End:
1581# vim: set expandtab tabstop=2 shiftwidth=2: