blob: 87c0a22801da4cd26f7e73e6601c504c25487266 [file] [log] [blame]
[email protected]cfa2e1102011-04-27 22:30:231# Copyright (c) 2011 The Chromium Authors. All rights reserved.
[email protected]2f80c312009-02-25 21:26:552# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4
[email protected]21642ab2009-09-15 23:52:145# IMPORTANT:
6# Please don't directly include this file if you are building via gyp_chromium,
7# since gyp_chromium is automatically forcing its inclusion.
[email protected]2f80c312009-02-25 21:26:558{
[email protected]e72e55b2011-01-06 22:19:309 # Variables expected to be overriden on the GYP command line (-D) or by
10 # ~/.gyp/include.gypi.
[email protected]2f80c312009-02-25 21:26:5511 'variables': {
[email protected]e14a9f92009-08-05 19:26:0712 # Putting a variables dict inside another variables dict looks kind of
[email protected]e72e55b2011-01-06 22:19:3013 # weird. This is done so that 'host_arch', 'chromeos', etc are defined as
[email protected]e14a9f92009-08-05 19:26:0714 # variables within the outer variables dict here. This is necessary
15 # to get these variables defined for the conditions within this variables
[email protected]e72e55b2011-01-06 22:19:3016 # dict that operate on these variables (e.g., for setting 'toolkit_views',
17 # we need to have 'chromeos' already set).
[email protected]e14a9f92009-08-05 19:26:0718 'variables': {
[email protected]e72e55b2011-01-06 22:19:3019 'variables': {
[email protected]bb6aba32011-01-07 19:04:4320 'variables': {
21 # Whether we're building a ChromeOS build.
22 'chromeos%': 0,
[email protected]e72e55b2011-01-06 22:19:3023
[email protected]1b546692011-06-30 18:22:3024 # Whether the Views toolkit can use its Pure form when available
25 # or if it must only use GTK (the default at the moment).
26 # This is an intermediate step until all of Views is 'Pure',
27 # at which point we plan to remove those switches.
28 # This turns on the TOOLKIT_USES_PURE_VIEWS macro which is used
29 # to replace the corresponding GTK implementation in such a way
30 # that GTK and PureViews can coexist. This intermediate solution
31 # allow us to switch the view implementations using
32 # --use-pure-views, without breaking exiting gtk implementation.
33 'toolkit_uses_pure_views%': 0,
34
[email protected]bb6aba32011-01-07 19:04:4335 # Disable touch support by default.
36 'touchui%': 0,
[email protected]9c8a1982011-05-24 23:08:5837
[email protected]8ebc9b42011-07-14 15:22:1838 # Disable webui certificate viewer until it is complete.
39 'webui_certificate_viewer%': 0,
40
[email protected]9c8a1982011-05-24 23:08:5841 # Whether the compositor is enabled on views.
42 'views_compositor%': 0,
[email protected]bb6aba32011-01-07 19:04:4343 },
44 # Copy conditionally-set variables out one scope.
45 'chromeos%': '<(chromeos)',
[email protected]1b546692011-06-30 18:22:3046 'toolkit_uses_pure_views%': '<(toolkit_uses_pure_views)',
[email protected]bb6aba32011-01-07 19:04:4347 'touchui%': '<(touchui)',
[email protected]8ebc9b42011-07-14 15:22:1848 'webui_certificate_viewer%': '<(webui_certificate_viewer)',
[email protected]9c8a1982011-05-24 23:08:5849 'views_compositor%': '<(views_compositor)',
[email protected]e72e55b2011-01-06 22:19:3050
[email protected]e72e55b2011-01-06 22:19:3051 # Compute the architecture that we're building on.
52 'conditions': [
[email protected]c49ab0c2011-05-18 17:25:3753 [ 'OS=="win" or OS=="mac"', {
54 'host_arch%': 'ia32',
55 }, {
[email protected]79e2336c2011-05-12 18:18:3456 # This handles the Unix platforms for which there is some support.
57 # Anything else gets passed through, which probably won't work very
58 # well; such hosts should pass an explicit target_arch to gyp.
[email protected]e72e55b2011-01-06 22:19:3059 'host_arch%':
[email protected]79e2336c2011-05-12 18:18:3460 '<!(uname -m | sed -e "s/i.86/ia32/;s/x86_64/x64/;s/amd64/x64/;s/arm.*/arm/;s/i86pc/ia32/")',
[email protected]e72e55b2011-01-06 22:19:3061 }],
[email protected]bb6aba32011-01-07 19:04:4362
63 # Set default value of toolkit_views on for Windows, Chrome OS
64 # and the touch UI.
[email protected]1b546692011-06-30 18:22:3065 ['OS=="win" or chromeos==1 or touchui==1 or toolkit_uses_pure_views==1', {
[email protected]bb6aba32011-01-07 19:04:4366 'toolkit_views%': 1,
67 }, {
68 'toolkit_views%': 0,
69 }],
[email protected]1b546692011-06-30 18:22:3070
71 # Views are always Pure in Touch case
72 ['touchui==1', {
73 'toolkit_uses_pure_views%': 1,
74 }, {
75 'toolkit_uses_pure_views%': 0,
76 }],
[email protected]8ebc9b42011-07-14 15:22:1877
78 # Use WebUI certificate viewer in Touch case
79 ['touchui==1', {
80 'webui_certificate_viewer%': 1
81 }],
[email protected]e72e55b2011-01-06 22:19:3082 ],
83 },
84
85 # Copy conditionally-set variables out one scope.
86 'chromeos%': '<(chromeos)',
87 'touchui%': '<(touchui)',
[email protected]8ebc9b42011-07-14 15:22:1888 'webui_certificate_viewer%': '<(webui_certificate_viewer)',
[email protected]e72e55b2011-01-06 22:19:3089 'host_arch%': '<(host_arch)',
[email protected]bb6aba32011-01-07 19:04:4390 'toolkit_views%': '<(toolkit_views)',
[email protected]1b546692011-06-30 18:22:3091 'toolkit_uses_pure_views%': '<(toolkit_uses_pure_views)',
[email protected]9c8a1982011-05-24 23:08:5892 'views_compositor%': '<(views_compositor)',
[email protected]e72e55b2011-01-06 22:19:3093
[email protected]8fb0ef02011-05-20 00:53:5094 # We used to provide a variable for changing how libraries were built.
95 # This variable remains until we can clean up all the users.
96 # This needs to be one nested variables dict in so that dependent
97 # gyp files can make use of it in their outer variables. (Yikes!)
98 # http://code.google.com/p/chromium/issues/detail?id=83308
99 'library%': 'static_library',
100
[email protected]e14a9f92009-08-05 19:26:07101 # Override branding to select the desired branding flavor.
102 'branding%': 'Chromium',
103
104 # Override buildtype to select the desired build flavor.
105 # Dev - everyday build for development/testing
106 # Official - release build (generally implies additional processing)
107 # TODO(mmoss) Once 'buildtype' is fully supported (e.g. Windows gyp
108 # conversion is done), some of the things which are now controlled by
109 # 'branding', such as symbol generation, will need to be refactored based
110 # on 'buildtype' (i.e. we don't care about saving symbols for non-Official
111 # builds).
112 'buildtype%': 'Dev',
[email protected]cbd5fd52009-08-26 00:14:27113
[email protected]e72e55b2011-01-06 22:19:30114 # Default architecture we're building for is the architecture we're
115 # building on.
116 'target_arch%': '<(host_arch)',
[email protected]b3f23ba2010-04-26 22:58:17117
[email protected]e72e55b2011-01-06 22:19:30118 # This variable tells WebCore.gyp and JavaScriptCore.gyp whether they are
119 # are built under a chromium full build (1) or a webkit.org chromium
120 # build (0).
121 'inside_chromium_build%': 1,
[email protected]8974e042010-06-21 18:06:52122
[email protected]e72e55b2011-01-06 22:19:30123 # Set to 1 to enable fast builds. It disables debug info for fastest
124 # compilation.
125 'fastbuild%': 0,
[email protected]93012ca2010-08-10 20:10:49126
[email protected]3d38d8e2011-04-16 20:48:51127 # Disable file manager component extension by default.
128 'file_manager_extension%': 0,
129
[email protected]8b2e9f392011-08-05 04:00:47130 # Disable WebUI TaskManager by default.
131 'webui_task_manager%': 0,
132
[email protected]e72e55b2011-01-06 22:19:30133 # Python version.
[email protected]a43c5a02011-05-27 06:54:51134 'python_ver%': '2.6',
[email protected]b3f23ba2010-04-26 22:58:17135
[email protected]e72e55b2011-01-06 22:19:30136 # Set ARM-v7 compilation flags
137 'armv7%': 0,
138
139 # Set Neon compilation flags (only meaningful if armv7==1).
140 'arm_neon%': 1,
141
142 # The system root for cross-compiles. Default: none.
143 'sysroot%': '',
144
145 # On Linux, we build with sse2 for Chromium builds.
146 'disable_sse2%': 0,
147
148 # Use libjpeg-turbo as the JPEG codec used by Chromium.
[email protected]32e56e52011-02-28 02:28:03149 'use_libjpeg_turbo%': 1,
[email protected]e72e55b2011-01-06 22:19:30150
151 # Variable 'component' is for cases where we would like to build some
152 # components as dynamic shared libraries but still need variable
153 # 'library' for static libraries.
154 # By default, component is set to whatever library is set to and
155 # it can be overriden by the GYP command line or by ~/.gyp/include.gypi.
[email protected]5a547332011-05-19 23:18:53156 'component%': 'static_library',
[email protected]e72e55b2011-01-06 22:19:30157
[email protected]bb6aba32011-01-07 19:04:43158 # Set to select the Title Case versions of strings in GRD files.
159 'use_titlecase_in_grd_files%': 0,
[email protected]63692212010-09-16 00:22:21160
[email protected]98da0042011-02-02 00:10:27161 # Use translations provided by volunteers at launchpad.net. This
162 # currently only works on Linux.
[email protected]00dc155832011-02-01 18:51:19163 'use_third_party_translations%': 0,
164
[email protected]9a425422011-01-11 00:53:18165 # Remoting compilation is enabled by default. Set to 0 to disable.
166 'remoting%': 1,
167
[email protected]a026daa2011-04-20 15:49:51168 # P2P APIs are compiled in by default. Set to 0 to disable.
169 # Also note that this should be enabled for remoting to compile.
170 'p2p_apis%': 1,
171
[email protected]1ec68c42011-06-01 13:56:25172 # Configuration policy is enabled by default. Set to 0 to disable.
173 'configuration_policy%': 1,
174
[email protected]4b58e7d2011-07-11 10:22:56175 # Safe browsing is compiled in by default. Set to 0 to disable.
176 'safe_browsing%': 1,
177
[email protected]5d451ad2011-02-11 16:43:46178 # If this is set, the clang plugins used on the buildbot will be used.
179 # Run tools/clang/scripts/update.sh to make sure they are compiled.
180 # This causes 'clang_chrome_plugins_flags' to be set.
181 # Has no effect if 'clang' is not set as well.
182 'clang_use_chrome_plugins%': 0,
183
[email protected]1ad5a7b2011-06-24 03:15:13184 # Set to 1 compile with -fPIC cflag on linux. This is a must for shared
185 # libraries on linux x86-64 and arm, plus ASLR.
186 'linux_fpic%': 1,
187
[email protected]c6a1f94172011-07-05 02:35:00188 # Enable navigator.registerProtocolHandler and supporting UI.
189 'enable_register_protocol_handler%': 1,
190
[email protected]62af76e2011-08-01 02:34:01191 # Enable Web Intents and supporting UI.
192 'enable_web_intents%': 0,
193
[email protected]32877d302011-07-07 17:57:49194 # Smooth scrolling is disabled by default.
195 'enable_smooth_scrolling%': 0,
196
[email protected]dda90ae2011-07-19 22:07:48197 # Webrtc compilation is enabled by default. Set to 0 to disable.
198 'enable_webrtc%': 1,
199
[email protected]bb6aba32011-01-07 19:04:43200 'conditions': [
[email protected]7d7564a12011-06-21 19:20:22201 # Use Skia as WebKit renderer on Mac
202 ['OS=="mac"', {
203 'use_skia%': 0,
204 }, {
205 'use_skia%': 1,
206 }],
207
[email protected]79e2336c2011-05-12 18:18:34208 # A flag for POSIX platforms
[email protected]c49ab0c2011-05-18 17:25:37209 ['OS=="win"', {
[email protected]79e2336c2011-05-12 18:18:34210 'os_posix%': 0,
[email protected]c49ab0c2011-05-18 17:25:37211 }, {
212 'os_posix%': 1,
[email protected]79e2336c2011-05-12 18:18:34213 }],
214
215 # Flags to use Gtk and X11 on non-Mac POSIX platforms
[email protected]c49ab0c2011-05-18 17:25:37216 ['OS=="win" or OS=="mac"', {
[email protected]79e2336c2011-05-12 18:18:34217 'toolkit_uses_gtk%': 0,
218 'use_x11%': 0,
[email protected]c49ab0c2011-05-18 17:25:37219 }, {
[email protected]236754a2011-07-28 17:38:23220 # TODO(dnicoara) Wayland build should have these disabled, but
221 # currently GTK and X is too spread and it's hard to completely
222 # remove every dependency.
[email protected]c49ab0c2011-05-18 17:25:37223 'toolkit_uses_gtk%': 1,
224 'use_x11%': 1,
[email protected]79e2336c2011-05-12 18:18:34225 }],
226
[email protected]63692212010-09-16 00:22:21227 # A flag to enable or disable our compile-time dependency
228 # on gnome-keyring. If that dependency is disabled, no gnome-keyring
229 # support will be available. This option is useful
230 # for Linux distributions.
231 ['chromeos==1', {
232 'use_gnome_keyring%': 0,
233 }, {
234 'use_gnome_keyring%': 1,
235 }],
[email protected]0afe5212010-10-01 18:56:11236
[email protected]bb6aba32011-01-07 19:04:43237 ['toolkit_views==0 or OS=="mac"', {
238 # GTK+ and Mac wants Title Case strings
239 'use_titlecase_in_grd_files%': 1,
240 }],
241
[email protected]1b4209f2011-01-07 00:25:40242 # Enable some hacks to support Flapper only on Chrome OS.
243 ['chromeos==1', {
244 'enable_flapper_hacks%': 1,
245 }, {
246 'enable_flapper_hacks%': 0,
247 }],
[email protected]3d38d8e2011-04-16 20:48:51248
249 # Enable file manager extension by default on Chrome OS.
250 ['chromeos==1', {
251 'file_manager_extension%': 1,
252 }, {
253 'file_manager_extension%': 0,
254 }],
[email protected]32877d302011-07-07 17:57:49255
[email protected]8b2e9f392011-08-05 04:00:47256 # Enable WebUI TaskManager only on Chrome OS and Touch UI.
257 ['chromeos==1 or touchui==1', {
258 'webui_task_manager%': 1,
259 }, {
260 'webui_task_manager%': 0,
261 }],
262
[email protected]32877d302011-07-07 17:57:49263 # Enable smooth scrolling for Linux and ChromeOS
264 ['OS=="linux"', {
265 'enable_smooth_scrolling%': 1,
266 }, {
267 'enable_smooth_scrolling%': 0,
268 }],
[email protected]b3f23ba2010-04-26 22:58:17269 ],
[email protected]e14a9f92009-08-05 19:26:07270 },
271
[email protected]e72e55b2011-01-06 22:19:30272 # Copy conditionally-set variables out one scope.
[email protected]e14a9f92009-08-05 19:26:07273 'branding%': '<(branding)',
274 'buildtype%': '<(buildtype)',
[email protected]e0d00142009-09-18 22:10:27275 'target_arch%': '<(target_arch)',
[email protected]cf185b32010-01-12 04:29:59276 'host_arch%': '<(host_arch)',
[email protected]8fb0ef02011-05-20 00:53:50277 'library%': 'static_library',
[email protected]c153e5352009-09-22 12:37:44278 'toolkit_views%': '<(toolkit_views)',
[email protected]1b546692011-06-30 18:22:30279 'toolkit_uses_pure_views%': '<(toolkit_uses_pure_views)',
[email protected]9c8a1982011-05-24 23:08:58280 'views_compositor%': '<(views_compositor)',
[email protected]79e2336c2011-05-12 18:18:34281 'os_posix%': '<(os_posix)',
282 'toolkit_uses_gtk%': '<(toolkit_uses_gtk)',
[email protected]7d7564a12011-06-21 19:20:22283 'use_skia%': '<(use_skia)',
[email protected]79e2336c2011-05-12 18:18:34284 'use_x11%': '<(use_x11)',
[email protected]63692212010-09-16 00:22:21285 'use_gnome_keyring%': '<(use_gnome_keyring)',
[email protected]0afe5212010-10-01 18:56:11286 'linux_fpic%': '<(linux_fpic)',
[email protected]1b4209f2011-01-07 00:25:40287 'enable_flapper_hacks%': '<(enable_flapper_hacks)',
[email protected]c153e5352009-09-22 12:37:44288 'chromeos%': '<(chromeos)',
[email protected]93012ca2010-08-10 20:10:49289 'touchui%': '<(touchui)',
[email protected]8ebc9b42011-07-14 15:22:18290 'webui_certificate_viewer%': '<(webui_certificate_viewer)',
[email protected]e47c32032011-03-01 19:26:20291 'file_manager_extension%': '<(file_manager_extension)',
[email protected]8b2e9f392011-08-05 04:00:47292 'webui_task_manager%': '<(webui_task_manager)',
[email protected]b2f030c2009-09-24 20:36:21293 'inside_chromium_build%': '<(inside_chromium_build)',
[email protected]9c1949e2009-10-02 19:59:54294 'fastbuild%': '<(fastbuild)',
[email protected]a76fe1a2010-03-01 23:39:36295 'python_ver%': '<(python_ver)',
[email protected]eafc0b452010-02-26 21:53:43296 'armv7%': '<(armv7)',
297 'arm_neon%': '<(arm_neon)',
[email protected]4d83eb72010-03-04 16:42:23298 'sysroot%': '<(sysroot)',
[email protected]ac120ff2010-04-28 02:14:22299 'disable_sse2%': '<(disable_sse2)',
[email protected]8974e042010-06-21 18:06:52300 'component%': '<(component)',
[email protected]bb6aba32011-01-07 19:04:43301 'use_titlecase_in_grd_files%': '<(use_titlecase_in_grd_files)',
[email protected]9e94cca2011-02-04 17:38:17302 'use_third_party_translations%': '<(use_third_party_translations)',
[email protected]9a425422011-01-11 00:53:18303 'remoting%': '<(remoting)',
[email protected]dda90ae2011-07-19 22:07:48304 'enable_webrtc%': '<(enable_webrtc)',
[email protected]a026daa2011-04-20 15:49:51305 'p2p_apis%': '<(p2p_apis)',
[email protected]1ec68c42011-06-01 13:56:25306 'configuration_policy%': '<(configuration_policy)',
[email protected]4b58e7d2011-07-11 10:22:56307 'safe_browsing%': '<(safe_browsing)',
[email protected]5d451ad2011-02-11 16:43:46308 'clang_use_chrome_plugins%': '<(clang_use_chrome_plugins)',
[email protected]365dd5b92011-05-26 01:30:56309 'enable_register_protocol_handler%': '<(enable_register_protocol_handler)',
[email protected]32877d302011-07-07 17:57:49310 'enable_smooth_scrolling%': '<(enable_smooth_scrolling)',
[email protected]4076d2f2011-08-11 18:20:22311 # Whether to build for Wayland display server
312 'use_wayland%': 0,
[email protected]a22ebd812011-06-23 00:05:39313
[email protected]caa95c82009-11-23 22:39:32314 # The release channel that this build targets. This is used to restrict
315 # channel-specific build options, like which installer packages to create.
316 # The default is 'all', which does no channel-specific filtering.
317 'channel%': 'all',
318
[email protected]b3fb8092009-03-12 19:09:24319 # Override chromium_mac_pch and set it to 0 to suppress the use of
320 # precompiled headers on the Mac. Prefix header injection may still be
321 # used, but prefix headers will not be precompiled. This is useful when
322 # using distcc to distribute a build to compile slaves that don't
323 # share the same compiler executable as the system driving the compilation,
324 # because precompiled headers rely on pointers into a specific compiler
325 # executable's image. Setting this to 0 is needed to use an experimental
326 # Linux-Mac cross compiler distcc farm.
327 'chromium_mac_pch%': 1,
328
[email protected]3224dcd2009-09-16 17:31:25329 # Mac OS X SDK and deployment target support.
330 # The SDK identifies the version of the system headers that will be used,
331 # and corresponds to the MAC_OS_X_VERSION_MAX_ALLOWED compile-time macro.
332 # "Maximum allowed" refers to the operating system version whose APIs are
333 # available in the headers.
334 # The deployment target identifies the minimum system version that the
335 # built products are expected to function on. It corresponds to the
336 # MAC_OS_X_VERSION_MIN_REQUIRED compile-time macro.
337 # To ensure these macros are available, #include <AvailabilityMacros.h>.
338 # Additional documentation on these macros is available at
339 # http://developer.apple.com/mac/library/technotes/tn2002/tn2064.html#SECTION3
340 # Chrome normally builds with the Mac OS X 10.5 SDK and sets the
341 # deployment target to 10.5. Other projects, such as O3D, may override
342 # these defaults.
343 'mac_sdk%': '10.5',
344 'mac_deployment_target%': '10.5',
[email protected]9543af052009-09-15 22:42:59345
[email protected]f5ecbba12009-04-03 04:35:18346 # Set to 1 to enable code coverage. In addition to build changes
347 # (e.g. extra CFLAGS), also creates a new target in the src/chrome
348 # project file called "coverage".
349 # Currently ignored on Windows.
350 'coverage%': 0,
[email protected]653bd5f032009-04-08 12:55:49351
[email protected]c61f6432009-04-22 01:16:42352 # Overridable specification for potential use of alternative
353 # JavaScript engines.
354 'javascript_engine%': 'v8',
355
[email protected]7477ea6f2009-12-22 23:28:15356 # Although base/allocator lets you select a heap library via an
[email protected]7e0d664a2009-12-03 21:07:47357 # environment variable, the libcmt shim it uses sometimes gets in
358 # the way. To disable it entirely, and switch to normal msvcrt, do e.g.
359 # 'win_use_allocator_shim': 0,
360 # 'win_release_RuntimeLibrary': 2
361 # to ~/.gyp/include.gypi, gclient runhooks --force, and do a release build.
[email protected]8974e042010-06-21 18:06:52362 'win_use_allocator_shim%': 1, # 1 = shim allocator via libcmt; 0 = msvcrt
[email protected]279cd4212009-09-11 22:32:11363
[email protected]95ff8082009-11-13 22:21:01364 # Whether usage of OpenMAX is enabled.
365 'enable_openmax%': 0,
366
[email protected]d01120e62010-05-10 17:04:48367 # Whether proprietary audio/video codecs are assumed to be included with
368 # this build (only meaningful if branding!=Chrome).
369 'proprietary_codecs%': 0,
370
[email protected]e5b2eaa2009-04-14 01:39:12371 # TODO(bradnelson): eliminate this when possible.
372 # To allow local gyp files to prevent release.vsprops from being included.
373 # Yes(1) means include release.vsprops.
374 # Once all vsprops settings are migrated into gyp, this can go away.
375 'msvs_use_common_release%': 1,
[email protected]606116d22009-05-06 22:38:23376
[email protected]cbd5fd52009-08-26 00:14:27377 # TODO(bradnelson): eliminate this when possible.
378 # To allow local gyp files to override additional linker options for msvs.
379 # Yes(1) means set use the common linker options.
[email protected]48c7af72009-07-03 22:00:19380 'msvs_use_common_linker_extras%': 1,
381
[email protected]1ffb6502009-06-02 07:46:24382 # TODO(sgk): eliminate this if possible.
383 # It would be nicer to support this via a setting in 'target_defaults'
384 # in chrome/app/locales/locales.gypi overriding the setting in the
385 # 'Debug' configuration in the 'target_defaults' dict below,
386 # but that doesn't work as we'd like.
387 'msvs_debug_link_incremental%': '2',
388
[email protected]1f790ef2011-01-11 20:45:36389 # Needed for some of the largest modules.
390 'msvs_debug_link_nonincremental%': '1',
391
[email protected]573136142009-07-15 22:48:37392 # This is the location of the sandbox binary. Chrome looks for this before
393 # running the zygote process. If found, and SUID, it will be used to
394 # sandbox the zygote process and, thus, all renderer processes.
395 'linux_sandbox_path%': '',
396
[email protected]ad6d2c42009-09-15 20:13:38397 # Set this to true to enable SELinux support.
398 'selinux%': 0,
[email protected]4c9cc6c2009-10-01 18:54:57399
[email protected]58680ce2010-09-18 00:09:15400 # Set this to true when building with Clang.
401 # See http://code.google.com/p/chromium/wiki/Clang for details.
402 # TODO: eventually clang should behave identically to gcc, and this
403 # won't be necessary.
404 'clang%': 0,
405
[email protected]5e781232011-01-28 02:57:59406 # These two variables can be set in GYP_DEFINES while running
407 # |gclient runhooks| to let clang run a plugin in every compilation.
408 # Only has an effect if 'clang=1' is in GYP_DEFINES as well.
409 # Example:
[email protected]93120fe2011-02-03 20:46:42410 # GYP_DEFINES='clang=1 clang_load=/abs/path/to/libPrintFunctionNames.dylib clang_add_plugin=print-fns' gclient runhooks
[email protected]5e781232011-01-28 02:57:59411
412 'clang_load%': '',
413 'clang_add_plugin%': '',
414
[email protected]7664ab32011-02-01 23:35:25415 # Enable sampling based profiler.
416 # See http://google-perftools.googlecode.com/svn/trunk/doc/cpuprofile.html
417 'profiling%': '0',
418
[email protected]36532f332010-08-25 00:22:01419 # Override whether we should use Breakpad on Linux. I.e. for Chrome bot.
420 'linux_breakpad%': 0,
421 # And if we want to dump symbols for Breakpad-enabled builds.
422 'linux_dump_symbols%': 0,
423 # And if we want to strip the binary after dumping symbols.
[email protected]05cb6962009-10-01 23:29:03424 'linux_strip_binary%': 0,
[email protected]1d87c282010-09-15 22:24:49425 # Strip the test binaries needed for Linux reliability tests.
426 'linux_strip_reliability_tests%': 0,
[email protected]05cb6962009-10-01 23:29:03427
[email protected]46ce5b562010-06-16 18:39:53428 # Enable TCMalloc.
429 'linux_use_tcmalloc%': 1,
[email protected]01699e22009-11-11 19:24:24430
[email protected]39ca7de2010-04-16 08:04:03431 # Disable TCMalloc's debugallocation.
432 'linux_use_debugallocation%': 0,
433
[email protected]d8b60602010-03-26 09:41:22434 # Disable TCMalloc's heapchecker.
435 'linux_use_heapchecker%': 0,
436
[email protected]64e2d4a42010-08-27 10:13:21437 # Disable shadow stack keeping used by heapcheck to unwind the stacks
438 # better.
439 'linux_keep_shadow_stacks%': 0,
440
[email protected]6def64a2010-10-28 20:40:34441 # Set to 1 to turn on seccomp sandbox by default.
442 # (Note: this is ignored for official builds.)
443 'linux_use_seccomp_sandbox%': 0,
[email protected]39c4e1a82010-03-30 19:47:41444
[email protected]556c5d72010-06-10 05:45:01445 # Set to 1 to link against libgnome-keyring instead of using dlopen().
446 'linux_link_gnome_keyring%': 0,
[email protected]abcc9ac2011-05-16 20:04:35447 # Set to 1 to link against gsettings APIs instead of using dlopen().
448 'linux_link_gsettings%': 0,
[email protected]556c5d72010-06-10 05:45:01449
[email protected]d8c7cbcc2009-10-02 19:00:31450 # Used to disable Native Client at compile time, for platforms where it
451 # isn't supported
452 'disable_nacl%': 0,
453
[email protected]77c1b29392009-12-04 06:21:29454 # Set Thumb compilation flags.
455 'arm_thumb%': 0,
456
[email protected]53e0f642010-03-05 01:41:56457 # Set ARM fpu compilation flags (only meaningful if armv7==1 and
458 # arm_neon==0).
459 'arm_fpu%': 'vfpv3',
460
[email protected]9821d0d2010-04-16 22:40:37461 # Enable new NPDevice API.
462 'enable_new_npdevice_api%': 0,
[email protected]ed154592010-04-29 00:18:50463
464 # Enable EGLImage support in OpenMAX
[email protected]58023be2011-02-04 20:34:14465 'enable_eglimage%': 1,
[email protected]ed154592010-04-29 00:18:50466
[email protected]6f51b27e2010-06-22 20:43:53467 # Enable a variable used elsewhere throughout the GYP files to determine
468 # whether to compile in the sources for the GPU plugin / process.
469 'enable_gpu%': 1,
470
[email protected]32e1dee2010-12-09 18:36:24471 # Use OpenSSL instead of NSS. Under development: see http://crbug.com/62803
[email protected]d518cd92010-09-29 12:27:44472 'use_openssl%': 0,
473
[email protected]e72e55b2011-01-06 22:19:30474 # .gyp files or targets should set chromium_code to 1 if they build
475 # Chromium-specific code, as opposed to external code. This variable is
476 # used to control such things as the set of warnings to enable, and
477 # whether warnings are treated as errors.
478 'chromium_code%': 0,
479
480 # Set to 1 to compile with the built in pdf viewer.
481 'internal_pdf%': 0,
482
483 # This allows to use libcros from the current system, ie. /usr/lib/
484 # The cros_api will be pulled in as a static library, and all headers
485 # from the system include dirs.
[email protected]bb6aba32011-01-07 19:04:43486 'system_libcros%': 0,
[email protected]e72e55b2011-01-06 22:19:30487
[email protected]e72e55b2011-01-06 22:19:30488 # NOTE: When these end up in the Mac bundle, we need to replace '-' for '_'
489 # so Cocoa is happy (http://crbug.com/20441).
490 'locales': [
491 'am', 'ar', 'bg', 'bn', 'ca', 'cs', 'da', 'de', 'el', 'en-GB',
492 'en-US', 'es-419', 'es', 'et', 'fa', 'fi', 'fil', 'fr', 'gu', 'he',
493 'hi', 'hr', 'hu', 'id', 'it', 'ja', 'kn', 'ko', 'lt', 'lv',
494 'ml', 'mr', 'nb', 'nl', 'pl', 'pt-BR', 'pt-PT', 'ro', 'ru',
495 'sk', 'sl', 'sr', 'sv', 'sw', 'ta', 'te', 'th', 'tr', 'uk',
496 'vi', 'zh-CN', 'zh-TW',
497 ],
498
[email protected]cc0322d2011-07-24 09:29:19499 # Pseudo locales are special locales which are used for testing and
500 # debugging. They don't get copied to the final app. For more info,
501 # check out https://sites.google.com/a/chromium.org/dev/Home/fake-bidi
502 'pseudo_locales': [
503 'fake-bidi',
504 ],
505
[email protected]bb6aba32011-01-07 19:04:43506 'grit_defines': [],
507
[email protected]29c2daea2011-01-05 20:38:50508 # Use Harfbuzz-NG instead of Harfbuzz.
509 # Under development: http://crbug.com/68551
510 'use_harfbuzz_ng%': 0,
511
[email protected]bd3bd442011-03-28 07:58:51512 # If debug_devtools is set to 1, JavaScript files for DevTools are
513 # stored as is and loaded from disk. Otherwise, a concatenated file
514 # is stored in resources.pak. It is still possible to load JS files
515 # from disk by passing --debug-devtools cmdline switch.
516 'debug_devtools%': 0,
517
[email protected]be8a9272011-02-10 22:06:07518 # Point to ICU directory.
519 'icu_src_dir': '../third_party/icu',
520
[email protected]912c55c2009-07-31 23:33:55521 'conditions': [
[email protected]79e2336c2011-05-12 18:18:34522 ['os_posix==1 and OS!="mac"', {
[email protected]242a9e62009-11-03 17:32:10523 # This will set gcc_version to XY if you are running gcc X.Y.*.
524 # This is used to tweak build flags for gcc 4.4.
525 'gcc_version%': '<!(python <(DEPTH)/build/compiler_version.py)',
[email protected]4d83eb72010-03-04 16:42:23526 # Figure out the python architecture to decide if we build pyauto.
[email protected]efd68462010-03-04 17:07:54527 'python_arch%': '<!(<(DEPTH)/build/linux/python_arch.sh <(sysroot)/usr/lib/libpython<(python_ver).so.1.0)',
[email protected]cbd5fd52009-08-26 00:14:27528 'conditions': [
[email protected]2a77a9d2010-08-26 19:58:10529 ['branding=="Chrome"', {
[email protected]cbd5fd52009-08-26 00:14:27530 'linux_breakpad%': 1,
[email protected]cbd5fd52009-08-26 00:14:27531 }],
[email protected]4c9cc6c2009-10-01 18:54:57532 # All Chrome builds have breakpad symbols, but only process the
533 # symbols from official builds.
[email protected]c913cb82010-08-31 19:44:08534 ['(branding=="Chrome" and buildtype=="Official")', {
[email protected]4c9cc6c2009-10-01 18:54:57535 'linux_dump_symbols%': 1,
[email protected]4c9cc6c2009-10-01 18:54:57536 }],
[email protected]cbd5fd52009-08-26 00:14:27537 ],
[email protected]79e2336c2011-05-12 18:18:34538 }], # os_posix==1 and OS!="mac"
[email protected]bb6aba32011-01-07 19:04:43539
[email protected]e14a9f92009-08-05 19:26:07540 ['OS=="mac"', {
541 'conditions': [
542 # mac_product_name is set to the name of the .app bundle as it should
543 # appear on disk. This duplicates data from
544 # chrome/app/theme/chromium/BRANDING and
545 # chrome/app/theme/google_chrome/BRANDING, but is necessary to get
546 # these names into the build system.
547 ['branding=="Chrome"', {
548 'mac_product_name%': 'Google Chrome',
549 }, { # else: branding!="Chrome"
550 'mac_product_name%': 'Chromium',
551 }],
552
553 # Feature variables for enabling Mac Breakpad and Keystone auto-update
554 # support. Both features are on by default in official builds with
555 # Chrome branding.
556 ['branding=="Chrome" and buildtype=="Official"', {
557 'mac_breakpad%': 1,
558 'mac_keystone%': 1,
[email protected]08857c6c2011-08-10 00:11:49559
560 # Official builds use clang, but only on m15+. Since there's just
561 # one buildbot config for the builder for m13, m14, and m15, this
562 # can't be defined in the buildbot config but is instead defined
563 # here (it was added after the m14 branch was cut). This is in the
564 # buildtype=="Official" section so that developers don't see it
565 # for their local builds.
[email protected]1fb9eee2011-08-11 18:10:05566 # TODO(thakis): Reenable once breakpad issues are sorted out.
567 #'clang%': 1,
[email protected]e14a9f92009-08-05 19:26:07568 }, { # else: branding!="Chrome" or buildtype!="Official"
569 'mac_breakpad%': 0,
570 'mac_keystone%': 0,
571 }],
572 ],
573 }], # OS=="mac"
[email protected]bb6aba32011-01-07 19:04:43574
[email protected]912c55c2009-07-31 23:33:55575 # Whether to use multiple cores to compile with visual studio. This is
576 # optional because it sometimes causes corruption on VS 2005.
577 # It is on by default on VS 2008 and off on VS 2005.
578 ['OS=="win"', {
579 'conditions': [
[email protected]8974e042010-06-21 18:06:52580 ['component=="shared_library"', {
581 'win_use_allocator_shim%': 0,
582 }],
[email protected]912c55c2009-07-31 23:33:55583 ['MSVS_VERSION=="2005"', {
[email protected]669795372009-08-14 17:51:13584 'msvs_multi_core_compile%': 0,
[email protected]912c55c2009-07-31 23:33:55585 },{
586 'msvs_multi_core_compile%': 1,
587 }],
[email protected]10bb8c92009-08-07 21:16:03588 # Don't do incremental linking for large modules on 32-bit.
589 ['MSVS_OS_BITS==32', {
590 'msvs_large_module_debug_link_mode%': '1', # No
591 },{
592 'msvs_large_module_debug_link_mode%': '2', # Yes
593 }],
[email protected]3e2648a2011-03-21 20:58:50594 ['MSVS_VERSION=="2010e" or MSVS_VERSION=="2008e" or MSVS_VERSION=="2005e"', {
595 'msvs_express%': 1,
596 'secure_atl%': 0,
597 },{
598 'msvs_express%': 0,
599 'secure_atl%': 1,
600 }],
[email protected]912c55c2009-07-31 23:33:55601 ],
[email protected]ef4fa4072009-12-04 22:46:50602 'nacl_win64_defines': [
603 # This flag is used to minimize dependencies when building
604 # Native Client loader for 64-bit Windows.
605 'NACL_WIN64',
606 ],
[email protected]912c55c2009-07-31 23:33:55607 }],
[email protected]bb6aba32011-01-07 19:04:43608
[email protected]79e2336c2011-05-12 18:18:34609 ['os_posix==1 and chromeos==0 and target_arch!="arm"', {
[email protected]8e553f492010-10-25 20:05:44610 'use_cups%': 1,
611 }, {
612 'use_cups%': 0,
613 }],
[email protected]bb6aba32011-01-07 19:04:43614
[email protected]19fe8f0b2010-12-07 07:27:27615 # Set the relative path from this file to the GYP file of the JPEG
616 # library used by Chromium.
617 ['use_libjpeg_turbo==1', {
618 'libjpeg_gyp_path': '../third_party/libjpeg_turbo/libjpeg.gyp',
619 }, {
620 'libjpeg_gyp_path': '../third_party/libjpeg/libjpeg.gyp',
621 }], # use_libjpeg_turbo==1
[email protected]bb6aba32011-01-07 19:04:43622
[email protected]abcc9ac2011-05-16 20:04:35623 # Options controlling the use of GConf (the classic GNOME configuration
624 # system) and GIO, which contains GSettings (the new GNOME config system).
[email protected]1c6fe29302011-01-20 22:14:31625 ['chromeos==1', {
626 'use_gconf%': 0,
[email protected]abcc9ac2011-05-16 20:04:35627 'use_gio%': 0,
[email protected]1c6fe29302011-01-20 22:14:31628 }, {
629 'use_gconf%': 1,
[email protected]abcc9ac2011-05-16 20:04:35630 'use_gio%': 1,
[email protected]1c6fe29302011-01-20 22:14:31631 }],
632
[email protected]4de39f82011-03-28 12:01:29633 # Set up -D and -E flags passed into grit.
[email protected]1660bffd2011-03-23 16:24:29634 ['branding=="Chrome"', {
635 # TODO(mmoss) The .grd files look for _google_chrome, but for
636 # consistency they should look for google_chrome_build like C++.
[email protected]4de39f82011-03-28 12:01:29637 'grit_defines': ['-D', '_google_chrome',
638 '-E', 'CHROMIUM_BUILD=google_chrome'],
[email protected]1660bffd2011-03-23 16:24:29639 }, {
[email protected]4de39f82011-03-28 12:01:29640 'grit_defines': ['-D', '_chromium',
641 '-E', 'CHROMIUM_BUILD=chromium'],
[email protected]1660bffd2011-03-23 16:24:29642 }],
[email protected]bb6aba32011-01-07 19:04:43643 ['chromeos==1', {
644 'grit_defines': ['-D', 'chromeos'],
645 }],
646 ['toolkit_views==1', {
647 'grit_defines': ['-D', 'toolkit_views'],
648 }],
[email protected]1b546692011-06-30 18:22:30649 ['toolkit_uses_pure_views==1', {
650 'grit_defines': ['-D', 'toolkit_uses_pure_views'],
651 }],
[email protected]bb6aba32011-01-07 19:04:43652 ['touchui==1', {
653 'grit_defines': ['-D', 'touchui'],
654 }],
[email protected]8ebc9b42011-07-14 15:22:18655 ['webui_certificate_viewer==1', {
656 'grit_defines': ['-D', 'webui_certificate_viewer'],
657 }],
[email protected]e47c32032011-03-01 19:26:20658 ['file_manager_extension==1', {
659 'grit_defines': ['-D', 'file_manager_extension'],
660 }],
[email protected]8b2e9f392011-08-05 04:00:47661 ['webui_task_manager==1', {
662 'grit_defines': ['-D', 'webui_task_manager'],
663 }],
[email protected]9a425422011-01-11 00:53:18664 ['remoting==1', {
665 'grit_defines': ['-D', 'remoting'],
666 }],
[email protected]bb6aba32011-01-07 19:04:43667 ['use_titlecase_in_grd_files==1', {
668 'grit_defines': ['-D', 'use_titlecase'],
669 }],
[email protected]00dc155832011-02-01 18:51:19670 ['use_third_party_translations==1', {
671 'grit_defines': ['-D', 'use_third_party_translations'],
[email protected]fb6c1022011-06-27 21:58:12672 'locales': [
[email protected]53e73332011-08-09 04:44:34673 'ast', 'bs', 'ca@valencia', 'en-AU', 'eo', 'eu', 'gl', 'hy', 'ia', 'ka',
674 'ku', 'kw', 'ug',
[email protected]fb6c1022011-06-27 21:58:12675 ],
[email protected]00dc155832011-02-01 18:51:19676 }],
[email protected]5d451ad2011-02-11 16:43:46677
678 ['clang_use_chrome_plugins==1', {
679 'clang_chrome_plugins_flags':
680 '<!(<(DEPTH)/tools/clang/scripts/plugin_flags.sh)',
681 }],
[email protected]cfa2e1102011-04-27 22:30:23682
[email protected]452da69e2011-05-24 02:36:05683 # Set use_ibus to 1 to enable ibus support.
[email protected]cfa2e1102011-04-27 22:30:23684 ['touchui==1 and chromeos==1', {
685 'use_ibus%': 1,
686 }, {
687 'use_ibus%': 0,
[email protected]365dd5b92011-05-26 01:30:56688 }],
689
690 ['enable_register_protocol_handler==1', {
691 'grit_defines': ['-D', 'enable_register_protocol_handler'],
692 }],
[email protected]912c55c2009-07-31 23:33:55693 ],
[email protected]2f80c312009-02-25 21:26:55694 },
695 'target_defaults': {
[email protected]1c966092009-08-20 21:19:26696 'variables': {
[email protected]a6e22132010-02-10 20:43:18697 # The condition that operates on chromium_code is in a target_conditions
698 # section, and will not have access to the default fallback value of
699 # chromium_code at the top of this file, or to the chromium_code
700 # variable placed at the root variables scope of .gyp files, because
701 # those variables are not set at target scope. As a workaround,
702 # if chromium_code is not set at target scope, define it in target scope
703 # to contain whatever value it has during early variable expansion.
704 # That's enough to make it available during target conditional
705 # processing.
706 'chromium_code%': '<(chromium_code)',
707
[email protected]7e0d664a2009-12-03 21:07:47708 # See http://gcc.gnu.org/onlinedocs/gcc-4.4.2/gcc/Optimize-Options.html
[email protected]d5d593a2009-08-28 23:23:29709 'mac_release_optimization%': '3', # Use -O3 unless overridden
[email protected]ffd984b12009-09-11 19:37:00710 'mac_debug_optimization%': '0', # Use -O0 unless overridden
[email protected]7e0d664a2009-12-03 21:07:47711 # See http://msdn.microsoft.com/en-us/library/aa652360(VS.71).aspx
712 'win_release_Optimization%': '2', # 2 = /Os
713 'win_debug_Optimization%': '0', # 0 = /Od
[email protected]6b0507b2010-05-07 07:41:21714 # See http://msdn.microsoft.com/en-us/library/8wtf2dfz(VS.71).aspx
715 'win_debug_RuntimeChecks%': '3', # 3 = all checks enabled, 0 = off
716 # See http://msdn.microsoft.com/en-us/library/47238hez(VS.71).aspx
[email protected]2ae6e022010-05-07 13:19:15717 'win_debug_InlineFunctionExpansion%': '', # empty = default, 0 = off,
718 'win_release_InlineFunctionExpansion%': '2', # 1 = only __inline, 2 = max
[email protected]fac10d12010-11-08 16:00:31719 # VS inserts quite a lot of extra checks to algorithms like
720 # std::partial_sort in Debug build which make them O(N^2)
721 # instead of O(N*logN). This is particularly slow under memory
722 # tools like ThreadSanitizer so we want it to be disablable.
723 # See http://msdn.microsoft.com/en-us/library/aa985982(v=VS.80).aspx
724 'win_debug_disable_iterator_debugging%': '0',
[email protected]7e0d664a2009-12-03 21:07:47725
[email protected]ffd984b12009-09-11 19:37:00726 'release_extra_cflags%': '',
727 'debug_extra_cflags%': '',
[email protected]92822e82009-09-18 14:26:56728 'release_valgrind_build%': 0,
[email protected]8974e042010-06-21 18:06:52729
730 'conditions': [
731 ['OS=="win" and component=="shared_library"', {
732 # See http://msdn.microsoft.com/en-us/library/aa652367.aspx
733 'win_release_RuntimeLibrary%': '2', # 2 = /MT (nondebug DLL)
734 'win_debug_RuntimeLibrary%': '3', # 3 = /MTd (debug DLL)
735 }, {
736 # See http://msdn.microsoft.com/en-us/library/aa652367.aspx
737 'win_release_RuntimeLibrary%': '0', # 0 = /MT (nondebug static)
738 'win_debug_RuntimeLibrary%': '1', # 1 = /MTd (debug static)
739 }],
740 ],
[email protected]1c966092009-08-20 21:19:26741 },
[email protected]32aa8cc2009-03-04 21:36:39742 'conditions': [
743 ['branding=="Chrome"', {
744 'defines': ['GOOGLE_CHROME_BUILD'],
745 }, { # else: branding!="Chrome"
746 'defines': ['CHROMIUM_BUILD'],
747 }],
[email protected]63e39a282011-07-13 20:41:28748 ['component=="shared_library"', {
749 'defines': ['COMPONENT_BUILD'],
750 }],
[email protected]06c756182010-04-27 18:31:31751 ['toolkit_views==1', {
[email protected]e6970232009-05-12 23:51:17752 'defines': ['TOOLKIT_VIEWS=1'],
753 }],
[email protected]1b546692011-06-30 18:22:30754 ['toolkit_uses_pure_views==1', {
755 'defines': ['TOOLKIT_USES_PURE_VIEWS=1'],
756 }],
[email protected]9c8a1982011-05-24 23:08:58757 ['views_compositor==1', {
[email protected]c3870f42011-06-10 16:43:27758 'defines': ['VIEWS_COMPOSITOR=1'],
[email protected]9c8a1982011-05-24 23:08:58759 }],
[email protected]fdc5bed2010-01-09 01:16:57760 ['chromeos==1', {
[email protected]16779842009-07-08 23:45:29761 'defines': ['OS_CHROMEOS=1'],
[email protected]2b883b92009-06-02 22:57:50762 }],
[email protected]0094fbe2010-07-15 21:51:43763 ['touchui==1', {
764 'defines': ['TOUCH_UI=1'],
765 }],
[email protected]236754a2011-07-28 17:38:23766 ['use_wayland==1', {
767 'defines': ['USE_WAYLAND=1', 'WL_EGL_PLATFORM=1'],
768 }],
[email protected]e47c32032011-03-01 19:26:20769 ['file_manager_extension==1', {
770 'defines': ['FILE_MANAGER_EXTENSION=1'],
771 }],
[email protected]8b2e9f392011-08-05 04:00:47772 ['webui_task_manager==1', {
773 'defines': ['WEBUI_TASK_MANAGER=1'],
774 }],
[email protected]7664ab32011-02-01 23:35:25775 ['profiling==1', {
776 'defines': ['ENABLE_PROFILING=1'],
777 }],
[email protected]542bf24a2010-06-11 23:08:17778 ['remoting==1', {
779 'defines': ['ENABLE_REMOTING=1'],
[email protected]c0bac532010-06-11 00:39:00780 }],
[email protected]a026daa2011-04-20 15:49:51781 ['p2p_apis==1', {
782 'defines': ['ENABLE_P2P_APIS=1'],
783 }],
[email protected]d01120e62010-05-10 17:04:48784 ['proprietary_codecs==1', {
785 'defines': ['USE_PROPRIETARY_CODECS'],
786 }],
[email protected]1b4209f2011-01-07 00:25:40787 ['enable_flapper_hacks==1', {
788 'defines': ['ENABLE_FLAPPER_HACKS=1'],
789 }],
[email protected]f31e2e52011-07-14 16:01:19790 ['configuration_policy==1', {
791 'defines': ['ENABLE_CONFIGURATION_POLICY'],
792 }],
[email protected]9c1949e2009-10-02 19:59:54793 ['fastbuild!=0', {
794 'conditions': [
[email protected]1cc2fa72010-07-03 08:49:24795 # For Windows, we don't genererate debug information.
[email protected]9c1949e2009-10-02 19:59:54796 ['OS=="win"', {
797 'msvs_settings': {
798 'VCLinkerTool': {
799 'GenerateDebugInformation': 'false',
800 },
801 'VCCLCompilerTool': {
802 'DebugInformationFormat': '0',
803 }
804 }
[email protected]1cc2fa72010-07-03 08:49:24805 }, { # else: OS != "win", generate less debug information.
806 'variables': {
807 'debug_extra_cflags': '-g1',
808 },
[email protected]37c84192010-04-14 21:37:40809 }],
[email protected]aecc4d12011-01-19 05:32:33810 # Clang creates chubby debug information, which makes linking very
811 # slow. For now, don't create debug information with clang. See
812 # http://crbug.com/70000
813 ['OS=="linux" and clang==1', {
814 'variables': {
815 'debug_extra_cflags': '-g0',
816 },
817 }],
[email protected]9c1949e2009-10-02 19:59:54818 ], # conditions for fastbuild.
819 }], # fastbuild!=0
[email protected]ad6d2c42009-09-15 20:13:38820 ['selinux==1', {
821 'defines': ['CHROMIUM_SELINUX=1'],
822 }],
[email protected]7e0d664a2009-12-03 21:07:47823 ['win_use_allocator_shim==0', {
824 'conditions': [
825 ['OS=="win"', {
826 'defines': ['NO_TCMALLOC'],
827 }],
828 ],
829 }],
[email protected]43f28f832010-02-03 02:28:48830 ['enable_gpu==1', {
[email protected]7477ea6f2009-12-22 23:28:15831 'defines': [
832 'ENABLE_GPU=1',
833 ],
834 }],
[email protected]b1c2a5542010-10-08 12:44:40835 ['use_openssl==1', {
836 'defines': [
837 'USE_OPENSSL=1',
838 ],
839 }],
[email protected]ed154592010-04-29 00:18:50840 ['enable_eglimage==1', {
841 'defines': [
842 'ENABLE_EGLIMAGE=1',
843 ],
844 }],
[email protected]7d7564a12011-06-21 19:20:22845 ['use_skia==1', {
846 'defines': [
847 'USE_SKIA=1',
848 ],
849 }],
[email protected]f5ecbba12009-04-03 04:35:18850 ['coverage!=0', {
851 'conditions': [
852 ['OS=="mac"', {
853 'xcode_settings': {
[email protected]ab2956372009-08-13 18:11:04854 'GCC_INSTRUMENT_PROGRAM_FLOW_ARCS': 'YES', # -fprofile-arcs
855 'GCC_GENERATE_TEST_COVERAGE_FILES': 'YES', # -ftest-coverage
[email protected]5ae4f55e2009-04-13 23:19:47856 },
[email protected]e4fb84c2009-12-28 20:45:43857 # Add -lgcov for types executable, shared_library, and
[email protected]dc259ce52010-04-13 04:03:10858 # loadable_module; not for static_library.
[email protected]e4fb84c2009-12-28 20:45:43859 # This is a delayed conditional.
[email protected]f5ecbba12009-04-03 04:35:18860 'target_conditions': [
[email protected]e4fb84c2009-12-28 20:45:43861 ['_type!="static_library"', {
[email protected]f5ecbba12009-04-03 04:35:18862 'xcode_settings': { 'OTHER_LDFLAGS': [ '-lgcov' ] },
[email protected]5ae4f55e2009-04-13 23:19:47863 }],
864 ],
865 }],
[email protected]f5ecbba12009-04-03 04:35:18866 ['OS=="linux"', {
867 'cflags': [ '-ftest-coverage',
868 '-fprofile-arcs' ],
[email protected]7122ffd52009-04-30 23:19:00869 'link_settings': { 'libraries': [ '-lgcov' ] },
[email protected]f5ecbba12009-04-03 04:35:18870 }],
[email protected]e8f6ff42009-07-07 18:20:53871 # Finally, for Windows, we simply turn on profiling.
872 ['OS=="win"', {
873 'msvs_settings': {
874 'VCLinkerTool': {
875 'Profile': 'true',
876 },
[email protected]10bb8c92009-08-07 21:16:03877 'VCCLCompilerTool': {
[email protected]e8f6ff42009-07-07 18:20:53878 # /Z7, not /Zi, so coverage is happyb
879 'DebugInformationFormat': '1',
[email protected]1f9471a2010-01-04 06:40:16880 'AdditionalOptions': ['/Yd'],
[email protected]e8f6ff42009-07-07 18:20:53881 }
882 }
883 }], # OS==win
884 ], # conditions for coverage
885 }], # coverage!=0
[email protected]4e4d6042010-08-26 18:34:38886 ['OS=="win"', {
887 'defines': [
888 '__STD_C',
889 '_CRT_SECURE_NO_DEPRECATE',
890 '_SCL_SECURE_NO_DEPRECATE',
891 ],
892 'include_dirs': [
893 '<(DEPTH)/third_party/wtl/include',
894 ],
895 }], # OS==win
[email protected]365dd5b92011-05-26 01:30:56896 ['enable_register_protocol_handler==1', {
897 'defines': [
[email protected]06bba4fb2011-06-09 05:17:19898 'ENABLE_REGISTER_PROTOCOL_HANDLER=1',
[email protected]365dd5b92011-05-26 01:30:56899 ],
900 }],
[email protected]a6e22132010-02-10 20:43:18901 ], # conditions for 'target_defaults'
902 'target_conditions': [
[email protected]c14d8e772010-02-09 22:06:15903 ['chromium_code==0', {
[email protected]d8543312010-02-10 17:43:28904 'conditions': [
[email protected]79e2336c2011-05-12 18:18:34905 [ 'os_posix==1 and OS!="mac"', {
[email protected]c0a6b272011-02-09 22:32:33906 # We don't want to get warnings from third-party code,
907 # so remove any existing warning-enabling flags like -Wall.
[email protected]d8543312010-02-10 17:43:28908 'cflags!': [
909 '-Wall',
910 '-Wextra',
911 '-Werror',
912 ],
[email protected]ec1d155be2011-02-08 22:19:00913 'cflags': [
914 # Don't warn about hash_map in third-party code.
915 '-Wno-deprecated',
[email protected]c0a6b272011-02-09 22:32:33916 # Don't warn about printf format problems.
917 # This is off by default in gcc but on in Ubuntu's gcc(!).
[email protected]ec392872011-02-10 22:38:22918 '-Wno-format',
[email protected]ec1d155be2011-02-08 22:19:00919 ],
[email protected]d16bd642011-07-25 23:59:18920 'cflags_cc!': [
921 # TODO(fischman): remove this.
922 # http://code.google.com/p/chromium/issues/detail?id=90453
923 '-Wsign-compare',
924 ]
[email protected]d8543312010-02-10 17:43:28925 }],
[email protected]6e4451892011-07-27 10:32:11926 [ 'os_posix==1 and OS!="mac" and chromeos==0', {
927 'cflags': [
928 # Don't warn about ignoring the return value from e.g. close().
929 # This is off by default in some gccs but on by default in others.
930 # Currently this option is not set for Chrome OS build because
931 # the current version of gcc (4.3.4) used for building Chrome in
932 # Chrome OS chroot doesn't support this option.
933 # TODO(mazda): remove the conditional for Chrome OS when gcc
934 # version is upgraded.
935 '-Wno-unused-result',
936 ],
937 }],
[email protected]d8543312010-02-10 17:43:28938 [ 'OS=="win"', {
939 'defines': [
940 '_CRT_SECURE_NO_DEPRECATE',
941 '_CRT_NONSTDC_NO_WARNINGS',
942 '_CRT_NONSTDC_NO_DEPRECATE',
943 '_SCL_SECURE_NO_DEPRECATE',
944 ],
945 'msvs_disabled_warnings': [4800],
946 'msvs_settings': {
947 'VCCLCompilerTool': {
[email protected]942c3a60f2011-05-03 02:04:11948 'WarningLevel': '3',
949 'WarnAsError': 'false', # TODO(maruel): Enable it.
[email protected]d8543312010-02-10 17:43:28950 'Detect64BitPortabilityProblems': 'false',
951 },
952 },
953 }],
[email protected]ea47b6a2011-07-17 19:39:42954 # TODO(darin): Unfortunately, some third_party code depends on base/
955 [ 'OS=="win" and component=="shared_library"', {
956 'msvs_disabled_warnings': [
957 4251, # class 'std::xx' needs to have dll-interface.
958 ],
959 }],
[email protected]d8543312010-02-10 17:43:28960 [ 'OS=="mac"', {
961 'xcode_settings': {
962 'GCC_TREAT_WARNINGS_AS_ERRORS': 'NO',
[email protected]4c4c2e5332010-06-15 11:51:06963 'WARNING_CFLAGS!': ['-Wall', '-Wextra'],
[email protected]d8543312010-02-10 17:43:28964 },
965 }],
[email protected]c14d8e772010-02-09 22:06:15966 ],
967 }, {
968 # In Chromium code, we define __STDC_FORMAT_MACROS in order to get the
969 # C99 macros on Mac and Linux.
970 'defines': [
971 '__STDC_FORMAT_MACROS',
972 ],
973 'conditions': [
974 ['OS!="win"', {
[email protected]40519592010-11-16 15:23:30975 'sources/': [ ['exclude', '_win(_unittest)?\\.(h|cc)$'],
[email protected]a316ca532010-11-15 14:08:16976 ['exclude', '(^|/)win/'],
[email protected]40519592010-11-16 15:23:30977 ['exclude', '(^|/)win_[^/]*\\.(h|cc)$'] ],
[email protected]c14d8e772010-02-09 22:06:15978 }],
979 ['OS!="mac"', {
[email protected]40519592010-11-16 15:23:30980 'sources/': [ ['exclude', '_(cocoa|mac)(_unittest)?\\.(h|cc)$'],
[email protected]a316ca532010-11-15 14:08:16981 ['exclude', '(^|/)(cocoa|mac)/'],
982 ['exclude', '\\.mm?$' ] ],
[email protected]c14d8e772010-02-09 22:06:15983 }],
[email protected]79e2336c2011-05-12 18:18:34984 ['toolkit_uses_gtk!=1', {
[email protected]c14d8e772010-02-09 22:06:15985 'sources/': [
[email protected]40519592010-11-16 15:23:30986 ['exclude', '_(chromeos|gtk|x|x11|xdg)(_unittest)?\\.(h|cc)$'],
[email protected]a316ca532010-11-15 14:08:16987 ['exclude', '(^|/)gtk/'],
[email protected]40519592010-11-16 15:23:30988 ['exclude', '(^|/)(gtk|x11)_[^/]*\\.(h|cc)$'],
[email protected]18cff3d2010-02-17 18:03:13989 ],
990 }],
[email protected]f1b2cd02011-08-10 16:50:44991 ['use_wayland!=1', {
992 'sources/': [
993 ['exclude', '_(wayland)(_unittest)?\\.(h|cc)$'],
994 ['exclude', '(^|/)wayland/'],
995 ['exclude', '(^|/)(wayland)_[^/]*\\.(h|cc)$'],
996 ],
997 }],
[email protected]18cff3d2010-02-17 18:03:13998 ['OS!="linux"', {
999 'sources/': [
[email protected]40519592010-11-16 15:23:301000 ['exclude', '_linux(_unittest)?\\.(h|cc)$'],
[email protected]a316ca532010-11-15 14:08:161001 ['exclude', '(^|/)linux/'],
[email protected]18cff3d2010-02-17 18:03:131002 ],
[email protected]c14d8e772010-02-09 22:06:151003 }],
1004 # We use "POSIX" to refer to all non-Windows operating systems.
1005 ['OS=="win"', {
[email protected]40519592010-11-16 15:23:301006 'sources/': [ ['exclude', '_posix\\.(h|cc)$'] ],
[email protected]f55bd4862010-05-27 15:38:071007 # turn on warnings for signed/unsigned mismatch on chromium code.
1008 'msvs_settings': {
1009 'VCCLCompilerTool': {
1010 'AdditionalOptions': ['/we4389'],
1011 },
1012 },
[email protected]c14d8e772010-02-09 22:06:151013 }],
[email protected]63e39a282011-07-13 20:41:281014 ['OS=="win" and component=="shared_library"', {
1015 'msvs_disabled_warnings': [
1016 4251, # class 'std::xx' needs to have dll-interface.
1017 ],
1018 }],
[email protected]c14d8e772010-02-09 22:06:151019 ['chromeos!=1', {
[email protected]40519592010-11-16 15:23:301020 'sources/': [ ['exclude', '_chromeos\\.(h|cc)$'] ]
[email protected]c14d8e772010-02-09 22:06:151021 }],
[email protected]06c756182010-04-27 18:31:311022 ['toolkit_views==0', {
[email protected]40519592010-11-16 15:23:301023 'sources/': [ ['exclude', '_views\\.(h|cc)$'] ]
[email protected]c14d8e772010-02-09 22:06:151024 }],
1025 ],
1026 }],
[email protected]a6e22132010-02-10 20:43:181027 ], # target_conditions for 'target_defaults'
[email protected]2f80c312009-02-25 21:26:551028 'default_configuration': 'Debug',
1029 'configurations': {
[email protected]5153767c2009-12-22 01:52:501030 # VCLinkerTool LinkIncremental values below:
1031 # 0 == default
1032 # 1 == /INCREMENTAL:NO
1033 # 2 == /INCREMENTAL
1034 # Debug links incremental, Release does not.
1035 #
[email protected]7b99801e2010-11-03 17:26:231036 # Abstract base configurations to cover common attributes.
[email protected]5153767c2009-12-22 01:52:501037 #
1038 'Common_Base': {
[email protected]bb05e452009-10-29 21:24:561039 'abstract': 1,
1040 'msvs_configuration_attributes': {
1041 'OutputDirectory': '$(SolutionDir)$(ConfigurationName)',
1042 'IntermediateDirectory': '$(OutDir)\\obj\\$(ProjectName)',
1043 'CharacterSet': '1',
1044 },
[email protected]5153767c2009-12-22 01:52:501045 },
1046 'x86_Base': {
1047 'abstract': 1,
[email protected]ef4fa4072009-12-04 22:46:501048 'msvs_settings': {
1049 'VCLinkerTool': {
1050 'TargetMachine': '1',
1051 },
1052 },
[email protected]2fa40782009-11-01 21:17:341053 'msvs_configuration_platform': 'Win32',
[email protected]bb05e452009-10-29 21:24:561054 },
[email protected]5153767c2009-12-22 01:52:501055 'x64_Base': {
1056 'abstract': 1,
1057 'msvs_configuration_platform': 'x64',
1058 'msvs_settings': {
1059 'VCLinkerTool': {
1060 'TargetMachine': '17', # x86 - 64
[email protected]5153767c2009-12-22 01:52:501061 'AdditionalLibraryDirectories!':
1062 ['<(DEPTH)/third_party/platformsdk_win7/files/Lib'],
1063 'AdditionalLibraryDirectories':
1064 ['<(DEPTH)/third_party/platformsdk_win7/files/Lib/x64'],
1065 },
[email protected]d26b4418ab2010-03-24 22:06:351066 'VCLibrarianTool': {
[email protected]5153767c2009-12-22 01:52:501067 'AdditionalLibraryDirectories!':
1068 ['<(DEPTH)/third_party/platformsdk_win7/files/Lib'],
1069 'AdditionalLibraryDirectories':
1070 ['<(DEPTH)/third_party/platformsdk_win7/files/Lib/x64'],
1071 },
1072 },
1073 'defines': [
1074 # Not sure if tcmalloc works on 64-bit Windows.
1075 'NO_TCMALLOC',
1076 ],
1077 },
1078 'Debug_Base': {
1079 'abstract': 1,
[email protected]14339762011-04-05 07:36:581080 'defines': [
1081 'DYNAMIC_ANNOTATIONS_ENABLED=1',
1082 'WTF_USE_DYNAMIC_ANNOTATIONS=1',
1083 ],
[email protected]1c966092009-08-20 21:19:261084 'xcode_settings': {
1085 'COPY_PHASE_STRIP': 'NO',
[email protected]d5d593a2009-08-28 23:23:291086 'GCC_OPTIMIZATION_LEVEL': '<(mac_debug_optimization)',
[email protected]a68c29a2011-07-01 16:23:491087 'OTHER_CFLAGS': [
[email protected]a68c29a2011-07-01 16:23:491088 '<@(debug_extra_cflags)',
1089 ],
[email protected]1c966092009-08-20 21:19:261090 },
[email protected]bb05e452009-10-29 21:24:561091 'msvs_settings': {
1092 'VCCLCompilerTool': {
[email protected]7e0d664a2009-12-03 21:07:471093 'Optimization': '<(win_debug_Optimization)',
[email protected]bb05e452009-10-29 21:24:561094 'PreprocessorDefinitions': ['_DEBUG'],
[email protected]6b0507b2010-05-07 07:41:211095 'BasicRuntimeChecks': '<(win_debug_RuntimeChecks)',
[email protected]7e0d664a2009-12-03 21:07:471096 'RuntimeLibrary': '<(win_debug_RuntimeLibrary)',
[email protected]2ae6e022010-05-07 13:19:151097 'conditions': [
1098 # According to MSVS, InlineFunctionExpansion=0 means
1099 # "default inlining", not "/Ob0".
1100 # Thus, we have to handle InlineFunctionExpansion==0 separately.
1101 ['win_debug_InlineFunctionExpansion==0', {
1102 'AdditionalOptions': ['/Ob0'],
1103 }],
1104 ['win_debug_InlineFunctionExpansion!=""', {
1105 'InlineFunctionExpansion':
1106 '<(win_debug_InlineFunctionExpansion)',
1107 }],
[email protected]fac10d12010-11-08 16:00:311108 ['win_debug_disable_iterator_debugging==1', {
1109 'PreprocessorDefinitions': ['_HAS_ITERATOR_DEBUGGING=0'],
1110 }],
[email protected]2ae6e022010-05-07 13:19:151111 ],
[email protected]bb05e452009-10-29 21:24:561112 },
1113 'VCLinkerTool': {
1114 'LinkIncremental': '<(msvs_debug_link_incremental)',
[email protected]646f6b42011-07-14 13:57:021115 # ASLR makes debugging with windbg difficult because Chrome.exe and
1116 # Chrome.dll share the same base name. As result, windbg will
1117 # name the Chrome.dll module like chrome_<base address>, where
1118 # <base address> typically changes with each launch. This in turn
1119 # means that breakpoints in Chrome.dll don't stick from one launch
1120 # to the next. For this reason, we turn ASLR off in debug builds.
1121 # Note that this is a three-way bool, where 0 means to pick up
1122 # the default setting, 1 is off and 2 is on.
1123 'RandomizedBaseAddress': 1,
[email protected]bb05e452009-10-29 21:24:561124 },
1125 'VCResourceCompilerTool': {
1126 'PreprocessorDefinitions': ['_DEBUG'],
1127 },
1128 },
[email protected]2f80c312009-02-25 21:26:551129 'conditions': [
[email protected]bb05e452009-10-29 21:24:561130 ['OS=="linux"', {
1131 'cflags': [
1132 '<@(debug_extra_cflags)',
1133 ],
[email protected]2f80c312009-02-25 21:26:551134 }],
[email protected]56cca4e2011-07-01 21:33:351135 ['release_valgrind_build==0', {
1136 'xcode_settings': {
1137 'OTHER_CFLAGS': [
1138 '-fstack-protector-all', # Implies -fstack-protector
1139 ],
1140 },
1141 }],
[email protected]2f80c312009-02-25 21:26:551142 ],
1143 },
[email protected]5153767c2009-12-22 01:52:501144 'Release_Base': {
1145 'abstract': 1,
[email protected]2f80c312009-02-25 21:26:551146 'defines': [
1147 'NDEBUG',
1148 ],
[email protected]1c966092009-08-20 21:19:261149 'xcode_settings': {
1150 'DEAD_CODE_STRIPPING': 'YES', # -Wl,-dead_strip
1151 'GCC_OPTIMIZATION_LEVEL': '<(mac_release_optimization)',
[email protected]ffd984b12009-09-11 19:37:001152 'OTHER_CFLAGS': [ '<@(release_extra_cflags)', ],
[email protected]1c966092009-08-20 21:19:261153 },
[email protected]bb05e452009-10-29 21:24:561154 'msvs_settings': {
[email protected]7e0d664a2009-12-03 21:07:471155 'VCCLCompilerTool': {
1156 'Optimization': '<(win_release_Optimization)',
1157 'RuntimeLibrary': '<(win_release_RuntimeLibrary)',
[email protected]2ae6e022010-05-07 13:19:151158 'conditions': [
1159 # According to MSVS, InlineFunctionExpansion=0 means
1160 # "default inlining", not "/Ob0".
1161 # Thus, we have to handle InlineFunctionExpansion==0 separately.
1162 ['win_release_InlineFunctionExpansion==0', {
1163 'AdditionalOptions': ['/Ob0'],
1164 }],
1165 ['win_release_InlineFunctionExpansion!=""', {
1166 'InlineFunctionExpansion':
1167 '<(win_release_InlineFunctionExpansion)',
1168 }],
1169 ],
[email protected]7e0d664a2009-12-03 21:07:471170 },
[email protected]bb05e452009-10-29 21:24:561171 'VCLinkerTool': {
[email protected]c059c612011-08-08 20:56:341172 # LinkIncremental is a tri-state boolean, where 0 means default
1173 # (i.e., inherit from parent solution), 1 means false, and
1174 # 2 means true.
[email protected]bb05e452009-10-29 21:24:561175 'LinkIncremental': '1',
[email protected]c059c612011-08-08 20:56:341176 # This corresponds to the /PROFILE flag which ensures the PDB
1177 # file contains FIXUP information (growing the PDB file by about
1178 # 5%) but does not otherwise alter the output binary. This
1179 # information is used by the Syzygy optimization tool when
1180 # decomposing the release image.
1181 'Profile': 'true',
[email protected]bb05e452009-10-29 21:24:561182 },
1183 },
[email protected]2f80c312009-02-25 21:26:551184 'conditions': [
[email protected]92822e82009-09-18 14:26:561185 ['release_valgrind_build==0', {
[email protected]14339762011-04-05 07:36:581186 'defines': [
1187 'NVALGRIND',
1188 'DYNAMIC_ANNOTATIONS_ENABLED=0',
1189 ],
[email protected]ee857512010-05-14 08:24:421190 }, {
[email protected]14339762011-04-05 07:36:581191 'defines': [
1192 'DYNAMIC_ANNOTATIONS_ENABLED=1',
1193 'WTF_USE_DYNAMIC_ANNOTATIONS=1',
1194 ],
[email protected]92822e82009-09-18 14:26:561195 }],
[email protected]7e0d664a2009-12-03 21:07:471196 ['win_use_allocator_shim==0', {
1197 'defines': ['NO_TCMALLOC'],
1198 }],
[email protected]bb05e452009-10-29 21:24:561199 ['OS=="linux"', {
1200 'cflags': [
[email protected]ffd984b12009-09-11 19:37:001201 '<@(release_extra_cflags)',
[email protected]bb05e452009-10-29 21:24:561202 ],
1203 }],
[email protected]2f80c312009-02-25 21:26:551204 ],
1205 },
[email protected]5153767c2009-12-22 01:52:501206 'Purify_Base': {
1207 'abstract': 1,
1208 'defines': [
1209 'PURIFY',
1210 'NO_TCMALLOC',
1211 ],
1212 'msvs_settings': {
1213 'VCCLCompilerTool': {
1214 'Optimization': '0',
1215 'RuntimeLibrary': '0',
1216 'BufferSecurityCheck': 'false',
1217 },
1218 'VCLinkerTool': {
1219 'EnableCOMDATFolding': '1',
1220 'LinkIncremental': '1',
1221 },
1222 },
1223 },
1224 #
1225 # Concrete configurations
1226 #
1227 'Debug': {
1228 'inherit_from': ['Common_Base', 'x86_Base', 'Debug_Base'],
1229 },
1230 'Release': {
1231 'inherit_from': ['Common_Base', 'x86_Base', 'Release_Base'],
1232 'conditions': [
1233 ['msvs_use_common_release', {
[email protected]1f9471a2010-01-04 06:40:161234 'includes': ['release.gypi'],
[email protected]5153767c2009-12-22 01:52:501235 }],
1236 ]
1237 },
[email protected]f926fa0a2009-08-04 22:50:131238 'conditions': [
1239 [ 'OS=="win"', {
1240 # TODO(bradnelson): add a gyp mechanism to make this more graceful.
1241 'Purify': {
[email protected]5153767c2009-12-22 01:52:501242 'inherit_from': ['Common_Base', 'x86_Base', 'Release_Base', 'Purify'],
[email protected]ef4fa4072009-12-04 22:46:501243 },
1244 'Debug_x64': {
[email protected]5153767c2009-12-22 01:52:501245 'inherit_from': ['Common_Base', 'x64_Base', 'Debug_Base'],
[email protected]78263c12009-11-01 23:45:301246 },
1247 'Release_x64': {
[email protected]5153767c2009-12-22 01:52:501248 'inherit_from': ['Common_Base', 'x64_Base', 'Release_Base'],
[email protected]78263c12009-11-01 23:45:301249 },
1250 'Purify_x64': {
[email protected]1f9471a2010-01-04 06:40:161251 'inherit_from': ['Common_Base', 'x64_Base', 'Release_Base', 'Purify_Base'],
[email protected]78263c12009-11-01 23:45:301252 },
[email protected]f926fa0a2009-08-04 22:50:131253 }],
1254 ],
[email protected]2f80c312009-02-25 21:26:551255 },
1256 },
1257 'conditions': [
[email protected]79e2336c2011-05-12 18:18:341258 ['os_posix==1 and OS!="mac"', {
[email protected]9d384032009-03-20 23:13:261259 'target_defaults': {
[email protected]5315f2842009-04-28 00:43:271260 # Enable -Werror by default, but put it in a variable so it can
1261 # be disabled in ~/.gyp/include.gypi on the valgrind builders.
1262 'variables': {
[email protected]57e94022011-05-04 15:33:191263 # Use -fno-strict-aliasing, see http://crbug.com/32204
[email protected]ecf52cb82010-01-13 19:25:421264 'no_strict_aliasing%': 1,
[email protected]79e2336c2011-05-12 18:18:341265 'conditions': [
1266 ['OS=="linux"', {
1267 'werror%': '-Werror',
1268 }, { # turn off -Werror on other Unices
1269 'werror%': '',
1270 }],
[email protected]47deeb62009-12-17 14:49:391271 ],
[email protected]5315f2842009-04-28 00:43:271272 },
[email protected]9d384032009-03-20 23:13:261273 'cflags': [
[email protected]1bba09c2009-08-13 12:53:161274 '<(werror)', # See note above about the werror variable.
1275 '-pthread',
1276 '-fno-exceptions',
1277 '-Wall',
[email protected]0fa17082010-03-26 00:48:051278 # TODO(evan): turn this back on once all the builds work.
1279 # '-Wextra',
[email protected]225c8f52010-02-05 22:23:201280 # Don't warn about unused function params. We use those everywhere.
1281 '-Wno-unused-parameter',
1282 # Don't warn about the "struct foo f = {0};" initialization pattern.
1283 '-Wno-missing-field-initializers',
[email protected]1bba09c2009-08-13 12:53:161284 '-D_FILE_OFFSET_BITS=64',
[email protected]3df6e3a2010-01-21 20:23:121285 # Don't export any symbols (for example, to plugins we dlopen()).
1286 # Note: this is *required* to make some plugins work.
1287 '-fvisibility=hidden',
[email protected]7ca6ce12010-09-15 23:39:351288 '-pipe',
[email protected]8a2fcba2009-07-29 00:52:241289 ],
1290 'cflags_cc': [
[email protected]832d0212009-10-28 19:12:221291 '-fno-rtti',
[email protected]8a2fcba2009-07-29 00:52:241292 '-fno-threadsafe-statics',
[email protected]f5986c42009-11-17 18:39:361293 # Make inline functions have hidden visiblity by default.
1294 # Surprisingly, not covered by -fvisibility=hidden.
1295 '-fvisibility-inlines-hidden',
[email protected]554abd902011-07-25 04:03:171296 # GCC turns on -Wsign-compare for C++ under -Wall, but clang doesn't,
1297 # so we specify it explicitly.
1298 # TODO(fischman): remove this if http://llvm.org/PR10448 obsoletes it.
[email protected]d16bd642011-07-25 23:59:181299 # http://code.google.com/p/chromium/issues/detail?id=90453
[email protected]554abd902011-07-25 04:03:171300 '-Wsign-compare',
[email protected]9d384032009-03-20 23:13:261301 ],
[email protected]a6cf87e2009-04-03 04:07:381302 'ldflags': [
[email protected]138241f2010-03-30 23:53:101303 '-pthread', '-Wl,-z,noexecstack',
[email protected]9d384032009-03-20 23:13:261304 ],
[email protected]3aacaf952009-04-02 15:34:091305 'configurations': {
[email protected]5153767c2009-12-22 01:52:501306 'Debug_Base': {
[email protected]c5bdc032009-04-20 19:11:311307 'variables': {
1308 'debug_optimize%': '0',
1309 },
[email protected]3aacaf952009-04-02 15:34:091310 'defines': [
1311 '_DEBUG',
1312 ],
1313 'cflags': [
[email protected]9cb5cc702011-02-01 19:56:041314 '-O>(debug_optimize)',
[email protected]3aacaf952009-04-02 15:34:091315 '-g',
1316 ],
[email protected]5315f2842009-04-28 00:43:271317 },
[email protected]5153767c2009-12-22 01:52:501318 'Release_Base': {
[email protected]740e2de2009-07-21 11:41:011319 'variables': {
1320 'release_optimize%': '2',
[email protected]1dd529642010-05-15 01:02:511321 # Binaries become big and gold is unable to perform GC
1322 # and remove unused sections for some of test targets
1323 # on 32 bit platform.
1324 # (This is currently observed only in chromeos valgrind bots)
1325 # The following flag is to disable --gc-sections linker
1326 # option for these bots.
1327 'no_gc_sections%': 0,
[email protected]409dceef2011-05-10 19:49:121328
1329 # TODO(bradnelson): reexamine how this is done if we change the
1330 # expansion of configurations
1331 'release_valgrind_build%': 0,
[email protected]740e2de2009-07-21 11:41:011332 },
[email protected]3aacaf952009-04-02 15:34:091333 'cflags': [
[email protected]9cb5cc702011-02-01 19:56:041334 '-O>(release_optimize)',
[email protected]d8cc3a62009-04-08 18:29:531335 # Don't emit the GCC version ident directives, they just end up
1336 # in the .comment section taking up binary size.
1337 '-fno-ident',
1338 # Put data and code in their own sections, so that unused symbols
1339 # can be removed at link time with --gc-sections.
1340 '-fdata-sections',
1341 '-ffunction-sections',
[email protected]3aacaf952009-04-02 15:34:091342 ],
[email protected]c902f2c2010-08-06 20:04:181343 'ldflags': [
1344 # Specifically tell the linker to perform optimizations.
1345 # See http://lwn.net/Articles/192624/ .
1346 '-Wl,-O1',
[email protected]27c2e492010-08-06 22:55:221347 '-Wl,--as-needed',
[email protected]c902f2c2010-08-06 20:04:181348 ],
[email protected]1dd529642010-05-15 01:02:511349 'conditions' : [
1350 ['no_gc_sections==0', {
1351 'ldflags': [
1352 '-Wl,--gc-sections',
1353 ],
1354 }],
[email protected]ecf7b6482010-10-13 09:15:201355 ['clang==1', {
1356 'cflags!': [
1357 '-fno-ident',
1358 ],
1359 }],
[email protected]7664ab32011-02-01 23:35:251360 ['profiling==1', {
1361 'cflags': [
1362 '-fno-omit-frame-pointer',
1363 '-g',
1364 ],
1365 }],
[email protected]c75f33e42011-05-04 18:11:521366 # At gyp time, we test the linker for ICF support; this flag
1367 # is then provided to us by gyp. (Currently only gold supports
1368 # an --icf flag.)
[email protected]16d71b0d2011-06-22 00:43:531369 # There seems to be a conflict of --icf and -pie in gold which
1370 # can generate crashy binaries. As a security measure, -pie
1371 # takes precendence for now.
[email protected]409dceef2011-05-10 19:49:121372 ['LINKER_SUPPORTS_ICF==1 and release_valgrind_build==0', {
[email protected]f2fcf4df72011-06-03 20:05:461373 'target_conditions': [
1374 ['_toolset=="target"', {
1375 'ldflags': [
[email protected]16d71b0d2011-06-22 00:43:531376 #'-Wl,--icf=safe',
1377 '-Wl,--icf=none',
[email protected]f2fcf4df72011-06-03 20:05:461378 ]
1379 }]
[email protected]c75f33e42011-05-04 18:11:521380 ]
1381 }],
[email protected]1dd529642010-05-15 01:02:511382 ]
[email protected]3aacaf952009-04-02 15:34:091383 },
1384 },
[email protected]601b540222009-04-03 21:32:041385 'variants': {
1386 'coverage': {
1387 'cflags': ['-fprofile-arcs', '-ftest-coverage'],
1388 'ldflags': ['-fprofile-arcs'],
1389 },
1390 'profile': {
1391 'cflags': ['-pg', '-g'],
1392 'ldflags': ['-pg'],
1393 },
1394 'symbols': {
1395 'cflags': ['-g'],
1396 },
1397 },
[email protected]606116d22009-05-06 22:38:231398 'conditions': [
[email protected]7e8eb7612009-07-29 15:56:001399 [ 'target_arch=="ia32"', {
[email protected]606116d22009-05-06 22:38:231400 'asflags': [
1401 # Needed so that libs with .s files (e.g. libicudata.a)
1402 # are compatible with the general 32-bit-ness.
1403 '-32',
1404 ],
1405 # All floating-point computations on x87 happens in 80-bit
1406 # precision. Because the C and C++ language standards allow
1407 # the compiler to keep the floating-point values in higher
1408 # precision than what's specified in the source and doing so
1409 # is more efficient than constantly rounding up to 64-bit or
1410 # 32-bit precision as specified in the source, the compiler,
1411 # especially in the optimized mode, tries very hard to keep
1412 # values in x87 floating-point stack (in 80-bit precision)
1413 # as long as possible. This has important side effects, that
1414 # the real value used in computation may change depending on
1415 # how the compiler did the optimization - that is, the value
1416 # kept in 80-bit is different than the value rounded down to
1417 # 64-bit or 32-bit. There are possible compiler options to make
1418 # this behavior consistent (e.g. -ffloat-store would keep all
1419 # floating-values in the memory, thus force them to be rounded
1420 # to its original precision) but they have significant runtime
1421 # performance penalty.
1422 #
1423 # -mfpmath=sse -msse2 makes the compiler use SSE instructions
1424 # which keep floating-point values in SSE registers in its
1425 # native precision (32-bit for single precision, and 64-bit for
1426 # double precision values). This means the floating-point value
1427 # used during computation does not change depending on how the
1428 # compiler optimized the code, since the value is always kept
1429 # in its specified precision.
[email protected]ffde7932009-05-29 00:39:061430 'conditions': [
[email protected]ac120ff2010-04-28 02:14:221431 ['branding=="Chromium" and disable_sse2==0', {
[email protected]ffde7932009-05-29 00:39:061432 'cflags': [
1433 '-march=pentium4',
1434 '-msse2',
1435 '-mfpmath=sse',
1436 ],
1437 }],
[email protected]06c756182010-04-27 18:31:311438 # ChromeOS targets Pinetrail, which is sse3, but most of the
[email protected]0183dbb2010-04-16 02:00:441439 # benefit comes from sse2 so this setting allows ChromeOS
1440 # to build on other CPUs. In the future -march=atom would help
1441 # but requires a newer compiler.
[email protected]ac120ff2010-04-28 02:14:221442 ['chromeos==1 and disable_sse2==0', {
[email protected]0183dbb2010-04-16 02:00:441443 'cflags': [
1444 '-msse2',
1445 ],
1446 }],
[email protected]34799f9d2010-07-08 17:51:331447 # Install packages have started cropping up with
1448 # different headers between the 32-bit and 64-bit
1449 # versions, so we have to shadow those differences off
1450 # and make sure a 32-bit-on-64-bit build picks up the
1451 # right files.
1452 ['host_arch!="ia32"', {
1453 'include_dirs+': [
1454 '/usr/include32',
1455 ],
1456 }],
[email protected]ffde7932009-05-29 00:39:061457 ],
[email protected]dc259ce52010-04-13 04:03:101458 # -mmmx allows mmintrin.h to be used for mmx intrinsics.
1459 # video playback is mmx and sse2 optimized.
[email protected]606116d22009-05-06 22:38:231460 'cflags': [
1461 '-m32',
[email protected]dc259ce52010-04-13 04:03:101462 '-mmmx',
[email protected]1c6560af2009-07-14 11:02:161463 ],
[email protected]606116d22009-05-06 22:38:231464 'ldflags': [
1465 '-m32',
1466 ],
1467 }],
[email protected]3dda8a962009-08-10 18:58:071468 ['target_arch=="arm"', {
[email protected]77c1b29392009-12-04 06:21:291469 'target_conditions': [
1470 ['_toolset=="target"', {
1471 'cflags_cc': [
1472 # The codesourcery arm-2009q3 toolchain warns at that the ABI
1473 # has changed whenever it encounters a varargs function. This
1474 # silences those warnings, as they are not helpful and
1475 # clutter legitimate warnings.
1476 '-Wno-abi',
1477 ],
1478 'conditions': [
1479 ['arm_thumb == 1', {
1480 'cflags': [
1481 '-mthumb',
[email protected]77c1b29392009-12-04 06:21:291482 ]
1483 }],
1484 ['armv7==1', {
[email protected]dc9711f2009-11-13 19:30:251485 'cflags': [
1486 '-march=armv7-a',
1487 '-mtune=cortex-a8',
[email protected]dc9711f2009-11-13 19:30:251488 '-mfloat-abi=softfp',
1489 ],
[email protected]eafc0b452010-02-26 21:53:431490 'conditions': [
1491 ['arm_neon==1', {
1492 'cflags': [ '-mfpu=neon', ],
1493 }, {
[email protected]53e0f642010-03-05 01:41:561494 'cflags': [ '-mfpu=<(arm_fpu)', ],
[email protected]eafc0b452010-02-26 21:53:431495 }]
1496 ],
[email protected]dc9711f2009-11-13 19:30:251497 }],
[email protected]3dda8a962009-08-10 18:58:071498 ],
1499 }],
1500 ],
1501 }],
[email protected]2fb843b2010-08-12 02:11:081502 ['linux_fpic==1', {
[email protected]c76723a2010-01-25 23:10:581503 'cflags': [
1504 '-fPIC',
1505 ],
1506 }],
[email protected]ee28c9f2009-09-04 01:53:011507 ['sysroot!=""', {
[email protected]fd36ce822009-10-28 20:13:571508 'target_conditions': [
1509 ['_toolset=="target"', {
1510 'cflags': [
1511 '--sysroot=<(sysroot)',
1512 ],
1513 'ldflags': [
1514 '--sysroot=<(sysroot)',
1515 ],
1516 }]]
[email protected]ee28c9f2009-09-04 01:53:011517 }],
[email protected]58680ce2010-09-18 00:09:151518 ['clang==1', {
[email protected]18ca15a2011-08-10 03:07:121519 'cflags': [
1520 '-Wheader-hygiene',
1521 # Clang spots more unused functions.
1522 '-Wno-unused-function',
1523 # Don't die on dtoa code that uses a char as an array index.
1524 '-Wno-char-subscripts',
1525 # Survive EXPECT_EQ(unnamed_enum, unsigned int) -- see
1526 # http://code.google.com/p/googletest/source/detail?r=446 .
1527 # TODO(thakis): Use -isystem instead (http://crbug.com/58751 )
1528 '-Wno-unnamed-type-template-args',
1529 ],
1530 'cflags!': [
1531 # Clang doesn't seem to know know this flag.
1532 '-mfpmath=sse',
1533 ],
[email protected]58680ce2010-09-18 00:09:151534 }],
[email protected]5d451ad2011-02-11 16:43:461535 ['clang==1 and clang_use_chrome_plugins==1', {
[email protected]d23720682011-08-11 00:16:261536 'cflags': [
1537 '<(clang_chrome_plugins_flags)',
1538 ],
[email protected]5d451ad2011-02-11 16:43:461539 }],
[email protected]5e781232011-01-28 02:57:591540 ['clang==1 and clang_load!="" and clang_add_plugin!=""', {
[email protected]d23720682011-08-11 00:16:261541 'cflags': [
1542 '-Xclang', '-load', '-Xclang', '<(clang_load)',
1543 '-Xclang', '-add-plugin', '-Xclang', '<(clang_add_plugin)',
1544 ],
[email protected]5e781232011-01-28 02:57:591545 }],
[email protected]cc4219a2009-08-14 05:30:521546 ['no_strict_aliasing==1', {
1547 'cflags': [
1548 '-fno-strict-aliasing',
1549 ],
1550 }],
[email protected]cbd5fd52009-08-26 00:14:271551 ['linux_breakpad==1', {
[email protected]c87efd42010-08-26 18:28:171552 'cflags': [ '-g' ],
[email protected]cbd5fd52009-08-26 00:14:271553 'defines': ['USE_LINUX_BREAKPAD'],
1554 }],
[email protected]d8b60602010-03-26 09:41:221555 ['linux_use_heapchecker==1', {
1556 'variables': {'linux_use_tcmalloc%': 1},
1557 }],
[email protected]61a9b2d82010-02-26 00:31:081558 ['linux_use_tcmalloc==0', {
1559 'defines': ['NO_TCMALLOC'],
[email protected]01699e22009-11-11 19:24:241560 }],
[email protected]d8b60602010-03-26 09:41:221561 ['linux_use_heapchecker==0', {
1562 'defines': ['NO_HEAPCHECKER'],
1563 }],
[email protected]64e2d4a42010-08-27 10:13:211564 ['linux_keep_shadow_stacks==1', {
1565 'defines': ['KEEP_SHADOW_STACKS'],
1566 'cflags': ['-finstrument-functions'],
1567 }],
[email protected]606116d22009-05-06 22:38:231568 ],
[email protected]9d384032009-03-20 23:13:261569 },
1570 }],
[email protected]c51e8d52009-12-11 20:04:061571 # FreeBSD-specific options; note that most FreeBSD options are set above,
1572 # with Linux.
1573 ['OS=="freebsd"', {
1574 'target_defaults': {
1575 'ldflags': [
1576 '-Wl,--no-keep-memory',
1577 ],
1578 },
1579 }],
[email protected]93f21e42010-04-01 00:35:151580 ['OS=="solaris"', {
1581 'cflags!': ['-fvisibility=hidden'],
1582 'cflags_cc!': ['-fvisibility-inlines-hidden'],
1583 }],
[email protected]2f80c312009-02-25 21:26:551584 ['OS=="mac"', {
1585 'target_defaults': {
[email protected]24700642009-06-01 16:01:201586 'variables': {
[email protected]9a5e72862010-09-02 16:16:581587 # These should be 'mac_real_dsym%' and 'mac_strip%', but there
1588 # seems to be a bug with % in variables that are intended to be
1589 # set to different values in different targets, like these two.
1590 'mac_strip': 1, # Strip debugging symbols from the target.
[email protected]24700642009-06-01 16:01:201591 'mac_real_dsym': 0, # Fake .dSYMs are fine in most cases.
1592 },
[email protected]d92c7c012009-03-19 19:26:421593 'mac_bundle': 0,
[email protected]2f80c312009-02-25 21:26:551594 'xcode_settings': {
1595 'ALWAYS_SEARCH_USER_PATHS': 'NO',
[email protected]ab2956372009-08-13 18:11:041596 'GCC_C_LANGUAGE_STANDARD': 'c99', # -std=c99
1597 'GCC_CW_ASM_SYNTAX': 'NO', # No -fasm-blocks
1598 'GCC_DYNAMIC_NO_PIC': 'NO', # No -mdynamic-no-pic
1599 # (Equivalent to -fPIC)
1600 'GCC_ENABLE_CPP_EXCEPTIONS': 'NO', # -fno-exceptions
1601 'GCC_ENABLE_CPP_RTTI': 'NO', # -fno-rtti
1602 'GCC_ENABLE_PASCAL_STRINGS': 'NO', # No -mpascal-strings
[email protected]3224dcd2009-09-16 17:31:251603 # GCC_INLINES_ARE_PRIVATE_EXTERN maps to -fvisibility-inlines-hidden
1604 'GCC_INLINES_ARE_PRIVATE_EXTERN': 'YES',
[email protected]ab2956372009-08-13 18:11:041605 'GCC_OBJC_CALL_CXX_CDTORS': 'YES', # -fobjc-call-cxx-cdtors
1606 'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES', # -fvisibility=hidden
1607 'GCC_THREADSAFE_STATICS': 'NO', # -fno-threadsafe-statics
1608 'GCC_TREAT_WARNINGS_AS_ERRORS': 'YES', # -Werror
[email protected]2f80c312009-02-25 21:26:551609 'GCC_VERSION': '4.2',
[email protected]ab2956372009-08-13 18:11:041610 'GCC_WARN_ABOUT_MISSING_NEWLINE': 'YES', # -Wnewline-eof
[email protected]3224dcd2009-09-16 17:31:251611 # MACOSX_DEPLOYMENT_TARGET maps to -mmacosx-version-min
1612 'MACOSX_DEPLOYMENT_TARGET': '<(mac_deployment_target)',
[email protected]ab2956372009-08-13 18:11:041613 'PREBINDING': 'NO', # No -Wl,-prebind
[email protected]2f80c312009-02-25 21:26:551614 'USE_HEADERMAP': 'NO',
[email protected]57e94022011-05-04 15:33:191615 'OTHER_CFLAGS': [
1616 '-fno-strict-aliasing', # See http://crbug.com/32204
1617 ],
[email protected]080e86f2010-06-21 15:19:041618 'WARNING_CFLAGS': [
1619 '-Wall',
1620 '-Wendif-labels',
1621 '-Wextra',
1622 # Don't warn about unused function parameters.
1623 '-Wno-unused-parameter',
1624 # Don't warn about the "struct foo f = {0};" initialization
1625 # pattern.
1626 '-Wno-missing-field-initializers',
1627 ],
[email protected]b3fb8092009-03-12 19:09:241628 'conditions': [
1629 ['chromium_mac_pch', {'GCC_PRECOMPILE_PREFIX_HEADER': 'YES'},
[email protected]9543af052009-09-15 22:42:591630 {'GCC_PRECOMPILE_PREFIX_HEADER': 'NO'}
1631 ],
[email protected]66733172010-09-22 00:09:281632 ['clang==1', {
1633 'WARNING_CFLAGS': [
[email protected]7f8d486f2011-04-05 19:49:071634 '-Wheader-hygiene',
[email protected]66733172010-09-22 00:09:281635 # Don't die on dtoa code that uses a char as an array index.
1636 # This is required solely for base/third_party/dmg_fp/dtoa.cc.
1637 '-Wno-char-subscripts',
[email protected]25d3bb722010-11-22 14:31:451638 # Clang spots more unused functions.
1639 '-Wno-unused-function',
[email protected]0fa0fbc2010-10-12 04:32:051640 # Survive EXPECT_EQ(unnamed_enum, unsigned int) -- see
1641 # http://code.google.com/p/googletest/source/detail?r=446 .
1642 # TODO(thakis): Use -isystem instead (http://crbug.com/58751 ).
1643 '-Wno-unnamed-type-template-args',
[email protected]d53680932011-06-08 16:40:061644 # TODO(thakis): Reenable once the one instance this warns on
1645 # is fixed.
1646 '-Wno-parentheses',
[email protected]66733172010-09-22 00:09:281647 ],
1648 }],
[email protected]5d451ad2011-02-11 16:43:461649 ['clang==1 and clang_use_chrome_plugins==1', {
1650 'OTHER_CFLAGS': [
1651 '<(clang_chrome_plugins_flags)',
1652 ],
1653 }],
[email protected]5e781232011-01-28 02:57:591654 ['clang==1 and clang_load!="" and clang_add_plugin!=""', {
1655 'OTHER_CFLAGS': [
1656 '-Xclang', '-load', '-Xclang', '<(clang_load)',
1657 '-Xclang', '-add-plugin', '-Xclang', '<(clang_add_plugin)',
1658 ],
1659 }],
[email protected]b3fb8092009-03-12 19:09:241660 ],
[email protected]2f80c312009-02-25 21:26:551661 },
1662 'target_conditions': [
[email protected]2f80c312009-02-25 21:26:551663 ['_type!="static_library"', {
[email protected]5d7dc972009-04-16 15:30:461664 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-search_paths_first']},
1665 }],
1666 ['_mac_bundle', {
1667 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-ObjC']},
[email protected]87fde4a2009-02-28 00:50:081668 }],
[email protected]6303fed2011-08-11 01:12:101669 ['_type=="executable"', {
1670 'postbuilds': [
1671 {
1672 # Arranges for data (heap) pages to be protected against
1673 # code execution when running on Mac OS X 10.7 ("Lion").
1674 'variables': {
1675 # Define make_heap_non_executable in a variable ending in
1676 # _path so that gyp understands it's a path and performs
1677 # proper relativization during dict merging.
1678 'make_heap_non_executable_path':
1679 'mac/make_heap_non_executable_from_xcode.sh',
1680 },
1681 'postbuild_name': 'Make Heap Non-Executable',
1682 'action': ['<(make_heap_non_executable_path)'],
1683 },
1684 ],
1685 }],
[email protected]6a0242bc2011-07-01 00:34:461686 ['_type=="executable" and release_valgrind_build==0', {
1687 # Turn on position-independence (ASLR) for executables. When PIE
1688 # is on for the Chrome executables, the framework will also be
1689 # subject to ASLR.
1690 # Don't do this when building for Valgrind because Valgrind
1691 # doesn't understand slide. TODO: Make Valgrind on Mac OS X
1692 # understand slide, and get rid of the Valgrind check.
1693 'xcode_settings': {
1694 'OTHER_LDFLAGS': [
1695 '-Wl,-pie', # Position-independent executable (MH_PIE)
1696 ],
1697 },
1698 }],
[email protected]9a5e72862010-09-02 16:16:581699 ['(_type=="executable" or _type=="shared_library" or \
1700 _type=="loadable_module") and mac_strip!=0', {
[email protected]24700642009-06-01 16:01:201701 'target_conditions': [
1702 ['mac_real_dsym == 1', {
1703 # To get a real .dSYM bundle produced by dsymutil, set the
1704 # debug information format to dwarf-with-dsym. Since
1705 # strip_from_xcode will not be used, set Xcode to do the
1706 # stripping as well.
1707 'configurations': {
[email protected]5153767c2009-12-22 01:52:501708 'Release_Base': {
[email protected]24700642009-06-01 16:01:201709 'xcode_settings': {
1710 'DEBUG_INFORMATION_FORMAT': 'dwarf-with-dsym',
1711 'DEPLOYMENT_POSTPROCESSING': 'YES',
1712 'STRIP_INSTALLED_PRODUCT': 'YES',
[email protected]e14a9f92009-08-05 19:26:071713 'target_conditions': [
[email protected]c2111422010-06-01 18:30:251714 ['_type=="shared_library" or _type=="loadable_module"', {
[email protected]e14a9f92009-08-05 19:26:071715 # The Xcode default is to strip debugging symbols
1716 # only (-S). Local symbols should be stripped as
1717 # well, which will be handled by -x. Xcode will
1718 # continue to insert -S when stripping even when
1719 # additional flags are added with STRIPFLAGS.
1720 'STRIPFLAGS': '-x',
[email protected]c2111422010-06-01 18:30:251721 }], # _type=="shared_library" or _type=="loadable_module"'
[email protected]e14a9f92009-08-05 19:26:071722 ], # target_conditions
1723 }, # xcode_settings
1724 }, # configuration "Release"
1725 }, # configurations
[email protected]24700642009-06-01 16:01:201726 }, { # mac_real_dsym != 1
1727 # To get a fast fake .dSYM bundle, use a post-build step to
1728 # produce the .dSYM and strip the executable. strip_from_xcode
1729 # only operates in the Release configuration.
1730 'postbuilds': [
1731 {
1732 'variables': {
1733 # Define strip_from_xcode in a variable ending in _path
1734 # so that gyp understands it's a path and performs proper
1735 # relativization during dict merging.
1736 'strip_from_xcode_path': 'mac/strip_from_xcode',
1737 },
1738 'postbuild_name': 'Strip If Needed',
1739 'action': ['<(strip_from_xcode_path)'],
1740 },
[email protected]e14a9f92009-08-05 19:26:071741 ], # postbuilds
1742 }], # mac_real_dsym
1743 ], # target_conditions
[email protected]9a5e72862010-09-02 16:16:581744 }], # (_type=="executable" or _type=="shared_library" or
1745 # _type=="loadable_module") and mac_strip!=0
[email protected]e14a9f92009-08-05 19:26:071746 ], # target_conditions
1747 }, # target_defaults
1748 }], # OS=="mac"
[email protected]2f80c312009-02-25 21:26:551749 ['OS=="win"', {
1750 'target_defaults': {
1751 'defines': [
[email protected]c62b7a52011-08-12 19:12:441752 '_WIN32_WINNT=0x0601',
1753 'WINVER=0x0601',
[email protected]2f80c312009-02-25 21:26:551754 'WIN32',
1755 '_WINDOWS',
[email protected]2f80c312009-02-25 21:26:551756 'NOMINMAX',
[email protected]e3116282011-08-13 00:52:281757 'PSAPI_VERSION=1',
[email protected]2f80c312009-02-25 21:26:551758 '_CRT_RAND_S',
1759 'CERT_CHAIN_PARA_HAS_EXTRA_FIELDS',
1760 'WIN32_LEAN_AND_MEAN',
[email protected]7a812dd62010-06-30 18:52:271761 '_ATL_NO_OPENGL',
[email protected]adfb98c2009-06-23 20:08:451762 '_HAS_TR1=0',
[email protected]2f80c312009-02-25 21:26:551763 ],
[email protected]8974e042010-06-21 18:06:521764 'conditions': [
1765 ['component=="static_library"', {
1766 'defines': [
1767 '_HAS_EXCEPTIONS=0',
1768 ],
1769 }],
[email protected]3e2648a2011-03-21 20:58:501770 ['secure_atl', {
1771 'defines': [
1772 '_SECURE_ATL',
1773 ],
1774 }],
[email protected]8974e042010-06-21 18:06:521775 ],
[email protected]5b5ca7cb2009-07-20 23:00:201776 'msvs_system_include_dirs': [
[email protected]998b5152009-12-12 22:19:521777 '<(DEPTH)/third_party/platformsdk_win7/files/Include',
[email protected]a78da50e2010-06-09 21:31:371778 '<(DEPTH)/third_party/directxsdk/files/Include',
[email protected]2f80c312009-02-25 21:26:551779 '$(VSInstallDir)/VC/atlmfc/include',
1780 ],
[email protected]a8d99cef2009-08-26 20:47:491781 'msvs_cygwin_dirs': ['<(DEPTH)/third_party/cygwin'],
[email protected]942c3a60f2011-05-03 02:04:111782 'msvs_disabled_warnings': [4351, 4396, 4503, 4819,
1783 # TODO(maruel): These warnings are level 4. They will be slowly
1784 # removed as code is fixed.
1785 4100, 4121, 4125, 4127, 4130, 4131, 4189, 4201, 4238, 4244, 4245,
1786 4310, 4355, 4428, 4481, 4505, 4510, 4512, 4530, 4610, 4611, 4701,
1787 4702, 4706,
1788 ],
[email protected]2f80c312009-02-25 21:26:551789 'msvs_settings': {
1790 'VCCLCompilerTool': {
1791 'MinimalRebuild': 'false',
[email protected]2f80c312009-02-25 21:26:551792 'BufferSecurityCheck': 'true',
1793 'EnableFunctionLevelLinking': 'true',
1794 'RuntimeTypeInfo': 'false',
[email protected]942c3a60f2011-05-03 02:04:111795 'WarningLevel': '4',
[email protected]2f80c312009-02-25 21:26:551796 'WarnAsError': 'true',
1797 'DebugInformationFormat': '3',
[email protected]3fef6e62009-07-31 19:58:581798 'conditions': [
[email protected]3e2648a2011-03-21 20:58:501799 ['msvs_multi_core_compile', {
[email protected]1f9471a2010-01-04 06:40:161800 'AdditionalOptions': ['/MP'],
[email protected]912c55c2009-07-31 23:33:551801 }],
[email protected]3e2648a2011-03-21 20:58:501802 ['MSVS_VERSION=="2005e"', {
1803 'AdditionalOptions': ['/w44068'], # Unknown pragma to 4 (ATL)
1804 }],
[email protected]8974e042010-06-21 18:06:521805 ['component=="shared_library"', {
1806 'ExceptionHandling': '1', # /EHsc
1807 }, {
1808 'ExceptionHandling': '0',
1809 }],
[email protected]3fef6e62009-07-31 19:58:581810 ],
[email protected]2f80c312009-02-25 21:26:551811 },
1812 'VCLibrarianTool': {
[email protected]1f9471a2010-01-04 06:40:161813 'AdditionalOptions': ['/ignore:4221'],
[email protected]a78da50e2010-06-09 21:31:371814 'AdditionalLibraryDirectories': [
1815 '<(DEPTH)/third_party/platformsdk_win7/files/Lib',
1816 '<(DEPTH)/third_party/directxsdk/files/Lib/x86',
1817 ],
[email protected]2f80c312009-02-25 21:26:551818 },
1819 'VCLinkerTool': {
[email protected]2f80c312009-02-25 21:26:551820 'AdditionalDependencies': [
1821 'wininet.lib',
[email protected]b1d8c252011-01-13 20:27:501822 'dnsapi.lib',
[email protected]2f80c312009-02-25 21:26:551823 'version.lib',
1824 'msimg32.lib',
1825 'ws2_32.lib',
1826 'usp10.lib',
1827 'psapi.lib',
[email protected]96fd0032009-04-24 00:13:081828 'dbghelp.lib',
[email protected]dfdf7ee2011-04-28 18:51:481829 'winmm.lib',
1830 'shlwapi.lib',
[email protected]2f80c312009-02-25 21:26:551831 ],
[email protected]4de39f82011-03-28 12:01:291832 'conditions': [
[email protected]3e2648a2011-03-21 20:58:501833 ['msvs_express', {
1834 # Explicitly required when using the ATL with express
1835 'AdditionalDependencies': [
1836 'atlthunk.lib',
1837 ],
1838 }],
1839 ['MSVS_VERSION=="2005e"', {
1840 # Non-express versions link automatically to these
1841 'AdditionalDependencies': [
1842 'advapi32.lib',
1843 'comdlg32.lib',
1844 'ole32.lib',
1845 'shell32.lib',
1846 'user32.lib',
1847 'winspool.lib',
1848 ],
1849 }],
1850 ],
[email protected]a78da50e2010-06-09 21:31:371851 'AdditionalLibraryDirectories': [
1852 '<(DEPTH)/third_party/platformsdk_win7/files/Lib',
1853 '<(DEPTH)/third_party/directxsdk/files/Lib/x86',
1854 ],
[email protected]2f80c312009-02-25 21:26:551855 'GenerateDebugInformation': 'true',
1856 'MapFileName': '$(OutDir)\\$(TargetName).map',
1857 'ImportLibrary': '$(OutDir)\\lib\\$(TargetName).lib',
[email protected]2f80c312009-02-25 21:26:551858 'FixedBaseAddress': '1',
[email protected]825ff8d2009-05-22 01:40:481859 # SubSystem values:
1860 # 0 == not set
1861 # 1 == /SUBSYSTEM:CONSOLE
1862 # 2 == /SUBSYSTEM:WINDOWS
1863 # Most of the executables we'll ever create are tests
1864 # and utilities with console output.
1865 'SubSystem': '1',
[email protected]2f80c312009-02-25 21:26:551866 },
1867 'VCMIDLTool': {
1868 'GenerateStublessProxies': 'true',
1869 'TypeLibraryName': '$(InputName).tlb',
1870 'OutputDirectory': '$(IntDir)',
1871 'HeaderFileName': '$(InputName).h',
1872 'DLLDataFileName': 'dlldata.c',
1873 'InterfaceIdentifierFileName': '$(InputName)_i.c',
1874 'ProxyFileName': '$(InputName)_p.c',
1875 },
1876 'VCResourceCompilerTool': {
1877 'Culture' : '1033',
[email protected]4d91cbc2010-05-07 20:41:381878 'AdditionalIncludeDirectories': [
1879 '<(DEPTH)',
1880 '<(SHARED_INTERMEDIATE_DIR)',
1881 ],
[email protected]2f80c312009-02-25 21:26:551882 },
1883 },
1884 },
1885 }],
[email protected]79e2336c2011-05-12 18:18:341886 ['disable_nacl==1', {
[email protected]d8c7cbcc2009-10-02 19:00:311887 'target_defaults': {
1888 'defines': [
1889 'DISABLE_NACL',
1890 ],
1891 },
1892 }],
[email protected]cfbf9bc2009-12-07 22:07:561893 ['OS=="win" and msvs_use_common_linker_extras', {
[email protected]48c7af72009-07-03 22:00:191894 'target_defaults': {
1895 'msvs_settings': {
1896 'VCLinkerTool': {
[email protected]48c7af72009-07-03 22:00:191897 'DelayLoadDLLs': [
1898 'dbghelp.dll',
1899 'dwmapi.dll',
1900 'uxtheme.dll',
1901 ],
1902 },
1903 },
[email protected]ef4fa4072009-12-04 22:46:501904 'configurations': {
[email protected]5153767c2009-12-22 01:52:501905 'x86_Base': {
[email protected]ef4fa4072009-12-04 22:46:501906 'msvs_settings': {
1907 'VCLinkerTool': {
[email protected]1f9471a2010-01-04 06:40:161908 'AdditionalOptions': [
1909 '/safeseh',
1910 '/dynamicbase',
1911 '/ignore:4199',
1912 '/ignore:4221',
1913 '/nxcompat',
1914 ],
[email protected]ef4fa4072009-12-04 22:46:501915 },
1916 },
1917 },
[email protected]5153767c2009-12-22 01:52:501918 'x64_Base': {
[email protected]ef4fa4072009-12-04 22:46:501919 'msvs_settings': {
1920 'VCLinkerTool': {
[email protected]1f9471a2010-01-04 06:40:161921 'AdditionalOptions': [
[email protected]ef4fa4072009-12-04 22:46:501922 # safeseh is not compatible with x64
[email protected]1f9471a2010-01-04 06:40:161923 '/dynamicbase',
1924 '/ignore:4199',
1925 '/ignore:4221',
1926 '/nxcompat',
1927 ],
[email protected]ef4fa4072009-12-04 22:46:501928 },
1929 },
1930 },
1931 },
[email protected]48c7af72009-07-03 22:00:191932 },
1933 }],
[email protected]9821d0d2010-04-16 22:40:371934 ['enable_new_npdevice_api==1', {
1935 'target_defaults': {
1936 'defines': [
1937 'ENABLE_NEW_NPDEVICE_API',
1938 ],
1939 },
1940 }],
[email protected]2f80c312009-02-25 21:26:551941 ],
1942 'xcode_settings': {
[email protected]0c8ab452009-11-06 21:57:501943 # DON'T ADD ANYTHING NEW TO THIS BLOCK UNLESS YOU REALLY REALLY NEED IT!
1944 # This block adds *project-wide* configuration settings to each project
1945 # file. It's almost always wrong to put things here. Specify your
1946 # custom xcode_settings in target_defaults to add them to targets instead.
1947
1948 # In an Xcode Project Info window, the "Base SDK for All Configurations"
1949 # setting sets the SDK on a project-wide basis. In order to get the
1950 # configured SDK to show properly in the Xcode UI, SDKROOT must be set
1951 # here at the project level.
1952 'SDKROOT': 'macosx<(mac_sdk)', # -isysroot
1953
[email protected]2f80c312009-02-25 21:26:551954 # The Xcode generator will look for an xcode_settings section at the root
1955 # of each dict and use it to apply settings on a file-wide basis. Most
1956 # settings should not be here, they should be in target-specific
1957 # xcode_settings sections, or better yet, should use non-Xcode-specific
1958 # settings in target dicts. SYMROOT is a special case, because many other
1959 # Xcode variables depend on it, including variables such as
1960 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something
1961 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the
1962 # files to appear (when present) in the UI as actual files and not red
1963 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR,
1964 # and therefore SYMROOT, needs to be set at the project level.
[email protected]bfa24b962009-03-02 00:16:161965 'SYMROOT': '<(DEPTH)/xcodebuild',
[email protected]2f80c312009-02-25 21:26:551966 },
[email protected]ee28c9f2009-09-04 01:53:011967}