blob: 9b68623d20014fb8554664c914952dfcb71b236f [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]93012ca2010-08-10 20:10:4994 # Copy conditionally-set chromeos and touchui variables out one scope.
[email protected]b3f23ba2010-04-26 22:58:1795 'chromeos%': '<(chromeos)',
[email protected]93012ca2010-08-10 20:10:4996 'touchui%': '<(touchui)',
[email protected]b2f030c2009-09-24 20:36:2197
98 # This variable tells WebCore.gyp and JavaScriptCore.gyp whether they are
99 # are built under a chromium full build (1) or a webkit.org chromium
100 # build (0).
101 'inside_chromium_build%': 1,
[email protected]9c1949e2009-10-02 19:59:54102
103 # Set to 1 to enable fast builds. It disables debug info for fastest
104 # compilation.
105 'fastbuild%': 0,
[email protected]84352455e72010-02-03 17:02:27106
[email protected]2fb843b2010-08-12 02:11:08107 # Set to 1 compile with -fPIC cflag on linux. This is a must for shared
108 # libraries on linux x86-64 and arm.
109 'linux_fpic%': 0,
110
[email protected]a76fe1a2010-03-01 23:39:36111 # Python version.
112 'python_ver%': '2.5',
113
[email protected]eafc0b452010-02-26 21:53:43114 # Set ARM-v7 compilation flags
115 'armv7%': 0,
116
117 # Set Neon compilation flags (only meaningful if armv7==1).
118 'arm_neon%': 1,
[email protected]4d83eb72010-03-04 16:42:23119
120 # The system root for cross-compiles. Default: none.
121 'sysroot%': '',
[email protected]ac120ff2010-04-28 02:14:22122
123 # On Linux, we build with sse2 for Chromium builds.
124 'disable_sse2%': 0,
[email protected]d67c9ea2010-06-08 22:43:45125
[email protected]542bf24a2010-06-11 23:08:17126 # Remoting compilation is enabled by default. Set to 0 to disable.
127 'remoting%': 1,
[email protected]8974e042010-06-21 18:06:52128
129 'library%': '<(library)',
130
131 # Variable 'component' is for cases where we would like to build some
132 # components as dynamic shared libraries but still need variable
133 # 'library' for static libraries.
134 # By default, component is set to whatever library is set to and
135 # it can be overriden by the GYP command line or by ~/.gyp/include.gypi.
136 'component%': '<(library)',
[email protected]e14a9f92009-08-05 19:26:07137 },
138
139 # Define branding and buildtype on the basis of their settings within the
140 # variables sub-dict above, unless overridden.
141 'branding%': '<(branding)',
142 'buildtype%': '<(buildtype)',
[email protected]e0d00142009-09-18 22:10:27143 'target_arch%': '<(target_arch)',
[email protected]cf185b32010-01-12 04:29:59144 'host_arch%': '<(host_arch)',
[email protected]c153e5352009-09-22 12:37:44145 'toolkit_views%': '<(toolkit_views)',
146 'chromeos%': '<(chromeos)',
[email protected]93012ca2010-08-10 20:10:49147 'touchui%': '<(touchui)',
[email protected]b2f030c2009-09-24 20:36:21148 'inside_chromium_build%': '<(inside_chromium_build)',
[email protected]9c1949e2009-10-02 19:59:54149 'fastbuild%': '<(fastbuild)',
[email protected]2fb843b2010-08-12 02:11:08150 'linux_fpic%': '<(linux_fpic)',
[email protected]a76fe1a2010-03-01 23:39:36151 'python_ver%': '<(python_ver)',
[email protected]eafc0b452010-02-26 21:53:43152 'armv7%': '<(armv7)',
153 'arm_neon%': '<(arm_neon)',
[email protected]4d83eb72010-03-04 16:42:23154 'sysroot%': '<(sysroot)',
[email protected]ac120ff2010-04-28 02:14:22155 'disable_sse2%': '<(disable_sse2)',
[email protected]542bf24a2010-06-11 23:08:17156 'remoting%': '<(remoting)',
[email protected]8974e042010-06-21 18:06:52157 'library%': '<(library)',
158 'component%': '<(component)',
[email protected]e14a9f92009-08-05 19:26:07159
[email protected]caa95c82009-11-23 22:39:32160 # The release channel that this build targets. This is used to restrict
161 # channel-specific build options, like which installer packages to create.
162 # The default is 'all', which does no channel-specific filtering.
163 'channel%': 'all',
164
[email protected]b3fb8092009-03-12 19:09:24165 # Override chromium_mac_pch and set it to 0 to suppress the use of
166 # precompiled headers on the Mac. Prefix header injection may still be
167 # used, but prefix headers will not be precompiled. This is useful when
168 # using distcc to distribute a build to compile slaves that don't
169 # share the same compiler executable as the system driving the compilation,
170 # because precompiled headers rely on pointers into a specific compiler
171 # executable's image. Setting this to 0 is needed to use an experimental
172 # Linux-Mac cross compiler distcc farm.
173 'chromium_mac_pch%': 1,
174
[email protected]3224dcd2009-09-16 17:31:25175 # Mac OS X SDK and deployment target support.
176 # The SDK identifies the version of the system headers that will be used,
177 # and corresponds to the MAC_OS_X_VERSION_MAX_ALLOWED compile-time macro.
178 # "Maximum allowed" refers to the operating system version whose APIs are
179 # available in the headers.
180 # The deployment target identifies the minimum system version that the
181 # built products are expected to function on. It corresponds to the
182 # MAC_OS_X_VERSION_MIN_REQUIRED compile-time macro.
183 # To ensure these macros are available, #include <AvailabilityMacros.h>.
184 # Additional documentation on these macros is available at
185 # http://developer.apple.com/mac/library/technotes/tn2002/tn2064.html#SECTION3
186 # Chrome normally builds with the Mac OS X 10.5 SDK and sets the
187 # deployment target to 10.5. Other projects, such as O3D, may override
188 # these defaults.
189 'mac_sdk%': '10.5',
190 'mac_deployment_target%': '10.5',
[email protected]9543af052009-09-15 22:42:59191
[email protected]f5ecbba12009-04-03 04:35:18192 # Set to 1 to enable code coverage. In addition to build changes
193 # (e.g. extra CFLAGS), also creates a new target in the src/chrome
194 # project file called "coverage".
195 # Currently ignored on Windows.
196 'coverage%': 0,
[email protected]653bd5f032009-04-08 12:55:49197
[email protected]c61f6432009-04-22 01:16:42198 # Overridable specification for potential use of alternative
199 # JavaScript engines.
200 'javascript_engine%': 'v8',
201
[email protected]7477ea6f2009-12-22 23:28:15202 # Although base/allocator lets you select a heap library via an
[email protected]7e0d664a2009-12-03 21:07:47203 # environment variable, the libcmt shim it uses sometimes gets in
204 # the way. To disable it entirely, and switch to normal msvcrt, do e.g.
205 # 'win_use_allocator_shim': 0,
206 # 'win_release_RuntimeLibrary': 2
207 # to ~/.gyp/include.gypi, gclient runhooks --force, and do a release build.
[email protected]8974e042010-06-21 18:06:52208 'win_use_allocator_shim%': 1, # 1 = shim allocator via libcmt; 0 = msvcrt
[email protected]279cd4212009-09-11 22:32:11209
[email protected]95ff8082009-11-13 22:21:01210 # Whether usage of OpenMAX is enabled.
211 'enable_openmax%': 0,
212
[email protected]d01120e62010-05-10 17:04:48213 # Whether proprietary audio/video codecs are assumed to be included with
214 # this build (only meaningful if branding!=Chrome).
215 'proprietary_codecs%': 0,
216
[email protected]e5b2eaa2009-04-14 01:39:12217 # TODO(bradnelson): eliminate this when possible.
218 # To allow local gyp files to prevent release.vsprops from being included.
219 # Yes(1) means include release.vsprops.
220 # Once all vsprops settings are migrated into gyp, this can go away.
221 'msvs_use_common_release%': 1,
[email protected]606116d22009-05-06 22:38:23222
[email protected]cbd5fd52009-08-26 00:14:27223 # TODO(bradnelson): eliminate this when possible.
224 # To allow local gyp files to override additional linker options for msvs.
225 # Yes(1) means set use the common linker options.
[email protected]48c7af72009-07-03 22:00:19226 'msvs_use_common_linker_extras%': 1,
227
[email protected]1ffb6502009-06-02 07:46:24228 # TODO(sgk): eliminate this if possible.
229 # It would be nicer to support this via a setting in 'target_defaults'
230 # in chrome/app/locales/locales.gypi overriding the setting in the
231 # 'Debug' configuration in the 'target_defaults' dict below,
232 # but that doesn't work as we'd like.
233 'msvs_debug_link_incremental%': '2',
234
[email protected]573136142009-07-15 22:48:37235 # This is the location of the sandbox binary. Chrome looks for this before
236 # running the zygote process. If found, and SUID, it will be used to
237 # sandbox the zygote process and, thus, all renderer processes.
238 'linux_sandbox_path%': '',
239
[email protected]ad6d2c42009-09-15 20:13:38240 # Set this to true to enable SELinux support.
241 'selinux%': 0,
[email protected]4c9cc6c2009-10-01 18:54:57242
[email protected]36532f332010-08-25 00:22:01243 # Override whether we should use Breakpad on Linux. I.e. for Chrome bot.
244 'linux_breakpad%': 0,
245 # And if we want to dump symbols for Breakpad-enabled builds.
246 'linux_dump_symbols%': 0,
247 # And if we want to strip the binary after dumping symbols.
[email protected]05cb6962009-10-01 23:29:03248 'linux_strip_binary%': 0,
249
[email protected]46ce5b562010-06-16 18:39:53250 # Enable TCMalloc.
251 'linux_use_tcmalloc%': 1,
[email protected]01699e22009-11-11 19:24:24252
[email protected]39ca7de2010-04-16 08:04:03253 # Disable TCMalloc's debugallocation.
254 'linux_use_debugallocation%': 0,
255
[email protected]d8b60602010-03-26 09:41:22256 # Disable TCMalloc's heapchecker.
257 'linux_use_heapchecker%': 0,
258
[email protected]64e2d4a42010-08-27 10:13:21259 # Disable shadow stack keeping used by heapcheck to unwind the stacks
260 # better.
261 'linux_keep_shadow_stacks%': 0,
262
[email protected]cc2d7cd2010-03-30 22:46:21263 # Set to 1 to turn on seccomp sandbox by default.
264 # (Note: this is ignored for official builds.)
265 'linux_use_seccomp_sandbox%': 0,
[email protected]39c4e1a82010-03-30 19:47:41266
[email protected]556c5d72010-06-10 05:45:01267 # Set to 1 to link against libgnome-keyring instead of using dlopen().
268 'linux_link_gnome_keyring%': 0,
269
[email protected]c153e5352009-09-22 12:37:44270 # Set to select the Title Case versions of strings in GRD files.
271 'use_titlecase_in_grd_files%': 0,
[email protected]ad6d2c42009-09-15 20:13:38272
[email protected]d8c7cbcc2009-10-02 19:00:31273 # Used to disable Native Client at compile time, for platforms where it
274 # isn't supported
275 'disable_nacl%': 0,
276
[email protected]77c1b29392009-12-04 06:21:29277 # Set Thumb compilation flags.
278 'arm_thumb%': 0,
279
[email protected]53e0f642010-03-05 01:41:56280 # Set ARM fpu compilation flags (only meaningful if armv7==1 and
281 # arm_neon==0).
282 'arm_fpu%': 'vfpv3',
283
[email protected]9821d0d2010-04-16 22:40:37284 # Enable new NPDevice API.
285 'enable_new_npdevice_api%': 0,
[email protected]ed154592010-04-29 00:18:50286
287 # Enable EGLImage support in OpenMAX
288 'enable_eglimage%': 0,
289
[email protected]6f51b27e2010-06-22 20:43:53290 # Enable a variable used elsewhere throughout the GYP files to determine
291 # whether to compile in the sources for the GPU plugin / process.
292 'enable_gpu%': 1,
293
[email protected]912c55c2009-07-31 23:33:55294 'conditions': [
[email protected]47deeb62009-12-17 14:49:39295 ['OS=="linux" or OS=="freebsd" or OS=="openbsd"', {
[email protected]242a9e62009-11-03 17:32:10296 # This will set gcc_version to XY if you are running gcc X.Y.*.
297 # This is used to tweak build flags for gcc 4.4.
298 'gcc_version%': '<!(python <(DEPTH)/build/compiler_version.py)',
[email protected]4d83eb72010-03-04 16:42:23299 # Figure out the python architecture to decide if we build pyauto.
[email protected]efd68462010-03-04 17:07:54300 'python_arch%': '<!(<(DEPTH)/build/linux/python_arch.sh <(sysroot)/usr/lib/libpython<(python_ver).so.1.0)',
[email protected]cbd5fd52009-08-26 00:14:27301 'conditions': [
[email protected]2a77a9d2010-08-26 19:58:10302 ['branding=="Chrome"', {
[email protected]cbd5fd52009-08-26 00:14:27303 'linux_breakpad%': 1,
[email protected]cbd5fd52009-08-26 00:14:27304 }],
[email protected]4c9cc6c2009-10-01 18:54:57305 # All Chrome builds have breakpad symbols, but only process the
306 # symbols from official builds.
[email protected]c913cb82010-08-31 19:44:08307 ['(branding=="Chrome" and buildtype=="Official")', {
[email protected]4c9cc6c2009-10-01 18:54:57308 'linux_dump_symbols%': 1,
[email protected]4c9cc6c2009-10-01 18:54:57309 }],
[email protected]06c756182010-04-27 18:31:31310 ['toolkit_views==0', {
[email protected]c153e5352009-09-22 12:37:44311 # GTK wants Title Case strings
312 'use_titlecase_in_grd_files%': 1,
313 }],
[email protected]cbd5fd52009-08-26 00:14:27314 ],
[email protected]47deeb62009-12-17 14:49:39315 }], # OS=="linux" or OS=="freebsd" or OS=="openbsd"
[email protected]e14a9f92009-08-05 19:26:07316 ['OS=="mac"', {
[email protected]c153e5352009-09-22 12:37:44317 # Mac wants Title Case strings
318 'use_titlecase_in_grd_files%': 1,
[email protected]e14a9f92009-08-05 19:26:07319 'conditions': [
320 # mac_product_name is set to the name of the .app bundle as it should
321 # appear on disk. This duplicates data from
322 # chrome/app/theme/chromium/BRANDING and
323 # chrome/app/theme/google_chrome/BRANDING, but is necessary to get
324 # these names into the build system.
325 ['branding=="Chrome"', {
326 'mac_product_name%': 'Google Chrome',
327 }, { # else: branding!="Chrome"
328 'mac_product_name%': 'Chromium',
329 }],
330
331 # Feature variables for enabling Mac Breakpad and Keystone auto-update
332 # support. Both features are on by default in official builds with
333 # Chrome branding.
334 ['branding=="Chrome" and buildtype=="Official"', {
335 'mac_breakpad%': 1,
336 'mac_keystone%': 1,
337 }, { # else: branding!="Chrome" or buildtype!="Official"
338 'mac_breakpad%': 0,
339 'mac_keystone%': 0,
340 }],
341 ],
342 }], # OS=="mac"
[email protected]912c55c2009-07-31 23:33:55343 # Whether to use multiple cores to compile with visual studio. This is
344 # optional because it sometimes causes corruption on VS 2005.
345 # It is on by default on VS 2008 and off on VS 2005.
346 ['OS=="win"', {
347 'conditions': [
[email protected]8974e042010-06-21 18:06:52348 ['component=="shared_library"', {
349 'win_use_allocator_shim%': 0,
350 }],
[email protected]912c55c2009-07-31 23:33:55351 ['MSVS_VERSION=="2005"', {
[email protected]669795372009-08-14 17:51:13352 'msvs_multi_core_compile%': 0,
[email protected]912c55c2009-07-31 23:33:55353 },{
354 'msvs_multi_core_compile%': 1,
355 }],
[email protected]10bb8c92009-08-07 21:16:03356 # Don't do incremental linking for large modules on 32-bit.
357 ['MSVS_OS_BITS==32', {
358 'msvs_large_module_debug_link_mode%': '1', # No
359 },{
360 'msvs_large_module_debug_link_mode%': '2', # Yes
361 }],
[email protected]912c55c2009-07-31 23:33:55362 ],
[email protected]ef4fa4072009-12-04 22:46:50363 'nacl_win64_defines': [
364 # This flag is used to minimize dependencies when building
365 # Native Client loader for 64-bit Windows.
366 'NACL_WIN64',
367 ],
[email protected]912c55c2009-07-31 23:33:55368 }],
369 ],
[email protected]f703c4e2009-09-17 21:54:28370
371 # NOTE: When these end up in the Mac bundle, we need to replace '-' for '_'
372 # so Cocoa is happy (http://crbug.com/20441).
373 'locales': [
[email protected]af27c8c2009-11-04 20:36:50374 'am', 'ar', 'bg', 'bn', 'ca', 'cs', 'da', 'de', 'el', 'en-GB',
[email protected]35f51d42010-09-09 21:06:13375 'en-US', 'es-419', 'es', 'et', 'fa', 'fi', 'fil', 'fr', 'gu', 'he',
[email protected]f703c4e2009-09-17 21:54:28376 'hi', 'hr', 'hu', 'id', 'it', 'ja', 'kn', 'ko', 'lt', 'lv',
[email protected]cf1ab6f2010-03-25 19:38:23377 'ml', 'mr', 'nb', 'nl', 'pl', 'pt-BR', 'pt-PT', 'ro', 'ru',
378 'sk', 'sl', 'sr', 'sv', 'sw', 'ta', 'te', 'th', 'tr', 'uk',
379 'vi', 'zh-CN', 'zh-TW',
[email protected]f703c4e2009-09-17 21:54:28380 ],
[email protected]2f80c312009-02-25 21:26:55381 },
382 'target_defaults': {
[email protected]1c966092009-08-20 21:19:26383 'variables': {
[email protected]a6e22132010-02-10 20:43:18384 # The condition that operates on chromium_code is in a target_conditions
385 # section, and will not have access to the default fallback value of
386 # chromium_code at the top of this file, or to the chromium_code
387 # variable placed at the root variables scope of .gyp files, because
388 # those variables are not set at target scope. As a workaround,
389 # if chromium_code is not set at target scope, define it in target scope
390 # to contain whatever value it has during early variable expansion.
391 # That's enough to make it available during target conditional
392 # processing.
393 'chromium_code%': '<(chromium_code)',
394
[email protected]7e0d664a2009-12-03 21:07:47395 # See http://gcc.gnu.org/onlinedocs/gcc-4.4.2/gcc/Optimize-Options.html
[email protected]d5d593a2009-08-28 23:23:29396 'mac_release_optimization%': '3', # Use -O3 unless overridden
[email protected]ffd984b12009-09-11 19:37:00397 'mac_debug_optimization%': '0', # Use -O0 unless overridden
[email protected]7e0d664a2009-12-03 21:07:47398 # See http://msdn.microsoft.com/en-us/library/aa652360(VS.71).aspx
399 'win_release_Optimization%': '2', # 2 = /Os
400 'win_debug_Optimization%': '0', # 0 = /Od
[email protected]6b0507b2010-05-07 07:41:21401 # See http://msdn.microsoft.com/en-us/library/8wtf2dfz(VS.71).aspx
402 'win_debug_RuntimeChecks%': '3', # 3 = all checks enabled, 0 = off
403 # See http://msdn.microsoft.com/en-us/library/47238hez(VS.71).aspx
[email protected]2ae6e022010-05-07 13:19:15404 'win_debug_InlineFunctionExpansion%': '', # empty = default, 0 = off,
405 'win_release_InlineFunctionExpansion%': '2', # 1 = only __inline, 2 = max
[email protected]7e0d664a2009-12-03 21:07:47406
[email protected]ffd984b12009-09-11 19:37:00407 'release_extra_cflags%': '',
408 'debug_extra_cflags%': '',
[email protected]92822e82009-09-18 14:26:56409 'release_valgrind_build%': 0,
[email protected]8974e042010-06-21 18:06:52410
411 'conditions': [
412 ['OS=="win" and component=="shared_library"', {
413 # See http://msdn.microsoft.com/en-us/library/aa652367.aspx
414 'win_release_RuntimeLibrary%': '2', # 2 = /MT (nondebug DLL)
415 'win_debug_RuntimeLibrary%': '3', # 3 = /MTd (debug DLL)
416 }, {
417 # See http://msdn.microsoft.com/en-us/library/aa652367.aspx
418 'win_release_RuntimeLibrary%': '0', # 0 = /MT (nondebug static)
419 'win_debug_RuntimeLibrary%': '1', # 1 = /MTd (debug static)
420 }],
421 ],
[email protected]1c966092009-08-20 21:19:26422 },
[email protected]32aa8cc2009-03-04 21:36:39423 'conditions': [
424 ['branding=="Chrome"', {
425 'defines': ['GOOGLE_CHROME_BUILD'],
426 }, { # else: branding!="Chrome"
427 'defines': ['CHROMIUM_BUILD'],
428 }],
[email protected]06c756182010-04-27 18:31:31429 ['toolkit_views==1', {
[email protected]e6970232009-05-12 23:51:17430 'defines': ['TOOLKIT_VIEWS=1'],
431 }],
[email protected]fdc5bed2010-01-09 01:16:57432 ['chromeos==1', {
[email protected]16779842009-07-08 23:45:29433 'defines': ['OS_CHROMEOS=1'],
[email protected]2b883b92009-06-02 22:57:50434 }],
[email protected]0094fbe2010-07-15 21:51:43435 ['touchui==1', {
436 'defines': ['TOUCH_UI=1'],
437 }],
[email protected]542bf24a2010-06-11 23:08:17438 ['remoting==1', {
439 'defines': ['ENABLE_REMOTING=1'],
[email protected]c0bac532010-06-11 00:39:00440 }],
[email protected]d01120e62010-05-10 17:04:48441 ['proprietary_codecs==1', {
442 'defines': ['USE_PROPRIETARY_CODECS'],
443 }],
[email protected]9c1949e2009-10-02 19:59:54444 ['fastbuild!=0', {
445 'conditions': [
[email protected]1cc2fa72010-07-03 08:49:24446 # For Windows, we don't genererate debug information.
[email protected]9c1949e2009-10-02 19:59:54447 ['OS=="win"', {
448 'msvs_settings': {
449 'VCLinkerTool': {
450 'GenerateDebugInformation': 'false',
451 },
452 'VCCLCompilerTool': {
453 'DebugInformationFormat': '0',
454 }
455 }
[email protected]1cc2fa72010-07-03 08:49:24456 }, { # else: OS != "win", generate less debug information.
457 'variables': {
458 'debug_extra_cflags': '-g1',
459 },
[email protected]37c84192010-04-14 21:37:40460 }],
[email protected]9c1949e2009-10-02 19:59:54461 ], # conditions for fastbuild.
462 }], # fastbuild!=0
[email protected]ad6d2c42009-09-15 20:13:38463 ['selinux==1', {
464 'defines': ['CHROMIUM_SELINUX=1'],
465 }],
[email protected]7e0d664a2009-12-03 21:07:47466 ['win_use_allocator_shim==0', {
467 'conditions': [
468 ['OS=="win"', {
469 'defines': ['NO_TCMALLOC'],
470 }],
471 ],
472 }],
[email protected]43f28f832010-02-03 02:28:48473 ['enable_gpu==1', {
[email protected]7477ea6f2009-12-22 23:28:15474 'defines': [
475 'ENABLE_GPU=1',
476 ],
477 }],
[email protected]ed154592010-04-29 00:18:50478 ['enable_eglimage==1', {
479 'defines': [
480 'ENABLE_EGLIMAGE=1',
481 ],
482 }],
[email protected]f5ecbba12009-04-03 04:35:18483 ['coverage!=0', {
484 'conditions': [
485 ['OS=="mac"', {
486 'xcode_settings': {
[email protected]ab2956372009-08-13 18:11:04487 'GCC_INSTRUMENT_PROGRAM_FLOW_ARCS': 'YES', # -fprofile-arcs
488 'GCC_GENERATE_TEST_COVERAGE_FILES': 'YES', # -ftest-coverage
[email protected]5ae4f55e2009-04-13 23:19:47489 },
[email protected]e4fb84c2009-12-28 20:45:43490 # Add -lgcov for types executable, shared_library, and
[email protected]dc259ce52010-04-13 04:03:10491 # loadable_module; not for static_library.
[email protected]e4fb84c2009-12-28 20:45:43492 # This is a delayed conditional.
[email protected]f5ecbba12009-04-03 04:35:18493 'target_conditions': [
[email protected]e4fb84c2009-12-28 20:45:43494 ['_type!="static_library"', {
[email protected]f5ecbba12009-04-03 04:35:18495 'xcode_settings': { 'OTHER_LDFLAGS': [ '-lgcov' ] },
[email protected]5ae4f55e2009-04-13 23:19:47496 }],
497 ],
498 }],
[email protected]7122ffd52009-04-30 23:19:00499 # Linux gyp (into scons) doesn't like target_conditions?
500 # TODO(???): track down why 'target_conditions' doesn't work
501 # on Linux gyp into scons like it does on Mac gyp into xcodeproj.
[email protected]f5ecbba12009-04-03 04:35:18502 ['OS=="linux"', {
503 'cflags': [ '-ftest-coverage',
504 '-fprofile-arcs' ],
[email protected]7122ffd52009-04-30 23:19:00505 'link_settings': { 'libraries': [ '-lgcov' ] },
[email protected]f5ecbba12009-04-03 04:35:18506 }],
[email protected]e8f6ff42009-07-07 18:20:53507 # Finally, for Windows, we simply turn on profiling.
508 ['OS=="win"', {
509 'msvs_settings': {
510 'VCLinkerTool': {
511 'Profile': 'true',
512 },
[email protected]10bb8c92009-08-07 21:16:03513 'VCCLCompilerTool': {
[email protected]e8f6ff42009-07-07 18:20:53514 # /Z7, not /Zi, so coverage is happyb
515 'DebugInformationFormat': '1',
[email protected]1f9471a2010-01-04 06:40:16516 'AdditionalOptions': ['/Yd'],
[email protected]e8f6ff42009-07-07 18:20:53517 }
518 }
519 }], # OS==win
520 ], # conditions for coverage
521 }], # coverage!=0
[email protected]4e4d6042010-08-26 18:34:38522 ['OS=="win"', {
523 'defines': [
524 '__STD_C',
525 '_CRT_SECURE_NO_DEPRECATE',
526 '_SCL_SECURE_NO_DEPRECATE',
527 ],
528 'include_dirs': [
529 '<(DEPTH)/third_party/wtl/include',
530 ],
531 }], # OS==win
[email protected]a6e22132010-02-10 20:43:18532 ], # conditions for 'target_defaults'
533 'target_conditions': [
[email protected]c14d8e772010-02-09 22:06:15534 ['chromium_code==0', {
[email protected]d8543312010-02-10 17:43:28535 'conditions': [
536 [ 'OS=="linux" or OS=="freebsd" or OS=="openbsd"', {
537 'cflags!': [
538 '-Wall',
539 '-Wextra',
540 '-Werror',
541 ],
542 }],
543 [ 'OS=="win"', {
544 'defines': [
545 '_CRT_SECURE_NO_DEPRECATE',
546 '_CRT_NONSTDC_NO_WARNINGS',
547 '_CRT_NONSTDC_NO_DEPRECATE',
548 '_SCL_SECURE_NO_DEPRECATE',
549 ],
550 'msvs_disabled_warnings': [4800],
551 'msvs_settings': {
552 'VCCLCompilerTool': {
553 'WarnAsError': 'false',
554 'Detect64BitPortabilityProblems': 'false',
555 },
556 },
557 }],
558 [ 'OS=="mac"', {
559 'xcode_settings': {
560 'GCC_TREAT_WARNINGS_AS_ERRORS': 'NO',
[email protected]4c4c2e5332010-06-15 11:51:06561 'WARNING_CFLAGS!': ['-Wall', '-Wextra'],
[email protected]d8543312010-02-10 17:43:28562 },
563 }],
[email protected]c14d8e772010-02-09 22:06:15564 ],
565 }, {
566 # In Chromium code, we define __STDC_FORMAT_MACROS in order to get the
567 # C99 macros on Mac and Linux.
568 'defines': [
569 '__STDC_FORMAT_MACROS',
570 ],
571 'conditions': [
572 ['OS!="win"', {
573 'sources/': [ ['exclude', '_win(_unittest)?\\.cc$'],
574 ['exclude', '/win/'],
575 ['exclude', '/win_[^/]*\\.cc$'] ],
576 }],
577 ['OS!="mac"', {
578 'sources/': [ ['exclude', '_(cocoa|mac)(_unittest)?\\.cc$'],
579 ['exclude', '/(cocoa|mac)/'],
[email protected]e603d952010-02-10 22:36:26580 ['exclude', '\.mm?$' ] ],
[email protected]c14d8e772010-02-09 22:06:15581 }],
582 ['OS!="linux" and OS!="freebsd" and OS!="openbsd"', {
583 'sources/': [
[email protected]1c657852010-04-22 23:28:05584 ['exclude', '_(chromeos|gtk|x|x11|xdg)(_unittest)?\\.cc$'],
[email protected]c14d8e772010-02-09 22:06:15585 ['exclude', '/gtk/'],
[email protected]18cff3d2010-02-17 18:03:13586 ['exclude', '/(gtk|x11)_[^/]*\\.cc$'],
587 ],
588 }],
589 ['OS!="linux"', {
590 'sources/': [
591 ['exclude', '_linux(_unittest)?\\.cc$'],
592 ['exclude', '/linux/'],
593 ],
[email protected]c14d8e772010-02-09 22:06:15594 }],
595 # We use "POSIX" to refer to all non-Windows operating systems.
596 ['OS=="win"', {
597 'sources/': [ ['exclude', '_posix\\.cc$'] ],
[email protected]f55bd4862010-05-27 15:38:07598 # turn on warnings for signed/unsigned mismatch on chromium code.
599 'msvs_settings': {
600 'VCCLCompilerTool': {
601 'AdditionalOptions': ['/we4389'],
602 },
603 },
[email protected]c14d8e772010-02-09 22:06:15604 }],
[email protected]c14d8e772010-02-09 22:06:15605 ['chromeos!=1', {
606 'sources/': [ ['exclude', '_chromeos\\.cc$'] ]
607 }],
[email protected]06c756182010-04-27 18:31:31608 ['toolkit_views==0', {
[email protected]c14d8e772010-02-09 22:06:15609 'sources/': [ ['exclude', '_views\\.cc$'] ]
610 }],
611 ],
612 }],
[email protected]a6e22132010-02-10 20:43:18613 ], # target_conditions for 'target_defaults'
[email protected]2f80c312009-02-25 21:26:55614 'default_configuration': 'Debug',
615 'configurations': {
[email protected]5153767c2009-12-22 01:52:50616 # VCLinkerTool LinkIncremental values below:
617 # 0 == default
618 # 1 == /INCREMENTAL:NO
619 # 2 == /INCREMENTAL
620 # Debug links incremental, Release does not.
621 #
622 # Abstract base configurations to cover common
623 # attributes.
624 #
625 'Common_Base': {
[email protected]bb05e452009-10-29 21:24:56626 'abstract': 1,
627 'msvs_configuration_attributes': {
628 'OutputDirectory': '$(SolutionDir)$(ConfigurationName)',
629 'IntermediateDirectory': '$(OutDir)\\obj\\$(ProjectName)',
630 'CharacterSet': '1',
631 },
[email protected]5153767c2009-12-22 01:52:50632 },
633 'x86_Base': {
634 'abstract': 1,
[email protected]ef4fa4072009-12-04 22:46:50635 'msvs_settings': {
636 'VCLinkerTool': {
637 'TargetMachine': '1',
638 },
639 },
[email protected]2fa40782009-11-01 21:17:34640 'msvs_configuration_platform': 'Win32',
[email protected]bb05e452009-10-29 21:24:56641 },
[email protected]5153767c2009-12-22 01:52:50642 'x64_Base': {
643 'abstract': 1,
644 'msvs_configuration_platform': 'x64',
645 'msvs_settings': {
646 'VCLinkerTool': {
647 'TargetMachine': '17', # x86 - 64
[email protected]5153767c2009-12-22 01:52:50648 'AdditionalLibraryDirectories!':
649 ['<(DEPTH)/third_party/platformsdk_win7/files/Lib'],
650 'AdditionalLibraryDirectories':
651 ['<(DEPTH)/third_party/platformsdk_win7/files/Lib/x64'],
652 },
[email protected]d26b4418ab2010-03-24 22:06:35653 'VCLibrarianTool': {
[email protected]5153767c2009-12-22 01:52:50654 'AdditionalLibraryDirectories!':
655 ['<(DEPTH)/third_party/platformsdk_win7/files/Lib'],
656 'AdditionalLibraryDirectories':
657 ['<(DEPTH)/third_party/platformsdk_win7/files/Lib/x64'],
658 },
659 },
660 'defines': [
661 # Not sure if tcmalloc works on 64-bit Windows.
662 'NO_TCMALLOC',
663 ],
664 },
665 'Debug_Base': {
666 'abstract': 1,
[email protected]ee857512010-05-14 08:24:42667 'defines': ['DYNAMIC_ANNOTATIONS_ENABLED=1'],
[email protected]1c966092009-08-20 21:19:26668 'xcode_settings': {
669 'COPY_PHASE_STRIP': 'NO',
[email protected]d5d593a2009-08-28 23:23:29670 'GCC_OPTIMIZATION_LEVEL': '<(mac_debug_optimization)',
[email protected]bd232ac2009-10-21 02:23:53671 'OTHER_CFLAGS': [ '<@(debug_extra_cflags)', ],
[email protected]1c966092009-08-20 21:19:26672 },
[email protected]bb05e452009-10-29 21:24:56673 'msvs_settings': {
674 'VCCLCompilerTool': {
[email protected]7e0d664a2009-12-03 21:07:47675 'Optimization': '<(win_debug_Optimization)',
[email protected]bb05e452009-10-29 21:24:56676 'PreprocessorDefinitions': ['_DEBUG'],
[email protected]6b0507b2010-05-07 07:41:21677 'BasicRuntimeChecks': '<(win_debug_RuntimeChecks)',
[email protected]7e0d664a2009-12-03 21:07:47678 'RuntimeLibrary': '<(win_debug_RuntimeLibrary)',
[email protected]2ae6e022010-05-07 13:19:15679 'conditions': [
680 # According to MSVS, InlineFunctionExpansion=0 means
681 # "default inlining", not "/Ob0".
682 # Thus, we have to handle InlineFunctionExpansion==0 separately.
683 ['win_debug_InlineFunctionExpansion==0', {
684 'AdditionalOptions': ['/Ob0'],
685 }],
686 ['win_debug_InlineFunctionExpansion!=""', {
687 'InlineFunctionExpansion':
688 '<(win_debug_InlineFunctionExpansion)',
689 }],
690 ],
[email protected]bb05e452009-10-29 21:24:56691 },
692 'VCLinkerTool': {
693 'LinkIncremental': '<(msvs_debug_link_incremental)',
694 },
695 'VCResourceCompilerTool': {
696 'PreprocessorDefinitions': ['_DEBUG'],
697 },
698 },
[email protected]2f80c312009-02-25 21:26:55699 'conditions': [
[email protected]bb05e452009-10-29 21:24:56700 ['OS=="linux"', {
701 'cflags': [
702 '<@(debug_extra_cflags)',
703 ],
[email protected]2f80c312009-02-25 21:26:55704 }],
705 ],
706 },
[email protected]5153767c2009-12-22 01:52:50707 'Release_Base': {
708 'abstract': 1,
[email protected]2f80c312009-02-25 21:26:55709 'defines': [
710 'NDEBUG',
711 ],
[email protected]1c966092009-08-20 21:19:26712 'xcode_settings': {
713 'DEAD_CODE_STRIPPING': 'YES', # -Wl,-dead_strip
714 'GCC_OPTIMIZATION_LEVEL': '<(mac_release_optimization)',
[email protected]ffd984b12009-09-11 19:37:00715 'OTHER_CFLAGS': [ '<@(release_extra_cflags)', ],
[email protected]1c966092009-08-20 21:19:26716 },
[email protected]bb05e452009-10-29 21:24:56717 'msvs_settings': {
[email protected]7e0d664a2009-12-03 21:07:47718 'VCCLCompilerTool': {
719 'Optimization': '<(win_release_Optimization)',
720 'RuntimeLibrary': '<(win_release_RuntimeLibrary)',
[email protected]2ae6e022010-05-07 13:19:15721 'conditions': [
722 # According to MSVS, InlineFunctionExpansion=0 means
723 # "default inlining", not "/Ob0".
724 # Thus, we have to handle InlineFunctionExpansion==0 separately.
725 ['win_release_InlineFunctionExpansion==0', {
726 'AdditionalOptions': ['/Ob0'],
727 }],
728 ['win_release_InlineFunctionExpansion!=""', {
729 'InlineFunctionExpansion':
730 '<(win_release_InlineFunctionExpansion)',
731 }],
732 ],
[email protected]7e0d664a2009-12-03 21:07:47733 },
[email protected]bb05e452009-10-29 21:24:56734 'VCLinkerTool': {
735 'LinkIncremental': '1',
736 },
737 },
[email protected]2f80c312009-02-25 21:26:55738 'conditions': [
[email protected]92822e82009-09-18 14:26:56739 ['release_valgrind_build==0', {
[email protected]ee857512010-05-14 08:24:42740 'defines': ['NVALGRIND', 'DYNAMIC_ANNOTATIONS_ENABLED=0'],
741 }, {
742 'defines': ['DYNAMIC_ANNOTATIONS_ENABLED=1'],
[email protected]92822e82009-09-18 14:26:56743 }],
[email protected]7e0d664a2009-12-03 21:07:47744 ['win_use_allocator_shim==0', {
745 'defines': ['NO_TCMALLOC'],
746 }],
[email protected]bb05e452009-10-29 21:24:56747 ['OS=="linux"', {
748 'cflags': [
[email protected]ffd984b12009-09-11 19:37:00749 '<@(release_extra_cflags)',
[email protected]bb05e452009-10-29 21:24:56750 ],
751 }],
[email protected]2f80c312009-02-25 21:26:55752 ],
753 },
[email protected]5153767c2009-12-22 01:52:50754 'Purify_Base': {
755 'abstract': 1,
756 'defines': [
757 'PURIFY',
758 'NO_TCMALLOC',
759 ],
760 'msvs_settings': {
761 'VCCLCompilerTool': {
762 'Optimization': '0',
763 'RuntimeLibrary': '0',
764 'BufferSecurityCheck': 'false',
765 },
766 'VCLinkerTool': {
767 'EnableCOMDATFolding': '1',
768 'LinkIncremental': '1',
769 },
770 },
771 },
772 #
773 # Concrete configurations
774 #
775 'Debug': {
776 'inherit_from': ['Common_Base', 'x86_Base', 'Debug_Base'],
777 },
778 'Release': {
779 'inherit_from': ['Common_Base', 'x86_Base', 'Release_Base'],
780 'conditions': [
781 ['msvs_use_common_release', {
[email protected]1f9471a2010-01-04 06:40:16782 'includes': ['release.gypi'],
[email protected]5153767c2009-12-22 01:52:50783 }],
784 ]
785 },
[email protected]f926fa0a2009-08-04 22:50:13786 'conditions': [
787 [ 'OS=="win"', {
788 # TODO(bradnelson): add a gyp mechanism to make this more graceful.
789 'Purify': {
[email protected]5153767c2009-12-22 01:52:50790 'inherit_from': ['Common_Base', 'x86_Base', 'Release_Base', 'Purify'],
[email protected]ef4fa4072009-12-04 22:46:50791 },
792 'Debug_x64': {
[email protected]5153767c2009-12-22 01:52:50793 'inherit_from': ['Common_Base', 'x64_Base', 'Debug_Base'],
[email protected]78263c12009-11-01 23:45:30794 },
795 'Release_x64': {
[email protected]5153767c2009-12-22 01:52:50796 'inherit_from': ['Common_Base', 'x64_Base', 'Release_Base'],
[email protected]78263c12009-11-01 23:45:30797 },
798 'Purify_x64': {
[email protected]1f9471a2010-01-04 06:40:16799 'inherit_from': ['Common_Base', 'x64_Base', 'Release_Base', 'Purify_Base'],
[email protected]78263c12009-11-01 23:45:30800 },
[email protected]f926fa0a2009-08-04 22:50:13801 }],
802 ],
[email protected]2f80c312009-02-25 21:26:55803 },
804 },
805 'conditions': [
[email protected]93f21e42010-04-01 00:35:15806 ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris"', {
[email protected]9d384032009-03-20 23:13:26807 'target_defaults': {
[email protected]5315f2842009-04-28 00:43:27808 # Enable -Werror by default, but put it in a variable so it can
809 # be disabled in ~/.gyp/include.gypi on the valgrind builders.
810 'variables': {
[email protected]ecf52cb82010-01-13 19:25:42811 # Use -fno-strict-aliasing by default since gcc 4.4 has periodic
812 # issues that slip through the cracks. We could do this just for
813 # gcc 4.4 but it makes more sense to be consistent on all
814 # compilers in use. TODO(Craig): turn this off again when
815 # there is some 4.4 test infrastructure in place and existing
816 # aliasing issues have been fixed.
817 'no_strict_aliasing%': 1,
[email protected]47deeb62009-12-17 14:49:39818 'conditions': [['OS=="linux"', {'werror%': '-Werror',}],
819 ['OS=="freebsd"', {'werror%': '',}],
820 ['OS=="openbsd"', {'werror%': '',}],
821 ],
[email protected]5315f2842009-04-28 00:43:27822 },
[email protected]9d384032009-03-20 23:13:26823 'cflags': [
[email protected]1bba09c2009-08-13 12:53:16824 '<(werror)', # See note above about the werror variable.
825 '-pthread',
826 '-fno-exceptions',
827 '-Wall',
[email protected]0fa17082010-03-26 00:48:05828 # TODO(evan): turn this back on once all the builds work.
829 # '-Wextra',
[email protected]225c8f52010-02-05 22:23:20830 # Don't warn about unused function params. We use those everywhere.
831 '-Wno-unused-parameter',
832 # Don't warn about the "struct foo f = {0};" initialization pattern.
833 '-Wno-missing-field-initializers',
[email protected]1bba09c2009-08-13 12:53:16834 '-D_FILE_OFFSET_BITS=64',
[email protected]3df6e3a2010-01-21 20:23:12835 # Don't export any symbols (for example, to plugins we dlopen()).
836 # Note: this is *required* to make some plugins work.
837 '-fvisibility=hidden',
[email protected]8a2fcba2009-07-29 00:52:24838 ],
839 'cflags_cc': [
[email protected]832d0212009-10-28 19:12:22840 '-fno-rtti',
[email protected]8a2fcba2009-07-29 00:52:24841 '-fno-threadsafe-statics',
[email protected]f5986c42009-11-17 18:39:36842 # Make inline functions have hidden visiblity by default.
843 # Surprisingly, not covered by -fvisibility=hidden.
844 '-fvisibility-inlines-hidden',
[email protected]9d384032009-03-20 23:13:26845 ],
[email protected]a6cf87e2009-04-03 04:07:38846 'ldflags': [
[email protected]138241f2010-03-30 23:53:10847 '-pthread', '-Wl,-z,noexecstack',
[email protected]9d384032009-03-20 23:13:26848 ],
[email protected]b5e46b92009-03-26 18:58:10849 'scons_variable_settings': {
850 'LIBPATH': ['$LIB_DIR'],
[email protected]9d384032009-03-20 23:13:26851 # Linking of large files uses lots of RAM, so serialize links
852 # using the handy flock command from util-linux.
[email protected]c13fcbd2009-03-27 04:27:01853 'FLOCK_LINK': ['flock', '$TOP_BUILDDIR/linker.lock', '$LINK'],
[email protected]789fbb7c2009-04-02 16:20:31854 'FLOCK_SHLINK': ['flock', '$TOP_BUILDDIR/linker.lock', '$SHLINK'],
855 'FLOCK_LDMODULE': ['flock', '$TOP_BUILDDIR/linker.lock', '$LDMODULE'],
[email protected]9d384032009-03-20 23:13:26856
857 # We have several cases where archives depend on each other in
858 # a cyclic fashion. Since the GNU linker does only a single
859 # pass over the archives we surround the libraries with
860 # --start-group and --end-group (aka -( and -) ). That causes
861 # ld to loop over the group until no more undefined symbols
862 # are found. In an ideal world we would only make groups from
863 # those libraries which we knew to be in cycles. However,
864 # that's tough with SCons, so we bodge it by making all the
865 # archives a group by redefining the linking command here.
866 #
867 # TODO: investigate whether we still have cycles that
868 # require --{start,end}-group. There has been a lot of
869 # refactoring since this was first coded, which might have
870 # eliminated the circular dependencies.
[email protected]12862922009-04-20 21:36:41871 #
872 # Note: $_LIBDIRFLAGS comes before ${LINK,SHLINK,LDMODULE}FLAGS
873 # so that we prefer our own built libraries (e.g. -lpng) to
874 # system versions of libraries that pkg-config might turn up.
875 # TODO(sgk): investigate handling this not by re-ordering the
876 # flags this way, but by adding a hook to use the SCons
877 # ParseFlags() option on the output from pkg-config.
[email protected]610d8cc2009-09-19 00:47:04878 'LINKCOM': [['$FLOCK_LINK', '-o', '$TARGET',
879 '$_LIBDIRFLAGS', '$LINKFLAGS', '$SOURCES',
880 '-Wl,--start-group', '$_LIBFLAGS', '-Wl,--end-group']],
881 'SHLINKCOM': [['$FLOCK_SHLINK', '-o', '$TARGET',
882 '$_LIBDIRFLAGS', '$SHLINKFLAGS', '$SOURCES',
883 '-Wl,--start-group', '$_LIBFLAGS', '-Wl,--end-group']],
884 'LDMODULECOM': [['$FLOCK_LDMODULE', '-o', '$TARGET',
885 '$_LIBDIRFLAGS', '$LDMODULEFLAGS', '$SOURCES',
886 '-Wl,--start-group', '$_LIBFLAGS', '-Wl,--end-group']],
[email protected]9d384032009-03-20 23:13:26887 'IMPLICIT_COMMAND_DEPENDENCIES': 0,
[email protected]d0644282009-04-22 00:20:29888 # -rpath is only used when building with shared libraries.
889 'conditions': [
890 [ 'library=="shared_library"', {
891 'RPATH': '$LIB_DIR',
892 }],
893 ],
[email protected]9d384032009-03-20 23:13:26894 },
[email protected]b5e46b92009-03-26 18:58:10895 'scons_import_variables': [
[email protected]52049d5c2009-05-01 20:32:49896 'AS',
[email protected]b5e46b92009-03-26 18:58:10897 'CC',
898 'CXX',
899 'LINK',
900 ],
901 'scons_propagate_variables': [
[email protected]52049d5c2009-05-01 20:32:49902 'AS',
[email protected]b5e46b92009-03-26 18:58:10903 'CC',
904 'CCACHE_DIR',
905 'CXX',
906 'DISTCC_DIR',
907 'DISTCC_HOSTS',
908 'HOME',
[email protected]5ae4f55e2009-04-13 23:19:47909 'INCLUDE_SERVER_ARGS',
910 'INCLUDE_SERVER_PORT',
[email protected]b5e46b92009-03-26 18:58:10911 'LINK',
[email protected]fff920a2009-05-08 22:35:32912 'CHROME_BUILD_TYPE',
913 'CHROMIUM_BUILD',
914 'OFFICIAL_BUILD',
[email protected]b5e46b92009-03-26 18:58:10915 ],
[email protected]3aacaf952009-04-02 15:34:09916 'configurations': {
[email protected]5153767c2009-12-22 01:52:50917 'Debug_Base': {
[email protected]c5bdc032009-04-20 19:11:31918 'variables': {
919 'debug_optimize%': '0',
920 },
[email protected]3aacaf952009-04-02 15:34:09921 'defines': [
922 '_DEBUG',
923 ],
924 'cflags': [
[email protected]22898f62009-10-26 22:14:01925 '-O>(debug_optimize)',
[email protected]3aacaf952009-04-02 15:34:09926 '-g',
927 ],
[email protected]5315f2842009-04-28 00:43:27928 },
[email protected]5153767c2009-12-22 01:52:50929 'Release_Base': {
[email protected]740e2de2009-07-21 11:41:01930 'variables': {
931 'release_optimize%': '2',
[email protected]1dd529642010-05-15 01:02:51932 # Binaries become big and gold is unable to perform GC
933 # and remove unused sections for some of test targets
934 # on 32 bit platform.
935 # (This is currently observed only in chromeos valgrind bots)
936 # The following flag is to disable --gc-sections linker
937 # option for these bots.
938 'no_gc_sections%': 0,
[email protected]740e2de2009-07-21 11:41:01939 },
[email protected]3aacaf952009-04-02 15:34:09940 'cflags': [
[email protected]22898f62009-10-26 22:14:01941 '-O>(release_optimize)',
[email protected]d8cc3a62009-04-08 18:29:53942 # Don't emit the GCC version ident directives, they just end up
943 # in the .comment section taking up binary size.
944 '-fno-ident',
945 # Put data and code in their own sections, so that unused symbols
946 # can be removed at link time with --gc-sections.
947 '-fdata-sections',
948 '-ffunction-sections',
[email protected]3aacaf952009-04-02 15:34:09949 ],
[email protected]c902f2c2010-08-06 20:04:18950 'ldflags': [
951 # Specifically tell the linker to perform optimizations.
952 # See http://lwn.net/Articles/192624/ .
953 '-Wl,-O1',
[email protected]27c2e492010-08-06 22:55:22954 '-Wl,--as-needed',
[email protected]c902f2c2010-08-06 20:04:18955 ],
[email protected]1dd529642010-05-15 01:02:51956 'conditions' : [
957 ['no_gc_sections==0', {
958 'ldflags': [
959 '-Wl,--gc-sections',
960 ],
961 }],
962 ]
[email protected]3aacaf952009-04-02 15:34:09963 },
964 },
[email protected]601b540222009-04-03 21:32:04965 'variants': {
966 'coverage': {
967 'cflags': ['-fprofile-arcs', '-ftest-coverage'],
968 'ldflags': ['-fprofile-arcs'],
969 },
970 'profile': {
971 'cflags': ['-pg', '-g'],
972 'ldflags': ['-pg'],
973 },
974 'symbols': {
975 'cflags': ['-g'],
976 },
977 },
[email protected]606116d22009-05-06 22:38:23978 'conditions': [
[email protected]7e8eb7612009-07-29 15:56:00979 [ 'target_arch=="ia32"', {
[email protected]606116d22009-05-06 22:38:23980 'asflags': [
981 # Needed so that libs with .s files (e.g. libicudata.a)
982 # are compatible with the general 32-bit-ness.
983 '-32',
984 ],
985 # All floating-point computations on x87 happens in 80-bit
986 # precision. Because the C and C++ language standards allow
987 # the compiler to keep the floating-point values in higher
988 # precision than what's specified in the source and doing so
989 # is more efficient than constantly rounding up to 64-bit or
990 # 32-bit precision as specified in the source, the compiler,
991 # especially in the optimized mode, tries very hard to keep
992 # values in x87 floating-point stack (in 80-bit precision)
993 # as long as possible. This has important side effects, that
994 # the real value used in computation may change depending on
995 # how the compiler did the optimization - that is, the value
996 # kept in 80-bit is different than the value rounded down to
997 # 64-bit or 32-bit. There are possible compiler options to make
998 # this behavior consistent (e.g. -ffloat-store would keep all
999 # floating-values in the memory, thus force them to be rounded
1000 # to its original precision) but they have significant runtime
1001 # performance penalty.
1002 #
1003 # -mfpmath=sse -msse2 makes the compiler use SSE instructions
1004 # which keep floating-point values in SSE registers in its
1005 # native precision (32-bit for single precision, and 64-bit for
1006 # double precision values). This means the floating-point value
1007 # used during computation does not change depending on how the
1008 # compiler optimized the code, since the value is always kept
1009 # in its specified precision.
[email protected]ffde7932009-05-29 00:39:061010 'conditions': [
[email protected]ac120ff2010-04-28 02:14:221011 ['branding=="Chromium" and disable_sse2==0', {
[email protected]ffde7932009-05-29 00:39:061012 'cflags': [
1013 '-march=pentium4',
1014 '-msse2',
1015 '-mfpmath=sse',
1016 ],
1017 }],
[email protected]06c756182010-04-27 18:31:311018 # ChromeOS targets Pinetrail, which is sse3, but most of the
[email protected]0183dbb2010-04-16 02:00:441019 # benefit comes from sse2 so this setting allows ChromeOS
1020 # to build on other CPUs. In the future -march=atom would help
1021 # but requires a newer compiler.
[email protected]ac120ff2010-04-28 02:14:221022 ['chromeos==1 and disable_sse2==0', {
[email protected]0183dbb2010-04-16 02:00:441023 'cflags': [
1024 '-msse2',
1025 ],
1026 }],
[email protected]34799f9d2010-07-08 17:51:331027 # Install packages have started cropping up with
1028 # different headers between the 32-bit and 64-bit
1029 # versions, so we have to shadow those differences off
1030 # and make sure a 32-bit-on-64-bit build picks up the
1031 # right files.
1032 ['host_arch!="ia32"', {
1033 'include_dirs+': [
1034 '/usr/include32',
1035 ],
1036 }],
[email protected]ffde7932009-05-29 00:39:061037 ],
[email protected]dc259ce52010-04-13 04:03:101038 # -mmmx allows mmintrin.h to be used for mmx intrinsics.
1039 # video playback is mmx and sse2 optimized.
[email protected]606116d22009-05-06 22:38:231040 'cflags': [
1041 '-m32',
[email protected]dc259ce52010-04-13 04:03:101042 '-mmmx',
[email protected]1c6560af2009-07-14 11:02:161043 ],
[email protected]606116d22009-05-06 22:38:231044 'ldflags': [
1045 '-m32',
1046 ],
1047 }],
[email protected]3dda8a962009-08-10 18:58:071048 ['target_arch=="arm"', {
[email protected]77c1b29392009-12-04 06:21:291049 'target_conditions': [
1050 ['_toolset=="target"', {
1051 'cflags_cc': [
1052 # The codesourcery arm-2009q3 toolchain warns at that the ABI
1053 # has changed whenever it encounters a varargs function. This
1054 # silences those warnings, as they are not helpful and
1055 # clutter legitimate warnings.
1056 '-Wno-abi',
1057 ],
1058 'conditions': [
1059 ['arm_thumb == 1', {
1060 'cflags': [
1061 '-mthumb',
1062 # TODO(piman): -Wa,-mimplicit-it=thumb is needed for
1063 # inline assembly that uses condition codes but it's
1064 # suboptimal. Better would be to #ifdef __thumb__ at the
1065 # right place and have a separate thumb path.
1066 '-Wa,-mimplicit-it=thumb',
1067 ]
1068 }],
1069 ['armv7==1', {
[email protected]dc9711f2009-11-13 19:30:251070 'cflags': [
1071 '-march=armv7-a',
1072 '-mtune=cortex-a8',
[email protected]dc9711f2009-11-13 19:30:251073 '-mfloat-abi=softfp',
1074 ],
[email protected]eafc0b452010-02-26 21:53:431075 'conditions': [
1076 ['arm_neon==1', {
1077 'cflags': [ '-mfpu=neon', ],
1078 }, {
[email protected]53e0f642010-03-05 01:41:561079 'cflags': [ '-mfpu=<(arm_fpu)', ],
[email protected]eafc0b452010-02-26 21:53:431080 }]
1081 ],
[email protected]dc9711f2009-11-13 19:30:251082 }],
[email protected]3dda8a962009-08-10 18:58:071083 ],
1084 }],
1085 ],
1086 }],
[email protected]2fb843b2010-08-12 02:11:081087 ['linux_fpic==1', {
[email protected]c76723a2010-01-25 23:10:581088 'cflags': [
1089 '-fPIC',
1090 ],
1091 }],
[email protected]ee28c9f2009-09-04 01:53:011092 ['sysroot!=""', {
[email protected]fd36ce822009-10-28 20:13:571093 'target_conditions': [
1094 ['_toolset=="target"', {
1095 'cflags': [
1096 '--sysroot=<(sysroot)',
1097 ],
1098 'ldflags': [
1099 '--sysroot=<(sysroot)',
1100 ],
1101 }]]
[email protected]ee28c9f2009-09-04 01:53:011102 }],
[email protected]cc4219a2009-08-14 05:30:521103 ['no_strict_aliasing==1', {
1104 'cflags': [
1105 '-fno-strict-aliasing',
1106 ],
1107 }],
[email protected]cbd5fd52009-08-26 00:14:271108 ['linux_breakpad==1', {
[email protected]c87efd42010-08-26 18:28:171109 'cflags': [ '-g' ],
[email protected]cbd5fd52009-08-26 00:14:271110 'defines': ['USE_LINUX_BREAKPAD'],
1111 }],
[email protected]39c4e1a82010-03-30 19:47:411112 ['linux_use_seccomp_sandbox==1 and buildtype!="Official"', {
1113 'defines': ['USE_SECCOMP_SANDBOX'],
1114 }],
[email protected]7cd2afd2009-10-27 21:40:261115 ['library=="shared_library"', {
1116 # When building with shared libraries, remove the visiblity-hiding
1117 # flag.
1118 'cflags!': [ '-fvisibility=hidden' ],
[email protected]2fb843b2010-08-12 02:11:081119 'conditions': [
1120 ['target_arch=="x64" or target_arch=="arm"', {
1121 # Shared libraries need -fPIC on x86-64 and arm
1122 'cflags': ['-fPIC']
1123 }]
1124 ],
[email protected]7cd2afd2009-10-27 21:40:261125 }],
[email protected]d8b60602010-03-26 09:41:221126 ['linux_use_heapchecker==1', {
1127 'variables': {'linux_use_tcmalloc%': 1},
1128 }],
[email protected]61a9b2d82010-02-26 00:31:081129 ['linux_use_tcmalloc==0', {
1130 'defines': ['NO_TCMALLOC'],
[email protected]01699e22009-11-11 19:24:241131 }],
[email protected]d8b60602010-03-26 09:41:221132 ['linux_use_heapchecker==0', {
1133 'defines': ['NO_HEAPCHECKER'],
1134 }],
[email protected]64e2d4a42010-08-27 10:13:211135 ['linux_keep_shadow_stacks==1', {
1136 'defines': ['KEEP_SHADOW_STACKS'],
1137 'cflags': ['-finstrument-functions'],
1138 }],
[email protected]606116d22009-05-06 22:38:231139 ],
[email protected]9d384032009-03-20 23:13:261140 },
1141 }],
[email protected]c51e8d52009-12-11 20:04:061142 # FreeBSD-specific options; note that most FreeBSD options are set above,
1143 # with Linux.
1144 ['OS=="freebsd"', {
1145 'target_defaults': {
1146 'ldflags': [
1147 '-Wl,--no-keep-memory',
1148 ],
1149 },
1150 }],
[email protected]93f21e42010-04-01 00:35:151151 ['OS=="solaris"', {
1152 'cflags!': ['-fvisibility=hidden'],
1153 'cflags_cc!': ['-fvisibility-inlines-hidden'],
1154 }],
[email protected]2f80c312009-02-25 21:26:551155 ['OS=="mac"', {
1156 'target_defaults': {
[email protected]24700642009-06-01 16:01:201157 'variables': {
[email protected]9a5e72862010-09-02 16:16:581158 # These should be 'mac_real_dsym%' and 'mac_strip%', but there
1159 # seems to be a bug with % in variables that are intended to be
1160 # set to different values in different targets, like these two.
1161 'mac_strip': 1, # Strip debugging symbols from the target.
[email protected]24700642009-06-01 16:01:201162 'mac_real_dsym': 0, # Fake .dSYMs are fine in most cases.
1163 },
[email protected]d92c7c012009-03-19 19:26:421164 'mac_bundle': 0,
[email protected]2f80c312009-02-25 21:26:551165 'xcode_settings': {
1166 'ALWAYS_SEARCH_USER_PATHS': 'NO',
[email protected]ab2956372009-08-13 18:11:041167 'GCC_C_LANGUAGE_STANDARD': 'c99', # -std=c99
1168 'GCC_CW_ASM_SYNTAX': 'NO', # No -fasm-blocks
1169 'GCC_DYNAMIC_NO_PIC': 'NO', # No -mdynamic-no-pic
1170 # (Equivalent to -fPIC)
1171 'GCC_ENABLE_CPP_EXCEPTIONS': 'NO', # -fno-exceptions
1172 'GCC_ENABLE_CPP_RTTI': 'NO', # -fno-rtti
1173 'GCC_ENABLE_PASCAL_STRINGS': 'NO', # No -mpascal-strings
[email protected]3224dcd2009-09-16 17:31:251174 # GCC_INLINES_ARE_PRIVATE_EXTERN maps to -fvisibility-inlines-hidden
1175 'GCC_INLINES_ARE_PRIVATE_EXTERN': 'YES',
[email protected]ab2956372009-08-13 18:11:041176 'GCC_OBJC_CALL_CXX_CDTORS': 'YES', # -fobjc-call-cxx-cdtors
1177 'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES', # -fvisibility=hidden
1178 'GCC_THREADSAFE_STATICS': 'NO', # -fno-threadsafe-statics
1179 'GCC_TREAT_WARNINGS_AS_ERRORS': 'YES', # -Werror
[email protected]2f80c312009-02-25 21:26:551180 'GCC_VERSION': '4.2',
[email protected]ab2956372009-08-13 18:11:041181 'GCC_WARN_ABOUT_MISSING_NEWLINE': 'YES', # -Wnewline-eof
[email protected]3224dcd2009-09-16 17:31:251182 # MACOSX_DEPLOYMENT_TARGET maps to -mmacosx-version-min
1183 'MACOSX_DEPLOYMENT_TARGET': '<(mac_deployment_target)',
[email protected]ab2956372009-08-13 18:11:041184 'PREBINDING': 'NO', # No -Wl,-prebind
[email protected]2f80c312009-02-25 21:26:551185 'USE_HEADERMAP': 'NO',
[email protected]080e86f2010-06-21 15:19:041186 'WARNING_CFLAGS': [
1187 '-Wall',
1188 '-Wendif-labels',
1189 '-Wextra',
1190 # Don't warn about unused function parameters.
1191 '-Wno-unused-parameter',
1192 # Don't warn about the "struct foo f = {0};" initialization
1193 # pattern.
1194 '-Wno-missing-field-initializers',
1195 ],
[email protected]b3fb8092009-03-12 19:09:241196 'conditions': [
1197 ['chromium_mac_pch', {'GCC_PRECOMPILE_PREFIX_HEADER': 'YES'},
[email protected]9543af052009-09-15 22:42:591198 {'GCC_PRECOMPILE_PREFIX_HEADER': 'NO'}
1199 ],
[email protected]b3fb8092009-03-12 19:09:241200 ],
[email protected]2f80c312009-02-25 21:26:551201 },
1202 'target_conditions': [
[email protected]2f80c312009-02-25 21:26:551203 ['_type!="static_library"', {
[email protected]5d7dc972009-04-16 15:30:461204 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-search_paths_first']},
1205 }],
1206 ['_mac_bundle', {
1207 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-ObjC']},
[email protected]87fde4a2009-02-28 00:50:081208 }],
[email protected]9a5e72862010-09-02 16:16:581209 ['(_type=="executable" or _type=="shared_library" or \
1210 _type=="loadable_module") and mac_strip!=0', {
[email protected]24700642009-06-01 16:01:201211 'target_conditions': [
1212 ['mac_real_dsym == 1', {
1213 # To get a real .dSYM bundle produced by dsymutil, set the
1214 # debug information format to dwarf-with-dsym. Since
1215 # strip_from_xcode will not be used, set Xcode to do the
1216 # stripping as well.
1217 'configurations': {
[email protected]5153767c2009-12-22 01:52:501218 'Release_Base': {
[email protected]24700642009-06-01 16:01:201219 'xcode_settings': {
1220 'DEBUG_INFORMATION_FORMAT': 'dwarf-with-dsym',
1221 'DEPLOYMENT_POSTPROCESSING': 'YES',
1222 'STRIP_INSTALLED_PRODUCT': 'YES',
[email protected]e14a9f92009-08-05 19:26:071223 'target_conditions': [
[email protected]c2111422010-06-01 18:30:251224 ['_type=="shared_library" or _type=="loadable_module"', {
[email protected]e14a9f92009-08-05 19:26:071225 # The Xcode default is to strip debugging symbols
1226 # only (-S). Local symbols should be stripped as
1227 # well, which will be handled by -x. Xcode will
1228 # continue to insert -S when stripping even when
1229 # additional flags are added with STRIPFLAGS.
1230 'STRIPFLAGS': '-x',
[email protected]c2111422010-06-01 18:30:251231 }], # _type=="shared_library" or _type=="loadable_module"'
[email protected]e14a9f92009-08-05 19:26:071232 ], # target_conditions
1233 }, # xcode_settings
1234 }, # configuration "Release"
1235 }, # configurations
[email protected]24700642009-06-01 16:01:201236 }, { # mac_real_dsym != 1
1237 # To get a fast fake .dSYM bundle, use a post-build step to
1238 # produce the .dSYM and strip the executable. strip_from_xcode
1239 # only operates in the Release configuration.
1240 'postbuilds': [
1241 {
1242 'variables': {
1243 # Define strip_from_xcode in a variable ending in _path
1244 # so that gyp understands it's a path and performs proper
1245 # relativization during dict merging.
1246 'strip_from_xcode_path': 'mac/strip_from_xcode',
1247 },
1248 'postbuild_name': 'Strip If Needed',
1249 'action': ['<(strip_from_xcode_path)'],
1250 },
[email protected]e14a9f92009-08-05 19:26:071251 ], # postbuilds
1252 }], # mac_real_dsym
1253 ], # target_conditions
[email protected]9a5e72862010-09-02 16:16:581254 }], # (_type=="executable" or _type=="shared_library" or
1255 # _type=="loadable_module") and mac_strip!=0
[email protected]e14a9f92009-08-05 19:26:071256 ], # target_conditions
1257 }, # target_defaults
1258 }], # OS=="mac"
[email protected]2f80c312009-02-25 21:26:551259 ['OS=="win"', {
1260 'target_defaults': {
1261 'defines': [
1262 '_WIN32_WINNT=0x0600',
1263 'WINVER=0x0600',
1264 'WIN32',
1265 '_WINDOWS',
[email protected]2f80c312009-02-25 21:26:551266 'NOMINMAX',
1267 '_CRT_RAND_S',
1268 'CERT_CHAIN_PARA_HAS_EXTRA_FIELDS',
1269 'WIN32_LEAN_AND_MEAN',
1270 '_SECURE_ATL',
[email protected]7a812dd62010-06-30 18:52:271271 '_ATL_NO_OPENGL',
[email protected]adfb98c2009-06-23 20:08:451272 '_HAS_TR1=0',
[email protected]2f80c312009-02-25 21:26:551273 ],
[email protected]8974e042010-06-21 18:06:521274 'conditions': [
1275 ['component=="static_library"', {
1276 'defines': [
1277 '_HAS_EXCEPTIONS=0',
1278 ],
1279 }],
1280 ],
[email protected]5b5ca7cb2009-07-20 23:00:201281 'msvs_system_include_dirs': [
[email protected]998b5152009-12-12 22:19:521282 '<(DEPTH)/third_party/platformsdk_win7/files/Include',
[email protected]a78da50e2010-06-09 21:31:371283 '<(DEPTH)/third_party/directxsdk/files/Include',
[email protected]2f80c312009-02-25 21:26:551284 '$(VSInstallDir)/VC/atlmfc/include',
1285 ],
[email protected]a8d99cef2009-08-26 20:47:491286 'msvs_cygwin_dirs': ['<(DEPTH)/third_party/cygwin'],
[email protected]365632b2010-06-22 02:01:571287 'msvs_disabled_warnings': [4351, 4396, 4503, 4819],
[email protected]2f80c312009-02-25 21:26:551288 'msvs_settings': {
1289 'VCCLCompilerTool': {
1290 'MinimalRebuild': 'false',
[email protected]2f80c312009-02-25 21:26:551291 'BufferSecurityCheck': 'true',
1292 'EnableFunctionLevelLinking': 'true',
1293 'RuntimeTypeInfo': 'false',
1294 'WarningLevel': '3',
1295 'WarnAsError': 'true',
1296 'DebugInformationFormat': '3',
[email protected]3fef6e62009-07-31 19:58:581297 'conditions': [
[email protected]912c55c2009-07-31 23:33:551298 [ 'msvs_multi_core_compile', {
[email protected]1f9471a2010-01-04 06:40:161299 'AdditionalOptions': ['/MP'],
[email protected]912c55c2009-07-31 23:33:551300 }],
[email protected]8974e042010-06-21 18:06:521301 ['component=="shared_library"', {
1302 'ExceptionHandling': '1', # /EHsc
1303 }, {
1304 'ExceptionHandling': '0',
1305 }],
[email protected]3fef6e62009-07-31 19:58:581306 ],
[email protected]2f80c312009-02-25 21:26:551307 },
1308 'VCLibrarianTool': {
[email protected]1f9471a2010-01-04 06:40:161309 'AdditionalOptions': ['/ignore:4221'],
[email protected]a78da50e2010-06-09 21:31:371310 'AdditionalLibraryDirectories': [
1311 '<(DEPTH)/third_party/platformsdk_win7/files/Lib',
1312 '<(DEPTH)/third_party/directxsdk/files/Lib/x86',
1313 ],
[email protected]2f80c312009-02-25 21:26:551314 },
1315 'VCLinkerTool': {
[email protected]2f80c312009-02-25 21:26:551316 'AdditionalDependencies': [
1317 'wininet.lib',
1318 'version.lib',
1319 'msimg32.lib',
1320 'ws2_32.lib',
1321 'usp10.lib',
1322 'psapi.lib',
[email protected]96fd0032009-04-24 00:13:081323 'dbghelp.lib',
[email protected]2f80c312009-02-25 21:26:551324 ],
[email protected]a78da50e2010-06-09 21:31:371325 'AdditionalLibraryDirectories': [
1326 '<(DEPTH)/third_party/platformsdk_win7/files/Lib',
1327 '<(DEPTH)/third_party/directxsdk/files/Lib/x86',
1328 ],
[email protected]2f80c312009-02-25 21:26:551329 'GenerateDebugInformation': 'true',
1330 'MapFileName': '$(OutDir)\\$(TargetName).map',
1331 'ImportLibrary': '$(OutDir)\\lib\\$(TargetName).lib',
[email protected]2f80c312009-02-25 21:26:551332 'FixedBaseAddress': '1',
[email protected]825ff8d2009-05-22 01:40:481333 # SubSystem values:
1334 # 0 == not set
1335 # 1 == /SUBSYSTEM:CONSOLE
1336 # 2 == /SUBSYSTEM:WINDOWS
1337 # Most of the executables we'll ever create are tests
1338 # and utilities with console output.
1339 'SubSystem': '1',
[email protected]2f80c312009-02-25 21:26:551340 },
1341 'VCMIDLTool': {
1342 'GenerateStublessProxies': 'true',
1343 'TypeLibraryName': '$(InputName).tlb',
1344 'OutputDirectory': '$(IntDir)',
1345 'HeaderFileName': '$(InputName).h',
1346 'DLLDataFileName': 'dlldata.c',
1347 'InterfaceIdentifierFileName': '$(InputName)_i.c',
1348 'ProxyFileName': '$(InputName)_p.c',
1349 },
1350 'VCResourceCompilerTool': {
1351 'Culture' : '1033',
[email protected]4d91cbc2010-05-07 20:41:381352 'AdditionalIncludeDirectories': [
1353 '<(DEPTH)',
1354 '<(SHARED_INTERMEDIATE_DIR)',
1355 ],
[email protected]2f80c312009-02-25 21:26:551356 },
1357 },
1358 },
1359 }],
[email protected]93f21e42010-04-01 00:35:151360 ['disable_nacl==1 or OS=="freebsd" or OS=="openbsd" or OS=="solaris"', {
[email protected]d8c7cbcc2009-10-02 19:00:311361 'target_defaults': {
1362 'defines': [
1363 'DISABLE_NACL',
1364 ],
1365 },
1366 }],
[email protected]cfbf9bc2009-12-07 22:07:561367 ['OS=="win" and msvs_use_common_linker_extras', {
[email protected]48c7af72009-07-03 22:00:191368 'target_defaults': {
1369 'msvs_settings': {
1370 'VCLinkerTool': {
[email protected]48c7af72009-07-03 22:00:191371 'DelayLoadDLLs': [
1372 'dbghelp.dll',
1373 'dwmapi.dll',
1374 'uxtheme.dll',
1375 ],
1376 },
1377 },
[email protected]ef4fa4072009-12-04 22:46:501378 'configurations': {
[email protected]5153767c2009-12-22 01:52:501379 'x86_Base': {
[email protected]ef4fa4072009-12-04 22:46:501380 'msvs_settings': {
1381 'VCLinkerTool': {
[email protected]1f9471a2010-01-04 06:40:161382 'AdditionalOptions': [
1383 '/safeseh',
1384 '/dynamicbase',
1385 '/ignore:4199',
1386 '/ignore:4221',
1387 '/nxcompat',
1388 ],
[email protected]ef4fa4072009-12-04 22:46:501389 },
1390 },
1391 },
[email protected]5153767c2009-12-22 01:52:501392 'x64_Base': {
[email protected]ef4fa4072009-12-04 22:46:501393 'msvs_settings': {
1394 'VCLinkerTool': {
[email protected]1f9471a2010-01-04 06:40:161395 'AdditionalOptions': [
[email protected]ef4fa4072009-12-04 22:46:501396 # safeseh is not compatible with x64
[email protected]1f9471a2010-01-04 06:40:161397 '/dynamicbase',
1398 '/ignore:4199',
1399 '/ignore:4221',
1400 '/nxcompat',
1401 ],
[email protected]ef4fa4072009-12-04 22:46:501402 },
1403 },
1404 },
1405 },
[email protected]48c7af72009-07-03 22:00:191406 },
1407 }],
[email protected]9821d0d2010-04-16 22:40:371408 ['enable_new_npdevice_api==1', {
1409 'target_defaults': {
1410 'defines': [
1411 'ENABLE_NEW_NPDEVICE_API',
1412 ],
1413 },
1414 }],
[email protected]2f80c312009-02-25 21:26:551415 ],
[email protected]c13fcbd2009-03-27 04:27:011416 'scons_settings': {
1417 'sconsbuild_dir': '<(DEPTH)/sconsbuild',
[email protected]a8b56d92009-08-10 04:09:071418 'tools': ['ar', 'as', 'gcc', 'g++', 'gnulink', 'chromium_builders'],
[email protected]c13fcbd2009-03-27 04:27:011419 },
[email protected]2f80c312009-02-25 21:26:551420 'xcode_settings': {
[email protected]0c8ab452009-11-06 21:57:501421 # DON'T ADD ANYTHING NEW TO THIS BLOCK UNLESS YOU REALLY REALLY NEED IT!
1422 # This block adds *project-wide* configuration settings to each project
1423 # file. It's almost always wrong to put things here. Specify your
1424 # custom xcode_settings in target_defaults to add them to targets instead.
1425
1426 # In an Xcode Project Info window, the "Base SDK for All Configurations"
1427 # setting sets the SDK on a project-wide basis. In order to get the
1428 # configured SDK to show properly in the Xcode UI, SDKROOT must be set
1429 # here at the project level.
1430 'SDKROOT': 'macosx<(mac_sdk)', # -isysroot
1431
[email protected]2f80c312009-02-25 21:26:551432 # The Xcode generator will look for an xcode_settings section at the root
1433 # of each dict and use it to apply settings on a file-wide basis. Most
1434 # settings should not be here, they should be in target-specific
1435 # xcode_settings sections, or better yet, should use non-Xcode-specific
1436 # settings in target dicts. SYMROOT is a special case, because many other
1437 # Xcode variables depend on it, including variables such as
1438 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something
1439 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the
1440 # files to appear (when present) in the UI as actual files and not red
1441 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR,
1442 # and therefore SYMROOT, needs to be set at the project level.
[email protected]bfa24b962009-03-02 00:16:161443 'SYMROOT': '<(DEPTH)/xcodebuild',
[email protected]2f80c312009-02-25 21:26:551444 },
[email protected]ee28c9f2009-09-04 01:53:011445}
[email protected]f5c990c2009-10-06 03:02:381446
1447# Local Variables:
1448# tab-width:2
1449# indent-tabs-mode:nil
1450# End:
1451# vim: set expandtab tabstop=2 shiftwidth=2: