blob: 0ed4972baea8b780ab8901a02d6ad77dd727f295 [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{
9 'variables': {
[email protected]a6e22132010-02-10 20:43:1810 # .gyp files or targets should set chromium_code to 1 if they build
11 # Chromium-specific code, as opposed to external code. This variable is
12 # used to control such things as the set of warnings to enable, and
13 # whether warnings are treated as errors.
[email protected]2f80c312009-02-25 21:26:5514 'chromium_code%': 0,
[email protected]b3fb8092009-03-12 19:09:2415
[email protected]97a28e722010-06-11 21:30:3716 'internal_pdf%': 0,
17
[email protected]1e40513c2010-07-22 01:00:2118 # This allows to use libcros from the current system, ie. /usr/lib/
19 # The cros_api will be pulled in as a static library, and all headers
20 # from the system include dirs.
21 'system_libcros%': '0',
22
[email protected]b3fb8092009-03-12 19:09:2423 # Variables expected to be overriden on the GYP command line (-D) or by
24 # ~/.gyp/include.gypi.
25
[email protected]e14a9f92009-08-05 19:26:0726 # Putting a variables dict inside another variables dict looks kind of
27 # weird. This is done so that "branding" and "buildtype" are defined as
28 # variables within the outer variables dict here. This is necessary
29 # to get these variables defined for the conditions within this variables
30 # dict that operate on these variables.
31 'variables': {
32 # Override branding to select the desired branding flavor.
33 'branding%': 'Chromium',
34
35 # Override buildtype to select the desired build flavor.
36 # Dev - everyday build for development/testing
37 # Official - release build (generally implies additional processing)
38 # TODO(mmoss) Once 'buildtype' is fully supported (e.g. Windows gyp
39 # conversion is done), some of the things which are now controlled by
40 # 'branding', such as symbol generation, will need to be refactored based
41 # on 'buildtype' (i.e. we don't care about saving symbols for non-Official
42 # builds).
43 'buildtype%': 'Dev',
[email protected]cbd5fd52009-08-26 00:14:2744
[email protected]cf185b32010-01-12 04:29:5945 'variables': {
46 # Compute the architecture that we're building on.
47 'conditions': [
[email protected]65df0582010-01-23 02:37:5648 [ 'OS=="linux" or OS=="freebsd" or OS=="openbsd"', {
[email protected]cf185b32010-01-12 04:29:5949 # This handles the Linux platforms we generally deal with. Anything
50 # else gets passed through, which probably won't work very well; such
51 # hosts should pass an explicit target_arch to gyp.
52 'host_arch%':
53 '<!(uname -m | sed -e "s/i.86/ia32/;s/x86_64/x64/;s/amd64/x64/;s/arm.*/arm/")',
54 }, { # OS!="linux"
55 'host_arch%': 'ia32',
56 }],
57 ],
[email protected]b3f23ba2010-04-26 22:58:1758
59 # Whether we're building a ChromeOS build. We set the initial
60 # value at this level of nesting so it's available for the
61 # toolkit_views test below.
62 'chromeos%': '0',
[email protected]8974e042010-06-21 18:06:5263
[email protected]93012ca2010-08-10 20:10:4964 # Disable touch support by default.
65 'touchui%': 0,
66
[email protected]8974e042010-06-21 18:06:5267 # To do a shared build on linux we need to be able to choose between
68 # type static_library and shared_library. We default to doing a static
69 # build but you can override this with "gyp -Dlibrary=shared_library"
70 # or you can add the following line (without the #) to
71 # ~/.gyp/include.gypi {'variables': {'library': 'shared_library'}}
72 # to compile as shared by default
73 'library%': 'static_library',
[email protected]cf185b32010-01-12 04:29:5974 },
[email protected]b3f23ba2010-04-26 22:58:1775
[email protected]93012ca2010-08-10 20:10:4976 # Set default value of toolkit_views on for Windows, Chrome OS
77 # and the touch UI.
[email protected]b3f23ba2010-04-26 22:58:1778 # We set it at this level of nesting so the value is available for
79 # other conditionals below.
80 'conditions': [
[email protected]93012ca2010-08-10 20:10:4981 ['OS=="win" or chromeos==1 or touchui==1', {
[email protected]b3f23ba2010-04-26 22:58:1782 'toolkit_views%': 1,
83 }, {
84 'toolkit_views%': 0,
85 }],
86 ],
87
[email protected]cf185b32010-01-12 04:29:5988 'host_arch%': '<(host_arch)',
89
90 # Default architecture we're building for is the architecture we're
91 # building on.
92 'target_arch%': '<(host_arch)',
[email protected]e0d00142009-09-18 22:10:2793
[email protected]36532f332010-08-25 00:22:0194 # TODO(thestig) remove these after the Linux Reliability bot stops
95 # using them.
[email protected]cbd5fd52009-08-26 00:14:2796 # We do want to build Chromium with Breakpad support in certain
97 # situations. I.e. for Chrome bot.
98 'linux_chromium_breakpad%': 0,
[email protected]4c9cc6c2009-10-01 18:54:5799 # And if we want to dump symbols.
[email protected]05cb6962009-10-01 23:29:03100 'linux_chromium_dump_symbols%': 0,
101 # Also see linux_strip_binary below.
[email protected]c153e5352009-09-22 12:37:44102
[email protected]93012ca2010-08-10 20:10:49103 # Copy conditionally-set chromeos and touchui variables out one scope.
[email protected]b3f23ba2010-04-26 22:58:17104 'chromeos%': '<(chromeos)',
[email protected]93012ca2010-08-10 20:10:49105 'touchui%': '<(touchui)',
[email protected]b2f030c2009-09-24 20:36:21106
107 # This variable tells WebCore.gyp and JavaScriptCore.gyp whether they are
108 # are built under a chromium full build (1) or a webkit.org chromium
109 # build (0).
110 'inside_chromium_build%': 1,
[email protected]9c1949e2009-10-02 19:59:54111
112 # Set to 1 to enable fast builds. It disables debug info for fastest
113 # compilation.
114 'fastbuild%': 0,
[email protected]84352455e72010-02-03 17:02:27115
[email protected]2fb843b2010-08-12 02:11:08116 # Set to 1 compile with -fPIC cflag on linux. This is a must for shared
117 # libraries on linux x86-64 and arm.
118 'linux_fpic%': 0,
119
[email protected]a76fe1a2010-03-01 23:39:36120 # Python version.
121 'python_ver%': '2.5',
122
[email protected]eafc0b452010-02-26 21:53:43123 # Set ARM-v7 compilation flags
124 'armv7%': 0,
125
126 # Set Neon compilation flags (only meaningful if armv7==1).
127 'arm_neon%': 1,
[email protected]4d83eb72010-03-04 16:42:23128
129 # The system root for cross-compiles. Default: none.
130 'sysroot%': '',
[email protected]ac120ff2010-04-28 02:14:22131
132 # On Linux, we build with sse2 for Chromium builds.
133 'disable_sse2%': 0,
[email protected]d67c9ea2010-06-08 22:43:45134
[email protected]542bf24a2010-06-11 23:08:17135 # Remoting compilation is enabled by default. Set to 0 to disable.
136 'remoting%': 1,
[email protected]8974e042010-06-21 18:06:52137
138 'library%': '<(library)',
139
140 # Variable 'component' is for cases where we would like to build some
141 # components as dynamic shared libraries but still need variable
142 # 'library' for static libraries.
143 # By default, component is set to whatever library is set to and
144 # it can be overriden by the GYP command line or by ~/.gyp/include.gypi.
145 'component%': '<(library)',
[email protected]e14a9f92009-08-05 19:26:07146 },
147
148 # Define branding and buildtype on the basis of their settings within the
149 # variables sub-dict above, unless overridden.
150 'branding%': '<(branding)',
151 'buildtype%': '<(buildtype)',
[email protected]e0d00142009-09-18 22:10:27152 'target_arch%': '<(target_arch)',
[email protected]cf185b32010-01-12 04:29:59153 'host_arch%': '<(host_arch)',
[email protected]c153e5352009-09-22 12:37:44154 'toolkit_views%': '<(toolkit_views)',
155 'chromeos%': '<(chromeos)',
[email protected]93012ca2010-08-10 20:10:49156 'touchui%': '<(touchui)',
[email protected]b2f030c2009-09-24 20:36:21157 'inside_chromium_build%': '<(inside_chromium_build)',
[email protected]9c1949e2009-10-02 19:59:54158 'fastbuild%': '<(fastbuild)',
[email protected]2fb843b2010-08-12 02:11:08159 'linux_fpic%': '<(linux_fpic)',
[email protected]a76fe1a2010-03-01 23:39:36160 'python_ver%': '<(python_ver)',
[email protected]eafc0b452010-02-26 21:53:43161 'armv7%': '<(armv7)',
162 'arm_neon%': '<(arm_neon)',
[email protected]4d83eb72010-03-04 16:42:23163 'sysroot%': '<(sysroot)',
[email protected]ac120ff2010-04-28 02:14:22164 'disable_sse2%': '<(disable_sse2)',
[email protected]542bf24a2010-06-11 23:08:17165 'remoting%': '<(remoting)',
[email protected]8974e042010-06-21 18:06:52166 'library%': '<(library)',
167 'component%': '<(component)',
[email protected]e14a9f92009-08-05 19:26:07168
[email protected]caa95c82009-11-23 22:39:32169 # The release channel that this build targets. This is used to restrict
170 # channel-specific build options, like which installer packages to create.
171 # The default is 'all', which does no channel-specific filtering.
172 'channel%': 'all',
173
[email protected]b3fb8092009-03-12 19:09:24174 # Override chromium_mac_pch and set it to 0 to suppress the use of
175 # precompiled headers on the Mac. Prefix header injection may still be
176 # used, but prefix headers will not be precompiled. This is useful when
177 # using distcc to distribute a build to compile slaves that don't
178 # share the same compiler executable as the system driving the compilation,
179 # because precompiled headers rely on pointers into a specific compiler
180 # executable's image. Setting this to 0 is needed to use an experimental
181 # Linux-Mac cross compiler distcc farm.
182 'chromium_mac_pch%': 1,
183
[email protected]3224dcd2009-09-16 17:31:25184 # Mac OS X SDK and deployment target support.
185 # The SDK identifies the version of the system headers that will be used,
186 # and corresponds to the MAC_OS_X_VERSION_MAX_ALLOWED compile-time macro.
187 # "Maximum allowed" refers to the operating system version whose APIs are
188 # available in the headers.
189 # The deployment target identifies the minimum system version that the
190 # built products are expected to function on. It corresponds to the
191 # MAC_OS_X_VERSION_MIN_REQUIRED compile-time macro.
192 # To ensure these macros are available, #include <AvailabilityMacros.h>.
193 # Additional documentation on these macros is available at
194 # http://developer.apple.com/mac/library/technotes/tn2002/tn2064.html#SECTION3
195 # Chrome normally builds with the Mac OS X 10.5 SDK and sets the
196 # deployment target to 10.5. Other projects, such as O3D, may override
197 # these defaults.
198 'mac_sdk%': '10.5',
199 'mac_deployment_target%': '10.5',
[email protected]9543af052009-09-15 22:42:59200
[email protected]f5ecbba12009-04-03 04:35:18201 # Set to 1 to enable code coverage. In addition to build changes
202 # (e.g. extra CFLAGS), also creates a new target in the src/chrome
203 # project file called "coverage".
204 # Currently ignored on Windows.
205 'coverage%': 0,
[email protected]653bd5f032009-04-08 12:55:49206
[email protected]c61f6432009-04-22 01:16:42207 # Overridable specification for potential use of alternative
208 # JavaScript engines.
209 'javascript_engine%': 'v8',
210
[email protected]7477ea6f2009-12-22 23:28:15211 # Although base/allocator lets you select a heap library via an
[email protected]7e0d664a2009-12-03 21:07:47212 # environment variable, the libcmt shim it uses sometimes gets in
213 # the way. To disable it entirely, and switch to normal msvcrt, do e.g.
214 # 'win_use_allocator_shim': 0,
215 # 'win_release_RuntimeLibrary': 2
216 # to ~/.gyp/include.gypi, gclient runhooks --force, and do a release build.
[email protected]8974e042010-06-21 18:06:52217 'win_use_allocator_shim%': 1, # 1 = shim allocator via libcmt; 0 = msvcrt
[email protected]279cd4212009-09-11 22:32:11218
[email protected]95ff8082009-11-13 22:21:01219 # Whether usage of OpenMAX is enabled.
220 'enable_openmax%': 0,
221
[email protected]d01120e62010-05-10 17:04:48222 # Whether proprietary audio/video codecs are assumed to be included with
223 # this build (only meaningful if branding!=Chrome).
224 'proprietary_codecs%': 0,
225
[email protected]e5b2eaa2009-04-14 01:39:12226 # TODO(bradnelson): eliminate this when possible.
227 # To allow local gyp files to prevent release.vsprops from being included.
228 # Yes(1) means include release.vsprops.
229 # Once all vsprops settings are migrated into gyp, this can go away.
230 'msvs_use_common_release%': 1,
[email protected]606116d22009-05-06 22:38:23231
[email protected]cbd5fd52009-08-26 00:14:27232 # TODO(bradnelson): eliminate this when possible.
233 # To allow local gyp files to override additional linker options for msvs.
234 # Yes(1) means set use the common linker options.
[email protected]48c7af72009-07-03 22:00:19235 'msvs_use_common_linker_extras%': 1,
236
[email protected]1ffb6502009-06-02 07:46:24237 # TODO(sgk): eliminate this if possible.
238 # It would be nicer to support this via a setting in 'target_defaults'
239 # in chrome/app/locales/locales.gypi overriding the setting in the
240 # 'Debug' configuration in the 'target_defaults' dict below,
241 # but that doesn't work as we'd like.
242 'msvs_debug_link_incremental%': '2',
243
[email protected]573136142009-07-15 22:48:37244 # This is the location of the sandbox binary. Chrome looks for this before
245 # running the zygote process. If found, and SUID, it will be used to
246 # sandbox the zygote process and, thus, all renderer processes.
247 'linux_sandbox_path%': '',
248
[email protected]ad6d2c42009-09-15 20:13:38249 # Set this to true to enable SELinux support.
250 'selinux%': 0,
[email protected]4c9cc6c2009-10-01 18:54:57251
[email protected]36532f332010-08-25 00:22:01252 # Override whether we should use Breakpad on Linux. I.e. for Chrome bot.
253 'linux_breakpad%': 0,
254 # And if we want to dump symbols for Breakpad-enabled builds.
255 'linux_dump_symbols%': 0,
256 # And if we want to strip the binary after dumping symbols.
[email protected]05cb6962009-10-01 23:29:03257 'linux_strip_binary%': 0,
258
[email protected]46ce5b562010-06-16 18:39:53259 # Enable TCMalloc.
260 'linux_use_tcmalloc%': 1,
[email protected]01699e22009-11-11 19:24:24261
[email protected]39ca7de2010-04-16 08:04:03262 # Disable TCMalloc's debugallocation.
263 'linux_use_debugallocation%': 0,
264
[email protected]d8b60602010-03-26 09:41:22265 # Disable TCMalloc's heapchecker.
266 'linux_use_heapchecker%': 0,
267
[email protected]cc2d7cd2010-03-30 22:46:21268 # Set to 1 to turn on seccomp sandbox by default.
269 # (Note: this is ignored for official builds.)
270 'linux_use_seccomp_sandbox%': 0,
[email protected]39c4e1a82010-03-30 19:47:41271
[email protected]556c5d72010-06-10 05:45:01272 # Set to 1 to link against libgnome-keyring instead of using dlopen().
273 'linux_link_gnome_keyring%': 0,
274
[email protected]c153e5352009-09-22 12:37:44275 # Set to select the Title Case versions of strings in GRD files.
276 'use_titlecase_in_grd_files%': 0,
[email protected]ad6d2c42009-09-15 20:13:38277
[email protected]d8c7cbcc2009-10-02 19:00:31278 # Used to disable Native Client at compile time, for platforms where it
279 # isn't supported
280 'disable_nacl%': 0,
281
[email protected]77c1b29392009-12-04 06:21:29282 # Set Thumb compilation flags.
283 'arm_thumb%': 0,
284
[email protected]53e0f642010-03-05 01:41:56285 # Set ARM fpu compilation flags (only meaningful if armv7==1 and
286 # arm_neon==0).
287 'arm_fpu%': 'vfpv3',
288
[email protected]9821d0d2010-04-16 22:40:37289 # Enable new NPDevice API.
290 'enable_new_npdevice_api%': 0,
[email protected]ed154592010-04-29 00:18:50291
292 # Enable EGLImage support in OpenMAX
293 'enable_eglimage%': 0,
294
[email protected]6f51b27e2010-06-22 20:43:53295 # Enable a variable used elsewhere throughout the GYP files to determine
296 # whether to compile in the sources for the GPU plugin / process.
297 'enable_gpu%': 1,
298
[email protected]912c55c2009-07-31 23:33:55299 'conditions': [
[email protected]47deeb62009-12-17 14:49:39300 ['OS=="linux" or OS=="freebsd" or OS=="openbsd"', {
[email protected]242a9e62009-11-03 17:32:10301 # This will set gcc_version to XY if you are running gcc X.Y.*.
302 # This is used to tweak build flags for gcc 4.4.
303 'gcc_version%': '<!(python <(DEPTH)/build/compiler_version.py)',
[email protected]4d83eb72010-03-04 16:42:23304 # Figure out the python architecture to decide if we build pyauto.
[email protected]efd68462010-03-04 17:07:54305 'python_arch%': '<!(<(DEPTH)/build/linux/python_arch.sh <(sysroot)/usr/lib/libpython<(python_ver).so.1.0)',
[email protected]cbd5fd52009-08-26 00:14:27306 'conditions': [
307 ['branding=="Chrome" or linux_chromium_breakpad==1', {
308 'linux_breakpad%': 1,
[email protected]cbd5fd52009-08-26 00:14:27309 }],
[email protected]4c9cc6c2009-10-01 18:54:57310 # All Chrome builds have breakpad symbols, but only process the
311 # symbols from official builds.
312 # TODO(mmoss) dump_syms segfaults on x64. Enable once dump_syms and
313 # crash server handle 64-bit symbols.
314 ['linux_chromium_dump_symbols==1 or '
315 '(branding=="Chrome" and buildtype=="Official" and '
316 'target_arch=="ia32")', {
317 'linux_dump_symbols%': 1,
[email protected]4c9cc6c2009-10-01 18:54:57318 }],
[email protected]06c756182010-04-27 18:31:31319 ['toolkit_views==0', {
[email protected]c153e5352009-09-22 12:37:44320 # GTK wants Title Case strings
321 'use_titlecase_in_grd_files%': 1,
322 }],
[email protected]cbd5fd52009-08-26 00:14:27323 ],
[email protected]47deeb62009-12-17 14:49:39324 }], # OS=="linux" or OS=="freebsd" or OS=="openbsd"
[email protected]e14a9f92009-08-05 19:26:07325 ['OS=="mac"', {
[email protected]c153e5352009-09-22 12:37:44326 # Mac wants Title Case strings
327 'use_titlecase_in_grd_files%': 1,
[email protected]e14a9f92009-08-05 19:26:07328 'conditions': [
329 # mac_product_name is set to the name of the .app bundle as it should
330 # appear on disk. This duplicates data from
331 # chrome/app/theme/chromium/BRANDING and
332 # chrome/app/theme/google_chrome/BRANDING, but is necessary to get
333 # these names into the build system.
334 ['branding=="Chrome"', {
335 'mac_product_name%': 'Google Chrome',
336 }, { # else: branding!="Chrome"
337 'mac_product_name%': 'Chromium',
338 }],
339
340 # Feature variables for enabling Mac Breakpad and Keystone auto-update
341 # support. Both features are on by default in official builds with
342 # Chrome branding.
343 ['branding=="Chrome" and buildtype=="Official"', {
344 'mac_breakpad%': 1,
345 'mac_keystone%': 1,
346 }, { # else: branding!="Chrome" or buildtype!="Official"
347 'mac_breakpad%': 0,
348 'mac_keystone%': 0,
349 }],
350 ],
351 }], # OS=="mac"
[email protected]912c55c2009-07-31 23:33:55352 # Whether to use multiple cores to compile with visual studio. This is
353 # optional because it sometimes causes corruption on VS 2005.
354 # It is on by default on VS 2008 and off on VS 2005.
355 ['OS=="win"', {
356 'conditions': [
[email protected]8974e042010-06-21 18:06:52357 ['component=="shared_library"', {
358 'win_use_allocator_shim%': 0,
359 }],
[email protected]912c55c2009-07-31 23:33:55360 ['MSVS_VERSION=="2005"', {
[email protected]669795372009-08-14 17:51:13361 'msvs_multi_core_compile%': 0,
[email protected]912c55c2009-07-31 23:33:55362 },{
363 'msvs_multi_core_compile%': 1,
364 }],
[email protected]10bb8c92009-08-07 21:16:03365 # Don't do incremental linking for large modules on 32-bit.
366 ['MSVS_OS_BITS==32', {
367 'msvs_large_module_debug_link_mode%': '1', # No
368 },{
369 'msvs_large_module_debug_link_mode%': '2', # Yes
370 }],
[email protected]912c55c2009-07-31 23:33:55371 ],
[email protected]ef4fa4072009-12-04 22:46:50372 'nacl_win64_defines': [
373 # This flag is used to minimize dependencies when building
374 # Native Client loader for 64-bit Windows.
375 'NACL_WIN64',
376 ],
[email protected]912c55c2009-07-31 23:33:55377 }],
378 ],
[email protected]f703c4e2009-09-17 21:54:28379
380 # NOTE: When these end up in the Mac bundle, we need to replace '-' for '_'
381 # so Cocoa is happy (http://crbug.com/20441).
382 'locales': [
[email protected]af27c8c2009-11-04 20:36:50383 'am', 'ar', 'bg', 'bn', 'ca', 'cs', 'da', 'de', 'el', 'en-GB',
[email protected]f703c4e2009-09-17 21:54:28384 'en-US', 'es-419', 'es', 'et', 'fi', 'fil', 'fr', 'gu', 'he',
385 'hi', 'hr', 'hu', 'id', 'it', 'ja', 'kn', 'ko', 'lt', 'lv',
[email protected]cf1ab6f2010-03-25 19:38:23386 'ml', 'mr', 'nb', 'nl', 'pl', 'pt-BR', 'pt-PT', 'ro', 'ru',
387 'sk', 'sl', 'sr', 'sv', 'sw', 'ta', 'te', 'th', 'tr', 'uk',
388 'vi', 'zh-CN', 'zh-TW',
[email protected]f703c4e2009-09-17 21:54:28389 ],
[email protected]2f80c312009-02-25 21:26:55390 },
391 'target_defaults': {
[email protected]c4e4d152010-08-21 01:22:24392 'defines': ['V8_REPORT_EXECUTABLE_MEMORY_USAGE'],
[email protected]1c966092009-08-20 21:19:26393 'variables': {
[email protected]a6e22132010-02-10 20:43:18394 # The condition that operates on chromium_code is in a target_conditions
395 # section, and will not have access to the default fallback value of
396 # chromium_code at the top of this file, or to the chromium_code
397 # variable placed at the root variables scope of .gyp files, because
398 # those variables are not set at target scope. As a workaround,
399 # if chromium_code is not set at target scope, define it in target scope
400 # to contain whatever value it has during early variable expansion.
401 # That's enough to make it available during target conditional
402 # processing.
403 'chromium_code%': '<(chromium_code)',
404
[email protected]7e0d664a2009-12-03 21:07:47405 # See http://gcc.gnu.org/onlinedocs/gcc-4.4.2/gcc/Optimize-Options.html
[email protected]d5d593a2009-08-28 23:23:29406 'mac_release_optimization%': '3', # Use -O3 unless overridden
[email protected]ffd984b12009-09-11 19:37:00407 'mac_debug_optimization%': '0', # Use -O0 unless overridden
[email protected]7e0d664a2009-12-03 21:07:47408 # See http://msdn.microsoft.com/en-us/library/aa652360(VS.71).aspx
409 'win_release_Optimization%': '2', # 2 = /Os
410 'win_debug_Optimization%': '0', # 0 = /Od
[email protected]6b0507b2010-05-07 07:41:21411 # See http://msdn.microsoft.com/en-us/library/8wtf2dfz(VS.71).aspx
412 'win_debug_RuntimeChecks%': '3', # 3 = all checks enabled, 0 = off
413 # See http://msdn.microsoft.com/en-us/library/47238hez(VS.71).aspx
[email protected]2ae6e022010-05-07 13:19:15414 'win_debug_InlineFunctionExpansion%': '', # empty = default, 0 = off,
415 'win_release_InlineFunctionExpansion%': '2', # 1 = only __inline, 2 = max
[email protected]7e0d664a2009-12-03 21:07:47416
[email protected]ffd984b12009-09-11 19:37:00417 'release_extra_cflags%': '',
418 'debug_extra_cflags%': '',
[email protected]92822e82009-09-18 14:26:56419 'release_valgrind_build%': 0,
[email protected]8974e042010-06-21 18:06:52420
421 'conditions': [
422 ['OS=="win" and component=="shared_library"', {
423 # See http://msdn.microsoft.com/en-us/library/aa652367.aspx
424 'win_release_RuntimeLibrary%': '2', # 2 = /MT (nondebug DLL)
425 'win_debug_RuntimeLibrary%': '3', # 3 = /MTd (debug DLL)
426 }, {
427 # See http://msdn.microsoft.com/en-us/library/aa652367.aspx
428 'win_release_RuntimeLibrary%': '0', # 0 = /MT (nondebug static)
429 'win_debug_RuntimeLibrary%': '1', # 1 = /MTd (debug static)
430 }],
431 ],
[email protected]1c966092009-08-20 21:19:26432 },
[email protected]32aa8cc2009-03-04 21:36:39433 'conditions': [
434 ['branding=="Chrome"', {
435 'defines': ['GOOGLE_CHROME_BUILD'],
436 }, { # else: branding!="Chrome"
437 'defines': ['CHROMIUM_BUILD'],
438 }],
[email protected]06c756182010-04-27 18:31:31439 ['toolkit_views==1', {
[email protected]e6970232009-05-12 23:51:17440 'defines': ['TOOLKIT_VIEWS=1'],
441 }],
[email protected]fdc5bed2010-01-09 01:16:57442 ['chromeos==1', {
[email protected]16779842009-07-08 23:45:29443 'defines': ['OS_CHROMEOS=1'],
[email protected]2b883b92009-06-02 22:57:50444 }],
[email protected]0094fbe2010-07-15 21:51:43445 ['touchui==1', {
446 'defines': ['TOUCH_UI=1'],
447 }],
[email protected]542bf24a2010-06-11 23:08:17448 ['remoting==1', {
449 'defines': ['ENABLE_REMOTING=1'],
[email protected]c0bac532010-06-11 00:39:00450 }],
[email protected]d01120e62010-05-10 17:04:48451 ['proprietary_codecs==1', {
452 'defines': ['USE_PROPRIETARY_CODECS'],
453 }],
[email protected]9c1949e2009-10-02 19:59:54454 ['fastbuild!=0', {
455 'conditions': [
[email protected]1cc2fa72010-07-03 08:49:24456 # For Windows, we don't genererate debug information.
[email protected]9c1949e2009-10-02 19:59:54457 ['OS=="win"', {
458 'msvs_settings': {
459 'VCLinkerTool': {
460 'GenerateDebugInformation': 'false',
461 },
462 'VCCLCompilerTool': {
463 'DebugInformationFormat': '0',
464 }
465 }
[email protected]1cc2fa72010-07-03 08:49:24466 }, { # else: OS != "win", generate less debug information.
467 'variables': {
468 'debug_extra_cflags': '-g1',
469 },
[email protected]37c84192010-04-14 21:37:40470 }],
[email protected]9c1949e2009-10-02 19:59:54471 ], # conditions for fastbuild.
472 }], # fastbuild!=0
[email protected]ad6d2c42009-09-15 20:13:38473 ['selinux==1', {
474 'defines': ['CHROMIUM_SELINUX=1'],
475 }],
[email protected]7e0d664a2009-12-03 21:07:47476 ['win_use_allocator_shim==0', {
477 'conditions': [
478 ['OS=="win"', {
479 'defines': ['NO_TCMALLOC'],
480 }],
481 ],
482 }],
[email protected]43f28f832010-02-03 02:28:48483 ['enable_gpu==1', {
[email protected]7477ea6f2009-12-22 23:28:15484 'defines': [
485 'ENABLE_GPU=1',
486 ],
487 }],
[email protected]ed154592010-04-29 00:18:50488 ['enable_eglimage==1', {
489 'defines': [
490 'ENABLE_EGLIMAGE=1',
491 ],
492 }],
[email protected]f5ecbba12009-04-03 04:35:18493 ['coverage!=0', {
494 'conditions': [
495 ['OS=="mac"', {
496 'xcode_settings': {
[email protected]ab2956372009-08-13 18:11:04497 'GCC_INSTRUMENT_PROGRAM_FLOW_ARCS': 'YES', # -fprofile-arcs
498 'GCC_GENERATE_TEST_COVERAGE_FILES': 'YES', # -ftest-coverage
[email protected]5ae4f55e2009-04-13 23:19:47499 },
[email protected]e4fb84c2009-12-28 20:45:43500 # Add -lgcov for types executable, shared_library, and
[email protected]dc259ce52010-04-13 04:03:10501 # loadable_module; not for static_library.
[email protected]e4fb84c2009-12-28 20:45:43502 # This is a delayed conditional.
[email protected]f5ecbba12009-04-03 04:35:18503 'target_conditions': [
[email protected]e4fb84c2009-12-28 20:45:43504 ['_type!="static_library"', {
[email protected]f5ecbba12009-04-03 04:35:18505 'xcode_settings': { 'OTHER_LDFLAGS': [ '-lgcov' ] },
[email protected]5ae4f55e2009-04-13 23:19:47506 }],
507 ],
508 }],
[email protected]7122ffd52009-04-30 23:19:00509 # Linux gyp (into scons) doesn't like target_conditions?
510 # TODO(???): track down why 'target_conditions' doesn't work
511 # on Linux gyp into scons like it does on Mac gyp into xcodeproj.
[email protected]f5ecbba12009-04-03 04:35:18512 ['OS=="linux"', {
513 'cflags': [ '-ftest-coverage',
514 '-fprofile-arcs' ],
[email protected]7122ffd52009-04-30 23:19:00515 'link_settings': { 'libraries': [ '-lgcov' ] },
[email protected]f5ecbba12009-04-03 04:35:18516 }],
[email protected]e8f6ff42009-07-07 18:20:53517 # Finally, for Windows, we simply turn on profiling.
518 ['OS=="win"', {
519 'msvs_settings': {
520 'VCLinkerTool': {
521 'Profile': 'true',
522 },
[email protected]10bb8c92009-08-07 21:16:03523 'VCCLCompilerTool': {
[email protected]e8f6ff42009-07-07 18:20:53524 # /Z7, not /Zi, so coverage is happyb
525 'DebugInformationFormat': '1',
[email protected]1f9471a2010-01-04 06:40:16526 'AdditionalOptions': ['/Yd'],
[email protected]e8f6ff42009-07-07 18:20:53527 }
528 }
529 }], # OS==win
530 ], # conditions for coverage
531 }], # coverage!=0
[email protected]4e4d6042010-08-26 18:34:38532 ['OS=="win"', {
533 'defines': [
534 '__STD_C',
535 '_CRT_SECURE_NO_DEPRECATE',
536 '_SCL_SECURE_NO_DEPRECATE',
537 ],
538 'include_dirs': [
539 '<(DEPTH)/third_party/wtl/include',
540 ],
541 }], # OS==win
[email protected]a6e22132010-02-10 20:43:18542 ], # conditions for 'target_defaults'
543 'target_conditions': [
[email protected]c14d8e772010-02-09 22:06:15544 ['chromium_code==0', {
[email protected]d8543312010-02-10 17:43:28545 'conditions': [
546 [ 'OS=="linux" or OS=="freebsd" or OS=="openbsd"', {
547 'cflags!': [
548 '-Wall',
549 '-Wextra',
550 '-Werror',
551 ],
552 }],
553 [ 'OS=="win"', {
554 'defines': [
555 '_CRT_SECURE_NO_DEPRECATE',
556 '_CRT_NONSTDC_NO_WARNINGS',
557 '_CRT_NONSTDC_NO_DEPRECATE',
558 '_SCL_SECURE_NO_DEPRECATE',
559 ],
560 'msvs_disabled_warnings': [4800],
561 'msvs_settings': {
562 'VCCLCompilerTool': {
563 'WarnAsError': 'false',
564 'Detect64BitPortabilityProblems': 'false',
565 },
566 },
567 }],
568 [ 'OS=="mac"', {
569 'xcode_settings': {
570 'GCC_TREAT_WARNINGS_AS_ERRORS': 'NO',
[email protected]4c4c2e5332010-06-15 11:51:06571 'WARNING_CFLAGS!': ['-Wall', '-Wextra'],
[email protected]d8543312010-02-10 17:43:28572 },
573 }],
[email protected]c14d8e772010-02-09 22:06:15574 ],
575 }, {
576 # In Chromium code, we define __STDC_FORMAT_MACROS in order to get the
577 # C99 macros on Mac and Linux.
578 'defines': [
579 '__STDC_FORMAT_MACROS',
580 ],
581 'conditions': [
582 ['OS!="win"', {
583 'sources/': [ ['exclude', '_win(_unittest)?\\.cc$'],
584 ['exclude', '/win/'],
585 ['exclude', '/win_[^/]*\\.cc$'] ],
586 }],
587 ['OS!="mac"', {
588 'sources/': [ ['exclude', '_(cocoa|mac)(_unittest)?\\.cc$'],
589 ['exclude', '/(cocoa|mac)/'],
[email protected]e603d952010-02-10 22:36:26590 ['exclude', '\.mm?$' ] ],
[email protected]c14d8e772010-02-09 22:06:15591 }],
592 ['OS!="linux" and OS!="freebsd" and OS!="openbsd"', {
593 'sources/': [
[email protected]1c657852010-04-22 23:28:05594 ['exclude', '_(chromeos|gtk|x|x11|xdg)(_unittest)?\\.cc$'],
[email protected]c14d8e772010-02-09 22:06:15595 ['exclude', '/gtk/'],
[email protected]18cff3d2010-02-17 18:03:13596 ['exclude', '/(gtk|x11)_[^/]*\\.cc$'],
597 ],
598 }],
599 ['OS!="linux"', {
600 'sources/': [
601 ['exclude', '_linux(_unittest)?\\.cc$'],
602 ['exclude', '/linux/'],
603 ],
[email protected]c14d8e772010-02-09 22:06:15604 }],
605 # We use "POSIX" to refer to all non-Windows operating systems.
606 ['OS=="win"', {
607 'sources/': [ ['exclude', '_posix\\.cc$'] ],
[email protected]f55bd4862010-05-27 15:38:07608 # turn on warnings for signed/unsigned mismatch on chromium code.
609 'msvs_settings': {
610 'VCCLCompilerTool': {
611 'AdditionalOptions': ['/we4389'],
612 },
613 },
[email protected]c14d8e772010-02-09 22:06:15614 }],
[email protected]c14d8e772010-02-09 22:06:15615 ['chromeos!=1', {
616 'sources/': [ ['exclude', '_chromeos\\.cc$'] ]
617 }],
[email protected]06c756182010-04-27 18:31:31618 ['toolkit_views==0', {
[email protected]c14d8e772010-02-09 22:06:15619 'sources/': [ ['exclude', '_views\\.cc$'] ]
620 }],
621 ],
622 }],
[email protected]a6e22132010-02-10 20:43:18623 ], # target_conditions for 'target_defaults'
[email protected]2f80c312009-02-25 21:26:55624 'default_configuration': 'Debug',
625 'configurations': {
[email protected]5153767c2009-12-22 01:52:50626 # VCLinkerTool LinkIncremental values below:
627 # 0 == default
628 # 1 == /INCREMENTAL:NO
629 # 2 == /INCREMENTAL
630 # Debug links incremental, Release does not.
631 #
632 # Abstract base configurations to cover common
633 # attributes.
634 #
635 'Common_Base': {
[email protected]bb05e452009-10-29 21:24:56636 'abstract': 1,
637 'msvs_configuration_attributes': {
638 'OutputDirectory': '$(SolutionDir)$(ConfigurationName)',
639 'IntermediateDirectory': '$(OutDir)\\obj\\$(ProjectName)',
640 'CharacterSet': '1',
641 },
[email protected]5153767c2009-12-22 01:52:50642 },
643 'x86_Base': {
644 'abstract': 1,
[email protected]ef4fa4072009-12-04 22:46:50645 'msvs_settings': {
646 'VCLinkerTool': {
647 'TargetMachine': '1',
648 },
649 },
[email protected]2fa40782009-11-01 21:17:34650 'msvs_configuration_platform': 'Win32',
[email protected]bb05e452009-10-29 21:24:56651 },
[email protected]5153767c2009-12-22 01:52:50652 'x64_Base': {
653 'abstract': 1,
654 'msvs_configuration_platform': 'x64',
655 'msvs_settings': {
656 'VCLinkerTool': {
657 'TargetMachine': '17', # x86 - 64
[email protected]5153767c2009-12-22 01:52:50658 'AdditionalLibraryDirectories!':
659 ['<(DEPTH)/third_party/platformsdk_win7/files/Lib'],
660 'AdditionalLibraryDirectories':
661 ['<(DEPTH)/third_party/platformsdk_win7/files/Lib/x64'],
662 },
[email protected]d26b4418ab2010-03-24 22:06:35663 'VCLibrarianTool': {
[email protected]5153767c2009-12-22 01:52:50664 'AdditionalLibraryDirectories!':
665 ['<(DEPTH)/third_party/platformsdk_win7/files/Lib'],
666 'AdditionalLibraryDirectories':
667 ['<(DEPTH)/third_party/platformsdk_win7/files/Lib/x64'],
668 },
669 },
670 'defines': [
671 # Not sure if tcmalloc works on 64-bit Windows.
672 'NO_TCMALLOC',
673 ],
674 },
675 'Debug_Base': {
676 'abstract': 1,
[email protected]ee857512010-05-14 08:24:42677 'defines': ['DYNAMIC_ANNOTATIONS_ENABLED=1'],
[email protected]1c966092009-08-20 21:19:26678 'xcode_settings': {
679 'COPY_PHASE_STRIP': 'NO',
[email protected]d5d593a2009-08-28 23:23:29680 'GCC_OPTIMIZATION_LEVEL': '<(mac_debug_optimization)',
[email protected]bd232ac2009-10-21 02:23:53681 'OTHER_CFLAGS': [ '<@(debug_extra_cflags)', ],
[email protected]1c966092009-08-20 21:19:26682 },
[email protected]bb05e452009-10-29 21:24:56683 'msvs_settings': {
684 'VCCLCompilerTool': {
[email protected]7e0d664a2009-12-03 21:07:47685 'Optimization': '<(win_debug_Optimization)',
[email protected]bb05e452009-10-29 21:24:56686 'PreprocessorDefinitions': ['_DEBUG'],
[email protected]6b0507b2010-05-07 07:41:21687 'BasicRuntimeChecks': '<(win_debug_RuntimeChecks)',
[email protected]7e0d664a2009-12-03 21:07:47688 'RuntimeLibrary': '<(win_debug_RuntimeLibrary)',
[email protected]2ae6e022010-05-07 13:19:15689 'conditions': [
690 # According to MSVS, InlineFunctionExpansion=0 means
691 # "default inlining", not "/Ob0".
692 # Thus, we have to handle InlineFunctionExpansion==0 separately.
693 ['win_debug_InlineFunctionExpansion==0', {
694 'AdditionalOptions': ['/Ob0'],
695 }],
696 ['win_debug_InlineFunctionExpansion!=""', {
697 'InlineFunctionExpansion':
698 '<(win_debug_InlineFunctionExpansion)',
699 }],
700 ],
[email protected]bb05e452009-10-29 21:24:56701 },
702 'VCLinkerTool': {
703 'LinkIncremental': '<(msvs_debug_link_incremental)',
704 },
705 'VCResourceCompilerTool': {
706 'PreprocessorDefinitions': ['_DEBUG'],
707 },
708 },
[email protected]2f80c312009-02-25 21:26:55709 'conditions': [
[email protected]bb05e452009-10-29 21:24:56710 ['OS=="linux"', {
711 'cflags': [
712 '<@(debug_extra_cflags)',
713 ],
[email protected]2f80c312009-02-25 21:26:55714 }],
715 ],
716 },
[email protected]5153767c2009-12-22 01:52:50717 'Release_Base': {
718 'abstract': 1,
[email protected]2f80c312009-02-25 21:26:55719 'defines': [
720 'NDEBUG',
721 ],
[email protected]1c966092009-08-20 21:19:26722 'xcode_settings': {
723 'DEAD_CODE_STRIPPING': 'YES', # -Wl,-dead_strip
724 'GCC_OPTIMIZATION_LEVEL': '<(mac_release_optimization)',
[email protected]ffd984b12009-09-11 19:37:00725 'OTHER_CFLAGS': [ '<@(release_extra_cflags)', ],
[email protected]1c966092009-08-20 21:19:26726 },
[email protected]bb05e452009-10-29 21:24:56727 'msvs_settings': {
[email protected]7e0d664a2009-12-03 21:07:47728 'VCCLCompilerTool': {
729 'Optimization': '<(win_release_Optimization)',
730 'RuntimeLibrary': '<(win_release_RuntimeLibrary)',
[email protected]2ae6e022010-05-07 13:19:15731 'conditions': [
732 # According to MSVS, InlineFunctionExpansion=0 means
733 # "default inlining", not "/Ob0".
734 # Thus, we have to handle InlineFunctionExpansion==0 separately.
735 ['win_release_InlineFunctionExpansion==0', {
736 'AdditionalOptions': ['/Ob0'],
737 }],
738 ['win_release_InlineFunctionExpansion!=""', {
739 'InlineFunctionExpansion':
740 '<(win_release_InlineFunctionExpansion)',
741 }],
742 ],
[email protected]7e0d664a2009-12-03 21:07:47743 },
[email protected]bb05e452009-10-29 21:24:56744 'VCLinkerTool': {
745 'LinkIncremental': '1',
746 },
747 },
[email protected]2f80c312009-02-25 21:26:55748 'conditions': [
[email protected]92822e82009-09-18 14:26:56749 ['release_valgrind_build==0', {
[email protected]ee857512010-05-14 08:24:42750 'defines': ['NVALGRIND', 'DYNAMIC_ANNOTATIONS_ENABLED=0'],
751 }, {
752 'defines': ['DYNAMIC_ANNOTATIONS_ENABLED=1'],
[email protected]92822e82009-09-18 14:26:56753 }],
[email protected]7e0d664a2009-12-03 21:07:47754 ['win_use_allocator_shim==0', {
755 'defines': ['NO_TCMALLOC'],
756 }],
[email protected]bb05e452009-10-29 21:24:56757 ['OS=="linux"', {
758 'cflags': [
[email protected]ffd984b12009-09-11 19:37:00759 '<@(release_extra_cflags)',
[email protected]bb05e452009-10-29 21:24:56760 ],
761 }],
[email protected]2f80c312009-02-25 21:26:55762 ],
763 },
[email protected]5153767c2009-12-22 01:52:50764 'Purify_Base': {
765 'abstract': 1,
766 'defines': [
767 'PURIFY',
768 'NO_TCMALLOC',
769 ],
770 'msvs_settings': {
771 'VCCLCompilerTool': {
772 'Optimization': '0',
773 'RuntimeLibrary': '0',
774 'BufferSecurityCheck': 'false',
775 },
776 'VCLinkerTool': {
777 'EnableCOMDATFolding': '1',
778 'LinkIncremental': '1',
779 },
780 },
781 },
782 #
783 # Concrete configurations
784 #
785 'Debug': {
786 'inherit_from': ['Common_Base', 'x86_Base', 'Debug_Base'],
787 },
788 'Release': {
789 'inherit_from': ['Common_Base', 'x86_Base', 'Release_Base'],
790 'conditions': [
791 ['msvs_use_common_release', {
[email protected]1f9471a2010-01-04 06:40:16792 'includes': ['release.gypi'],
[email protected]5153767c2009-12-22 01:52:50793 }],
794 ]
795 },
[email protected]f926fa0a2009-08-04 22:50:13796 'conditions': [
797 [ 'OS=="win"', {
798 # TODO(bradnelson): add a gyp mechanism to make this more graceful.
799 'Purify': {
[email protected]5153767c2009-12-22 01:52:50800 'inherit_from': ['Common_Base', 'x86_Base', 'Release_Base', 'Purify'],
[email protected]ef4fa4072009-12-04 22:46:50801 },
802 'Debug_x64': {
[email protected]5153767c2009-12-22 01:52:50803 'inherit_from': ['Common_Base', 'x64_Base', 'Debug_Base'],
[email protected]78263c12009-11-01 23:45:30804 },
805 'Release_x64': {
[email protected]5153767c2009-12-22 01:52:50806 'inherit_from': ['Common_Base', 'x64_Base', 'Release_Base'],
[email protected]78263c12009-11-01 23:45:30807 },
808 'Purify_x64': {
[email protected]1f9471a2010-01-04 06:40:16809 'inherit_from': ['Common_Base', 'x64_Base', 'Release_Base', 'Purify_Base'],
[email protected]78263c12009-11-01 23:45:30810 },
[email protected]f926fa0a2009-08-04 22:50:13811 }],
812 ],
[email protected]2f80c312009-02-25 21:26:55813 },
814 },
815 'conditions': [
[email protected]93f21e42010-04-01 00:35:15816 ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris"', {
[email protected]9d384032009-03-20 23:13:26817 'target_defaults': {
[email protected]5315f2842009-04-28 00:43:27818 # Enable -Werror by default, but put it in a variable so it can
819 # be disabled in ~/.gyp/include.gypi on the valgrind builders.
820 'variables': {
[email protected]ecf52cb82010-01-13 19:25:42821 # Use -fno-strict-aliasing by default since gcc 4.4 has periodic
822 # issues that slip through the cracks. We could do this just for
823 # gcc 4.4 but it makes more sense to be consistent on all
824 # compilers in use. TODO(Craig): turn this off again when
825 # there is some 4.4 test infrastructure in place and existing
826 # aliasing issues have been fixed.
827 'no_strict_aliasing%': 1,
[email protected]47deeb62009-12-17 14:49:39828 'conditions': [['OS=="linux"', {'werror%': '-Werror',}],
829 ['OS=="freebsd"', {'werror%': '',}],
830 ['OS=="openbsd"', {'werror%': '',}],
831 ],
[email protected]5315f2842009-04-28 00:43:27832 },
[email protected]9d384032009-03-20 23:13:26833 'cflags': [
[email protected]1bba09c2009-08-13 12:53:16834 '<(werror)', # See note above about the werror variable.
835 '-pthread',
836 '-fno-exceptions',
837 '-Wall',
[email protected]0fa17082010-03-26 00:48:05838 # TODO(evan): turn this back on once all the builds work.
839 # '-Wextra',
[email protected]225c8f52010-02-05 22:23:20840 # Don't warn about unused function params. We use those everywhere.
841 '-Wno-unused-parameter',
842 # Don't warn about the "struct foo f = {0};" initialization pattern.
843 '-Wno-missing-field-initializers',
[email protected]1bba09c2009-08-13 12:53:16844 '-D_FILE_OFFSET_BITS=64',
[email protected]3df6e3a2010-01-21 20:23:12845 # Don't export any symbols (for example, to plugins we dlopen()).
846 # Note: this is *required* to make some plugins work.
847 '-fvisibility=hidden',
[email protected]8a2fcba2009-07-29 00:52:24848 ],
849 'cflags_cc': [
[email protected]832d0212009-10-28 19:12:22850 '-fno-rtti',
[email protected]8a2fcba2009-07-29 00:52:24851 '-fno-threadsafe-statics',
[email protected]f5986c42009-11-17 18:39:36852 # Make inline functions have hidden visiblity by default.
853 # Surprisingly, not covered by -fvisibility=hidden.
854 '-fvisibility-inlines-hidden',
[email protected]9d384032009-03-20 23:13:26855 ],
[email protected]a6cf87e2009-04-03 04:07:38856 'ldflags': [
[email protected]138241f2010-03-30 23:53:10857 '-pthread', '-Wl,-z,noexecstack',
[email protected]9d384032009-03-20 23:13:26858 ],
[email protected]b5e46b92009-03-26 18:58:10859 'scons_variable_settings': {
860 'LIBPATH': ['$LIB_DIR'],
[email protected]9d384032009-03-20 23:13:26861 # Linking of large files uses lots of RAM, so serialize links
862 # using the handy flock command from util-linux.
[email protected]c13fcbd2009-03-27 04:27:01863 'FLOCK_LINK': ['flock', '$TOP_BUILDDIR/linker.lock', '$LINK'],
[email protected]789fbb7c2009-04-02 16:20:31864 'FLOCK_SHLINK': ['flock', '$TOP_BUILDDIR/linker.lock', '$SHLINK'],
865 'FLOCK_LDMODULE': ['flock', '$TOP_BUILDDIR/linker.lock', '$LDMODULE'],
[email protected]9d384032009-03-20 23:13:26866
867 # We have several cases where archives depend on each other in
868 # a cyclic fashion. Since the GNU linker does only a single
869 # pass over the archives we surround the libraries with
870 # --start-group and --end-group (aka -( and -) ). That causes
871 # ld to loop over the group until no more undefined symbols
872 # are found. In an ideal world we would only make groups from
873 # those libraries which we knew to be in cycles. However,
874 # that's tough with SCons, so we bodge it by making all the
875 # archives a group by redefining the linking command here.
876 #
877 # TODO: investigate whether we still have cycles that
878 # require --{start,end}-group. There has been a lot of
879 # refactoring since this was first coded, which might have
880 # eliminated the circular dependencies.
[email protected]12862922009-04-20 21:36:41881 #
882 # Note: $_LIBDIRFLAGS comes before ${LINK,SHLINK,LDMODULE}FLAGS
883 # so that we prefer our own built libraries (e.g. -lpng) to
884 # system versions of libraries that pkg-config might turn up.
885 # TODO(sgk): investigate handling this not by re-ordering the
886 # flags this way, but by adding a hook to use the SCons
887 # ParseFlags() option on the output from pkg-config.
[email protected]610d8cc2009-09-19 00:47:04888 'LINKCOM': [['$FLOCK_LINK', '-o', '$TARGET',
889 '$_LIBDIRFLAGS', '$LINKFLAGS', '$SOURCES',
890 '-Wl,--start-group', '$_LIBFLAGS', '-Wl,--end-group']],
891 'SHLINKCOM': [['$FLOCK_SHLINK', '-o', '$TARGET',
892 '$_LIBDIRFLAGS', '$SHLINKFLAGS', '$SOURCES',
893 '-Wl,--start-group', '$_LIBFLAGS', '-Wl,--end-group']],
894 'LDMODULECOM': [['$FLOCK_LDMODULE', '-o', '$TARGET',
895 '$_LIBDIRFLAGS', '$LDMODULEFLAGS', '$SOURCES',
896 '-Wl,--start-group', '$_LIBFLAGS', '-Wl,--end-group']],
[email protected]9d384032009-03-20 23:13:26897 'IMPLICIT_COMMAND_DEPENDENCIES': 0,
[email protected]d0644282009-04-22 00:20:29898 # -rpath is only used when building with shared libraries.
899 'conditions': [
900 [ 'library=="shared_library"', {
901 'RPATH': '$LIB_DIR',
902 }],
903 ],
[email protected]9d384032009-03-20 23:13:26904 },
[email protected]b5e46b92009-03-26 18:58:10905 'scons_import_variables': [
[email protected]52049d5c2009-05-01 20:32:49906 'AS',
[email protected]b5e46b92009-03-26 18:58:10907 'CC',
908 'CXX',
909 'LINK',
910 ],
911 'scons_propagate_variables': [
[email protected]52049d5c2009-05-01 20:32:49912 'AS',
[email protected]b5e46b92009-03-26 18:58:10913 'CC',
914 'CCACHE_DIR',
915 'CXX',
916 'DISTCC_DIR',
917 'DISTCC_HOSTS',
918 'HOME',
[email protected]5ae4f55e2009-04-13 23:19:47919 'INCLUDE_SERVER_ARGS',
920 'INCLUDE_SERVER_PORT',
[email protected]b5e46b92009-03-26 18:58:10921 'LINK',
[email protected]fff920a2009-05-08 22:35:32922 'CHROME_BUILD_TYPE',
923 'CHROMIUM_BUILD',
924 'OFFICIAL_BUILD',
[email protected]b5e46b92009-03-26 18:58:10925 ],
[email protected]3aacaf952009-04-02 15:34:09926 'configurations': {
[email protected]5153767c2009-12-22 01:52:50927 'Debug_Base': {
[email protected]c5bdc032009-04-20 19:11:31928 'variables': {
929 'debug_optimize%': '0',
930 },
[email protected]3aacaf952009-04-02 15:34:09931 'defines': [
932 '_DEBUG',
933 ],
934 'cflags': [
[email protected]22898f62009-10-26 22:14:01935 '-O>(debug_optimize)',
[email protected]3aacaf952009-04-02 15:34:09936 '-g',
937 ],
[email protected]5315f2842009-04-28 00:43:27938 },
[email protected]5153767c2009-12-22 01:52:50939 'Release_Base': {
[email protected]740e2de2009-07-21 11:41:01940 'variables': {
941 'release_optimize%': '2',
[email protected]1dd529642010-05-15 01:02:51942 # Binaries become big and gold is unable to perform GC
943 # and remove unused sections for some of test targets
944 # on 32 bit platform.
945 # (This is currently observed only in chromeos valgrind bots)
946 # The following flag is to disable --gc-sections linker
947 # option for these bots.
948 'no_gc_sections%': 0,
[email protected]740e2de2009-07-21 11:41:01949 },
[email protected]3aacaf952009-04-02 15:34:09950 'cflags': [
[email protected]22898f62009-10-26 22:14:01951 '-O>(release_optimize)',
[email protected]d8cc3a62009-04-08 18:29:53952 # Don't emit the GCC version ident directives, they just end up
953 # in the .comment section taking up binary size.
954 '-fno-ident',
955 # Put data and code in their own sections, so that unused symbols
956 # can be removed at link time with --gc-sections.
957 '-fdata-sections',
958 '-ffunction-sections',
[email protected]3aacaf952009-04-02 15:34:09959 ],
[email protected]c902f2cba2010-08-06 20:04:18960 'ldflags': [
961 # Specifically tell the linker to perform optimizations.
962 # See http://lwn.net/Articles/192624/ .
963 '-Wl,-O1',
[email protected]27c2e492010-08-06 22:55:22964 '-Wl,--as-needed',
[email protected]c902f2cba2010-08-06 20:04:18965 ],
[email protected]1dd529642010-05-15 01:02:51966 'conditions' : [
967 ['no_gc_sections==0', {
968 'ldflags': [
969 '-Wl,--gc-sections',
970 ],
971 }],
972 ]
[email protected]3aacaf952009-04-02 15:34:09973 },
974 },
[email protected]601b540222009-04-03 21:32:04975 'variants': {
976 'coverage': {
977 'cflags': ['-fprofile-arcs', '-ftest-coverage'],
978 'ldflags': ['-fprofile-arcs'],
979 },
980 'profile': {
981 'cflags': ['-pg', '-g'],
982 'ldflags': ['-pg'],
983 },
984 'symbols': {
985 'cflags': ['-g'],
986 },
987 },
[email protected]606116d22009-05-06 22:38:23988 'conditions': [
[email protected]7e8eb7612009-07-29 15:56:00989 [ 'target_arch=="ia32"', {
[email protected]606116d22009-05-06 22:38:23990 'asflags': [
991 # Needed so that libs with .s files (e.g. libicudata.a)
992 # are compatible with the general 32-bit-ness.
993 '-32',
994 ],
995 # All floating-point computations on x87 happens in 80-bit
996 # precision. Because the C and C++ language standards allow
997 # the compiler to keep the floating-point values in higher
998 # precision than what's specified in the source and doing so
999 # is more efficient than constantly rounding up to 64-bit or
1000 # 32-bit precision as specified in the source, the compiler,
1001 # especially in the optimized mode, tries very hard to keep
1002 # values in x87 floating-point stack (in 80-bit precision)
1003 # as long as possible. This has important side effects, that
1004 # the real value used in computation may change depending on
1005 # how the compiler did the optimization - that is, the value
1006 # kept in 80-bit is different than the value rounded down to
1007 # 64-bit or 32-bit. There are possible compiler options to make
1008 # this behavior consistent (e.g. -ffloat-store would keep all
1009 # floating-values in the memory, thus force them to be rounded
1010 # to its original precision) but they have significant runtime
1011 # performance penalty.
1012 #
1013 # -mfpmath=sse -msse2 makes the compiler use SSE instructions
1014 # which keep floating-point values in SSE registers in its
1015 # native precision (32-bit for single precision, and 64-bit for
1016 # double precision values). This means the floating-point value
1017 # used during computation does not change depending on how the
1018 # compiler optimized the code, since the value is always kept
1019 # in its specified precision.
[email protected]ffde7932009-05-29 00:39:061020 'conditions': [
[email protected]ac120ff2010-04-28 02:14:221021 ['branding=="Chromium" and disable_sse2==0', {
[email protected]ffde7932009-05-29 00:39:061022 'cflags': [
1023 '-march=pentium4',
1024 '-msse2',
1025 '-mfpmath=sse',
1026 ],
1027 }],
[email protected]06c756182010-04-27 18:31:311028 # ChromeOS targets Pinetrail, which is sse3, but most of the
[email protected]0183dbb2010-04-16 02:00:441029 # benefit comes from sse2 so this setting allows ChromeOS
1030 # to build on other CPUs. In the future -march=atom would help
1031 # but requires a newer compiler.
[email protected]ac120ff2010-04-28 02:14:221032 ['chromeos==1 and disable_sse2==0', {
[email protected]0183dbb2010-04-16 02:00:441033 'cflags': [
1034 '-msse2',
1035 ],
1036 }],
[email protected]34799f9d2010-07-08 17:51:331037 # Install packages have started cropping up with
1038 # different headers between the 32-bit and 64-bit
1039 # versions, so we have to shadow those differences off
1040 # and make sure a 32-bit-on-64-bit build picks up the
1041 # right files.
1042 ['host_arch!="ia32"', {
1043 'include_dirs+': [
1044 '/usr/include32',
1045 ],
1046 }],
[email protected]ffde7932009-05-29 00:39:061047 ],
[email protected]dc259ce52010-04-13 04:03:101048 # -mmmx allows mmintrin.h to be used for mmx intrinsics.
1049 # video playback is mmx and sse2 optimized.
[email protected]606116d22009-05-06 22:38:231050 'cflags': [
1051 '-m32',
[email protected]dc259ce52010-04-13 04:03:101052 '-mmmx',
[email protected]1c6560af2009-07-14 11:02:161053 ],
[email protected]606116d22009-05-06 22:38:231054 'ldflags': [
1055 '-m32',
1056 ],
1057 }],
[email protected]3dda8a962009-08-10 18:58:071058 ['target_arch=="arm"', {
[email protected]77c1b29392009-12-04 06:21:291059 'target_conditions': [
1060 ['_toolset=="target"', {
1061 'cflags_cc': [
1062 # The codesourcery arm-2009q3 toolchain warns at that the ABI
1063 # has changed whenever it encounters a varargs function. This
1064 # silences those warnings, as they are not helpful and
1065 # clutter legitimate warnings.
1066 '-Wno-abi',
1067 ],
1068 'conditions': [
1069 ['arm_thumb == 1', {
1070 'cflags': [
1071 '-mthumb',
1072 # TODO(piman): -Wa,-mimplicit-it=thumb is needed for
1073 # inline assembly that uses condition codes but it's
1074 # suboptimal. Better would be to #ifdef __thumb__ at the
1075 # right place and have a separate thumb path.
1076 '-Wa,-mimplicit-it=thumb',
1077 ]
1078 }],
1079 ['armv7==1', {
[email protected]dc9711f2009-11-13 19:30:251080 'cflags': [
1081 '-march=armv7-a',
1082 '-mtune=cortex-a8',
[email protected]dc9711f2009-11-13 19:30:251083 '-mfloat-abi=softfp',
1084 ],
[email protected]eafc0b452010-02-26 21:53:431085 'conditions': [
1086 ['arm_neon==1', {
1087 'cflags': [ '-mfpu=neon', ],
1088 }, {
[email protected]53e0f642010-03-05 01:41:561089 'cflags': [ '-mfpu=<(arm_fpu)', ],
[email protected]eafc0b452010-02-26 21:53:431090 }]
1091 ],
[email protected]dc9711f2009-11-13 19:30:251092 }],
[email protected]3dda8a962009-08-10 18:58:071093 ],
1094 }],
1095 ],
1096 }],
[email protected]2fb843b2010-08-12 02:11:081097 ['linux_fpic==1', {
[email protected]c76723a2010-01-25 23:10:581098 'cflags': [
1099 '-fPIC',
1100 ],
1101 }],
[email protected]ee28c9f2009-09-04 01:53:011102 ['sysroot!=""', {
[email protected]fd36ce822009-10-28 20:13:571103 'target_conditions': [
1104 ['_toolset=="target"', {
1105 'cflags': [
1106 '--sysroot=<(sysroot)',
1107 ],
1108 'ldflags': [
1109 '--sysroot=<(sysroot)',
1110 ],
1111 }]]
[email protected]ee28c9f2009-09-04 01:53:011112 }],
[email protected]cc4219a2009-08-14 05:30:521113 ['no_strict_aliasing==1', {
1114 'cflags': [
1115 '-fno-strict-aliasing',
1116 ],
1117 }],
[email protected]cbd5fd52009-08-26 00:14:271118 ['linux_breakpad==1', {
[email protected]c87efd42010-08-26 18:28:171119 'cflags': [ '-g' ],
[email protected]cbd5fd52009-08-26 00:14:271120 'defines': ['USE_LINUX_BREAKPAD'],
1121 }],
[email protected]39c4e1a82010-03-30 19:47:411122 ['linux_use_seccomp_sandbox==1 and buildtype!="Official"', {
1123 'defines': ['USE_SECCOMP_SANDBOX'],
1124 }],
[email protected]7cd2afd2009-10-27 21:40:261125 ['library=="shared_library"', {
1126 # When building with shared libraries, remove the visiblity-hiding
1127 # flag.
1128 'cflags!': [ '-fvisibility=hidden' ],
[email protected]2fb843b2010-08-12 02:11:081129 'conditions': [
1130 ['target_arch=="x64" or target_arch=="arm"', {
1131 # Shared libraries need -fPIC on x86-64 and arm
1132 'cflags': ['-fPIC']
1133 }]
1134 ],
[email protected]7cd2afd2009-10-27 21:40:261135 }],
[email protected]d8b60602010-03-26 09:41:221136 ['linux_use_heapchecker==1', {
1137 'variables': {'linux_use_tcmalloc%': 1},
1138 }],
[email protected]61a9b2d82010-02-26 00:31:081139 ['linux_use_tcmalloc==0', {
1140 'defines': ['NO_TCMALLOC'],
[email protected]01699e22009-11-11 19:24:241141 }],
[email protected]d8b60602010-03-26 09:41:221142 ['linux_use_heapchecker==0', {
1143 'defines': ['NO_HEAPCHECKER'],
1144 }],
[email protected]606116d22009-05-06 22:38:231145 ],
[email protected]9d384032009-03-20 23:13:261146 },
1147 }],
[email protected]c51e8d52009-12-11 20:04:061148 # FreeBSD-specific options; note that most FreeBSD options are set above,
1149 # with Linux.
1150 ['OS=="freebsd"', {
1151 'target_defaults': {
1152 'ldflags': [
1153 '-Wl,--no-keep-memory',
1154 ],
1155 },
1156 }],
[email protected]93f21e42010-04-01 00:35:151157 ['OS=="solaris"', {
1158 'cflags!': ['-fvisibility=hidden'],
1159 'cflags_cc!': ['-fvisibility-inlines-hidden'],
1160 }],
[email protected]2f80c312009-02-25 21:26:551161 ['OS=="mac"', {
1162 'target_defaults': {
[email protected]24700642009-06-01 16:01:201163 'variables': {
1164 # This should be 'mac_real_dsym%', but there seems to be a bug
1165 # with % in variables that are intended to be set to different
1166 # values in different targets, like this one.
1167 'mac_real_dsym': 0, # Fake .dSYMs are fine in most cases.
1168 },
[email protected]d92c7c012009-03-19 19:26:421169 'mac_bundle': 0,
[email protected]2f80c312009-02-25 21:26:551170 'xcode_settings': {
1171 'ALWAYS_SEARCH_USER_PATHS': 'NO',
[email protected]ab2956372009-08-13 18:11:041172 'GCC_C_LANGUAGE_STANDARD': 'c99', # -std=c99
1173 'GCC_CW_ASM_SYNTAX': 'NO', # No -fasm-blocks
1174 'GCC_DYNAMIC_NO_PIC': 'NO', # No -mdynamic-no-pic
1175 # (Equivalent to -fPIC)
1176 'GCC_ENABLE_CPP_EXCEPTIONS': 'NO', # -fno-exceptions
1177 'GCC_ENABLE_CPP_RTTI': 'NO', # -fno-rtti
1178 'GCC_ENABLE_PASCAL_STRINGS': 'NO', # No -mpascal-strings
[email protected]3224dcd2009-09-16 17:31:251179 # GCC_INLINES_ARE_PRIVATE_EXTERN maps to -fvisibility-inlines-hidden
1180 'GCC_INLINES_ARE_PRIVATE_EXTERN': 'YES',
[email protected]ab2956372009-08-13 18:11:041181 'GCC_OBJC_CALL_CXX_CDTORS': 'YES', # -fobjc-call-cxx-cdtors
1182 'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES', # -fvisibility=hidden
1183 'GCC_THREADSAFE_STATICS': 'NO', # -fno-threadsafe-statics
1184 'GCC_TREAT_WARNINGS_AS_ERRORS': 'YES', # -Werror
[email protected]2f80c312009-02-25 21:26:551185 'GCC_VERSION': '4.2',
[email protected]ab2956372009-08-13 18:11:041186 'GCC_WARN_ABOUT_MISSING_NEWLINE': 'YES', # -Wnewline-eof
[email protected]3224dcd2009-09-16 17:31:251187 # MACOSX_DEPLOYMENT_TARGET maps to -mmacosx-version-min
1188 'MACOSX_DEPLOYMENT_TARGET': '<(mac_deployment_target)',
[email protected]ab2956372009-08-13 18:11:041189 'PREBINDING': 'NO', # No -Wl,-prebind
[email protected]2f80c312009-02-25 21:26:551190 'USE_HEADERMAP': 'NO',
[email protected]080e86f2010-06-21 15:19:041191 'WARNING_CFLAGS': [
1192 '-Wall',
1193 '-Wendif-labels',
1194 '-Wextra',
1195 # Don't warn about unused function parameters.
1196 '-Wno-unused-parameter',
1197 # Don't warn about the "struct foo f = {0};" initialization
1198 # pattern.
1199 '-Wno-missing-field-initializers',
1200 ],
[email protected]b3fb8092009-03-12 19:09:241201 'conditions': [
1202 ['chromium_mac_pch', {'GCC_PRECOMPILE_PREFIX_HEADER': 'YES'},
[email protected]9543af052009-09-15 22:42:591203 {'GCC_PRECOMPILE_PREFIX_HEADER': 'NO'}
1204 ],
[email protected]b3fb8092009-03-12 19:09:241205 ],
[email protected]2f80c312009-02-25 21:26:551206 },
1207 'target_conditions': [
[email protected]2f80c312009-02-25 21:26:551208 ['_type!="static_library"', {
[email protected]5d7dc972009-04-16 15:30:461209 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-search_paths_first']},
1210 }],
1211 ['_mac_bundle', {
1212 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-ObjC']},
[email protected]87fde4a2009-02-28 00:50:081213 }],
[email protected]c2111422010-06-01 18:30:251214 ['_type=="executable" or _type=="shared_library" or _type=="loadable_module"', {
[email protected]24700642009-06-01 16:01:201215 'target_conditions': [
1216 ['mac_real_dsym == 1', {
1217 # To get a real .dSYM bundle produced by dsymutil, set the
1218 # debug information format to dwarf-with-dsym. Since
1219 # strip_from_xcode will not be used, set Xcode to do the
1220 # stripping as well.
1221 'configurations': {
[email protected]5153767c2009-12-22 01:52:501222 'Release_Base': {
[email protected]24700642009-06-01 16:01:201223 'xcode_settings': {
1224 'DEBUG_INFORMATION_FORMAT': 'dwarf-with-dsym',
1225 'DEPLOYMENT_POSTPROCESSING': 'YES',
1226 'STRIP_INSTALLED_PRODUCT': 'YES',
[email protected]e14a9f92009-08-05 19:26:071227 'target_conditions': [
[email protected]c2111422010-06-01 18:30:251228 ['_type=="shared_library" or _type=="loadable_module"', {
[email protected]e14a9f92009-08-05 19:26:071229 # The Xcode default is to strip debugging symbols
1230 # only (-S). Local symbols should be stripped as
1231 # well, which will be handled by -x. Xcode will
1232 # continue to insert -S when stripping even when
1233 # additional flags are added with STRIPFLAGS.
1234 'STRIPFLAGS': '-x',
[email protected]c2111422010-06-01 18:30:251235 }], # _type=="shared_library" or _type=="loadable_module"'
[email protected]e14a9f92009-08-05 19:26:071236 ], # target_conditions
1237 }, # xcode_settings
1238 }, # configuration "Release"
1239 }, # configurations
[email protected]24700642009-06-01 16:01:201240 }, { # mac_real_dsym != 1
1241 # To get a fast fake .dSYM bundle, use a post-build step to
1242 # produce the .dSYM and strip the executable. strip_from_xcode
1243 # only operates in the Release configuration.
1244 'postbuilds': [
1245 {
1246 'variables': {
1247 # Define strip_from_xcode in a variable ending in _path
1248 # so that gyp understands it's a path and performs proper
1249 # relativization during dict merging.
1250 'strip_from_xcode_path': 'mac/strip_from_xcode',
1251 },
1252 'postbuild_name': 'Strip If Needed',
1253 'action': ['<(strip_from_xcode_path)'],
1254 },
[email protected]e14a9f92009-08-05 19:26:071255 ], # postbuilds
1256 }], # mac_real_dsym
1257 ], # target_conditions
[email protected]c2111422010-06-01 18:30:251258 }], # _type=="executable" or _type=="shared_library" or _type=="loadable_module"
[email protected]e14a9f92009-08-05 19:26:071259 ], # target_conditions
1260 }, # target_defaults
1261 }], # OS=="mac"
[email protected]2f80c312009-02-25 21:26:551262 ['OS=="win"', {
1263 'target_defaults': {
1264 'defines': [
1265 '_WIN32_WINNT=0x0600',
1266 'WINVER=0x0600',
1267 'WIN32',
1268 '_WINDOWS',
[email protected]2f80c312009-02-25 21:26:551269 'NOMINMAX',
1270 '_CRT_RAND_S',
1271 'CERT_CHAIN_PARA_HAS_EXTRA_FIELDS',
1272 'WIN32_LEAN_AND_MEAN',
1273 '_SECURE_ATL',
[email protected]7a812dd62010-06-30 18:52:271274 '_ATL_NO_OPENGL',
[email protected]adfb98c2009-06-23 20:08:451275 '_HAS_TR1=0',
[email protected]2f80c312009-02-25 21:26:551276 ],
[email protected]8974e042010-06-21 18:06:521277 'conditions': [
1278 ['component=="static_library"', {
1279 'defines': [
1280 '_HAS_EXCEPTIONS=0',
1281 ],
1282 }],
1283 ],
[email protected]5b5ca7cb2009-07-20 23:00:201284 'msvs_system_include_dirs': [
[email protected]998b5152009-12-12 22:19:521285 '<(DEPTH)/third_party/platformsdk_win7/files/Include',
[email protected]a78da50e2010-06-09 21:31:371286 '<(DEPTH)/third_party/directxsdk/files/Include',
[email protected]2f80c312009-02-25 21:26:551287 '$(VSInstallDir)/VC/atlmfc/include',
1288 ],
[email protected]a8d99cef2009-08-26 20:47:491289 'msvs_cygwin_dirs': ['<(DEPTH)/third_party/cygwin'],
[email protected]365632b2010-06-22 02:01:571290 'msvs_disabled_warnings': [4351, 4396, 4503, 4819],
[email protected]2f80c312009-02-25 21:26:551291 'msvs_settings': {
1292 'VCCLCompilerTool': {
1293 'MinimalRebuild': 'false',
[email protected]2f80c312009-02-25 21:26:551294 'BufferSecurityCheck': 'true',
1295 'EnableFunctionLevelLinking': 'true',
1296 'RuntimeTypeInfo': 'false',
1297 'WarningLevel': '3',
1298 'WarnAsError': 'true',
1299 'DebugInformationFormat': '3',
[email protected]3fef6e62009-07-31 19:58:581300 'conditions': [
[email protected]912c55c2009-07-31 23:33:551301 [ 'msvs_multi_core_compile', {
[email protected]1f9471a2010-01-04 06:40:161302 'AdditionalOptions': ['/MP'],
[email protected]912c55c2009-07-31 23:33:551303 }],
[email protected]8974e042010-06-21 18:06:521304 ['component=="shared_library"', {
1305 'ExceptionHandling': '1', # /EHsc
1306 }, {
1307 'ExceptionHandling': '0',
1308 }],
[email protected]3fef6e62009-07-31 19:58:581309 ],
[email protected]2f80c312009-02-25 21:26:551310 },
1311 'VCLibrarianTool': {
[email protected]1f9471a2010-01-04 06:40:161312 'AdditionalOptions': ['/ignore:4221'],
[email protected]a78da50e2010-06-09 21:31:371313 'AdditionalLibraryDirectories': [
1314 '<(DEPTH)/third_party/platformsdk_win7/files/Lib',
1315 '<(DEPTH)/third_party/directxsdk/files/Lib/x86',
1316 ],
[email protected]2f80c312009-02-25 21:26:551317 },
1318 'VCLinkerTool': {
[email protected]2f80c312009-02-25 21:26:551319 'AdditionalDependencies': [
1320 'wininet.lib',
1321 'version.lib',
1322 'msimg32.lib',
1323 'ws2_32.lib',
1324 'usp10.lib',
1325 'psapi.lib',
[email protected]96fd0032009-04-24 00:13:081326 'dbghelp.lib',
[email protected]2f80c312009-02-25 21:26:551327 ],
[email protected]a78da50e2010-06-09 21:31:371328 'AdditionalLibraryDirectories': [
1329 '<(DEPTH)/third_party/platformsdk_win7/files/Lib',
1330 '<(DEPTH)/third_party/directxsdk/files/Lib/x86',
1331 ],
[email protected]2f80c312009-02-25 21:26:551332 'GenerateDebugInformation': 'true',
1333 'MapFileName': '$(OutDir)\\$(TargetName).map',
1334 'ImportLibrary': '$(OutDir)\\lib\\$(TargetName).lib',
[email protected]2f80c312009-02-25 21:26:551335 'FixedBaseAddress': '1',
[email protected]825ff8d2009-05-22 01:40:481336 # SubSystem values:
1337 # 0 == not set
1338 # 1 == /SUBSYSTEM:CONSOLE
1339 # 2 == /SUBSYSTEM:WINDOWS
1340 # Most of the executables we'll ever create are tests
1341 # and utilities with console output.
1342 'SubSystem': '1',
[email protected]2f80c312009-02-25 21:26:551343 },
1344 'VCMIDLTool': {
1345 'GenerateStublessProxies': 'true',
1346 'TypeLibraryName': '$(InputName).tlb',
1347 'OutputDirectory': '$(IntDir)',
1348 'HeaderFileName': '$(InputName).h',
1349 'DLLDataFileName': 'dlldata.c',
1350 'InterfaceIdentifierFileName': '$(InputName)_i.c',
1351 'ProxyFileName': '$(InputName)_p.c',
1352 },
1353 'VCResourceCompilerTool': {
1354 'Culture' : '1033',
[email protected]4d91cbc2010-05-07 20:41:381355 'AdditionalIncludeDirectories': [
1356 '<(DEPTH)',
1357 '<(SHARED_INTERMEDIATE_DIR)',
1358 ],
[email protected]2f80c312009-02-25 21:26:551359 },
1360 },
1361 },
1362 }],
[email protected]93f21e42010-04-01 00:35:151363 ['disable_nacl==1 or OS=="freebsd" or OS=="openbsd" or OS=="solaris"', {
[email protected]d8c7cbcc2009-10-02 19:00:311364 'target_defaults': {
1365 'defines': [
1366 'DISABLE_NACL',
1367 ],
1368 },
1369 }],
[email protected]cfbf9bc2009-12-07 22:07:561370 ['OS=="win" and msvs_use_common_linker_extras', {
[email protected]48c7af72009-07-03 22:00:191371 'target_defaults': {
1372 'msvs_settings': {
1373 'VCLinkerTool': {
[email protected]48c7af72009-07-03 22:00:191374 'DelayLoadDLLs': [
1375 'dbghelp.dll',
1376 'dwmapi.dll',
1377 'uxtheme.dll',
1378 ],
1379 },
1380 },
[email protected]ef4fa4072009-12-04 22:46:501381 'configurations': {
[email protected]5153767c2009-12-22 01:52:501382 'x86_Base': {
[email protected]ef4fa4072009-12-04 22:46:501383 'msvs_settings': {
1384 'VCLinkerTool': {
[email protected]1f9471a2010-01-04 06:40:161385 'AdditionalOptions': [
1386 '/safeseh',
1387 '/dynamicbase',
1388 '/ignore:4199',
1389 '/ignore:4221',
1390 '/nxcompat',
1391 ],
[email protected]ef4fa4072009-12-04 22:46:501392 },
1393 },
1394 },
[email protected]5153767c2009-12-22 01:52:501395 'x64_Base': {
[email protected]ef4fa4072009-12-04 22:46:501396 'msvs_settings': {
1397 'VCLinkerTool': {
[email protected]1f9471a2010-01-04 06:40:161398 'AdditionalOptions': [
[email protected]ef4fa4072009-12-04 22:46:501399 # safeseh is not compatible with x64
[email protected]1f9471a2010-01-04 06:40:161400 '/dynamicbase',
1401 '/ignore:4199',
1402 '/ignore:4221',
1403 '/nxcompat',
1404 ],
[email protected]ef4fa4072009-12-04 22:46:501405 },
1406 },
1407 },
1408 },
[email protected]48c7af72009-07-03 22:00:191409 },
1410 }],
[email protected]9821d0d2010-04-16 22:40:371411 ['enable_new_npdevice_api==1', {
1412 'target_defaults': {
1413 'defines': [
1414 'ENABLE_NEW_NPDEVICE_API',
1415 ],
1416 },
1417 }],
[email protected]2f80c312009-02-25 21:26:551418 ],
[email protected]c13fcbd2009-03-27 04:27:011419 'scons_settings': {
1420 'sconsbuild_dir': '<(DEPTH)/sconsbuild',
[email protected]a8b56d92009-08-10 04:09:071421 'tools': ['ar', 'as', 'gcc', 'g++', 'gnulink', 'chromium_builders'],
[email protected]c13fcbd2009-03-27 04:27:011422 },
[email protected]2f80c312009-02-25 21:26:551423 'xcode_settings': {
[email protected]0c8ab452009-11-06 21:57:501424 # DON'T ADD ANYTHING NEW TO THIS BLOCK UNLESS YOU REALLY REALLY NEED IT!
1425 # This block adds *project-wide* configuration settings to each project
1426 # file. It's almost always wrong to put things here. Specify your
1427 # custom xcode_settings in target_defaults to add them to targets instead.
1428
1429 # In an Xcode Project Info window, the "Base SDK for All Configurations"
1430 # setting sets the SDK on a project-wide basis. In order to get the
1431 # configured SDK to show properly in the Xcode UI, SDKROOT must be set
1432 # here at the project level.
1433 'SDKROOT': 'macosx<(mac_sdk)', # -isysroot
1434
[email protected]2f80c312009-02-25 21:26:551435 # The Xcode generator will look for an xcode_settings section at the root
1436 # of each dict and use it to apply settings on a file-wide basis. Most
1437 # settings should not be here, they should be in target-specific
1438 # xcode_settings sections, or better yet, should use non-Xcode-specific
1439 # settings in target dicts. SYMROOT is a special case, because many other
1440 # Xcode variables depend on it, including variables such as
1441 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something
1442 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the
1443 # files to appear (when present) in the UI as actual files and not red
1444 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR,
1445 # and therefore SYMROOT, needs to be set at the project level.
[email protected]bfa24b962009-03-02 00:16:161446 'SYMROOT': '<(DEPTH)/xcodebuild',
[email protected]2f80c312009-02-25 21:26:551447 },
[email protected]ee28c9f2009-09-04 01:53:011448}
[email protected]f5c990c2009-10-06 03:02:381449
1450# Local Variables:
1451# tab-width:2
1452# indent-tabs-mode:nil
1453# End:
1454# vim: set expandtab tabstop=2 shiftwidth=2: