blob: 0867e42fe61f45a3c9798d37d0e069efe8f871e7 [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]b3fb8092009-03-12 19:09:2418 # Variables expected to be overriden on the GYP command line (-D) or by
19 # ~/.gyp/include.gypi.
20
[email protected]e14a9f92009-08-05 19:26:0721 # Putting a variables dict inside another variables dict looks kind of
22 # weird. This is done so that "branding" and "buildtype" are defined as
23 # variables within the outer variables dict here. This is necessary
24 # to get these variables defined for the conditions within this variables
25 # dict that operate on these variables.
26 'variables': {
27 # Override branding to select the desired branding flavor.
28 'branding%': 'Chromium',
29
30 # Override buildtype to select the desired build flavor.
31 # Dev - everyday build for development/testing
32 # Official - release build (generally implies additional processing)
33 # TODO(mmoss) Once 'buildtype' is fully supported (e.g. Windows gyp
34 # conversion is done), some of the things which are now controlled by
35 # 'branding', such as symbol generation, will need to be refactored based
36 # on 'buildtype' (i.e. we don't care about saving symbols for non-Official
37 # builds).
38 'buildtype%': 'Dev',
[email protected]cbd5fd52009-08-26 00:14:2739
[email protected]cf185b32010-01-12 04:29:5940 'variables': {
41 # Compute the architecture that we're building on.
42 'conditions': [
[email protected]65df0582010-01-23 02:37:5643 [ 'OS=="linux" or OS=="freebsd" or OS=="openbsd"', {
[email protected]cf185b32010-01-12 04:29:5944 # This handles the Linux platforms we generally deal with. Anything
45 # else gets passed through, which probably won't work very well; such
46 # hosts should pass an explicit target_arch to gyp.
47 'host_arch%':
48 '<!(uname -m | sed -e "s/i.86/ia32/;s/x86_64/x64/;s/amd64/x64/;s/arm.*/arm/")',
49 }, { # OS!="linux"
50 'host_arch%': 'ia32',
51 }],
52 ],
[email protected]b3f23ba2010-04-26 22:58:1753
54 # Whether we're building a ChromeOS build. We set the initial
55 # value at this level of nesting so it's available for the
56 # toolkit_views test below.
57 'chromeos%': '0',
[email protected]8974e042010-06-21 18:06:5258
59 # To do a shared build on linux we need to be able to choose between
60 # type static_library and shared_library. We default to doing a static
61 # build but you can override this with "gyp -Dlibrary=shared_library"
62 # or you can add the following line (without the #) to
63 # ~/.gyp/include.gypi {'variables': {'library': 'shared_library'}}
64 # to compile as shared by default
65 'library%': 'static_library',
[email protected]cf185b32010-01-12 04:29:5966 },
[email protected]b3f23ba2010-04-26 22:58:1767
68 # Set default value of toolkit_views on for Windows and Chrome OS.
69 # We set it at this level of nesting so the value is available for
70 # other conditionals below.
71 'conditions': [
72 ['OS=="win" or chromeos==1', {
73 'toolkit_views%': 1,
74 }, {
75 'toolkit_views%': 0,
76 }],
77 ],
78
[email protected]cf185b32010-01-12 04:29:5979 'host_arch%': '<(host_arch)',
80
81 # Default architecture we're building for is the architecture we're
82 # building on.
83 'target_arch%': '<(host_arch)',
[email protected]e0d00142009-09-18 22:10:2784
[email protected]cbd5fd52009-08-26 00:14:2785 # We do want to build Chromium with Breakpad support in certain
86 # situations. I.e. for Chrome bot.
87 'linux_chromium_breakpad%': 0,
[email protected]4c9cc6c2009-10-01 18:54:5788 # And if we want to dump symbols.
[email protected]05cb6962009-10-01 23:29:0389 'linux_chromium_dump_symbols%': 0,
90 # Also see linux_strip_binary below.
[email protected]c153e5352009-09-22 12:37:4491
[email protected]b3f23ba2010-04-26 22:58:1792 # Copy conditionally-set chromeos variable out one scope.
93 'chromeos%': '<(chromeos)',
[email protected]b2f030c2009-09-24 20:36:2194
95 # This variable tells WebCore.gyp and JavaScriptCore.gyp whether they are
96 # are built under a chromium full build (1) or a webkit.org chromium
97 # build (0).
98 'inside_chromium_build%': 1,
[email protected]9c1949e2009-10-02 19:59:5499
100 # Set to 1 to enable fast builds. It disables debug info for fastest
101 # compilation.
102 'fastbuild%': 0,
[email protected]84352455e72010-02-03 17:02:27103
104 # Set to 1 compile with -fPIC cflag on linux. This is a must for shared
105 # libraries on linux x86-64 and arm.
106 'linux_fpic%': 0,
[email protected]eafc0b452010-02-26 21:53:43107
[email protected]a76fe1a2010-03-01 23:39:36108 # Python version.
109 'python_ver%': '2.5',
110
[email protected]eafc0b452010-02-26 21:53:43111 # Set ARM-v7 compilation flags
112 'armv7%': 0,
113
114 # Set Neon compilation flags (only meaningful if armv7==1).
115 'arm_neon%': 1,
[email protected]4d83eb72010-03-04 16:42:23116
117 # The system root for cross-compiles. Default: none.
118 'sysroot%': '',
[email protected]ac120ff2010-04-28 02:14:22119
120 # On Linux, we build with sse2 for Chromium builds.
121 'disable_sse2%': 0,
[email protected]d67c9ea2010-06-08 22:43:45122
[email protected]542bf24a2010-06-11 23:08:17123 # Remoting compilation is enabled by default. Set to 0 to disable.
124 'remoting%': 1,
[email protected]8974e042010-06-21 18:06:52125
126 'library%': '<(library)',
127
128 # Variable 'component' is for cases where we would like to build some
129 # components as dynamic shared libraries but still need variable
130 # 'library' for static libraries.
131 # By default, component is set to whatever library is set to and
132 # it can be overriden by the GYP command line or by ~/.gyp/include.gypi.
133 'component%': '<(library)',
[email protected]e14a9f92009-08-05 19:26:07134 },
135
136 # Define branding and buildtype on the basis of their settings within the
137 # variables sub-dict above, unless overridden.
138 'branding%': '<(branding)',
139 'buildtype%': '<(buildtype)',
[email protected]e0d00142009-09-18 22:10:27140 'target_arch%': '<(target_arch)',
[email protected]cf185b32010-01-12 04:29:59141 'host_arch%': '<(host_arch)',
[email protected]c153e5352009-09-22 12:37:44142 'toolkit_views%': '<(toolkit_views)',
143 'chromeos%': '<(chromeos)',
[email protected]b2f030c2009-09-24 20:36:21144 'inside_chromium_build%': '<(inside_chromium_build)',
[email protected]9c1949e2009-10-02 19:59:54145 'fastbuild%': '<(fastbuild)',
[email protected]84352455e72010-02-03 17:02:27146 'linux_fpic%': '<(linux_fpic)',
[email protected]a76fe1a2010-03-01 23:39:36147 'python_ver%': '<(python_ver)',
[email protected]eafc0b452010-02-26 21:53:43148 'armv7%': '<(armv7)',
149 'arm_neon%': '<(arm_neon)',
[email protected]4d83eb72010-03-04 16:42:23150 'sysroot%': '<(sysroot)',
[email protected]ac120ff2010-04-28 02:14:22151 'disable_sse2%': '<(disable_sse2)',
[email protected]542bf24a2010-06-11 23:08:17152 'remoting%': '<(remoting)',
[email protected]8974e042010-06-21 18:06:52153 'library%': '<(library)',
154 'component%': '<(component)',
[email protected]e14a9f92009-08-05 19:26:07155
[email protected]caa95c82009-11-23 22:39:32156 # The release channel that this build targets. This is used to restrict
157 # channel-specific build options, like which installer packages to create.
158 # The default is 'all', which does no channel-specific filtering.
159 'channel%': 'all',
160
[email protected]b3fb8092009-03-12 19:09:24161 # Override chromium_mac_pch and set it to 0 to suppress the use of
162 # precompiled headers on the Mac. Prefix header injection may still be
163 # used, but prefix headers will not be precompiled. This is useful when
164 # using distcc to distribute a build to compile slaves that don't
165 # share the same compiler executable as the system driving the compilation,
166 # because precompiled headers rely on pointers into a specific compiler
167 # executable's image. Setting this to 0 is needed to use an experimental
168 # Linux-Mac cross compiler distcc farm.
169 'chromium_mac_pch%': 1,
170
[email protected]3224dcd2009-09-16 17:31:25171 # Mac OS X SDK and deployment target support.
172 # The SDK identifies the version of the system headers that will be used,
173 # and corresponds to the MAC_OS_X_VERSION_MAX_ALLOWED compile-time macro.
174 # "Maximum allowed" refers to the operating system version whose APIs are
175 # available in the headers.
176 # The deployment target identifies the minimum system version that the
177 # built products are expected to function on. It corresponds to the
178 # MAC_OS_X_VERSION_MIN_REQUIRED compile-time macro.
179 # To ensure these macros are available, #include <AvailabilityMacros.h>.
180 # Additional documentation on these macros is available at
181 # http://developer.apple.com/mac/library/technotes/tn2002/tn2064.html#SECTION3
182 # Chrome normally builds with the Mac OS X 10.5 SDK and sets the
183 # deployment target to 10.5. Other projects, such as O3D, may override
184 # these defaults.
185 'mac_sdk%': '10.5',
186 'mac_deployment_target%': '10.5',
[email protected]9543af052009-09-15 22:42:59187
[email protected]f5ecbba12009-04-03 04:35:18188 # Set to 1 to enable code coverage. In addition to build changes
189 # (e.g. extra CFLAGS), also creates a new target in the src/chrome
190 # project file called "coverage".
191 # Currently ignored on Windows.
192 'coverage%': 0,
[email protected]653bd5f032009-04-08 12:55:49193
[email protected]c61f6432009-04-22 01:16:42194 # Overridable specification for potential use of alternative
195 # JavaScript engines.
196 'javascript_engine%': 'v8',
197
[email protected]7477ea6f2009-12-22 23:28:15198 # Although base/allocator lets you select a heap library via an
[email protected]7e0d664a2009-12-03 21:07:47199 # environment variable, the libcmt shim it uses sometimes gets in
200 # the way. To disable it entirely, and switch to normal msvcrt, do e.g.
201 # 'win_use_allocator_shim': 0,
202 # 'win_release_RuntimeLibrary': 2
203 # to ~/.gyp/include.gypi, gclient runhooks --force, and do a release build.
[email protected]8974e042010-06-21 18:06:52204 'win_use_allocator_shim%': 1, # 1 = shim allocator via libcmt; 0 = msvcrt
[email protected]279cd4212009-09-11 22:32:11205
[email protected]95ff8082009-11-13 22:21:01206 # Whether usage of OpenMAX is enabled.
207 'enable_openmax%': 0,
208
[email protected]d01120e62010-05-10 17:04:48209 # Whether proprietary audio/video codecs are assumed to be included with
210 # this build (only meaningful if branding!=Chrome).
211 'proprietary_codecs%': 0,
212
[email protected]e5b2eaa2009-04-14 01:39:12213 # TODO(bradnelson): eliminate this when possible.
214 # To allow local gyp files to prevent release.vsprops from being included.
215 # Yes(1) means include release.vsprops.
216 # Once all vsprops settings are migrated into gyp, this can go away.
217 'msvs_use_common_release%': 1,
[email protected]606116d22009-05-06 22:38:23218
[email protected]cbd5fd52009-08-26 00:14:27219 # TODO(bradnelson): eliminate this when possible.
220 # To allow local gyp files to override additional linker options for msvs.
221 # Yes(1) means set use the common linker options.
[email protected]48c7af72009-07-03 22:00:19222 'msvs_use_common_linker_extras%': 1,
223
[email protected]1ffb6502009-06-02 07:46:24224 # TODO(sgk): eliminate this if possible.
225 # It would be nicer to support this via a setting in 'target_defaults'
226 # in chrome/app/locales/locales.gypi overriding the setting in the
227 # 'Debug' configuration in the 'target_defaults' dict below,
228 # but that doesn't work as we'd like.
229 'msvs_debug_link_incremental%': '2',
230
[email protected]573136142009-07-15 22:48:37231 # This is the location of the sandbox binary. Chrome looks for this before
232 # running the zygote process. If found, and SUID, it will be used to
233 # sandbox the zygote process and, thus, all renderer processes.
234 'linux_sandbox_path%': '',
235
[email protected]ad6d2c42009-09-15 20:13:38236 # Set this to true to enable SELinux support.
237 'selinux%': 0,
[email protected]4c9cc6c2009-10-01 18:54:57238
[email protected]05cb6962009-10-01 23:29:03239 # Strip the binary after dumping symbols.
240 'linux_strip_binary%': 0,
241
[email protected]46ce5b562010-06-16 18:39:53242 # Enable TCMalloc.
243 'linux_use_tcmalloc%': 1,
[email protected]01699e22009-11-11 19:24:24244
[email protected]39ca7de2010-04-16 08:04:03245 # Disable TCMalloc's debugallocation.
246 'linux_use_debugallocation%': 0,
247
[email protected]d8b60602010-03-26 09:41:22248 # Disable TCMalloc's heapchecker.
249 'linux_use_heapchecker%': 0,
250
[email protected]cc2d7cd2010-03-30 22:46:21251 # Set to 1 to turn on seccomp sandbox by default.
252 # (Note: this is ignored for official builds.)
253 'linux_use_seccomp_sandbox%': 0,
[email protected]39c4e1a82010-03-30 19:47:41254
[email protected]556c5d72010-06-10 05:45:01255 # Set to 1 to link against libgnome-keyring instead of using dlopen().
256 'linux_link_gnome_keyring%': 0,
257
[email protected]c153e5352009-09-22 12:37:44258 # Set to select the Title Case versions of strings in GRD files.
259 'use_titlecase_in_grd_files%': 0,
[email protected]ad6d2c42009-09-15 20:13:38260
[email protected]d8c7cbcc2009-10-02 19:00:31261 # Used to disable Native Client at compile time, for platforms where it
262 # isn't supported
263 'disable_nacl%': 0,
264
[email protected]77c1b29392009-12-04 06:21:29265 # Set Thumb compilation flags.
266 'arm_thumb%': 0,
267
[email protected]53e0f642010-03-05 01:41:56268 # Set ARM fpu compilation flags (only meaningful if armv7==1 and
269 # arm_neon==0).
270 'arm_fpu%': 'vfpv3',
271
[email protected]9821d0d2010-04-16 22:40:37272 # Enable new NPDevice API.
273 'enable_new_npdevice_api%': 0,
[email protected]ed154592010-04-29 00:18:50274
275 # Enable EGLImage support in OpenMAX
276 'enable_eglimage%': 0,
277
[email protected]912c55c2009-07-31 23:33:55278 'conditions': [
[email protected]47deeb62009-12-17 14:49:39279 ['OS=="linux" or OS=="freebsd" or OS=="openbsd"', {
[email protected]242a9e62009-11-03 17:32:10280 # This will set gcc_version to XY if you are running gcc X.Y.*.
281 # This is used to tweak build flags for gcc 4.4.
282 'gcc_version%': '<!(python <(DEPTH)/build/compiler_version.py)',
[email protected]4d83eb72010-03-04 16:42:23283 # Figure out the python architecture to decide if we build pyauto.
[email protected]efd68462010-03-04 17:07:54284 'python_arch%': '<!(<(DEPTH)/build/linux/python_arch.sh <(sysroot)/usr/lib/libpython<(python_ver).so.1.0)',
[email protected]cbd5fd52009-08-26 00:14:27285 'conditions': [
286 ['branding=="Chrome" or linux_chromium_breakpad==1', {
287 'linux_breakpad%': 1,
288 }, {
289 'linux_breakpad%': 0,
290 }],
[email protected]4c9cc6c2009-10-01 18:54:57291 # All Chrome builds have breakpad symbols, but only process the
292 # symbols from official builds.
293 # TODO(mmoss) dump_syms segfaults on x64. Enable once dump_syms and
294 # crash server handle 64-bit symbols.
295 ['linux_chromium_dump_symbols==1 or '
296 '(branding=="Chrome" and buildtype=="Official" and '
297 'target_arch=="ia32")', {
298 'linux_dump_symbols%': 1,
299 }, {
300 'linux_dump_symbols%': 0,
301 }],
[email protected]06c756182010-04-27 18:31:31302 ['toolkit_views==0', {
[email protected]c153e5352009-09-22 12:37:44303 # GTK wants Title Case strings
304 'use_titlecase_in_grd_files%': 1,
305 }],
[email protected]cbd5fd52009-08-26 00:14:27306 ],
[email protected]47deeb62009-12-17 14:49:39307 }], # OS=="linux" or OS=="freebsd" or OS=="openbsd"
[email protected]e14a9f92009-08-05 19:26:07308 ['OS=="mac"', {
[email protected]c153e5352009-09-22 12:37:44309 # Mac wants Title Case strings
310 'use_titlecase_in_grd_files%': 1,
[email protected]e14a9f92009-08-05 19:26:07311 'conditions': [
312 # mac_product_name is set to the name of the .app bundle as it should
313 # appear on disk. This duplicates data from
314 # chrome/app/theme/chromium/BRANDING and
315 # chrome/app/theme/google_chrome/BRANDING, but is necessary to get
316 # these names into the build system.
317 ['branding=="Chrome"', {
318 'mac_product_name%': 'Google Chrome',
319 }, { # else: branding!="Chrome"
320 'mac_product_name%': 'Chromium',
321 }],
322
323 # Feature variables for enabling Mac Breakpad and Keystone auto-update
324 # support. Both features are on by default in official builds with
325 # Chrome branding.
326 ['branding=="Chrome" and buildtype=="Official"', {
327 'mac_breakpad%': 1,
328 'mac_keystone%': 1,
329 }, { # else: branding!="Chrome" or buildtype!="Official"
330 'mac_breakpad%': 0,
331 'mac_keystone%': 0,
332 }],
333 ],
334 }], # OS=="mac"
[email protected]912c55c2009-07-31 23:33:55335 # Whether to use multiple cores to compile with visual studio. This is
336 # optional because it sometimes causes corruption on VS 2005.
337 # It is on by default on VS 2008 and off on VS 2005.
338 ['OS=="win"', {
339 'conditions': [
[email protected]8974e042010-06-21 18:06:52340 ['component=="shared_library"', {
341 'win_use_allocator_shim%': 0,
342 }],
343
[email protected]912c55c2009-07-31 23:33:55344 ['MSVS_VERSION=="2005"', {
[email protected]669795372009-08-14 17:51:13345 'msvs_multi_core_compile%': 0,
[email protected]912c55c2009-07-31 23:33:55346 },{
347 'msvs_multi_core_compile%': 1,
348 }],
[email protected]10bb8c92009-08-07 21:16:03349 # Don't do incremental linking for large modules on 32-bit.
350 ['MSVS_OS_BITS==32', {
351 'msvs_large_module_debug_link_mode%': '1', # No
352 },{
353 'msvs_large_module_debug_link_mode%': '2', # Yes
354 }],
[email protected]912c55c2009-07-31 23:33:55355 ],
[email protected]ef4fa4072009-12-04 22:46:50356 'nacl_win64_defines': [
357 # This flag is used to minimize dependencies when building
358 # Native Client loader for 64-bit Windows.
359 'NACL_WIN64',
360 ],
[email protected]912c55c2009-07-31 23:33:55361 }],
[email protected]43f28f832010-02-03 02:28:48362 # Compute based on OS and target architecture whether the GPU
363 # plugin / process is supported.
364 [ 'OS=="win" or (OS=="linux" and target_arch!="arm") or OS=="mac"', {
365 # Enable a variable used elsewhere throughout the GYP files to determine
366 # whether to compile in the sources for the GPU plugin / process.
367 'enable_gpu%': 1,
368 }, { # GPU plugin not supported
369 'enable_gpu%': 0,
370 }],
[email protected]912c55c2009-07-31 23:33:55371 ],
[email protected]f703c4e2009-09-17 21:54:28372
373 # NOTE: When these end up in the Mac bundle, we need to replace '-' for '_'
374 # so Cocoa is happy (http://crbug.com/20441).
375 'locales': [
[email protected]af27c8c2009-11-04 20:36:50376 'am', 'ar', 'bg', 'bn', 'ca', 'cs', 'da', 'de', 'el', 'en-GB',
[email protected]f703c4e2009-09-17 21:54:28377 'en-US', 'es-419', 'es', 'et', 'fi', 'fil', 'fr', 'gu', 'he',
378 'hi', 'hr', 'hu', 'id', 'it', 'ja', 'kn', 'ko', 'lt', 'lv',
[email protected]cf1ab6f2010-03-25 19:38:23379 'ml', 'mr', 'nb', 'nl', 'pl', 'pt-BR', 'pt-PT', 'ro', 'ru',
380 'sk', 'sl', 'sr', 'sv', 'sw', 'ta', 'te', 'th', 'tr', 'uk',
381 'vi', 'zh-CN', 'zh-TW',
[email protected]f703c4e2009-09-17 21:54:28382 ],
[email protected]2f80c312009-02-25 21:26:55383 },
384 'target_defaults': {
[email protected]1c966092009-08-20 21:19:26385 'variables': {
[email protected]a6e22132010-02-10 20:43:18386 # The condition that operates on chromium_code is in a target_conditions
387 # section, and will not have access to the default fallback value of
388 # chromium_code at the top of this file, or to the chromium_code
389 # variable placed at the root variables scope of .gyp files, because
390 # those variables are not set at target scope. As a workaround,
391 # if chromium_code is not set at target scope, define it in target scope
392 # to contain whatever value it has during early variable expansion.
393 # That's enough to make it available during target conditional
394 # processing.
395 'chromium_code%': '<(chromium_code)',
396
[email protected]7e0d664a2009-12-03 21:07:47397 # See http://gcc.gnu.org/onlinedocs/gcc-4.4.2/gcc/Optimize-Options.html
[email protected]d5d593a2009-08-28 23:23:29398 'mac_release_optimization%': '3', # Use -O3 unless overridden
[email protected]ffd984b12009-09-11 19:37:00399 'mac_debug_optimization%': '0', # Use -O0 unless overridden
[email protected]7e0d664a2009-12-03 21:07:47400 # See http://msdn.microsoft.com/en-us/library/aa652360(VS.71).aspx
401 'win_release_Optimization%': '2', # 2 = /Os
402 'win_debug_Optimization%': '0', # 0 = /Od
[email protected]6b0507b2010-05-07 07:41:21403 # See http://msdn.microsoft.com/en-us/library/8wtf2dfz(VS.71).aspx
404 'win_debug_RuntimeChecks%': '3', # 3 = all checks enabled, 0 = off
405 # See http://msdn.microsoft.com/en-us/library/47238hez(VS.71).aspx
[email protected]2ae6e022010-05-07 13:19:15406 'win_debug_InlineFunctionExpansion%': '', # empty = default, 0 = off,
407 'win_release_InlineFunctionExpansion%': '2', # 1 = only __inline, 2 = max
[email protected]7e0d664a2009-12-03 21:07:47408
[email protected]ffd984b12009-09-11 19:37:00409 'release_extra_cflags%': '',
410 'debug_extra_cflags%': '',
[email protected]92822e82009-09-18 14:26:56411 'release_valgrind_build%': 0,
[email protected]8974e042010-06-21 18:06:52412
413 'conditions': [
414 ['OS=="win" and component=="shared_library"', {
415 # See http://msdn.microsoft.com/en-us/library/aa652367.aspx
416 'win_release_RuntimeLibrary%': '2', # 2 = /MT (nondebug DLL)
417 'win_debug_RuntimeLibrary%': '3', # 3 = /MTd (debug DLL)
418 }, {
419 # See http://msdn.microsoft.com/en-us/library/aa652367.aspx
420 'win_release_RuntimeLibrary%': '0', # 0 = /MT (nondebug static)
421 'win_debug_RuntimeLibrary%': '1', # 1 = /MTd (debug static)
422 }],
423 ],
[email protected]1c966092009-08-20 21:19:26424 },
[email protected]32aa8cc2009-03-04 21:36:39425 'conditions': [
426 ['branding=="Chrome"', {
427 'defines': ['GOOGLE_CHROME_BUILD'],
428 }, { # else: branding!="Chrome"
429 'defines': ['CHROMIUM_BUILD'],
430 }],
[email protected]06c756182010-04-27 18:31:31431 ['toolkit_views==1', {
[email protected]e6970232009-05-12 23:51:17432 'defines': ['TOOLKIT_VIEWS=1'],
433 }],
[email protected]fdc5bed2010-01-09 01:16:57434 ['chromeos==1', {
[email protected]16779842009-07-08 23:45:29435 'defines': ['OS_CHROMEOS=1'],
[email protected]2b883b92009-06-02 22:57:50436 }],
[email protected]542bf24a2010-06-11 23:08:17437 ['remoting==1', {
438 'defines': ['ENABLE_REMOTING=1'],
[email protected]c0bac532010-06-11 00:39:00439 }],
[email protected]d01120e62010-05-10 17:04:48440 ['proprietary_codecs==1', {
441 'defines': ['USE_PROPRIETARY_CODECS'],
442 }],
[email protected]9c1949e2009-10-02 19:59:54443 ['fastbuild!=0', {
444 'conditions': [
445 # Finally, for Windows, we simply turn on profiling.
446 ['OS=="win"', {
447 'msvs_settings': {
448 'VCLinkerTool': {
449 'GenerateDebugInformation': 'false',
450 },
451 'VCCLCompilerTool': {
452 'DebugInformationFormat': '0',
453 }
454 }
[email protected]37c84192010-04-14 21:37:40455 }, { # else: OS != "win"
456 'cflags': [ '-g1' ],
457 }],
[email protected]9c1949e2009-10-02 19:59:54458 ], # conditions for fastbuild.
459 }], # fastbuild!=0
[email protected]ad6d2c42009-09-15 20:13:38460 ['selinux==1', {
461 'defines': ['CHROMIUM_SELINUX=1'],
462 }],
[email protected]7e0d664a2009-12-03 21:07:47463 ['win_use_allocator_shim==0', {
464 'conditions': [
465 ['OS=="win"', {
466 'defines': ['NO_TCMALLOC'],
467 }],
468 ],
469 }],
[email protected]43f28f832010-02-03 02:28:48470 ['enable_gpu==1', {
[email protected]7477ea6f2009-12-22 23:28:15471 'defines': [
472 'ENABLE_GPU=1',
473 ],
474 }],
[email protected]ed154592010-04-29 00:18:50475 ['enable_eglimage==1', {
476 'defines': [
477 'ENABLE_EGLIMAGE=1',
478 ],
479 }],
[email protected]f5ecbba12009-04-03 04:35:18480 ['coverage!=0', {
481 'conditions': [
482 ['OS=="mac"', {
483 'xcode_settings': {
[email protected]ab2956372009-08-13 18:11:04484 'GCC_INSTRUMENT_PROGRAM_FLOW_ARCS': 'YES', # -fprofile-arcs
485 'GCC_GENERATE_TEST_COVERAGE_FILES': 'YES', # -ftest-coverage
[email protected]5ae4f55e2009-04-13 23:19:47486 },
[email protected]e4fb84c2009-12-28 20:45:43487 # Add -lgcov for types executable, shared_library, and
[email protected]dc259ce52010-04-13 04:03:10488 # loadable_module; not for static_library.
[email protected]e4fb84c2009-12-28 20:45:43489 # This is a delayed conditional.
[email protected]f5ecbba12009-04-03 04:35:18490 'target_conditions': [
[email protected]e4fb84c2009-12-28 20:45:43491 ['_type!="static_library"', {
[email protected]f5ecbba12009-04-03 04:35:18492 'xcode_settings': { 'OTHER_LDFLAGS': [ '-lgcov' ] },
[email protected]5ae4f55e2009-04-13 23:19:47493 }],
494 ],
495 }],
[email protected]7122ffd52009-04-30 23:19:00496 # Linux gyp (into scons) doesn't like target_conditions?
497 # TODO(???): track down why 'target_conditions' doesn't work
498 # on Linux gyp into scons like it does on Mac gyp into xcodeproj.
[email protected]f5ecbba12009-04-03 04:35:18499 ['OS=="linux"', {
500 'cflags': [ '-ftest-coverage',
501 '-fprofile-arcs' ],
[email protected]7122ffd52009-04-30 23:19:00502 'link_settings': { 'libraries': [ '-lgcov' ] },
[email protected]f5ecbba12009-04-03 04:35:18503 }],
[email protected]e8f6ff42009-07-07 18:20:53504 # Finally, for Windows, we simply turn on profiling.
505 ['OS=="win"', {
506 'msvs_settings': {
507 'VCLinkerTool': {
508 'Profile': 'true',
509 },
[email protected]10bb8c92009-08-07 21:16:03510 'VCCLCompilerTool': {
[email protected]e8f6ff42009-07-07 18:20:53511 # /Z7, not /Zi, so coverage is happyb
512 'DebugInformationFormat': '1',
[email protected]1f9471a2010-01-04 06:40:16513 'AdditionalOptions': ['/Yd'],
[email protected]e8f6ff42009-07-07 18:20:53514 }
515 }
516 }], # OS==win
517 ], # conditions for coverage
518 }], # coverage!=0
[email protected]a6e22132010-02-10 20:43:18519 ], # conditions for 'target_defaults'
520 'target_conditions': [
[email protected]c14d8e772010-02-09 22:06:15521 ['chromium_code==0', {
[email protected]d8543312010-02-10 17:43:28522 'conditions': [
523 [ 'OS=="linux" or OS=="freebsd" or OS=="openbsd"', {
524 'cflags!': [
525 '-Wall',
526 '-Wextra',
527 '-Werror',
528 ],
529 }],
530 [ 'OS=="win"', {
531 'defines': [
532 '_CRT_SECURE_NO_DEPRECATE',
533 '_CRT_NONSTDC_NO_WARNINGS',
534 '_CRT_NONSTDC_NO_DEPRECATE',
535 '_SCL_SECURE_NO_DEPRECATE',
536 ],
537 'msvs_disabled_warnings': [4800],
538 'msvs_settings': {
539 'VCCLCompilerTool': {
540 'WarnAsError': 'false',
541 'Detect64BitPortabilityProblems': 'false',
542 },
543 },
544 }],
545 [ 'OS=="mac"', {
546 'xcode_settings': {
547 'GCC_TREAT_WARNINGS_AS_ERRORS': 'NO',
[email protected]4c4c2e5332010-06-15 11:51:06548 'WARNING_CFLAGS!': ['-Wall', '-Wextra'],
[email protected]d8543312010-02-10 17:43:28549 },
550 }],
[email protected]c14d8e772010-02-09 22:06:15551 ],
552 }, {
553 # In Chromium code, we define __STDC_FORMAT_MACROS in order to get the
554 # C99 macros on Mac and Linux.
555 'defines': [
556 '__STDC_FORMAT_MACROS',
557 ],
558 'conditions': [
559 ['OS!="win"', {
560 'sources/': [ ['exclude', '_win(_unittest)?\\.cc$'],
561 ['exclude', '/win/'],
562 ['exclude', '/win_[^/]*\\.cc$'] ],
563 }],
564 ['OS!="mac"', {
565 'sources/': [ ['exclude', '_(cocoa|mac)(_unittest)?\\.cc$'],
566 ['exclude', '/(cocoa|mac)/'],
[email protected]e603d952010-02-10 22:36:26567 ['exclude', '\.mm?$' ] ],
[email protected]c14d8e772010-02-09 22:06:15568 }],
569 ['OS!="linux" and OS!="freebsd" and OS!="openbsd"', {
570 'sources/': [
[email protected]1c657852010-04-22 23:28:05571 ['exclude', '_(chromeos|gtk|x|x11|xdg)(_unittest)?\\.cc$'],
[email protected]c14d8e772010-02-09 22:06:15572 ['exclude', '/gtk/'],
[email protected]18cff3d2010-02-17 18:03:13573 ['exclude', '/(gtk|x11)_[^/]*\\.cc$'],
574 ],
575 }],
576 ['OS!="linux"', {
577 'sources/': [
578 ['exclude', '_linux(_unittest)?\\.cc$'],
579 ['exclude', '/linux/'],
580 ],
[email protected]c14d8e772010-02-09 22:06:15581 }],
582 # We use "POSIX" to refer to all non-Windows operating systems.
583 ['OS=="win"', {
584 'sources/': [ ['exclude', '_posix\\.cc$'] ],
[email protected]f55bd4862010-05-27 15:38:07585 # turn on warnings for signed/unsigned mismatch on chromium code.
586 'msvs_settings': {
587 'VCCLCompilerTool': {
588 'AdditionalOptions': ['/we4389'],
589 },
590 },
[email protected]c14d8e772010-02-09 22:06:15591 }],
592 # Though Skia is conceptually shared by Linux and Windows,
593 # the only _skia files in our tree are Linux-specific.
594 ['OS!="linux" and OS!="freebsd" and OS!="openbsd"', {
595 'sources/': [ ['exclude', '_skia\\.cc$'] ],
596 }],
597 ['chromeos!=1', {
598 'sources/': [ ['exclude', '_chromeos\\.cc$'] ]
599 }],
[email protected]06c756182010-04-27 18:31:31600 ['toolkit_views==0', {
[email protected]c14d8e772010-02-09 22:06:15601 'sources/': [ ['exclude', '_views\\.cc$'] ]
602 }],
603 ],
604 }],
[email protected]a6e22132010-02-10 20:43:18605 ], # target_conditions for 'target_defaults'
[email protected]2f80c312009-02-25 21:26:55606 'default_configuration': 'Debug',
607 'configurations': {
[email protected]5153767c2009-12-22 01:52:50608 # VCLinkerTool LinkIncremental values below:
609 # 0 == default
610 # 1 == /INCREMENTAL:NO
611 # 2 == /INCREMENTAL
612 # Debug links incremental, Release does not.
613 #
614 # Abstract base configurations to cover common
615 # attributes.
616 #
617 'Common_Base': {
[email protected]bb05e452009-10-29 21:24:56618 'abstract': 1,
619 'msvs_configuration_attributes': {
620 'OutputDirectory': '$(SolutionDir)$(ConfigurationName)',
621 'IntermediateDirectory': '$(OutDir)\\obj\\$(ProjectName)',
622 'CharacterSet': '1',
623 },
[email protected]5153767c2009-12-22 01:52:50624 },
625 'x86_Base': {
626 'abstract': 1,
[email protected]ef4fa4072009-12-04 22:46:50627 'msvs_settings': {
628 'VCLinkerTool': {
629 'TargetMachine': '1',
630 },
631 },
[email protected]2fa40782009-11-01 21:17:34632 'msvs_configuration_platform': 'Win32',
[email protected]bb05e452009-10-29 21:24:56633 },
[email protected]5153767c2009-12-22 01:52:50634 'x64_Base': {
635 'abstract': 1,
636 'msvs_configuration_platform': 'x64',
637 'msvs_settings': {
638 'VCLinkerTool': {
639 'TargetMachine': '17', # x86 - 64
[email protected]5153767c2009-12-22 01:52:50640 'AdditionalLibraryDirectories!':
641 ['<(DEPTH)/third_party/platformsdk_win7/files/Lib'],
642 'AdditionalLibraryDirectories':
643 ['<(DEPTH)/third_party/platformsdk_win7/files/Lib/x64'],
644 },
[email protected]d26b4418ab2010-03-24 22:06:35645 'VCLibrarianTool': {
[email protected]5153767c2009-12-22 01:52:50646 'AdditionalLibraryDirectories!':
647 ['<(DEPTH)/third_party/platformsdk_win7/files/Lib'],
648 'AdditionalLibraryDirectories':
649 ['<(DEPTH)/third_party/platformsdk_win7/files/Lib/x64'],
650 },
651 },
652 'defines': [
653 # Not sure if tcmalloc works on 64-bit Windows.
654 'NO_TCMALLOC',
655 ],
656 },
657 'Debug_Base': {
658 'abstract': 1,
[email protected]ee857512010-05-14 08:24:42659 'defines': ['DYNAMIC_ANNOTATIONS_ENABLED=1'],
[email protected]1c966092009-08-20 21:19:26660 'xcode_settings': {
661 'COPY_PHASE_STRIP': 'NO',
[email protected]d5d593a2009-08-28 23:23:29662 'GCC_OPTIMIZATION_LEVEL': '<(mac_debug_optimization)',
[email protected]bd232ac2009-10-21 02:23:53663 'OTHER_CFLAGS': [ '<@(debug_extra_cflags)', ],
[email protected]1c966092009-08-20 21:19:26664 },
[email protected]bb05e452009-10-29 21:24:56665 'msvs_settings': {
666 'VCCLCompilerTool': {
[email protected]7e0d664a2009-12-03 21:07:47667 'Optimization': '<(win_debug_Optimization)',
[email protected]bb05e452009-10-29 21:24:56668 'PreprocessorDefinitions': ['_DEBUG'],
[email protected]6b0507b2010-05-07 07:41:21669 'BasicRuntimeChecks': '<(win_debug_RuntimeChecks)',
[email protected]7e0d664a2009-12-03 21:07:47670 'RuntimeLibrary': '<(win_debug_RuntimeLibrary)',
[email protected]2ae6e022010-05-07 13:19:15671 'conditions': [
672 # According to MSVS, InlineFunctionExpansion=0 means
673 # "default inlining", not "/Ob0".
674 # Thus, we have to handle InlineFunctionExpansion==0 separately.
675 ['win_debug_InlineFunctionExpansion==0', {
676 'AdditionalOptions': ['/Ob0'],
677 }],
678 ['win_debug_InlineFunctionExpansion!=""', {
679 'InlineFunctionExpansion':
680 '<(win_debug_InlineFunctionExpansion)',
681 }],
682 ],
[email protected]bb05e452009-10-29 21:24:56683 },
684 'VCLinkerTool': {
685 'LinkIncremental': '<(msvs_debug_link_incremental)',
686 },
687 'VCResourceCompilerTool': {
688 'PreprocessorDefinitions': ['_DEBUG'],
689 },
690 },
[email protected]2f80c312009-02-25 21:26:55691 'conditions': [
[email protected]bb05e452009-10-29 21:24:56692 ['OS=="linux"', {
693 'cflags': [
694 '<@(debug_extra_cflags)',
695 ],
[email protected]2f80c312009-02-25 21:26:55696 }],
697 ],
698 },
[email protected]5153767c2009-12-22 01:52:50699 'Release_Base': {
700 'abstract': 1,
[email protected]2f80c312009-02-25 21:26:55701 'defines': [
702 'NDEBUG',
703 ],
[email protected]1c966092009-08-20 21:19:26704 'xcode_settings': {
705 'DEAD_CODE_STRIPPING': 'YES', # -Wl,-dead_strip
706 'GCC_OPTIMIZATION_LEVEL': '<(mac_release_optimization)',
[email protected]ffd984b12009-09-11 19:37:00707 'OTHER_CFLAGS': [ '<@(release_extra_cflags)', ],
[email protected]1c966092009-08-20 21:19:26708 },
[email protected]bb05e452009-10-29 21:24:56709 'msvs_settings': {
[email protected]7e0d664a2009-12-03 21:07:47710 'VCCLCompilerTool': {
711 'Optimization': '<(win_release_Optimization)',
712 'RuntimeLibrary': '<(win_release_RuntimeLibrary)',
[email protected]2ae6e022010-05-07 13:19:15713 'conditions': [
714 # According to MSVS, InlineFunctionExpansion=0 means
715 # "default inlining", not "/Ob0".
716 # Thus, we have to handle InlineFunctionExpansion==0 separately.
717 ['win_release_InlineFunctionExpansion==0', {
718 'AdditionalOptions': ['/Ob0'],
719 }],
720 ['win_release_InlineFunctionExpansion!=""', {
721 'InlineFunctionExpansion':
722 '<(win_release_InlineFunctionExpansion)',
723 }],
724 ],
[email protected]7e0d664a2009-12-03 21:07:47725 },
[email protected]bb05e452009-10-29 21:24:56726 'VCLinkerTool': {
727 'LinkIncremental': '1',
728 },
729 },
[email protected]2f80c312009-02-25 21:26:55730 'conditions': [
[email protected]92822e82009-09-18 14:26:56731 ['release_valgrind_build==0', {
[email protected]ee857512010-05-14 08:24:42732 'defines': ['NVALGRIND', 'DYNAMIC_ANNOTATIONS_ENABLED=0'],
733 }, {
734 'defines': ['DYNAMIC_ANNOTATIONS_ENABLED=1'],
[email protected]92822e82009-09-18 14:26:56735 }],
[email protected]7e0d664a2009-12-03 21:07:47736 ['win_use_allocator_shim==0', {
737 'defines': ['NO_TCMALLOC'],
738 }],
[email protected]bb05e452009-10-29 21:24:56739 ['OS=="linux"', {
740 'cflags': [
[email protected]ffd984b12009-09-11 19:37:00741 '<@(release_extra_cflags)',
[email protected]bb05e452009-10-29 21:24:56742 ],
743 }],
[email protected]2f80c312009-02-25 21:26:55744 ],
745 },
[email protected]5153767c2009-12-22 01:52:50746 'Purify_Base': {
747 'abstract': 1,
748 'defines': [
749 'PURIFY',
750 'NO_TCMALLOC',
751 ],
752 'msvs_settings': {
753 'VCCLCompilerTool': {
754 'Optimization': '0',
755 'RuntimeLibrary': '0',
756 'BufferSecurityCheck': 'false',
757 },
758 'VCLinkerTool': {
759 'EnableCOMDATFolding': '1',
760 'LinkIncremental': '1',
761 },
762 },
763 },
764 #
765 # Concrete configurations
766 #
767 'Debug': {
768 'inherit_from': ['Common_Base', 'x86_Base', 'Debug_Base'],
769 },
770 'Release': {
771 'inherit_from': ['Common_Base', 'x86_Base', 'Release_Base'],
772 'conditions': [
773 ['msvs_use_common_release', {
[email protected]1f9471a2010-01-04 06:40:16774 'includes': ['release.gypi'],
[email protected]5153767c2009-12-22 01:52:50775 }],
776 ]
777 },
[email protected]f926fa0a2009-08-04 22:50:13778 'conditions': [
779 [ 'OS=="win"', {
780 # TODO(bradnelson): add a gyp mechanism to make this more graceful.
781 'Purify': {
[email protected]5153767c2009-12-22 01:52:50782 'inherit_from': ['Common_Base', 'x86_Base', 'Release_Base', 'Purify'],
[email protected]ef4fa4072009-12-04 22:46:50783 },
784 'Debug_x64': {
[email protected]5153767c2009-12-22 01:52:50785 'inherit_from': ['Common_Base', 'x64_Base', 'Debug_Base'],
[email protected]78263c12009-11-01 23:45:30786 },
787 'Release_x64': {
[email protected]5153767c2009-12-22 01:52:50788 'inherit_from': ['Common_Base', 'x64_Base', 'Release_Base'],
[email protected]78263c12009-11-01 23:45:30789 },
790 'Purify_x64': {
[email protected]1f9471a2010-01-04 06:40:16791 'inherit_from': ['Common_Base', 'x64_Base', 'Release_Base', 'Purify_Base'],
[email protected]78263c12009-11-01 23:45:30792 },
[email protected]f926fa0a2009-08-04 22:50:13793 }],
794 ],
[email protected]2f80c312009-02-25 21:26:55795 },
796 },
797 'conditions': [
[email protected]93f21e42010-04-01 00:35:15798 ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris"', {
[email protected]9d384032009-03-20 23:13:26799 'target_defaults': {
[email protected]5315f2842009-04-28 00:43:27800 # Enable -Werror by default, but put it in a variable so it can
801 # be disabled in ~/.gyp/include.gypi on the valgrind builders.
802 'variables': {
[email protected]ecf52cb82010-01-13 19:25:42803 # Use -fno-strict-aliasing by default since gcc 4.4 has periodic
804 # issues that slip through the cracks. We could do this just for
805 # gcc 4.4 but it makes more sense to be consistent on all
806 # compilers in use. TODO(Craig): turn this off again when
807 # there is some 4.4 test infrastructure in place and existing
808 # aliasing issues have been fixed.
809 'no_strict_aliasing%': 1,
[email protected]47deeb62009-12-17 14:49:39810 'conditions': [['OS=="linux"', {'werror%': '-Werror',}],
811 ['OS=="freebsd"', {'werror%': '',}],
812 ['OS=="openbsd"', {'werror%': '',}],
813 ],
[email protected]5315f2842009-04-28 00:43:27814 },
[email protected]9d384032009-03-20 23:13:26815 'cflags': [
[email protected]1bba09c2009-08-13 12:53:16816 '<(werror)', # See note above about the werror variable.
817 '-pthread',
818 '-fno-exceptions',
819 '-Wall',
[email protected]0fa17082010-03-26 00:48:05820 # TODO(evan): turn this back on once all the builds work.
821 # '-Wextra',
[email protected]225c8f52010-02-05 22:23:20822 # Don't warn about unused function params. We use those everywhere.
823 '-Wno-unused-parameter',
824 # Don't warn about the "struct foo f = {0};" initialization pattern.
825 '-Wno-missing-field-initializers',
[email protected]1bba09c2009-08-13 12:53:16826 '-D_FILE_OFFSET_BITS=64',
[email protected]3df6e3a2010-01-21 20:23:12827 # Don't export any symbols (for example, to plugins we dlopen()).
828 # Note: this is *required* to make some plugins work.
829 '-fvisibility=hidden',
[email protected]8a2fcba2009-07-29 00:52:24830 ],
831 'cflags_cc': [
[email protected]832d0212009-10-28 19:12:22832 '-fno-rtti',
[email protected]8a2fcba2009-07-29 00:52:24833 '-fno-threadsafe-statics',
[email protected]f5986c42009-11-17 18:39:36834 # Make inline functions have hidden visiblity by default.
835 # Surprisingly, not covered by -fvisibility=hidden.
836 '-fvisibility-inlines-hidden',
[email protected]9d384032009-03-20 23:13:26837 ],
[email protected]a6cf87e2009-04-03 04:07:38838 'ldflags': [
[email protected]138241f2010-03-30 23:53:10839 '-pthread', '-Wl,-z,noexecstack',
[email protected]9d384032009-03-20 23:13:26840 ],
[email protected]b5e46b92009-03-26 18:58:10841 'scons_variable_settings': {
842 'LIBPATH': ['$LIB_DIR'],
[email protected]9d384032009-03-20 23:13:26843 # Linking of large files uses lots of RAM, so serialize links
844 # using the handy flock command from util-linux.
[email protected]c13fcbd2009-03-27 04:27:01845 'FLOCK_LINK': ['flock', '$TOP_BUILDDIR/linker.lock', '$LINK'],
[email protected]789fbb7c2009-04-02 16:20:31846 'FLOCK_SHLINK': ['flock', '$TOP_BUILDDIR/linker.lock', '$SHLINK'],
847 'FLOCK_LDMODULE': ['flock', '$TOP_BUILDDIR/linker.lock', '$LDMODULE'],
[email protected]9d384032009-03-20 23:13:26848
849 # We have several cases where archives depend on each other in
850 # a cyclic fashion. Since the GNU linker does only a single
851 # pass over the archives we surround the libraries with
852 # --start-group and --end-group (aka -( and -) ). That causes
853 # ld to loop over the group until no more undefined symbols
854 # are found. In an ideal world we would only make groups from
855 # those libraries which we knew to be in cycles. However,
856 # that's tough with SCons, so we bodge it by making all the
857 # archives a group by redefining the linking command here.
858 #
859 # TODO: investigate whether we still have cycles that
860 # require --{start,end}-group. There has been a lot of
861 # refactoring since this was first coded, which might have
862 # eliminated the circular dependencies.
[email protected]12862922009-04-20 21:36:41863 #
864 # Note: $_LIBDIRFLAGS comes before ${LINK,SHLINK,LDMODULE}FLAGS
865 # so that we prefer our own built libraries (e.g. -lpng) to
866 # system versions of libraries that pkg-config might turn up.
867 # TODO(sgk): investigate handling this not by re-ordering the
868 # flags this way, but by adding a hook to use the SCons
869 # ParseFlags() option on the output from pkg-config.
[email protected]610d8cc2009-09-19 00:47:04870 'LINKCOM': [['$FLOCK_LINK', '-o', '$TARGET',
871 '$_LIBDIRFLAGS', '$LINKFLAGS', '$SOURCES',
872 '-Wl,--start-group', '$_LIBFLAGS', '-Wl,--end-group']],
873 'SHLINKCOM': [['$FLOCK_SHLINK', '-o', '$TARGET',
874 '$_LIBDIRFLAGS', '$SHLINKFLAGS', '$SOURCES',
875 '-Wl,--start-group', '$_LIBFLAGS', '-Wl,--end-group']],
876 'LDMODULECOM': [['$FLOCK_LDMODULE', '-o', '$TARGET',
877 '$_LIBDIRFLAGS', '$LDMODULEFLAGS', '$SOURCES',
878 '-Wl,--start-group', '$_LIBFLAGS', '-Wl,--end-group']],
[email protected]9d384032009-03-20 23:13:26879 'IMPLICIT_COMMAND_DEPENDENCIES': 0,
[email protected]d0644282009-04-22 00:20:29880 # -rpath is only used when building with shared libraries.
881 'conditions': [
882 [ 'library=="shared_library"', {
883 'RPATH': '$LIB_DIR',
884 }],
885 ],
[email protected]9d384032009-03-20 23:13:26886 },
[email protected]b5e46b92009-03-26 18:58:10887 'scons_import_variables': [
[email protected]52049d5c2009-05-01 20:32:49888 'AS',
[email protected]b5e46b92009-03-26 18:58:10889 'CC',
890 'CXX',
891 'LINK',
892 ],
893 'scons_propagate_variables': [
[email protected]52049d5c2009-05-01 20:32:49894 'AS',
[email protected]b5e46b92009-03-26 18:58:10895 'CC',
896 'CCACHE_DIR',
897 'CXX',
898 'DISTCC_DIR',
899 'DISTCC_HOSTS',
900 'HOME',
[email protected]5ae4f55e2009-04-13 23:19:47901 'INCLUDE_SERVER_ARGS',
902 'INCLUDE_SERVER_PORT',
[email protected]b5e46b92009-03-26 18:58:10903 'LINK',
[email protected]fff920a2009-05-08 22:35:32904 'CHROME_BUILD_TYPE',
905 'CHROMIUM_BUILD',
906 'OFFICIAL_BUILD',
[email protected]b5e46b92009-03-26 18:58:10907 ],
[email protected]3aacaf952009-04-02 15:34:09908 'configurations': {
[email protected]5153767c2009-12-22 01:52:50909 'Debug_Base': {
[email protected]c5bdc032009-04-20 19:11:31910 'variables': {
911 'debug_optimize%': '0',
912 },
[email protected]3aacaf952009-04-02 15:34:09913 'defines': [
914 '_DEBUG',
915 ],
916 'cflags': [
[email protected]22898f62009-10-26 22:14:01917 '-O>(debug_optimize)',
[email protected]3aacaf952009-04-02 15:34:09918 '-g',
[email protected]9a5d2a52009-05-22 03:37:45919 # One can use '-gstabs' to enable building the debugging
920 # information in STABS format for breakpad's dumpsyms.
[email protected]3aacaf952009-04-02 15:34:09921 ],
[email protected]96fd0032009-04-24 00:13:08922 'ldflags': [
923 '-rdynamic', # Allows backtrace to resolve symbols.
924 ],
[email protected]5315f2842009-04-28 00:43:27925 },
[email protected]5153767c2009-12-22 01:52:50926 'Release_Base': {
[email protected]740e2de2009-07-21 11:41:01927 'variables': {
928 'release_optimize%': '2',
[email protected]1dd529642010-05-15 01:02:51929 # Binaries become big and gold is unable to perform GC
930 # and remove unused sections for some of test targets
931 # on 32 bit platform.
932 # (This is currently observed only in chromeos valgrind bots)
933 # The following flag is to disable --gc-sections linker
934 # option for these bots.
935 'no_gc_sections%': 0,
[email protected]740e2de2009-07-21 11:41:01936 },
[email protected]3aacaf952009-04-02 15:34:09937 'cflags': [
[email protected]22898f62009-10-26 22:14:01938 '-O>(release_optimize)',
[email protected]d8cc3a62009-04-08 18:29:53939 # Don't emit the GCC version ident directives, they just end up
940 # in the .comment section taking up binary size.
941 '-fno-ident',
942 # Put data and code in their own sections, so that unused symbols
943 # can be removed at link time with --gc-sections.
944 '-fdata-sections',
945 '-ffunction-sections',
[email protected]3aacaf952009-04-02 15:34:09946 ],
[email protected]1dd529642010-05-15 01:02:51947 'conditions' : [
948 ['no_gc_sections==0', {
949 'ldflags': [
950 '-Wl,--gc-sections',
951 ],
952 }],
953 ]
[email protected]3aacaf952009-04-02 15:34:09954 },
955 },
[email protected]601b540222009-04-03 21:32:04956 'variants': {
957 'coverage': {
958 'cflags': ['-fprofile-arcs', '-ftest-coverage'],
959 'ldflags': ['-fprofile-arcs'],
960 },
961 'profile': {
962 'cflags': ['-pg', '-g'],
963 'ldflags': ['-pg'],
964 },
965 'symbols': {
966 'cflags': ['-g'],
967 },
968 },
[email protected]606116d22009-05-06 22:38:23969 'conditions': [
[email protected]7e8eb7612009-07-29 15:56:00970 [ 'target_arch=="ia32"', {
[email protected]606116d22009-05-06 22:38:23971 'asflags': [
972 # Needed so that libs with .s files (e.g. libicudata.a)
973 # are compatible with the general 32-bit-ness.
974 '-32',
975 ],
976 # All floating-point computations on x87 happens in 80-bit
977 # precision. Because the C and C++ language standards allow
978 # the compiler to keep the floating-point values in higher
979 # precision than what's specified in the source and doing so
980 # is more efficient than constantly rounding up to 64-bit or
981 # 32-bit precision as specified in the source, the compiler,
982 # especially in the optimized mode, tries very hard to keep
983 # values in x87 floating-point stack (in 80-bit precision)
984 # as long as possible. This has important side effects, that
985 # the real value used in computation may change depending on
986 # how the compiler did the optimization - that is, the value
987 # kept in 80-bit is different than the value rounded down to
988 # 64-bit or 32-bit. There are possible compiler options to make
989 # this behavior consistent (e.g. -ffloat-store would keep all
990 # floating-values in the memory, thus force them to be rounded
991 # to its original precision) but they have significant runtime
992 # performance penalty.
993 #
994 # -mfpmath=sse -msse2 makes the compiler use SSE instructions
995 # which keep floating-point values in SSE registers in its
996 # native precision (32-bit for single precision, and 64-bit for
997 # double precision values). This means the floating-point value
998 # used during computation does not change depending on how the
999 # compiler optimized the code, since the value is always kept
1000 # in its specified precision.
[email protected]ffde7932009-05-29 00:39:061001 'conditions': [
[email protected]ac120ff2010-04-28 02:14:221002 ['branding=="Chromium" and disable_sse2==0', {
[email protected]ffde7932009-05-29 00:39:061003 'cflags': [
1004 '-march=pentium4',
1005 '-msse2',
1006 '-mfpmath=sse',
1007 ],
1008 }],
[email protected]06c756182010-04-27 18:31:311009 # ChromeOS targets Pinetrail, which is sse3, but most of the
[email protected]0183dbb2010-04-16 02:00:441010 # benefit comes from sse2 so this setting allows ChromeOS
1011 # to build on other CPUs. In the future -march=atom would help
1012 # but requires a newer compiler.
[email protected]ac120ff2010-04-28 02:14:221013 ['chromeos==1 and disable_sse2==0', {
[email protected]0183dbb2010-04-16 02:00:441014 'cflags': [
1015 '-msse2',
1016 ],
1017 }],
[email protected]ffde7932009-05-29 00:39:061018 ],
[email protected]dc259ce52010-04-13 04:03:101019 # -mmmx allows mmintrin.h to be used for mmx intrinsics.
1020 # video playback is mmx and sse2 optimized.
[email protected]606116d22009-05-06 22:38:231021 'cflags': [
1022 '-m32',
[email protected]dc259ce52010-04-13 04:03:101023 '-mmmx',
[email protected]1c6560af2009-07-14 11:02:161024 ],
[email protected]606116d22009-05-06 22:38:231025 'ldflags': [
1026 '-m32',
1027 ],
1028 }],
[email protected]3dda8a962009-08-10 18:58:071029 ['target_arch=="arm"', {
[email protected]77c1b29392009-12-04 06:21:291030 'target_conditions': [
1031 ['_toolset=="target"', {
1032 'cflags_cc': [
1033 # The codesourcery arm-2009q3 toolchain warns at that the ABI
1034 # has changed whenever it encounters a varargs function. This
1035 # silences those warnings, as they are not helpful and
1036 # clutter legitimate warnings.
1037 '-Wno-abi',
1038 ],
1039 'conditions': [
1040 ['arm_thumb == 1', {
1041 'cflags': [
1042 '-mthumb',
1043 # TODO(piman): -Wa,-mimplicit-it=thumb is needed for
1044 # inline assembly that uses condition codes but it's
1045 # suboptimal. Better would be to #ifdef __thumb__ at the
1046 # right place and have a separate thumb path.
1047 '-Wa,-mimplicit-it=thumb',
1048 ]
1049 }],
1050 ['armv7==1', {
[email protected]dc9711f2009-11-13 19:30:251051 'cflags': [
1052 '-march=armv7-a',
1053 '-mtune=cortex-a8',
[email protected]dc9711f2009-11-13 19:30:251054 '-mfloat-abi=softfp',
1055 ],
[email protected]eafc0b452010-02-26 21:53:431056 'conditions': [
1057 ['arm_neon==1', {
1058 'cflags': [ '-mfpu=neon', ],
1059 }, {
[email protected]53e0f642010-03-05 01:41:561060 'cflags': [ '-mfpu=<(arm_fpu)', ],
[email protected]eafc0b452010-02-26 21:53:431061 }]
1062 ],
[email protected]dc9711f2009-11-13 19:30:251063 }],
[email protected]3dda8a962009-08-10 18:58:071064 ],
1065 }],
1066 ],
1067 }],
[email protected]c76723a2010-01-25 23:10:581068 ['linux_fpic==1', {
1069 'cflags': [
1070 '-fPIC',
1071 ],
1072 }],
[email protected]ee28c9f2009-09-04 01:53:011073 ['sysroot!=""', {
[email protected]fd36ce822009-10-28 20:13:571074 'target_conditions': [
1075 ['_toolset=="target"', {
1076 'cflags': [
1077 '--sysroot=<(sysroot)',
1078 ],
1079 'ldflags': [
1080 '--sysroot=<(sysroot)',
1081 ],
1082 }]]
[email protected]ee28c9f2009-09-04 01:53:011083 }],
[email protected]cc4219a2009-08-14 05:30:521084 ['no_strict_aliasing==1', {
1085 'cflags': [
1086 '-fno-strict-aliasing',
1087 ],
1088 }],
[email protected]cbd5fd52009-08-26 00:14:271089 ['linux_breakpad==1', {
1090 'cflags': [ '-gstabs' ],
1091 'defines': ['USE_LINUX_BREAKPAD'],
1092 }],
[email protected]39c4e1a82010-03-30 19:47:411093 ['linux_use_seccomp_sandbox==1 and buildtype!="Official"', {
1094 'defines': ['USE_SECCOMP_SANDBOX'],
1095 }],
[email protected]7cd2afd2009-10-27 21:40:261096 ['library=="shared_library"', {
1097 # When building with shared libraries, remove the visiblity-hiding
1098 # flag.
1099 'cflags!': [ '-fvisibility=hidden' ],
[email protected]4907ac42009-11-02 20:32:511100 'conditions': [
[email protected]08be8a72009-11-18 20:35:541101 ['target_arch=="x64" or target_arch=="arm"', {
1102 # Shared libraries need -fPIC on x86-64 and arm
[email protected]4907ac42009-11-02 20:32:511103 'cflags': ['-fPIC']
1104 }]
1105 ],
[email protected]7cd2afd2009-10-27 21:40:261106 }],
[email protected]d8b60602010-03-26 09:41:221107 ['linux_use_heapchecker==1', {
1108 'variables': {'linux_use_tcmalloc%': 1},
1109 }],
[email protected]61a9b2d82010-02-26 00:31:081110 ['linux_use_tcmalloc==0', {
1111 'defines': ['NO_TCMALLOC'],
[email protected]01699e22009-11-11 19:24:241112 }],
[email protected]d8b60602010-03-26 09:41:221113 ['linux_use_heapchecker==0', {
1114 'defines': ['NO_HEAPCHECKER'],
1115 }],
[email protected]606116d22009-05-06 22:38:231116 ],
[email protected]9d384032009-03-20 23:13:261117 },
1118 }],
[email protected]c51e8d52009-12-11 20:04:061119 # FreeBSD-specific options; note that most FreeBSD options are set above,
1120 # with Linux.
1121 ['OS=="freebsd"', {
1122 'target_defaults': {
1123 'ldflags': [
1124 '-Wl,--no-keep-memory',
1125 ],
1126 },
1127 }],
[email protected]93f21e42010-04-01 00:35:151128 ['OS=="solaris"', {
1129 'cflags!': ['-fvisibility=hidden'],
1130 'cflags_cc!': ['-fvisibility-inlines-hidden'],
1131 }],
[email protected]2f80c312009-02-25 21:26:551132 ['OS=="mac"', {
1133 'target_defaults': {
[email protected]24700642009-06-01 16:01:201134 'variables': {
1135 # This should be 'mac_real_dsym%', but there seems to be a bug
1136 # with % in variables that are intended to be set to different
1137 # values in different targets, like this one.
1138 'mac_real_dsym': 0, # Fake .dSYMs are fine in most cases.
1139 },
[email protected]d92c7c012009-03-19 19:26:421140 'mac_bundle': 0,
[email protected]2f80c312009-02-25 21:26:551141 'xcode_settings': {
1142 'ALWAYS_SEARCH_USER_PATHS': 'NO',
[email protected]ab2956372009-08-13 18:11:041143 'GCC_C_LANGUAGE_STANDARD': 'c99', # -std=c99
1144 'GCC_CW_ASM_SYNTAX': 'NO', # No -fasm-blocks
1145 'GCC_DYNAMIC_NO_PIC': 'NO', # No -mdynamic-no-pic
1146 # (Equivalent to -fPIC)
1147 'GCC_ENABLE_CPP_EXCEPTIONS': 'NO', # -fno-exceptions
1148 'GCC_ENABLE_CPP_RTTI': 'NO', # -fno-rtti
1149 'GCC_ENABLE_PASCAL_STRINGS': 'NO', # No -mpascal-strings
[email protected]3224dcd2009-09-16 17:31:251150 # GCC_INLINES_ARE_PRIVATE_EXTERN maps to -fvisibility-inlines-hidden
1151 'GCC_INLINES_ARE_PRIVATE_EXTERN': 'YES',
[email protected]ab2956372009-08-13 18:11:041152 'GCC_OBJC_CALL_CXX_CDTORS': 'YES', # -fobjc-call-cxx-cdtors
1153 'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES', # -fvisibility=hidden
1154 'GCC_THREADSAFE_STATICS': 'NO', # -fno-threadsafe-statics
1155 'GCC_TREAT_WARNINGS_AS_ERRORS': 'YES', # -Werror
[email protected]2f80c312009-02-25 21:26:551156 'GCC_VERSION': '4.2',
[email protected]ab2956372009-08-13 18:11:041157 'GCC_WARN_ABOUT_MISSING_NEWLINE': 'YES', # -Wnewline-eof
[email protected]3224dcd2009-09-16 17:31:251158 # MACOSX_DEPLOYMENT_TARGET maps to -mmacosx-version-min
1159 'MACOSX_DEPLOYMENT_TARGET': '<(mac_deployment_target)',
[email protected]ab2956372009-08-13 18:11:041160 'PREBINDING': 'NO', # No -Wl,-prebind
[email protected]2f80c312009-02-25 21:26:551161 'USE_HEADERMAP': 'NO',
[email protected]080e86f2010-06-21 15:19:041162 'WARNING_CFLAGS': [
1163 '-Wall',
1164 '-Wendif-labels',
1165 '-Wextra',
1166 # Don't warn about unused function parameters.
1167 '-Wno-unused-parameter',
1168 # Don't warn about the "struct foo f = {0};" initialization
1169 # pattern.
1170 '-Wno-missing-field-initializers',
1171 ],
[email protected]b3fb8092009-03-12 19:09:241172 'conditions': [
1173 ['chromium_mac_pch', {'GCC_PRECOMPILE_PREFIX_HEADER': 'YES'},
[email protected]9543af052009-09-15 22:42:591174 {'GCC_PRECOMPILE_PREFIX_HEADER': 'NO'}
1175 ],
[email protected]b3fb8092009-03-12 19:09:241176 ],
[email protected]2f80c312009-02-25 21:26:551177 },
1178 'target_conditions': [
[email protected]2f80c312009-02-25 21:26:551179 ['_type!="static_library"', {
[email protected]5d7dc972009-04-16 15:30:461180 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-search_paths_first']},
1181 }],
1182 ['_mac_bundle', {
1183 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-ObjC']},
[email protected]87fde4a2009-02-28 00:50:081184 }],
[email protected]c2111422010-06-01 18:30:251185 ['_type=="executable" or _type=="shared_library" or _type=="loadable_module"', {
[email protected]24700642009-06-01 16:01:201186 'target_conditions': [
1187 ['mac_real_dsym == 1', {
1188 # To get a real .dSYM bundle produced by dsymutil, set the
1189 # debug information format to dwarf-with-dsym. Since
1190 # strip_from_xcode will not be used, set Xcode to do the
1191 # stripping as well.
1192 'configurations': {
[email protected]5153767c2009-12-22 01:52:501193 'Release_Base': {
[email protected]24700642009-06-01 16:01:201194 'xcode_settings': {
1195 'DEBUG_INFORMATION_FORMAT': 'dwarf-with-dsym',
1196 'DEPLOYMENT_POSTPROCESSING': 'YES',
1197 'STRIP_INSTALLED_PRODUCT': 'YES',
[email protected]e14a9f92009-08-05 19:26:071198 'target_conditions': [
[email protected]c2111422010-06-01 18:30:251199 ['_type=="shared_library" or _type=="loadable_module"', {
[email protected]e14a9f92009-08-05 19:26:071200 # The Xcode default is to strip debugging symbols
1201 # only (-S). Local symbols should be stripped as
1202 # well, which will be handled by -x. Xcode will
1203 # continue to insert -S when stripping even when
1204 # additional flags are added with STRIPFLAGS.
1205 'STRIPFLAGS': '-x',
[email protected]c2111422010-06-01 18:30:251206 }], # _type=="shared_library" or _type=="loadable_module"'
[email protected]e14a9f92009-08-05 19:26:071207 ], # target_conditions
1208 }, # xcode_settings
1209 }, # configuration "Release"
1210 }, # configurations
[email protected]24700642009-06-01 16:01:201211 }, { # mac_real_dsym != 1
1212 # To get a fast fake .dSYM bundle, use a post-build step to
1213 # produce the .dSYM and strip the executable. strip_from_xcode
1214 # only operates in the Release configuration.
1215 'postbuilds': [
1216 {
1217 'variables': {
1218 # Define strip_from_xcode in a variable ending in _path
1219 # so that gyp understands it's a path and performs proper
1220 # relativization during dict merging.
1221 'strip_from_xcode_path': 'mac/strip_from_xcode',
1222 },
1223 'postbuild_name': 'Strip If Needed',
1224 'action': ['<(strip_from_xcode_path)'],
1225 },
[email protected]e14a9f92009-08-05 19:26:071226 ], # postbuilds
1227 }], # mac_real_dsym
1228 ], # target_conditions
[email protected]c2111422010-06-01 18:30:251229 }], # _type=="executable" or _type=="shared_library" or _type=="loadable_module"
[email protected]e14a9f92009-08-05 19:26:071230 ], # target_conditions
1231 }, # target_defaults
1232 }], # OS=="mac"
[email protected]2f80c312009-02-25 21:26:551233 ['OS=="win"', {
1234 'target_defaults': {
1235 'defines': [
1236 '_WIN32_WINNT=0x0600',
1237 'WINVER=0x0600',
1238 'WIN32',
1239 '_WINDOWS',
[email protected]2f80c312009-02-25 21:26:551240 'NOMINMAX',
1241 '_CRT_RAND_S',
1242 'CERT_CHAIN_PARA_HAS_EXTRA_FIELDS',
1243 'WIN32_LEAN_AND_MEAN',
1244 '_SECURE_ATL',
[email protected]adfb98c2009-06-23 20:08:451245 '_HAS_TR1=0',
[email protected]2f80c312009-02-25 21:26:551246 ],
[email protected]8974e042010-06-21 18:06:521247 'conditions': [
1248 ['component=="static_library"', {
1249 'defines': [
1250 '_HAS_EXCEPTIONS=0',
1251 ],
1252 }],
1253 ],
1254
[email protected]5b5ca7cb2009-07-20 23:00:201255 'msvs_system_include_dirs': [
[email protected]998b5152009-12-12 22:19:521256 '<(DEPTH)/third_party/platformsdk_win7/files/Include',
[email protected]a78da50e2010-06-09 21:31:371257 '<(DEPTH)/third_party/directxsdk/files/Include',
[email protected]2f80c312009-02-25 21:26:551258 '$(VSInstallDir)/VC/atlmfc/include',
1259 ],
[email protected]a8d99cef2009-08-26 20:47:491260 'msvs_cygwin_dirs': ['<(DEPTH)/third_party/cygwin'],
[email protected]365632b2010-06-22 02:01:571261 'msvs_disabled_warnings': [4351, 4396, 4503, 4819],
[email protected]2f80c312009-02-25 21:26:551262 'msvs_settings': {
1263 'VCCLCompilerTool': {
1264 'MinimalRebuild': 'false',
[email protected]2f80c312009-02-25 21:26:551265 'BufferSecurityCheck': 'true',
1266 'EnableFunctionLevelLinking': 'true',
1267 'RuntimeTypeInfo': 'false',
1268 'WarningLevel': '3',
1269 'WarnAsError': 'true',
1270 'DebugInformationFormat': '3',
[email protected]3fef6e62009-07-31 19:58:581271 'conditions': [
[email protected]912c55c2009-07-31 23:33:551272 [ 'msvs_multi_core_compile', {
[email protected]1f9471a2010-01-04 06:40:161273 'AdditionalOptions': ['/MP'],
[email protected]912c55c2009-07-31 23:33:551274 }],
[email protected]8974e042010-06-21 18:06:521275
1276 ['component=="shared_library"', {
1277 'ExceptionHandling': '1', # /EHsc
1278 }, {
1279 'ExceptionHandling': '0',
1280 }],
[email protected]3fef6e62009-07-31 19:58:581281 ],
[email protected]2f80c312009-02-25 21:26:551282 },
1283 'VCLibrarianTool': {
[email protected]1f9471a2010-01-04 06:40:161284 'AdditionalOptions': ['/ignore:4221'],
[email protected]a78da50e2010-06-09 21:31:371285 'AdditionalLibraryDirectories': [
1286 '<(DEPTH)/third_party/platformsdk_win7/files/Lib',
1287 '<(DEPTH)/third_party/directxsdk/files/Lib/x86',
1288 ],
[email protected]2f80c312009-02-25 21:26:551289 },
1290 'VCLinkerTool': {
[email protected]2f80c312009-02-25 21:26:551291 'AdditionalDependencies': [
1292 'wininet.lib',
1293 'version.lib',
1294 'msimg32.lib',
1295 'ws2_32.lib',
1296 'usp10.lib',
1297 'psapi.lib',
[email protected]96fd0032009-04-24 00:13:081298 'dbghelp.lib',
[email protected]2f80c312009-02-25 21:26:551299 ],
[email protected]a78da50e2010-06-09 21:31:371300 'AdditionalLibraryDirectories': [
1301 '<(DEPTH)/third_party/platformsdk_win7/files/Lib',
1302 '<(DEPTH)/third_party/directxsdk/files/Lib/x86',
1303 ],
[email protected]2f80c312009-02-25 21:26:551304 'GenerateDebugInformation': 'true',
1305 'MapFileName': '$(OutDir)\\$(TargetName).map',
1306 'ImportLibrary': '$(OutDir)\\lib\\$(TargetName).lib',
[email protected]2f80c312009-02-25 21:26:551307 'FixedBaseAddress': '1',
[email protected]825ff8d2009-05-22 01:40:481308 # SubSystem values:
1309 # 0 == not set
1310 # 1 == /SUBSYSTEM:CONSOLE
1311 # 2 == /SUBSYSTEM:WINDOWS
1312 # Most of the executables we'll ever create are tests
1313 # and utilities with console output.
1314 'SubSystem': '1',
[email protected]2f80c312009-02-25 21:26:551315 },
1316 'VCMIDLTool': {
1317 'GenerateStublessProxies': 'true',
1318 'TypeLibraryName': '$(InputName).tlb',
1319 'OutputDirectory': '$(IntDir)',
1320 'HeaderFileName': '$(InputName).h',
1321 'DLLDataFileName': 'dlldata.c',
1322 'InterfaceIdentifierFileName': '$(InputName)_i.c',
1323 'ProxyFileName': '$(InputName)_p.c',
1324 },
1325 'VCResourceCompilerTool': {
1326 'Culture' : '1033',
[email protected]4d91cbc2010-05-07 20:41:381327 'AdditionalIncludeDirectories': [
1328 '<(DEPTH)',
1329 '<(SHARED_INTERMEDIATE_DIR)',
1330 ],
[email protected]2f80c312009-02-25 21:26:551331 },
1332 },
1333 },
1334 }],
[email protected]93f21e42010-04-01 00:35:151335 ['disable_nacl==1 or OS=="freebsd" or OS=="openbsd" or OS=="solaris"', {
[email protected]d8c7cbcc2009-10-02 19:00:311336 'target_defaults': {
1337 'defines': [
1338 'DISABLE_NACL',
1339 ],
1340 },
1341 }],
[email protected]cfbf9bc2009-12-07 22:07:561342 ['OS=="win" and msvs_use_common_linker_extras', {
[email protected]48c7af72009-07-03 22:00:191343 'target_defaults': {
1344 'msvs_settings': {
1345 'VCLinkerTool': {
[email protected]48c7af72009-07-03 22:00:191346 'DelayLoadDLLs': [
1347 'dbghelp.dll',
1348 'dwmapi.dll',
1349 'uxtheme.dll',
1350 ],
1351 },
1352 },
[email protected]ef4fa4072009-12-04 22:46:501353 'configurations': {
[email protected]5153767c2009-12-22 01:52:501354 'x86_Base': {
[email protected]ef4fa4072009-12-04 22:46:501355 'msvs_settings': {
1356 'VCLinkerTool': {
[email protected]1f9471a2010-01-04 06:40:161357 'AdditionalOptions': [
1358 '/safeseh',
1359 '/dynamicbase',
1360 '/ignore:4199',
1361 '/ignore:4221',
1362 '/nxcompat',
1363 ],
[email protected]ef4fa4072009-12-04 22:46:501364 },
1365 },
1366 },
[email protected]5153767c2009-12-22 01:52:501367 'x64_Base': {
[email protected]ef4fa4072009-12-04 22:46:501368 'msvs_settings': {
1369 'VCLinkerTool': {
[email protected]1f9471a2010-01-04 06:40:161370 'AdditionalOptions': [
[email protected]ef4fa4072009-12-04 22:46:501371 # safeseh is not compatible with x64
[email protected]1f9471a2010-01-04 06:40:161372 '/dynamicbase',
1373 '/ignore:4199',
1374 '/ignore:4221',
1375 '/nxcompat',
1376 ],
[email protected]ef4fa4072009-12-04 22:46:501377 },
1378 },
1379 },
1380 },
[email protected]48c7af72009-07-03 22:00:191381 },
1382 }],
[email protected]9821d0d2010-04-16 22:40:371383 ['enable_new_npdevice_api==1', {
1384 'target_defaults': {
1385 'defines': [
1386 'ENABLE_NEW_NPDEVICE_API',
1387 ],
1388 },
1389 }],
[email protected]2f80c312009-02-25 21:26:551390 ],
[email protected]c13fcbd2009-03-27 04:27:011391 'scons_settings': {
1392 'sconsbuild_dir': '<(DEPTH)/sconsbuild',
[email protected]a8b56d92009-08-10 04:09:071393 'tools': ['ar', 'as', 'gcc', 'g++', 'gnulink', 'chromium_builders'],
[email protected]c13fcbd2009-03-27 04:27:011394 },
[email protected]2f80c312009-02-25 21:26:551395 'xcode_settings': {
[email protected]0c8ab452009-11-06 21:57:501396 # DON'T ADD ANYTHING NEW TO THIS BLOCK UNLESS YOU REALLY REALLY NEED IT!
1397 # This block adds *project-wide* configuration settings to each project
1398 # file. It's almost always wrong to put things here. Specify your
1399 # custom xcode_settings in target_defaults to add them to targets instead.
1400
1401 # In an Xcode Project Info window, the "Base SDK for All Configurations"
1402 # setting sets the SDK on a project-wide basis. In order to get the
1403 # configured SDK to show properly in the Xcode UI, SDKROOT must be set
1404 # here at the project level.
1405 'SDKROOT': 'macosx<(mac_sdk)', # -isysroot
1406
[email protected]2f80c312009-02-25 21:26:551407 # The Xcode generator will look for an xcode_settings section at the root
1408 # of each dict and use it to apply settings on a file-wide basis. Most
1409 # settings should not be here, they should be in target-specific
1410 # xcode_settings sections, or better yet, should use non-Xcode-specific
1411 # settings in target dicts. SYMROOT is a special case, because many other
1412 # Xcode variables depend on it, including variables such as
1413 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something
1414 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the
1415 # files to appear (when present) in the UI as actual files and not red
1416 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR,
1417 # and therefore SYMROOT, needs to be set at the project level.
[email protected]bfa24b962009-03-02 00:16:161418 'SYMROOT': '<(DEPTH)/xcodebuild',
[email protected]2f80c312009-02-25 21:26:551419 },
[email protected]ee28c9f2009-09-04 01:53:011420}
[email protected]f5c990c2009-10-06 03:02:381421
1422# Local Variables:
1423# tab-width:2
1424# indent-tabs-mode:nil
1425# End:
1426# vim: set expandtab tabstop=2 shiftwidth=2: