blob: 76af9cc3a66cdb5dc1434a5ba35991d4a43e68e1 [file] [log] [blame]
[email protected]2f80c312009-02-25 21:26:551# Copyright (c) 2009 The Chromium Authors. All rights reserved.
2# 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]b3fb8092009-03-12 19:09:2410 # .gyp files should set chromium_code to 1 if they build Chromium-specific
11 # code, as opposed to external code. This variable is used to control
12 # such things as the set of warnings to enable, and whether warnings are
13 # treated as errors.
[email protected]2f80c312009-02-25 21:26:5514 'chromium_code%': 0,
[email protected]b3fb8092009-03-12 19:09:2415
16 # Variables expected to be overriden on the GYP command line (-D) or by
17 # ~/.gyp/include.gypi.
18
[email protected]e14a9f92009-08-05 19:26:0719 # Putting a variables dict inside another variables dict looks kind of
20 # weird. This is done so that "branding" and "buildtype" are defined as
21 # variables within the outer variables dict here. This is necessary
22 # to get these variables defined for the conditions within this variables
23 # dict that operate on these variables.
24 'variables': {
25 # Override branding to select the desired branding flavor.
26 'branding%': 'Chromium',
27
28 # Override buildtype to select the desired build flavor.
29 # Dev - everyday build for development/testing
30 # Official - release build (generally implies additional processing)
31 # TODO(mmoss) Once 'buildtype' is fully supported (e.g. Windows gyp
32 # conversion is done), some of the things which are now controlled by
33 # 'branding', such as symbol generation, will need to be refactored based
34 # on 'buildtype' (i.e. we don't care about saving symbols for non-Official
35 # builds).
36 'buildtype%': 'Dev',
[email protected]cbd5fd52009-08-26 00:14:2737
[email protected]cf185b32010-01-12 04:29:5938 'variables': {
39 # Compute the architecture that we're building on.
40 'conditions': [
[email protected]65df0582010-01-23 02:37:5641 [ 'OS=="linux" or OS=="freebsd" or OS=="openbsd"', {
[email protected]cf185b32010-01-12 04:29:5942 # This handles the Linux platforms we generally deal with. Anything
43 # else gets passed through, which probably won't work very well; such
44 # hosts should pass an explicit target_arch to gyp.
45 'host_arch%':
46 '<!(uname -m | sed -e "s/i.86/ia32/;s/x86_64/x64/;s/amd64/x64/;s/arm.*/arm/")',
47 }, { # OS!="linux"
48 'host_arch%': 'ia32',
49 }],
50 ],
51 },
52 'host_arch%': '<(host_arch)',
53
54 # Default architecture we're building for is the architecture we're
55 # building on.
56 'target_arch%': '<(host_arch)',
[email protected]e0d00142009-09-18 22:10:2757
[email protected]cbd5fd52009-08-26 00:14:2758 # We do want to build Chromium with Breakpad support in certain
59 # situations. I.e. for Chrome bot.
60 'linux_chromium_breakpad%': 0,
[email protected]4c9cc6c2009-10-01 18:54:5761 # And if we want to dump symbols.
[email protected]05cb6962009-10-01 23:29:0362 'linux_chromium_dump_symbols%': 0,
63 # Also see linux_strip_binary below.
[email protected]c153e5352009-09-22 12:37:4464
65 # By default, Linux does not use views. To turn on views in Linux,
66 # set the variable GYP_DEFINES to "toolkit_views=1", or modify
67 # ~/.gyp/include.gypi .
68 'toolkit_views%': 0,
69
70 # Defaults to a desktop build, overridden via command line/env.
71 'chromeos%': 0,
[email protected]b2f030c2009-09-24 20:36:2172
73 # This variable tells WebCore.gyp and JavaScriptCore.gyp whether they are
74 # are built under a chromium full build (1) or a webkit.org chromium
75 # build (0).
76 'inside_chromium_build%': 1,
[email protected]9c1949e2009-10-02 19:59:5477
78 # Set to 1 to enable fast builds. It disables debug info for fastest
79 # compilation.
80 'fastbuild%': 0,
[email protected]e14a9f92009-08-05 19:26:0781 },
82
83 # Define branding and buildtype on the basis of their settings within the
84 # variables sub-dict above, unless overridden.
85 'branding%': '<(branding)',
86 'buildtype%': '<(buildtype)',
[email protected]e0d00142009-09-18 22:10:2787 'target_arch%': '<(target_arch)',
[email protected]cf185b32010-01-12 04:29:5988 'host_arch%': '<(host_arch)',
[email protected]c153e5352009-09-22 12:37:4489 'toolkit_views%': '<(toolkit_views)',
90 'chromeos%': '<(chromeos)',
[email protected]b2f030c2009-09-24 20:36:2191 'inside_chromium_build%': '<(inside_chromium_build)',
[email protected]9c1949e2009-10-02 19:59:5492 'fastbuild%': '<(fastbuild)',
[email protected]e14a9f92009-08-05 19:26:0793
[email protected]caa95c82009-11-23 22:39:3294 # The release channel that this build targets. This is used to restrict
95 # channel-specific build options, like which installer packages to create.
96 # The default is 'all', which does no channel-specific filtering.
97 'channel%': 'all',
98
[email protected]b3fb8092009-03-12 19:09:2499 # Override chromium_mac_pch and set it to 0 to suppress the use of
100 # precompiled headers on the Mac. Prefix header injection may still be
101 # used, but prefix headers will not be precompiled. This is useful when
102 # using distcc to distribute a build to compile slaves that don't
103 # share the same compiler executable as the system driving the compilation,
104 # because precompiled headers rely on pointers into a specific compiler
105 # executable's image. Setting this to 0 is needed to use an experimental
106 # Linux-Mac cross compiler distcc farm.
107 'chromium_mac_pch%': 1,
108
[email protected]3224dcd2009-09-16 17:31:25109 # Mac OS X SDK and deployment target support.
110 # The SDK identifies the version of the system headers that will be used,
111 # and corresponds to the MAC_OS_X_VERSION_MAX_ALLOWED compile-time macro.
112 # "Maximum allowed" refers to the operating system version whose APIs are
113 # available in the headers.
114 # The deployment target identifies the minimum system version that the
115 # built products are expected to function on. It corresponds to the
116 # MAC_OS_X_VERSION_MIN_REQUIRED compile-time macro.
117 # To ensure these macros are available, #include <AvailabilityMacros.h>.
118 # Additional documentation on these macros is available at
119 # http://developer.apple.com/mac/library/technotes/tn2002/tn2064.html#SECTION3
120 # Chrome normally builds with the Mac OS X 10.5 SDK and sets the
121 # deployment target to 10.5. Other projects, such as O3D, may override
122 # these defaults.
123 'mac_sdk%': '10.5',
124 'mac_deployment_target%': '10.5',
[email protected]9543af052009-09-15 22:42:59125
[email protected]f5ecbba12009-04-03 04:35:18126 # Set to 1 to enable code coverage. In addition to build changes
127 # (e.g. extra CFLAGS), also creates a new target in the src/chrome
128 # project file called "coverage".
129 # Currently ignored on Windows.
130 'coverage%': 0,
[email protected]653bd5f032009-04-08 12:55:49131
[email protected]c61f6432009-04-22 01:16:42132 # Overridable specification for potential use of alternative
133 # JavaScript engines.
134 'javascript_engine%': 'v8',
135
[email protected]7477ea6f2009-12-22 23:28:15136 # Although base/allocator lets you select a heap library via an
[email protected]7e0d664a2009-12-03 21:07:47137 # environment variable, the libcmt shim it uses sometimes gets in
138 # the way. To disable it entirely, and switch to normal msvcrt, do e.g.
139 # 'win_use_allocator_shim': 0,
140 # 'win_release_RuntimeLibrary': 2
141 # to ~/.gyp/include.gypi, gclient runhooks --force, and do a release build.
142 'win_use_allocator_shim%': 1, # 0 = shim allocator via libcmt; 1 = msvcrt
143
[email protected]653bd5f032009-04-08 12:55:49144 # To do a shared build on linux we need to be able to choose between type
145 # static_library and shared_library. We default to doing a static build
146 # but you can override this with "gyp -Dlibrary=shared_library" or you
147 # can add the following line (without the #) to ~/.gyp/include.gypi
148 # {'variables': {'library': 'shared_library'}}
149 # to compile as shared by default
150 'library%': 'static_library',
[email protected]279cd4212009-09-11 22:32:11151
[email protected]95ff8082009-11-13 22:21:01152 # Whether usage of OpenMAX is enabled.
153 'enable_openmax%': 0,
154
[email protected]e5b2eaa2009-04-14 01:39:12155 # TODO(bradnelson): eliminate this when possible.
156 # To allow local gyp files to prevent release.vsprops from being included.
157 # Yes(1) means include release.vsprops.
158 # Once all vsprops settings are migrated into gyp, this can go away.
159 'msvs_use_common_release%': 1,
[email protected]606116d22009-05-06 22:38:23160
[email protected]cbd5fd52009-08-26 00:14:27161 # TODO(bradnelson): eliminate this when possible.
162 # To allow local gyp files to override additional linker options for msvs.
163 # Yes(1) means set use the common linker options.
[email protected]48c7af72009-07-03 22:00:19164 'msvs_use_common_linker_extras%': 1,
165
[email protected]1ffb6502009-06-02 07:46:24166 # TODO(sgk): eliminate this if possible.
167 # It would be nicer to support this via a setting in 'target_defaults'
168 # in chrome/app/locales/locales.gypi overriding the setting in the
169 # 'Debug' configuration in the 'target_defaults' dict below,
170 # but that doesn't work as we'd like.
171 'msvs_debug_link_incremental%': '2',
172
[email protected]ee28c9f2009-09-04 01:53:01173 # The system root for cross-compiles. Default: none.
174 'sysroot%': '',
175
[email protected]573136142009-07-15 22:48:37176 # This is the location of the sandbox binary. Chrome looks for this before
177 # running the zygote process. If found, and SUID, it will be used to
178 # sandbox the zygote process and, thus, all renderer processes.
179 'linux_sandbox_path%': '',
180
[email protected]ad6d2c42009-09-15 20:13:38181 # Set this to true to enable SELinux support.
182 'selinux%': 0,
[email protected]4c9cc6c2009-10-01 18:54:57183
[email protected]05cb6962009-10-01 23:29:03184 # Strip the binary after dumping symbols.
185 'linux_strip_binary%': 0,
186
[email protected]01699e22009-11-11 19:24:24187 # Enable TCMalloc.
[email protected]6cf24362010-01-21 02:46:50188 'linux_use_tcmalloc%': 0,
[email protected]01699e22009-11-11 19:24:24189
[email protected]c76723a2010-01-25 23:10:58190 'linux_fpic%': 0,
191
[email protected]c153e5352009-09-22 12:37:44192 # Set to select the Title Case versions of strings in GRD files.
193 'use_titlecase_in_grd_files%': 0,
[email protected]ad6d2c42009-09-15 20:13:38194
[email protected]d8c7cbcc2009-10-02 19:00:31195 # Used to disable Native Client at compile time, for platforms where it
196 # isn't supported
197 'disable_nacl%': 0,
198
[email protected]3ed42e32009-10-07 00:10:46199 # Set ARM-v7 compilation flags
200 'armv7%': 0,
201
[email protected]77c1b29392009-12-04 06:21:29202 # Set Thumb compilation flags.
203 'arm_thumb%': 0,
204
[email protected]912c55c2009-07-31 23:33:55205 'conditions': [
[email protected]47deeb62009-12-17 14:49:39206 ['OS=="linux" or OS=="freebsd" or OS=="openbsd"', {
[email protected]242a9e62009-11-03 17:32:10207 # This will set gcc_version to XY if you are running gcc X.Y.*.
208 # This is used to tweak build flags for gcc 4.4.
209 'gcc_version%': '<!(python <(DEPTH)/build/compiler_version.py)',
[email protected]cbd5fd52009-08-26 00:14:27210 'conditions': [
211 ['branding=="Chrome" or linux_chromium_breakpad==1', {
212 'linux_breakpad%': 1,
213 }, {
214 'linux_breakpad%': 0,
215 }],
[email protected]4c9cc6c2009-10-01 18:54:57216 # All Chrome builds have breakpad symbols, but only process the
217 # symbols from official builds.
218 # TODO(mmoss) dump_syms segfaults on x64. Enable once dump_syms and
219 # crash server handle 64-bit symbols.
220 ['linux_chromium_dump_symbols==1 or '
221 '(branding=="Chrome" and buildtype=="Official" and '
222 'target_arch=="ia32")', {
223 'linux_dump_symbols%': 1,
224 }, {
225 'linux_dump_symbols%': 0,
226 }],
[email protected]d3a2cef2009-12-22 23:30:18227 ['toolkit_views==0 and chromeos==0', {
[email protected]c153e5352009-09-22 12:37:44228 # GTK wants Title Case strings
229 'use_titlecase_in_grd_files%': 1,
230 }],
[email protected]cbd5fd52009-08-26 00:14:27231 ],
[email protected]47deeb62009-12-17 14:49:39232 }], # OS=="linux" or OS=="freebsd" or OS=="openbsd"
[email protected]e14a9f92009-08-05 19:26:07233 ['OS=="mac"', {
[email protected]c153e5352009-09-22 12:37:44234 # Mac wants Title Case strings
235 'use_titlecase_in_grd_files%': 1,
[email protected]e14a9f92009-08-05 19:26:07236 'conditions': [
237 # mac_product_name is set to the name of the .app bundle as it should
238 # appear on disk. This duplicates data from
239 # chrome/app/theme/chromium/BRANDING and
240 # chrome/app/theme/google_chrome/BRANDING, but is necessary to get
241 # these names into the build system.
242 ['branding=="Chrome"', {
243 'mac_product_name%': 'Google Chrome',
244 }, { # else: branding!="Chrome"
245 'mac_product_name%': 'Chromium',
246 }],
247
248 # Feature variables for enabling Mac Breakpad and Keystone auto-update
249 # support. Both features are on by default in official builds with
250 # Chrome branding.
251 ['branding=="Chrome" and buildtype=="Official"', {
252 'mac_breakpad%': 1,
253 'mac_keystone%': 1,
254 }, { # else: branding!="Chrome" or buildtype!="Official"
255 'mac_breakpad%': 0,
256 'mac_keystone%': 0,
257 }],
258 ],
259 }], # OS=="mac"
[email protected]912c55c2009-07-31 23:33:55260 # Whether to use multiple cores to compile with visual studio. This is
261 # optional because it sometimes causes corruption on VS 2005.
262 # It is on by default on VS 2008 and off on VS 2005.
263 ['OS=="win"', {
264 'conditions': [
265 ['MSVS_VERSION=="2005"', {
[email protected]669795372009-08-14 17:51:13266 'msvs_multi_core_compile%': 0,
[email protected]912c55c2009-07-31 23:33:55267 },{
268 'msvs_multi_core_compile%': 1,
269 }],
[email protected]10bb8c92009-08-07 21:16:03270 # Don't do incremental linking for large modules on 32-bit.
271 ['MSVS_OS_BITS==32', {
272 'msvs_large_module_debug_link_mode%': '1', # No
273 },{
274 'msvs_large_module_debug_link_mode%': '2', # Yes
275 }],
[email protected]912c55c2009-07-31 23:33:55276 ],
[email protected]ef4fa4072009-12-04 22:46:50277 'nacl_win64_defines': [
278 # This flag is used to minimize dependencies when building
279 # Native Client loader for 64-bit Windows.
280 'NACL_WIN64',
281 ],
[email protected]912c55c2009-07-31 23:33:55282 }],
283 ],
[email protected]f703c4e2009-09-17 21:54:28284
285 # NOTE: When these end up in the Mac bundle, we need to replace '-' for '_'
286 # so Cocoa is happy (http://crbug.com/20441).
287 'locales': [
[email protected]af27c8c2009-11-04 20:36:50288 'am', 'ar', 'bg', 'bn', 'ca', 'cs', 'da', 'de', 'el', 'en-GB',
[email protected]f703c4e2009-09-17 21:54:28289 'en-US', 'es-419', 'es', 'et', 'fi', 'fil', 'fr', 'gu', 'he',
290 'hi', 'hr', 'hu', 'id', 'it', 'ja', 'kn', 'ko', 'lt', 'lv',
291 'ml', 'mr', 'nb', 'nl', 'or', 'pl', 'pt-BR', 'pt-PT', 'ro',
[email protected]af27c8c2009-11-04 20:36:50292 'ru', 'sk', 'sl', 'sr', 'sv', 'sw', 'ta', 'te', 'th', 'tr',
[email protected]f703c4e2009-09-17 21:54:28293 'uk', 'vi', 'zh-CN', 'zh-TW',
294 ],
[email protected]2f80c312009-02-25 21:26:55295 },
296 'target_defaults': {
[email protected]1c966092009-08-20 21:19:26297 'variables': {
[email protected]7e0d664a2009-12-03 21:07:47298 # See http://gcc.gnu.org/onlinedocs/gcc-4.4.2/gcc/Optimize-Options.html
[email protected]d5d593a2009-08-28 23:23:29299 'mac_release_optimization%': '3', # Use -O3 unless overridden
[email protected]ffd984b12009-09-11 19:37:00300 'mac_debug_optimization%': '0', # Use -O0 unless overridden
[email protected]7e0d664a2009-12-03 21:07:47301 # See http://msdn.microsoft.com/en-us/library/aa652360(VS.71).aspx
302 'win_release_Optimization%': '2', # 2 = /Os
303 'win_debug_Optimization%': '0', # 0 = /Od
304 # See http://msdn.microsoft.com/en-us/library/aa652367(VS.71).aspx
305 'win_release_RuntimeLibrary%': '0', # 0 = /MT (nondebug static)
306 'win_debug_RuntimeLibrary%': '1', # 1 = /MTd (debug static)
307
[email protected]ffd984b12009-09-11 19:37:00308 'release_extra_cflags%': '',
309 'debug_extra_cflags%': '',
[email protected]92822e82009-09-18 14:26:56310 'release_valgrind_build%': 0,
[email protected]1c966092009-08-20 21:19:26311 },
[email protected]32aa8cc2009-03-04 21:36:39312 'conditions': [
313 ['branding=="Chrome"', {
314 'defines': ['GOOGLE_CHROME_BUILD'],
315 }, { # else: branding!="Chrome"
316 'defines': ['CHROMIUM_BUILD'],
317 }],
[email protected]d3a2cef2009-12-22 23:30:18318 ['toolkit_views==1 or chromeos==1', {
[email protected]e6970232009-05-12 23:51:17319 'defines': ['TOOLKIT_VIEWS=1'],
320 }],
[email protected]fdc5bed2010-01-09 01:16:57321 ['chromeos==1', {
[email protected]16779842009-07-08 23:45:29322 'defines': ['OS_CHROMEOS=1'],
[email protected]2b883b92009-06-02 22:57:50323 }],
[email protected]9c1949e2009-10-02 19:59:54324 ['fastbuild!=0', {
325 'conditions': [
326 # Finally, for Windows, we simply turn on profiling.
327 ['OS=="win"', {
328 'msvs_settings': {
329 'VCLinkerTool': {
330 'GenerateDebugInformation': 'false',
331 },
332 'VCCLCompilerTool': {
333 'DebugInformationFormat': '0',
334 }
335 }
336 }], # OS==win
337 ], # conditions for fastbuild.
338 }], # fastbuild!=0
[email protected]ad6d2c42009-09-15 20:13:38339 ['selinux==1', {
340 'defines': ['CHROMIUM_SELINUX=1'],
341 }],
[email protected]7e0d664a2009-12-03 21:07:47342 ['win_use_allocator_shim==0', {
343 'conditions': [
344 ['OS=="win"', {
345 'defines': ['NO_TCMALLOC'],
346 }],
347 ],
348 }],
[email protected]be4f1882010-01-06 04:38:55349 ['OS=="win" or (OS=="linux" and target_arch!="arm")', {
[email protected]7477ea6f2009-12-22 23:28:15350 'defines': [
351 'ENABLE_GPU=1',
352 ],
353 }],
[email protected]f5ecbba12009-04-03 04:35:18354 ['coverage!=0', {
355 'conditions': [
356 ['OS=="mac"', {
357 'xcode_settings': {
[email protected]ab2956372009-08-13 18:11:04358 'GCC_INSTRUMENT_PROGRAM_FLOW_ARCS': 'YES', # -fprofile-arcs
359 'GCC_GENERATE_TEST_COVERAGE_FILES': 'YES', # -ftest-coverage
[email protected]5ae4f55e2009-04-13 23:19:47360 },
[email protected]e4fb84c2009-12-28 20:45:43361 # Add -lgcov for types executable, shared_library, and
362 # loadable_module; not for static_library.
363 # This is a delayed conditional.
[email protected]f5ecbba12009-04-03 04:35:18364 'target_conditions': [
[email protected]e4fb84c2009-12-28 20:45:43365 ['_type!="static_library"', {
[email protected]f5ecbba12009-04-03 04:35:18366 'xcode_settings': { 'OTHER_LDFLAGS': [ '-lgcov' ] },
[email protected]5ae4f55e2009-04-13 23:19:47367 }],
368 ],
369 }],
[email protected]7122ffd52009-04-30 23:19:00370 # Linux gyp (into scons) doesn't like target_conditions?
371 # TODO(???): track down why 'target_conditions' doesn't work
372 # on Linux gyp into scons like it does on Mac gyp into xcodeproj.
[email protected]f5ecbba12009-04-03 04:35:18373 ['OS=="linux"', {
374 'cflags': [ '-ftest-coverage',
375 '-fprofile-arcs' ],
[email protected]7122ffd52009-04-30 23:19:00376 'link_settings': { 'libraries': [ '-lgcov' ] },
[email protected]f5ecbba12009-04-03 04:35:18377 }],
[email protected]e8f6ff42009-07-07 18:20:53378 # Finally, for Windows, we simply turn on profiling.
379 ['OS=="win"', {
380 'msvs_settings': {
381 'VCLinkerTool': {
382 'Profile': 'true',
383 },
[email protected]10bb8c92009-08-07 21:16:03384 'VCCLCompilerTool': {
[email protected]e8f6ff42009-07-07 18:20:53385 # /Z7, not /Zi, so coverage is happyb
386 'DebugInformationFormat': '1',
[email protected]1f9471a2010-01-04 06:40:16387 'AdditionalOptions': ['/Yd'],
[email protected]e8f6ff42009-07-07 18:20:53388 }
389 }
390 }], # OS==win
391 ], # conditions for coverage
392 }], # coverage!=0
393 ], # conditions for 'target_defaults'
[email protected]2f80c312009-02-25 21:26:55394 'default_configuration': 'Debug',
395 'configurations': {
[email protected]5153767c2009-12-22 01:52:50396 # VCLinkerTool LinkIncremental values below:
397 # 0 == default
398 # 1 == /INCREMENTAL:NO
399 # 2 == /INCREMENTAL
400 # Debug links incremental, Release does not.
401 #
402 # Abstract base configurations to cover common
403 # attributes.
404 #
405 'Common_Base': {
[email protected]bb05e452009-10-29 21:24:56406 'abstract': 1,
407 'msvs_configuration_attributes': {
408 'OutputDirectory': '$(SolutionDir)$(ConfigurationName)',
409 'IntermediateDirectory': '$(OutDir)\\obj\\$(ProjectName)',
410 'CharacterSet': '1',
411 },
[email protected]5153767c2009-12-22 01:52:50412 },
413 'x86_Base': {
414 'abstract': 1,
[email protected]ef4fa4072009-12-04 22:46:50415 'msvs_settings': {
416 'VCLinkerTool': {
417 'TargetMachine': '1',
418 },
419 },
[email protected]2fa40782009-11-01 21:17:34420 'msvs_configuration_platform': 'Win32',
[email protected]bb05e452009-10-29 21:24:56421 },
[email protected]5153767c2009-12-22 01:52:50422 'x64_Base': {
423 'abstract': 1,
424 'msvs_configuration_platform': 'x64',
425 'msvs_settings': {
426 'VCLinkerTool': {
427 'TargetMachine': '17', # x86 - 64
428 },
429 },
430 'msvs_settings': {
431 'VCLibrarianTool': {
432 'AdditionalLibraryDirectories!':
433 ['<(DEPTH)/third_party/platformsdk_win7/files/Lib'],
434 'AdditionalLibraryDirectories':
435 ['<(DEPTH)/third_party/platformsdk_win7/files/Lib/x64'],
436 },
437 'VCLinkerTool': {
438 'TargetMachine': '17',
439 'AdditionalLibraryDirectories!':
440 ['<(DEPTH)/third_party/platformsdk_win7/files/Lib'],
441 'AdditionalLibraryDirectories':
442 ['<(DEPTH)/third_party/platformsdk_win7/files/Lib/x64'],
443 },
444 },
445 'defines': [
446 # Not sure if tcmalloc works on 64-bit Windows.
447 'NO_TCMALLOC',
448 ],
449 },
450 'Debug_Base': {
451 'abstract': 1,
[email protected]1c966092009-08-20 21:19:26452 'xcode_settings': {
453 'COPY_PHASE_STRIP': 'NO',
[email protected]d5d593a2009-08-28 23:23:29454 'GCC_OPTIMIZATION_LEVEL': '<(mac_debug_optimization)',
[email protected]bd232ac2009-10-21 02:23:53455 'OTHER_CFLAGS': [ '<@(debug_extra_cflags)', ],
[email protected]1c966092009-08-20 21:19:26456 },
[email protected]bb05e452009-10-29 21:24:56457 'msvs_settings': {
458 'VCCLCompilerTool': {
[email protected]7e0d664a2009-12-03 21:07:47459 'Optimization': '<(win_debug_Optimization)',
[email protected]bb05e452009-10-29 21:24:56460 'PreprocessorDefinitions': ['_DEBUG'],
461 'BasicRuntimeChecks': '3',
[email protected]7e0d664a2009-12-03 21:07:47462 'RuntimeLibrary': '<(win_debug_RuntimeLibrary)',
[email protected]bb05e452009-10-29 21:24:56463 },
464 'VCLinkerTool': {
465 'LinkIncremental': '<(msvs_debug_link_incremental)',
466 },
467 'VCResourceCompilerTool': {
468 'PreprocessorDefinitions': ['_DEBUG'],
469 },
470 },
[email protected]2f80c312009-02-25 21:26:55471 'conditions': [
[email protected]bb05e452009-10-29 21:24:56472 ['OS=="linux"', {
473 'cflags': [
474 '<@(debug_extra_cflags)',
475 ],
[email protected]2f80c312009-02-25 21:26:55476 }],
477 ],
478 },
[email protected]5153767c2009-12-22 01:52:50479 'Release_Base': {
480 'abstract': 1,
[email protected]2f80c312009-02-25 21:26:55481 'defines': [
482 'NDEBUG',
483 ],
[email protected]1c966092009-08-20 21:19:26484 'xcode_settings': {
485 'DEAD_CODE_STRIPPING': 'YES', # -Wl,-dead_strip
486 'GCC_OPTIMIZATION_LEVEL': '<(mac_release_optimization)',
[email protected]ffd984b12009-09-11 19:37:00487 'OTHER_CFLAGS': [ '<@(release_extra_cflags)', ],
[email protected]1c966092009-08-20 21:19:26488 },
[email protected]bb05e452009-10-29 21:24:56489 'msvs_settings': {
[email protected]7e0d664a2009-12-03 21:07:47490 'VCCLCompilerTool': {
491 'Optimization': '<(win_release_Optimization)',
492 'RuntimeLibrary': '<(win_release_RuntimeLibrary)',
493 },
[email protected]bb05e452009-10-29 21:24:56494 'VCLinkerTool': {
495 'LinkIncremental': '1',
496 },
497 },
[email protected]2f80c312009-02-25 21:26:55498 'conditions': [
[email protected]92822e82009-09-18 14:26:56499 ['release_valgrind_build==0', {
500 'defines': ['NVALGRIND'],
501 }],
[email protected]7e0d664a2009-12-03 21:07:47502 ['win_use_allocator_shim==0', {
503 'defines': ['NO_TCMALLOC'],
504 }],
505 ['win_release_RuntimeLibrary==2', {
506 # Visual C++ 2008 barfs when building anything with /MD (msvcrt):
[email protected]7477ea6f2009-12-22 23:28:15507 # VC\include\typeinfo(139) : warning C4275: non dll-interface
508 # class 'stdext::exception' used as base for dll-interface
[email protected]7e0d664a2009-12-03 21:07:47509 # class 'std::bad_cast'
510 'msvs_disabled_warnings': [4275],
511 }],
[email protected]bb05e452009-10-29 21:24:56512 ['OS=="linux"', {
513 'cflags': [
[email protected]ffd984b12009-09-11 19:37:00514 '<@(release_extra_cflags)',
[email protected]bb05e452009-10-29 21:24:56515 ],
516 }],
[email protected]2f80c312009-02-25 21:26:55517 ],
518 },
[email protected]5153767c2009-12-22 01:52:50519 'Purify_Base': {
520 'abstract': 1,
521 'defines': [
522 'PURIFY',
523 'NO_TCMALLOC',
524 ],
525 'msvs_settings': {
526 'VCCLCompilerTool': {
527 'Optimization': '0',
528 'RuntimeLibrary': '0',
529 'BufferSecurityCheck': 'false',
530 },
531 'VCLinkerTool': {
532 'EnableCOMDATFolding': '1',
533 'LinkIncremental': '1',
534 },
535 },
536 },
537 #
538 # Concrete configurations
539 #
540 'Debug': {
541 'inherit_from': ['Common_Base', 'x86_Base', 'Debug_Base'],
542 },
543 'Release': {
544 'inherit_from': ['Common_Base', 'x86_Base', 'Release_Base'],
545 'conditions': [
546 ['msvs_use_common_release', {
[email protected]1f9471a2010-01-04 06:40:16547 'includes': ['release.gypi'],
[email protected]5153767c2009-12-22 01:52:50548 }],
549 ]
550 },
[email protected]f926fa0a2009-08-04 22:50:13551 'conditions': [
552 [ 'OS=="win"', {
553 # TODO(bradnelson): add a gyp mechanism to make this more graceful.
554 'Purify': {
[email protected]5153767c2009-12-22 01:52:50555 'inherit_from': ['Common_Base', 'x86_Base', 'Release_Base', 'Purify'],
[email protected]ef4fa4072009-12-04 22:46:50556 },
557 'Debug_x64': {
[email protected]5153767c2009-12-22 01:52:50558 'inherit_from': ['Common_Base', 'x64_Base', 'Debug_Base'],
[email protected]78263c12009-11-01 23:45:30559 },
560 'Release_x64': {
[email protected]5153767c2009-12-22 01:52:50561 'inherit_from': ['Common_Base', 'x64_Base', 'Release_Base'],
[email protected]78263c12009-11-01 23:45:30562 },
563 'Purify_x64': {
[email protected]1f9471a2010-01-04 06:40:16564 'inherit_from': ['Common_Base', 'x64_Base', 'Release_Base', 'Purify_Base'],
[email protected]78263c12009-11-01 23:45:30565 },
[email protected]f926fa0a2009-08-04 22:50:13566 }],
567 ],
[email protected]2f80c312009-02-25 21:26:55568 },
569 },
570 'conditions': [
[email protected]47deeb62009-12-17 14:49:39571 ['OS=="linux" or OS=="freebsd" or OS=="openbsd"', {
[email protected]9d384032009-03-20 23:13:26572 'target_defaults': {
[email protected]5315f2842009-04-28 00:43:27573 # Enable -Werror by default, but put it in a variable so it can
574 # be disabled in ~/.gyp/include.gypi on the valgrind builders.
575 'variables': {
[email protected]ecf52cb82010-01-13 19:25:42576 # Use -fno-strict-aliasing by default since gcc 4.4 has periodic
577 # issues that slip through the cracks. We could do this just for
578 # gcc 4.4 but it makes more sense to be consistent on all
579 # compilers in use. TODO(Craig): turn this off again when
580 # there is some 4.4 test infrastructure in place and existing
581 # aliasing issues have been fixed.
582 'no_strict_aliasing%': 1,
[email protected]47deeb62009-12-17 14:49:39583 'conditions': [['OS=="linux"', {'werror%': '-Werror',}],
584 ['OS=="freebsd"', {'werror%': '',}],
585 ['OS=="openbsd"', {'werror%': '',}],
586 ],
[email protected]5315f2842009-04-28 00:43:27587 },
[email protected]9d384032009-03-20 23:13:26588 'cflags': [
[email protected]1bba09c2009-08-13 12:53:16589 '<(werror)', # See note above about the werror variable.
590 '-pthread',
591 '-fno-exceptions',
592 '-Wall',
593 '-D_FILE_OFFSET_BITS=64',
[email protected]3df6e3a2010-01-21 20:23:12594 # Don't export any symbols (for example, to plugins we dlopen()).
595 # Note: this is *required* to make some plugins work.
596 '-fvisibility=hidden',
[email protected]8a2fcba2009-07-29 00:52:24597 ],
598 'cflags_cc': [
[email protected]832d0212009-10-28 19:12:22599 '-fno-rtti',
[email protected]8a2fcba2009-07-29 00:52:24600 '-fno-threadsafe-statics',
[email protected]f5986c42009-11-17 18:39:36601 # Make inline functions have hidden visiblity by default.
602 # Surprisingly, not covered by -fvisibility=hidden.
603 '-fvisibility-inlines-hidden',
[email protected]9d384032009-03-20 23:13:26604 ],
[email protected]a6cf87e2009-04-03 04:07:38605 'ldflags': [
[email protected]9d384032009-03-20 23:13:26606 '-pthread',
607 ],
[email protected]b5e46b92009-03-26 18:58:10608 'scons_variable_settings': {
609 'LIBPATH': ['$LIB_DIR'],
[email protected]9d384032009-03-20 23:13:26610 # Linking of large files uses lots of RAM, so serialize links
611 # using the handy flock command from util-linux.
[email protected]c13fcbd2009-03-27 04:27:01612 'FLOCK_LINK': ['flock', '$TOP_BUILDDIR/linker.lock', '$LINK'],
[email protected]789fbb7c2009-04-02 16:20:31613 'FLOCK_SHLINK': ['flock', '$TOP_BUILDDIR/linker.lock', '$SHLINK'],
614 'FLOCK_LDMODULE': ['flock', '$TOP_BUILDDIR/linker.lock', '$LDMODULE'],
[email protected]9d384032009-03-20 23:13:26615
616 # We have several cases where archives depend on each other in
617 # a cyclic fashion. Since the GNU linker does only a single
618 # pass over the archives we surround the libraries with
619 # --start-group and --end-group (aka -( and -) ). That causes
620 # ld to loop over the group until no more undefined symbols
621 # are found. In an ideal world we would only make groups from
622 # those libraries which we knew to be in cycles. However,
623 # that's tough with SCons, so we bodge it by making all the
624 # archives a group by redefining the linking command here.
625 #
626 # TODO: investigate whether we still have cycles that
627 # require --{start,end}-group. There has been a lot of
628 # refactoring since this was first coded, which might have
629 # eliminated the circular dependencies.
[email protected]12862922009-04-20 21:36:41630 #
631 # Note: $_LIBDIRFLAGS comes before ${LINK,SHLINK,LDMODULE}FLAGS
632 # so that we prefer our own built libraries (e.g. -lpng) to
633 # system versions of libraries that pkg-config might turn up.
634 # TODO(sgk): investigate handling this not by re-ordering the
635 # flags this way, but by adding a hook to use the SCons
636 # ParseFlags() option on the output from pkg-config.
[email protected]610d8cc2009-09-19 00:47:04637 'LINKCOM': [['$FLOCK_LINK', '-o', '$TARGET',
638 '$_LIBDIRFLAGS', '$LINKFLAGS', '$SOURCES',
639 '-Wl,--start-group', '$_LIBFLAGS', '-Wl,--end-group']],
640 'SHLINKCOM': [['$FLOCK_SHLINK', '-o', '$TARGET',
641 '$_LIBDIRFLAGS', '$SHLINKFLAGS', '$SOURCES',
642 '-Wl,--start-group', '$_LIBFLAGS', '-Wl,--end-group']],
643 'LDMODULECOM': [['$FLOCK_LDMODULE', '-o', '$TARGET',
644 '$_LIBDIRFLAGS', '$LDMODULEFLAGS', '$SOURCES',
645 '-Wl,--start-group', '$_LIBFLAGS', '-Wl,--end-group']],
[email protected]9d384032009-03-20 23:13:26646 'IMPLICIT_COMMAND_DEPENDENCIES': 0,
[email protected]d0644282009-04-22 00:20:29647 # -rpath is only used when building with shared libraries.
648 'conditions': [
649 [ 'library=="shared_library"', {
650 'RPATH': '$LIB_DIR',
651 }],
652 ],
[email protected]9d384032009-03-20 23:13:26653 },
[email protected]b5e46b92009-03-26 18:58:10654 'scons_import_variables': [
[email protected]52049d5c2009-05-01 20:32:49655 'AS',
[email protected]b5e46b92009-03-26 18:58:10656 'CC',
657 'CXX',
658 'LINK',
659 ],
660 'scons_propagate_variables': [
[email protected]52049d5c2009-05-01 20:32:49661 'AS',
[email protected]b5e46b92009-03-26 18:58:10662 'CC',
663 'CCACHE_DIR',
664 'CXX',
665 'DISTCC_DIR',
666 'DISTCC_HOSTS',
667 'HOME',
[email protected]5ae4f55e2009-04-13 23:19:47668 'INCLUDE_SERVER_ARGS',
669 'INCLUDE_SERVER_PORT',
[email protected]b5e46b92009-03-26 18:58:10670 'LINK',
[email protected]fff920a2009-05-08 22:35:32671 'CHROME_BUILD_TYPE',
672 'CHROMIUM_BUILD',
673 'OFFICIAL_BUILD',
[email protected]b5e46b92009-03-26 18:58:10674 ],
[email protected]3aacaf952009-04-02 15:34:09675 'configurations': {
[email protected]5153767c2009-12-22 01:52:50676 'Debug_Base': {
[email protected]c5bdc032009-04-20 19:11:31677 'variables': {
678 'debug_optimize%': '0',
679 },
[email protected]3aacaf952009-04-02 15:34:09680 'defines': [
681 '_DEBUG',
682 ],
683 'cflags': [
[email protected]22898f62009-10-26 22:14:01684 '-O>(debug_optimize)',
[email protected]3aacaf952009-04-02 15:34:09685 '-g',
[email protected]9a5d2a52009-05-22 03:37:45686 # One can use '-gstabs' to enable building the debugging
687 # information in STABS format for breakpad's dumpsyms.
[email protected]3aacaf952009-04-02 15:34:09688 ],
[email protected]96fd0032009-04-24 00:13:08689 'ldflags': [
690 '-rdynamic', # Allows backtrace to resolve symbols.
691 ],
[email protected]5315f2842009-04-28 00:43:27692 },
[email protected]5153767c2009-12-22 01:52:50693 'Release_Base': {
[email protected]740e2de2009-07-21 11:41:01694 'variables': {
695 'release_optimize%': '2',
696 },
[email protected]3aacaf952009-04-02 15:34:09697 'cflags': [
[email protected]22898f62009-10-26 22:14:01698 '-O>(release_optimize)',
[email protected]d8cc3a62009-04-08 18:29:53699 # Don't emit the GCC version ident directives, they just end up
700 # in the .comment section taking up binary size.
701 '-fno-ident',
702 # Put data and code in their own sections, so that unused symbols
703 # can be removed at link time with --gc-sections.
704 '-fdata-sections',
705 '-ffunction-sections',
[email protected]60b93ec2009-11-30 20:17:32706 # We don't use exceptions. The eh_frame section is used for those
707 # and for symbolizing backtraces. By passing this flag we drop
708 # the eh_frame section completely, we shaving off 2.5mb from
709 # our resulting binary.
710 '-fno-asynchronous-unwind-tables',
[email protected]3aacaf952009-04-02 15:34:09711 ],
[email protected]3a48e0542009-11-18 17:07:13712 'ldflags': [
713 '-Wl,--gc-sections',
714 ],
[email protected]3aacaf952009-04-02 15:34:09715 },
716 },
[email protected]601b540222009-04-03 21:32:04717 'variants': {
718 'coverage': {
719 'cflags': ['-fprofile-arcs', '-ftest-coverage'],
720 'ldflags': ['-fprofile-arcs'],
721 },
722 'profile': {
723 'cflags': ['-pg', '-g'],
724 'ldflags': ['-pg'],
725 },
726 'symbols': {
727 'cflags': ['-g'],
728 },
729 },
[email protected]606116d22009-05-06 22:38:23730 'conditions': [
[email protected]7e8eb7612009-07-29 15:56:00731 [ 'target_arch=="ia32"', {
[email protected]606116d22009-05-06 22:38:23732 'asflags': [
733 # Needed so that libs with .s files (e.g. libicudata.a)
734 # are compatible with the general 32-bit-ness.
735 '-32',
736 ],
737 # All floating-point computations on x87 happens in 80-bit
738 # precision. Because the C and C++ language standards allow
739 # the compiler to keep the floating-point values in higher
740 # precision than what's specified in the source and doing so
741 # is more efficient than constantly rounding up to 64-bit or
742 # 32-bit precision as specified in the source, the compiler,
743 # especially in the optimized mode, tries very hard to keep
744 # values in x87 floating-point stack (in 80-bit precision)
745 # as long as possible. This has important side effects, that
746 # the real value used in computation may change depending on
747 # how the compiler did the optimization - that is, the value
748 # kept in 80-bit is different than the value rounded down to
749 # 64-bit or 32-bit. There are possible compiler options to make
750 # this behavior consistent (e.g. -ffloat-store would keep all
751 # floating-values in the memory, thus force them to be rounded
752 # to its original precision) but they have significant runtime
753 # performance penalty.
754 #
755 # -mfpmath=sse -msse2 makes the compiler use SSE instructions
756 # which keep floating-point values in SSE registers in its
757 # native precision (32-bit for single precision, and 64-bit for
758 # double precision values). This means the floating-point value
759 # used during computation does not change depending on how the
760 # compiler optimized the code, since the value is always kept
761 # in its specified precision.
[email protected]ffde7932009-05-29 00:39:06762 'conditions': [
763 ['branding=="Chromium"', {
764 'cflags': [
765 '-march=pentium4',
766 '-msse2',
767 '-mfpmath=sse',
768 ],
769 }],
770 ],
[email protected]606116d22009-05-06 22:38:23771 'cflags': [
772 '-m32',
[email protected]1c6560af2009-07-14 11:02:16773 ],
[email protected]606116d22009-05-06 22:38:23774 'ldflags': [
775 '-m32',
776 ],
777 }],
[email protected]3dda8a962009-08-10 18:58:07778 ['target_arch=="arm"', {
[email protected]77c1b29392009-12-04 06:21:29779 'target_conditions': [
780 ['_toolset=="target"', {
781 'cflags_cc': [
782 # The codesourcery arm-2009q3 toolchain warns at that the ABI
783 # has changed whenever it encounters a varargs function. This
784 # silences those warnings, as they are not helpful and
785 # clutter legitimate warnings.
786 '-Wno-abi',
787 ],
788 'conditions': [
789 ['arm_thumb == 1', {
790 'cflags': [
791 '-mthumb',
792 # TODO(piman): -Wa,-mimplicit-it=thumb is needed for
793 # inline assembly that uses condition codes but it's
794 # suboptimal. Better would be to #ifdef __thumb__ at the
795 # right place and have a separate thumb path.
796 '-Wa,-mimplicit-it=thumb',
797 ]
798 }],
799 ['armv7==1', {
[email protected]dc9711f2009-11-13 19:30:25800 'cflags': [
801 '-march=armv7-a',
802 '-mtune=cortex-a8',
803 '-mfpu=neon',
804 '-mfloat-abi=softfp',
805 ],
806 }],
[email protected]3dda8a962009-08-10 18:58:07807 ],
808 }],
809 ],
810 }],
[email protected]c76723a2010-01-25 23:10:58811 ['linux_fpic==1', {
812 'cflags': [
813 '-fPIC',
814 ],
815 }],
[email protected]ee28c9f2009-09-04 01:53:01816 ['sysroot!=""', {
[email protected]fd36ce822009-10-28 20:13:57817 'target_conditions': [
818 ['_toolset=="target"', {
819 'cflags': [
820 '--sysroot=<(sysroot)',
821 ],
822 'ldflags': [
823 '--sysroot=<(sysroot)',
824 ],
825 }]]
[email protected]ee28c9f2009-09-04 01:53:01826 }],
[email protected]cc4219a2009-08-14 05:30:52827 ['no_strict_aliasing==1', {
828 'cflags': [
829 '-fno-strict-aliasing',
830 ],
831 }],
[email protected]cbd5fd52009-08-26 00:14:27832 ['linux_breakpad==1', {
833 'cflags': [ '-gstabs' ],
834 'defines': ['USE_LINUX_BREAKPAD'],
835 }],
[email protected]7cd2afd2009-10-27 21:40:26836 ['library=="shared_library"', {
837 # When building with shared libraries, remove the visiblity-hiding
838 # flag.
839 'cflags!': [ '-fvisibility=hidden' ],
[email protected]4907ac42009-11-02 20:32:51840 'conditions': [
[email protected]08be8a72009-11-18 20:35:54841 ['target_arch=="x64" or target_arch=="arm"', {
842 # Shared libraries need -fPIC on x86-64 and arm
[email protected]4907ac42009-11-02 20:32:51843 'cflags': ['-fPIC']
844 }]
845 ],
[email protected]7cd2afd2009-10-27 21:40:26846 }],
[email protected]01699e22009-11-11 19:24:24847 ['linux_use_tcmalloc==1', {
848 'defines': ['LINUX_USE_TCMALLOC'],
849 }],
[email protected]606116d22009-05-06 22:38:23850 ],
[email protected]9d384032009-03-20 23:13:26851 },
852 }],
[email protected]c51e8d52009-12-11 20:04:06853 # FreeBSD-specific options; note that most FreeBSD options are set above,
854 # with Linux.
855 ['OS=="freebsd"', {
856 'target_defaults': {
857 'ldflags': [
858 '-Wl,--no-keep-memory',
859 ],
860 },
861 }],
[email protected]2f80c312009-02-25 21:26:55862 ['OS=="mac"', {
863 'target_defaults': {
[email protected]24700642009-06-01 16:01:20864 'variables': {
865 # This should be 'mac_real_dsym%', but there seems to be a bug
866 # with % in variables that are intended to be set to different
867 # values in different targets, like this one.
868 'mac_real_dsym': 0, # Fake .dSYMs are fine in most cases.
869 },
[email protected]d92c7c012009-03-19 19:26:42870 'mac_bundle': 0,
[email protected]2f80c312009-02-25 21:26:55871 'xcode_settings': {
872 'ALWAYS_SEARCH_USER_PATHS': 'NO',
[email protected]ab2956372009-08-13 18:11:04873 'GCC_C_LANGUAGE_STANDARD': 'c99', # -std=c99
874 'GCC_CW_ASM_SYNTAX': 'NO', # No -fasm-blocks
875 'GCC_DYNAMIC_NO_PIC': 'NO', # No -mdynamic-no-pic
876 # (Equivalent to -fPIC)
877 'GCC_ENABLE_CPP_EXCEPTIONS': 'NO', # -fno-exceptions
878 'GCC_ENABLE_CPP_RTTI': 'NO', # -fno-rtti
879 'GCC_ENABLE_PASCAL_STRINGS': 'NO', # No -mpascal-strings
[email protected]3224dcd2009-09-16 17:31:25880 # GCC_INLINES_ARE_PRIVATE_EXTERN maps to -fvisibility-inlines-hidden
881 'GCC_INLINES_ARE_PRIVATE_EXTERN': 'YES',
[email protected]ab2956372009-08-13 18:11:04882 'GCC_OBJC_CALL_CXX_CDTORS': 'YES', # -fobjc-call-cxx-cdtors
883 'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES', # -fvisibility=hidden
884 'GCC_THREADSAFE_STATICS': 'NO', # -fno-threadsafe-statics
885 'GCC_TREAT_WARNINGS_AS_ERRORS': 'YES', # -Werror
[email protected]2f80c312009-02-25 21:26:55886 'GCC_VERSION': '4.2',
[email protected]ab2956372009-08-13 18:11:04887 'GCC_WARN_ABOUT_MISSING_NEWLINE': 'YES', # -Wnewline-eof
[email protected]3224dcd2009-09-16 17:31:25888 # MACOSX_DEPLOYMENT_TARGET maps to -mmacosx-version-min
889 'MACOSX_DEPLOYMENT_TARGET': '<(mac_deployment_target)',
[email protected]ab2956372009-08-13 18:11:04890 'PREBINDING': 'NO', # No -Wl,-prebind
[email protected]2f80c312009-02-25 21:26:55891 'USE_HEADERMAP': 'NO',
892 'WARNING_CFLAGS': ['-Wall', '-Wendif-labels'],
[email protected]b3fb8092009-03-12 19:09:24893 'conditions': [
894 ['chromium_mac_pch', {'GCC_PRECOMPILE_PREFIX_HEADER': 'YES'},
[email protected]9543af052009-09-15 22:42:59895 {'GCC_PRECOMPILE_PREFIX_HEADER': 'NO'}
896 ],
[email protected]b3fb8092009-03-12 19:09:24897 ],
[email protected]2f80c312009-02-25 21:26:55898 },
899 'target_conditions': [
[email protected]2f80c312009-02-25 21:26:55900 ['_type!="static_library"', {
[email protected]5d7dc972009-04-16 15:30:46901 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-search_paths_first']},
902 }],
903 ['_mac_bundle', {
904 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-ObjC']},
[email protected]87fde4a2009-02-28 00:50:08905 }],
[email protected]e14a9f92009-08-05 19:26:07906 ['_type=="executable" or _type=="shared_library"', {
[email protected]24700642009-06-01 16:01:20907 'target_conditions': [
908 ['mac_real_dsym == 1', {
909 # To get a real .dSYM bundle produced by dsymutil, set the
910 # debug information format to dwarf-with-dsym. Since
911 # strip_from_xcode will not be used, set Xcode to do the
912 # stripping as well.
913 'configurations': {
[email protected]5153767c2009-12-22 01:52:50914 'Release_Base': {
[email protected]24700642009-06-01 16:01:20915 'xcode_settings': {
916 'DEBUG_INFORMATION_FORMAT': 'dwarf-with-dsym',
917 'DEPLOYMENT_POSTPROCESSING': 'YES',
918 'STRIP_INSTALLED_PRODUCT': 'YES',
[email protected]e14a9f92009-08-05 19:26:07919 'target_conditions': [
920 ['_type=="shared_library"', {
921 # The Xcode default is to strip debugging symbols
922 # only (-S). Local symbols should be stripped as
923 # well, which will be handled by -x. Xcode will
924 # continue to insert -S when stripping even when
925 # additional flags are added with STRIPFLAGS.
926 'STRIPFLAGS': '-x',
927 }], # _type=="shared_library"
928 ], # target_conditions
929 }, # xcode_settings
930 }, # configuration "Release"
931 }, # configurations
[email protected]24700642009-06-01 16:01:20932 }, { # mac_real_dsym != 1
933 # To get a fast fake .dSYM bundle, use a post-build step to
934 # produce the .dSYM and strip the executable. strip_from_xcode
935 # only operates in the Release configuration.
936 'postbuilds': [
937 {
938 'variables': {
939 # Define strip_from_xcode in a variable ending in _path
940 # so that gyp understands it's a path and performs proper
941 # relativization during dict merging.
942 'strip_from_xcode_path': 'mac/strip_from_xcode',
943 },
944 'postbuild_name': 'Strip If Needed',
945 'action': ['<(strip_from_xcode_path)'],
946 },
[email protected]e14a9f92009-08-05 19:26:07947 ], # postbuilds
948 }], # mac_real_dsym
949 ], # target_conditions
950 }], # _type=="executable" or _type=="shared_library"
951 ], # target_conditions
952 }, # target_defaults
953 }], # OS=="mac"
[email protected]2f80c312009-02-25 21:26:55954 ['OS=="win"', {
955 'target_defaults': {
956 'defines': [
957 '_WIN32_WINNT=0x0600',
958 'WINVER=0x0600',
959 'WIN32',
960 '_WINDOWS',
961 '_HAS_EXCEPTIONS=0',
962 'NOMINMAX',
963 '_CRT_RAND_S',
964 'CERT_CHAIN_PARA_HAS_EXTRA_FIELDS',
965 'WIN32_LEAN_AND_MEAN',
966 '_SECURE_ATL',
[email protected]adfb98c2009-06-23 20:08:45967 '_HAS_TR1=0',
[email protected]2f80c312009-02-25 21:26:55968 ],
[email protected]5b5ca7cb2009-07-20 23:00:20969 'msvs_system_include_dirs': [
[email protected]998b5152009-12-12 22:19:52970 '<(DEPTH)/third_party/platformsdk_win7/files/Include',
[email protected]2f80c312009-02-25 21:26:55971 '$(VSInstallDir)/VC/atlmfc/include',
972 ],
[email protected]a8d99cef2009-08-26 20:47:49973 'msvs_cygwin_dirs': ['<(DEPTH)/third_party/cygwin'],
[email protected]6840561772009-05-12 16:37:55974 'msvs_disabled_warnings': [4396, 4503, 4819],
[email protected]2f80c312009-02-25 21:26:55975 'msvs_settings': {
976 'VCCLCompilerTool': {
977 'MinimalRebuild': 'false',
978 'ExceptionHandling': '0',
979 'BufferSecurityCheck': 'true',
980 'EnableFunctionLevelLinking': 'true',
981 'RuntimeTypeInfo': 'false',
982 'WarningLevel': '3',
983 'WarnAsError': 'true',
984 'DebugInformationFormat': '3',
[email protected]3fef6e62009-07-31 19:58:58985 'conditions': [
[email protected]912c55c2009-07-31 23:33:55986 [ 'msvs_multi_core_compile', {
[email protected]1f9471a2010-01-04 06:40:16987 'AdditionalOptions': ['/MP'],
[email protected]912c55c2009-07-31 23:33:55988 }],
[email protected]3fef6e62009-07-31 19:58:58989 ],
[email protected]2f80c312009-02-25 21:26:55990 },
991 'VCLibrarianTool': {
[email protected]1f9471a2010-01-04 06:40:16992 'AdditionalOptions': ['/ignore:4221'],
[email protected]2f80c312009-02-25 21:26:55993 'AdditionalLibraryDirectories':
[email protected]998b5152009-12-12 22:19:52994 ['<(DEPTH)/third_party/platformsdk_win7/files/Lib'],
[email protected]2f80c312009-02-25 21:26:55995 },
996 'VCLinkerTool': {
[email protected]2f80c312009-02-25 21:26:55997 'AdditionalDependencies': [
998 'wininet.lib',
999 'version.lib',
1000 'msimg32.lib',
1001 'ws2_32.lib',
1002 'usp10.lib',
1003 'psapi.lib',
[email protected]96fd0032009-04-24 00:13:081004 'dbghelp.lib',
[email protected]2f80c312009-02-25 21:26:551005 ],
1006 'AdditionalLibraryDirectories':
[email protected]998b5152009-12-12 22:19:521007 ['<(DEPTH)/third_party/platformsdk_win7/files/Lib'],
[email protected]2f80c312009-02-25 21:26:551008 'GenerateDebugInformation': 'true',
1009 'MapFileName': '$(OutDir)\\$(TargetName).map',
1010 'ImportLibrary': '$(OutDir)\\lib\\$(TargetName).lib',
[email protected]2f80c312009-02-25 21:26:551011 'FixedBaseAddress': '1',
[email protected]825ff8d2009-05-22 01:40:481012 # SubSystem values:
1013 # 0 == not set
1014 # 1 == /SUBSYSTEM:CONSOLE
1015 # 2 == /SUBSYSTEM:WINDOWS
1016 # Most of the executables we'll ever create are tests
1017 # and utilities with console output.
1018 'SubSystem': '1',
[email protected]2f80c312009-02-25 21:26:551019 },
1020 'VCMIDLTool': {
1021 'GenerateStublessProxies': 'true',
1022 'TypeLibraryName': '$(InputName).tlb',
1023 'OutputDirectory': '$(IntDir)',
1024 'HeaderFileName': '$(InputName).h',
1025 'DLLDataFileName': 'dlldata.c',
1026 'InterfaceIdentifierFileName': '$(InputName)_i.c',
1027 'ProxyFileName': '$(InputName)_p.c',
1028 },
1029 'VCResourceCompilerTool': {
1030 'Culture' : '1033',
[email protected]245b3cd592009-03-31 01:12:141031 'AdditionalIncludeDirectories': ['<(DEPTH)'],
[email protected]2f80c312009-02-25 21:26:551032 },
1033 },
1034 },
1035 }],
1036 ['chromium_code==0', {
[email protected]4ebb4f12009-11-26 00:15:501037 # This section must follow the other condition sections above because
[email protected]2f80c312009-02-25 21:26:551038 # external_code.gypi expects to be merged into those settings.
1039 'includes': [
1040 'external_code.gypi',
1041 ],
[email protected]dce5df52009-06-29 17:58:251042 }, {
1043 'target_defaults': {
1044 # In Chromium code, we define __STDC_FORMAT_MACROS in order to get the
1045 # C99 macros on Mac and Linux.
1046 'defines': [
1047 '__STDC_FORMAT_MACROS',
1048 ],
[email protected]4ebb4f12009-11-26 00:15:501049 'conditions': [
1050 ['OS!="win"', {
1051 'sources/': [ ['exclude', '_win\\.cc$'],
1052 ['exclude', '/win/'],
1053 ['exclude', '/win_[^/]*\\.cc$'] ],
1054 }],
1055 ['OS!="mac"', {
1056 'sources/': [ ['exclude', '_(cocoa|mac)(_unittest)?\\.cc$'],
[email protected]eee9f552009-11-28 22:05:111057 ['exclude', '/(cocoa|mac)/'],
[email protected]4ebb4f12009-11-26 00:15:501058 ['exclude', '\.mm$' ] ],
1059 }],
[email protected]47deeb62009-12-17 14:49:391060 ['OS!="linux" and OS!="freebsd" and OS!="openbsd"', {
[email protected]4ebb4f12009-11-26 00:15:501061 'sources/': [
1062 ['exclude', '_(chromeos|gtk|linux|x|x11)(_unittest)?\\.cc$'],
1063 ['exclude', '/gtk/'],
1064 ['exclude', '/(gtk|x11)_[^/]*\\.cc$'] ],
1065 }],
1066 # We use "POSIX" to refer to all non-Windows operating systems.
1067 ['OS=="win"', {
1068 'sources/': [ ['exclude', '_posix\\.cc$'] ],
1069 }],
1070 # Though Skia is conceptually shared by Linux and Windows,
1071 # the only _skia files in our tree are Linux-specific.
[email protected]47deeb62009-12-17 14:49:391072 ['OS!="linux" and OS!="freebsd" and OS!="openbsd"', {
[email protected]4ebb4f12009-11-26 00:15:501073 'sources/': [ ['exclude', '_skia\\.cc$'] ],
1074 }],
1075 ['chromeos!=1', {
1076 'sources/': [ ['exclude', '_chromeos\\.cc$'] ]
1077 }],
[email protected]d3a2cef2009-12-22 23:30:181078 ['OS!="win" and (toolkit_views==0 and chromeos==0)', {
[email protected]4ebb4f12009-11-26 00:15:501079 'sources/': [ ['exclude', '_views\\.cc$'] ]
1080 }],
1081 ],
[email protected]dce5df52009-06-29 17:58:251082 },
[email protected]2f80c312009-02-25 21:26:551083 }],
[email protected]47deeb62009-12-17 14:49:391084 # Disable native client on FreeBSD/OpenBSD for now
1085 ['disable_nacl==1 or OS=="freebsd" or OS=="openbsd"', {
[email protected]d8c7cbcc2009-10-02 19:00:311086 'target_defaults': {
1087 'defines': [
1088 'DISABLE_NACL',
1089 ],
1090 },
1091 }],
[email protected]cfbf9bc2009-12-07 22:07:561092 ['OS=="win" and msvs_use_common_linker_extras', {
[email protected]48c7af72009-07-03 22:00:191093 'target_defaults': {
1094 'msvs_settings': {
1095 'VCLinkerTool': {
[email protected]48c7af72009-07-03 22:00:191096 'DelayLoadDLLs': [
1097 'dbghelp.dll',
1098 'dwmapi.dll',
1099 'uxtheme.dll',
1100 ],
1101 },
1102 },
[email protected]ef4fa4072009-12-04 22:46:501103 'configurations': {
[email protected]5153767c2009-12-22 01:52:501104 'x86_Base': {
[email protected]ef4fa4072009-12-04 22:46:501105 'msvs_settings': {
1106 'VCLinkerTool': {
[email protected]1f9471a2010-01-04 06:40:161107 'AdditionalOptions': [
1108 '/safeseh',
1109 '/dynamicbase',
1110 '/ignore:4199',
1111 '/ignore:4221',
1112 '/nxcompat',
1113 ],
[email protected]ef4fa4072009-12-04 22:46:501114 },
1115 },
1116 },
[email protected]5153767c2009-12-22 01:52:501117 'x64_Base': {
[email protected]ef4fa4072009-12-04 22:46:501118 'msvs_settings': {
1119 'VCLinkerTool': {
[email protected]1f9471a2010-01-04 06:40:161120 'AdditionalOptions': [
[email protected]ef4fa4072009-12-04 22:46:501121 # safeseh is not compatible with x64
[email protected]1f9471a2010-01-04 06:40:161122 '/dynamicbase',
1123 '/ignore:4199',
1124 '/ignore:4221',
1125 '/nxcompat',
1126 ],
[email protected]ef4fa4072009-12-04 22:46:501127 },
1128 },
1129 },
1130 },
[email protected]48c7af72009-07-03 22:00:191131 },
1132 }],
[email protected]2f80c312009-02-25 21:26:551133 ],
[email protected]c13fcbd2009-03-27 04:27:011134 'scons_settings': {
1135 'sconsbuild_dir': '<(DEPTH)/sconsbuild',
[email protected]a8b56d92009-08-10 04:09:071136 'tools': ['ar', 'as', 'gcc', 'g++', 'gnulink', 'chromium_builders'],
[email protected]c13fcbd2009-03-27 04:27:011137 },
[email protected]2f80c312009-02-25 21:26:551138 'xcode_settings': {
[email protected]0c8ab452009-11-06 21:57:501139 # DON'T ADD ANYTHING NEW TO THIS BLOCK UNLESS YOU REALLY REALLY NEED IT!
1140 # This block adds *project-wide* configuration settings to each project
1141 # file. It's almost always wrong to put things here. Specify your
1142 # custom xcode_settings in target_defaults to add them to targets instead.
1143
1144 # In an Xcode Project Info window, the "Base SDK for All Configurations"
1145 # setting sets the SDK on a project-wide basis. In order to get the
1146 # configured SDK to show properly in the Xcode UI, SDKROOT must be set
1147 # here at the project level.
1148 'SDKROOT': 'macosx<(mac_sdk)', # -isysroot
1149
[email protected]2f80c312009-02-25 21:26:551150 # The Xcode generator will look for an xcode_settings section at the root
1151 # of each dict and use it to apply settings on a file-wide basis. Most
1152 # settings should not be here, they should be in target-specific
1153 # xcode_settings sections, or better yet, should use non-Xcode-specific
1154 # settings in target dicts. SYMROOT is a special case, because many other
1155 # Xcode variables depend on it, including variables such as
1156 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something
1157 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the
1158 # files to appear (when present) in the UI as actual files and not red
1159 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR,
1160 # and therefore SYMROOT, needs to be set at the project level.
[email protected]bfa24b962009-03-02 00:16:161161 'SYMROOT': '<(DEPTH)/xcodebuild',
[email protected]2f80c312009-02-25 21:26:551162 },
[email protected]ee28c9f2009-09-04 01:53:011163}
[email protected]f5c990c2009-10-06 03:02:381164
1165# Local Variables:
1166# tab-width:2
1167# indent-tabs-mode:nil
1168# End:
1169# vim: set expandtab tabstop=2 shiftwidth=2: