blob: 525bdeb376c9877da8276a50284af133f9b59bd3 [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]4c9ee222011-08-17 19:51:3538 # Disable webui dialog replacements for native dialogs by default.
39 # TODO(flackr): Change this to a runtime flag triggered by
40 # --pure-views so that these dialogs can be easily tested.
41 'webui_dialogs%': 0,
[email protected]8ebc9b42011-07-14 15:22:1842
[email protected]9c8a1982011-05-24 23:08:5843 # Whether the compositor is enabled on views.
44 'views_compositor%': 0,
[email protected]e599f0132011-08-24 19:03:3545
46 # Whether or not we are building with the Aura window manager.
47 'aura_wm%': 0,
[email protected]bb6aba32011-01-07 19:04:4348 },
49 # Copy conditionally-set variables out one scope.
50 'chromeos%': '<(chromeos)',
[email protected]1b546692011-06-30 18:22:3051 'toolkit_uses_pure_views%': '<(toolkit_uses_pure_views)',
[email protected]bb6aba32011-01-07 19:04:4352 'touchui%': '<(touchui)',
[email protected]4c9ee222011-08-17 19:51:3553 'webui_dialogs%': '<(webui_dialogs)',
[email protected]9c8a1982011-05-24 23:08:5854 'views_compositor%': '<(views_compositor)',
[email protected]e599f0132011-08-24 19:03:3555 'aura_wm%': '<(aura_wm)',
[email protected]e72e55b2011-01-06 22:19:3056
[email protected]e72e55b2011-01-06 22:19:3057 # Compute the architecture that we're building on.
58 'conditions': [
[email protected]c49ab0c2011-05-18 17:25:3759 [ 'OS=="win" or OS=="mac"', {
60 'host_arch%': 'ia32',
61 }, {
[email protected]79e2336c2011-05-12 18:18:3462 # This handles the Unix platforms for which there is some support.
63 # Anything else gets passed through, which probably won't work very
64 # well; such hosts should pass an explicit target_arch to gyp.
[email protected]e72e55b2011-01-06 22:19:3065 'host_arch%':
[email protected]79e2336c2011-05-12 18:18:3466 '<!(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:3067 }],
[email protected]bb6aba32011-01-07 19:04:4368
69 # Set default value of toolkit_views on for Windows, Chrome OS
70 # and the touch UI.
[email protected]1b546692011-06-30 18:22:3071 ['OS=="win" or chromeos==1 or touchui==1 or toolkit_uses_pure_views==1', {
[email protected]bb6aba32011-01-07 19:04:4372 'toolkit_views%': 1,
73 }, {
74 'toolkit_views%': 0,
75 }],
[email protected]1b546692011-06-30 18:22:3076
77 # Views are always Pure in Touch case
78 ['touchui==1', {
79 'toolkit_uses_pure_views%': 1,
80 }, {
81 'toolkit_uses_pure_views%': 0,
82 }],
[email protected]8ebc9b42011-07-14 15:22:1883
[email protected]4c9ee222011-08-17 19:51:3584 # Use WebUI dialogs in TouchUI builds.
[email protected]8ebc9b42011-07-14 15:22:1885 ['touchui==1', {
[email protected]4c9ee222011-08-17 19:51:3586 'webui_dialogs%': 1,
[email protected]8ebc9b42011-07-14 15:22:1887 }],
[email protected]e599f0132011-08-24 19:03:3588
89 # Use the views compositor when using the Aura window manager.
90 ['aura_wm==1', {
91 'views_compositor%': 1,
92 }],
[email protected]e72e55b2011-01-06 22:19:3093 ],
94 },
95
96 # Copy conditionally-set variables out one scope.
97 'chromeos%': '<(chromeos)',
98 'touchui%': '<(touchui)',
[email protected]4c9ee222011-08-17 19:51:3599 'webui_dialogs%': '<(webui_dialogs)',
[email protected]e72e55b2011-01-06 22:19:30100 'host_arch%': '<(host_arch)',
[email protected]bb6aba32011-01-07 19:04:43101 'toolkit_views%': '<(toolkit_views)',
[email protected]1b546692011-06-30 18:22:30102 'toolkit_uses_pure_views%': '<(toolkit_uses_pure_views)',
[email protected]9c8a1982011-05-24 23:08:58103 'views_compositor%': '<(views_compositor)',
[email protected]e599f0132011-08-24 19:03:35104 'aura_wm%': '<(aura_wm)',
[email protected]e72e55b2011-01-06 22:19:30105
[email protected]8fb0ef02011-05-20 00:53:50106 # We used to provide a variable for changing how libraries were built.
107 # This variable remains until we can clean up all the users.
108 # This needs to be one nested variables dict in so that dependent
109 # gyp files can make use of it in their outer variables. (Yikes!)
110 # http://code.google.com/p/chromium/issues/detail?id=83308
111 'library%': 'static_library',
112
[email protected]e14a9f92009-08-05 19:26:07113 # Override branding to select the desired branding flavor.
114 'branding%': 'Chromium',
115
116 # Override buildtype to select the desired build flavor.
117 # Dev - everyday build for development/testing
118 # Official - release build (generally implies additional processing)
119 # TODO(mmoss) Once 'buildtype' is fully supported (e.g. Windows gyp
120 # conversion is done), some of the things which are now controlled by
121 # 'branding', such as symbol generation, will need to be refactored based
122 # on 'buildtype' (i.e. we don't care about saving symbols for non-Official
123 # builds).
124 'buildtype%': 'Dev',
[email protected]cbd5fd52009-08-26 00:14:27125
[email protected]e72e55b2011-01-06 22:19:30126 # Default architecture we're building for is the architecture we're
127 # building on.
128 'target_arch%': '<(host_arch)',
[email protected]b3f23ba2010-04-26 22:58:17129
[email protected]e72e55b2011-01-06 22:19:30130 # This variable tells WebCore.gyp and JavaScriptCore.gyp whether they are
131 # are built under a chromium full build (1) or a webkit.org chromium
132 # build (0).
133 'inside_chromium_build%': 1,
[email protected]8974e042010-06-21 18:06:52134
[email protected]e72e55b2011-01-06 22:19:30135 # Set to 1 to enable fast builds. It disables debug info for fastest
136 # compilation.
137 'fastbuild%': 0,
[email protected]93012ca2010-08-10 20:10:49138
[email protected]3d38d8e2011-04-16 20:48:51139 # Disable file manager component extension by default.
140 'file_manager_extension%': 0,
141
[email protected]8b2e9f392011-08-05 04:00:47142 # Disable WebUI TaskManager by default.
143 'webui_task_manager%': 0,
144
[email protected]e72e55b2011-01-06 22:19:30145 # Python version.
[email protected]a43c5a02011-05-27 06:54:51146 'python_ver%': '2.6',
[email protected]b3f23ba2010-04-26 22:58:17147
[email protected]e72e55b2011-01-06 22:19:30148 # Set ARM-v7 compilation flags
149 'armv7%': 0,
150
151 # Set Neon compilation flags (only meaningful if armv7==1).
152 'arm_neon%': 1,
153
154 # The system root for cross-compiles. Default: none.
155 'sysroot%': '',
156
157 # On Linux, we build with sse2 for Chromium builds.
158 'disable_sse2%': 0,
159
160 # Use libjpeg-turbo as the JPEG codec used by Chromium.
[email protected]32e56e52011-02-28 02:28:03161 'use_libjpeg_turbo%': 1,
[email protected]e72e55b2011-01-06 22:19:30162
163 # Variable 'component' is for cases where we would like to build some
164 # components as dynamic shared libraries but still need variable
165 # 'library' for static libraries.
166 # By default, component is set to whatever library is set to and
167 # it can be overriden by the GYP command line or by ~/.gyp/include.gypi.
[email protected]5a547332011-05-19 23:18:53168 'component%': 'static_library',
[email protected]e72e55b2011-01-06 22:19:30169
[email protected]bb6aba32011-01-07 19:04:43170 # Set to select the Title Case versions of strings in GRD files.
171 'use_titlecase_in_grd_files%': 0,
[email protected]63692212010-09-16 00:22:21172
[email protected]98da0042011-02-02 00:10:27173 # Use translations provided by volunteers at launchpad.net. This
174 # currently only works on Linux.
[email protected]00dc155832011-02-01 18:51:19175 'use_third_party_translations%': 0,
176
[email protected]9a425422011-01-11 00:53:18177 # Remoting compilation is enabled by default. Set to 0 to disable.
178 'remoting%': 1,
179
[email protected]a026daa2011-04-20 15:49:51180 # P2P APIs are compiled in by default. Set to 0 to disable.
181 # Also note that this should be enabled for remoting to compile.
182 'p2p_apis%': 1,
183
[email protected]1ec68c42011-06-01 13:56:25184 # Configuration policy is enabled by default. Set to 0 to disable.
185 'configuration_policy%': 1,
186
[email protected]4b58e7d2011-07-11 10:22:56187 # Safe browsing is compiled in by default. Set to 0 to disable.
188 'safe_browsing%': 1,
189
[email protected]5d451ad2011-02-11 16:43:46190 # If this is set, the clang plugins used on the buildbot will be used.
191 # Run tools/clang/scripts/update.sh to make sure they are compiled.
192 # This causes 'clang_chrome_plugins_flags' to be set.
193 # Has no effect if 'clang' is not set as well.
194 'clang_use_chrome_plugins%': 0,
195
[email protected]92799b632011-08-15 14:33:06196 # Enable building with ASAN (Clang's -fasan option).
197 # -fasan only works with clang, but asan=1 implies clang=1
198 # See https://sites.google.com/a/chromium.org/dev/developers/testing/addresssanitizer
199 'asan%': 0,
200
[email protected]1ad5a7b2011-06-24 03:15:13201 # Set to 1 compile with -fPIC cflag on linux. This is a must for shared
202 # libraries on linux x86-64 and arm, plus ASLR.
203 'linux_fpic%': 1,
204
[email protected]c6a1f94172011-07-05 02:35:00205 # Enable navigator.registerProtocolHandler and supporting UI.
206 'enable_register_protocol_handler%': 1,
207
[email protected]62af76e2011-08-01 02:34:01208 # Enable Web Intents and supporting UI.
209 'enable_web_intents%': 0,
210
[email protected]32877d302011-07-07 17:57:49211 # Smooth scrolling is disabled by default.
212 'enable_smooth_scrolling%': 0,
213
[email protected]dda90ae2011-07-19 22:07:48214 # Webrtc compilation is enabled by default. Set to 0 to disable.
215 'enable_webrtc%': 1,
216
[email protected]bb6aba32011-01-07 19:04:43217 'conditions': [
[email protected]7d7564a12011-06-21 19:20:22218 # Use Skia as WebKit renderer on Mac
219 ['OS=="mac"', {
220 'use_skia%': 0,
221 }, {
222 'use_skia%': 1,
223 }],
224
[email protected]79e2336c2011-05-12 18:18:34225 # A flag for POSIX platforms
[email protected]c49ab0c2011-05-18 17:25:37226 ['OS=="win"', {
[email protected]79e2336c2011-05-12 18:18:34227 'os_posix%': 0,
[email protected]c49ab0c2011-05-18 17:25:37228 }, {
229 'os_posix%': 1,
[email protected]79e2336c2011-05-12 18:18:34230 }],
231
232 # Flags to use Gtk and X11 on non-Mac POSIX platforms
[email protected]c49ab0c2011-05-18 17:25:37233 ['OS=="win" or OS=="mac"', {
[email protected]79e2336c2011-05-12 18:18:34234 'toolkit_uses_gtk%': 0,
235 'use_x11%': 0,
[email protected]c49ab0c2011-05-18 17:25:37236 }, {
[email protected]236754a2011-07-28 17:38:23237 # TODO(dnicoara) Wayland build should have these disabled, but
238 # currently GTK and X is too spread and it's hard to completely
239 # remove every dependency.
[email protected]c49ab0c2011-05-18 17:25:37240 'toolkit_uses_gtk%': 1,
241 'use_x11%': 1,
[email protected]79e2336c2011-05-12 18:18:34242 }],
243
[email protected]63692212010-09-16 00:22:21244 # A flag to enable or disable our compile-time dependency
245 # on gnome-keyring. If that dependency is disabled, no gnome-keyring
246 # support will be available. This option is useful
247 # for Linux distributions.
248 ['chromeos==1', {
249 'use_gnome_keyring%': 0,
250 }, {
251 'use_gnome_keyring%': 1,
252 }],
[email protected]0afe5212010-10-01 18:56:11253
[email protected]bb6aba32011-01-07 19:04:43254 ['toolkit_views==0 or OS=="mac"', {
255 # GTK+ and Mac wants Title Case strings
256 'use_titlecase_in_grd_files%': 1,
257 }],
258
[email protected]1b4209f2011-01-07 00:25:40259 # Enable some hacks to support Flapper only on Chrome OS.
260 ['chromeos==1', {
261 'enable_flapper_hacks%': 1,
262 }, {
263 'enable_flapper_hacks%': 0,
264 }],
[email protected]3d38d8e2011-04-16 20:48:51265
266 # Enable file manager extension by default on Chrome OS.
267 ['chromeos==1', {
268 'file_manager_extension%': 1,
269 }, {
270 'file_manager_extension%': 0,
271 }],
[email protected]32877d302011-07-07 17:57:49272
[email protected]8b2e9f392011-08-05 04:00:47273 # Enable WebUI TaskManager only on Chrome OS and Touch UI.
274 ['chromeos==1 or touchui==1', {
275 'webui_task_manager%': 1,
276 }, {
277 'webui_task_manager%': 0,
278 }],
279
[email protected]32877d302011-07-07 17:57:49280 # Enable smooth scrolling for Linux and ChromeOS
281 ['OS=="linux"', {
282 'enable_smooth_scrolling%': 1,
283 }, {
284 'enable_smooth_scrolling%': 0,
285 }],
[email protected]b3f23ba2010-04-26 22:58:17286 ],
[email protected]e14a9f92009-08-05 19:26:07287 },
288
[email protected]e72e55b2011-01-06 22:19:30289 # Copy conditionally-set variables out one scope.
[email protected]e14a9f92009-08-05 19:26:07290 'branding%': '<(branding)',
291 'buildtype%': '<(buildtype)',
[email protected]e0d00142009-09-18 22:10:27292 'target_arch%': '<(target_arch)',
[email protected]cf185b32010-01-12 04:29:59293 'host_arch%': '<(host_arch)',
[email protected]8fb0ef02011-05-20 00:53:50294 'library%': 'static_library',
[email protected]c153e5352009-09-22 12:37:44295 'toolkit_views%': '<(toolkit_views)',
[email protected]1b546692011-06-30 18:22:30296 'toolkit_uses_pure_views%': '<(toolkit_uses_pure_views)',
[email protected]9c8a1982011-05-24 23:08:58297 'views_compositor%': '<(views_compositor)',
[email protected]e599f0132011-08-24 19:03:35298 'aura_wm%': '<(aura_wm)',
[email protected]79e2336c2011-05-12 18:18:34299 'os_posix%': '<(os_posix)',
300 'toolkit_uses_gtk%': '<(toolkit_uses_gtk)',
[email protected]7d7564a12011-06-21 19:20:22301 'use_skia%': '<(use_skia)',
[email protected]79e2336c2011-05-12 18:18:34302 'use_x11%': '<(use_x11)',
[email protected]63692212010-09-16 00:22:21303 'use_gnome_keyring%': '<(use_gnome_keyring)',
[email protected]0afe5212010-10-01 18:56:11304 'linux_fpic%': '<(linux_fpic)',
[email protected]1b4209f2011-01-07 00:25:40305 'enable_flapper_hacks%': '<(enable_flapper_hacks)',
[email protected]c153e5352009-09-22 12:37:44306 'chromeos%': '<(chromeos)',
[email protected]93012ca2010-08-10 20:10:49307 'touchui%': '<(touchui)',
[email protected]4c9ee222011-08-17 19:51:35308 'webui_dialogs%': '<(webui_dialogs)',
[email protected]e47c32032011-03-01 19:26:20309 'file_manager_extension%': '<(file_manager_extension)',
[email protected]8b2e9f392011-08-05 04:00:47310 'webui_task_manager%': '<(webui_task_manager)',
[email protected]b2f030c2009-09-24 20:36:21311 'inside_chromium_build%': '<(inside_chromium_build)',
[email protected]9c1949e2009-10-02 19:59:54312 'fastbuild%': '<(fastbuild)',
[email protected]a76fe1a2010-03-01 23:39:36313 'python_ver%': '<(python_ver)',
[email protected]eafc0b452010-02-26 21:53:43314 'armv7%': '<(armv7)',
315 'arm_neon%': '<(arm_neon)',
[email protected]4d83eb72010-03-04 16:42:23316 'sysroot%': '<(sysroot)',
[email protected]ac120ff2010-04-28 02:14:22317 'disable_sse2%': '<(disable_sse2)',
[email protected]8974e042010-06-21 18:06:52318 'component%': '<(component)',
[email protected]bb6aba32011-01-07 19:04:43319 'use_titlecase_in_grd_files%': '<(use_titlecase_in_grd_files)',
[email protected]9e94cca2011-02-04 17:38:17320 'use_third_party_translations%': '<(use_third_party_translations)',
[email protected]9a425422011-01-11 00:53:18321 'remoting%': '<(remoting)',
[email protected]dda90ae2011-07-19 22:07:48322 'enable_webrtc%': '<(enable_webrtc)',
[email protected]a026daa2011-04-20 15:49:51323 'p2p_apis%': '<(p2p_apis)',
[email protected]1ec68c42011-06-01 13:56:25324 'configuration_policy%': '<(configuration_policy)',
[email protected]4b58e7d2011-07-11 10:22:56325 'safe_browsing%': '<(safe_browsing)',
[email protected]5d451ad2011-02-11 16:43:46326 'clang_use_chrome_plugins%': '<(clang_use_chrome_plugins)',
[email protected]92799b632011-08-15 14:33:06327 'asan%': '<(asan)',
[email protected]365dd5b92011-05-26 01:30:56328 'enable_register_protocol_handler%': '<(enable_register_protocol_handler)',
[email protected]32877d302011-07-07 17:57:49329 'enable_smooth_scrolling%': '<(enable_smooth_scrolling)',
[email protected]4076d2f2011-08-11 18:20:22330 # Whether to build for Wayland display server
331 'use_wayland%': 0,
[email protected]a22ebd812011-06-23 00:05:39332
[email protected]caa95c82009-11-23 22:39:32333 # The release channel that this build targets. This is used to restrict
334 # channel-specific build options, like which installer packages to create.
335 # The default is 'all', which does no channel-specific filtering.
336 'channel%': 'all',
337
[email protected]b3fb8092009-03-12 19:09:24338 # Override chromium_mac_pch and set it to 0 to suppress the use of
339 # precompiled headers on the Mac. Prefix header injection may still be
340 # used, but prefix headers will not be precompiled. This is useful when
341 # using distcc to distribute a build to compile slaves that don't
342 # share the same compiler executable as the system driving the compilation,
343 # because precompiled headers rely on pointers into a specific compiler
344 # executable's image. Setting this to 0 is needed to use an experimental
345 # Linux-Mac cross compiler distcc farm.
346 'chromium_mac_pch%': 1,
347
[email protected]3224dcd2009-09-16 17:31:25348 # Mac OS X SDK and deployment target support.
349 # The SDK identifies the version of the system headers that will be used,
350 # and corresponds to the MAC_OS_X_VERSION_MAX_ALLOWED compile-time macro.
351 # "Maximum allowed" refers to the operating system version whose APIs are
352 # available in the headers.
353 # The deployment target identifies the minimum system version that the
354 # built products are expected to function on. It corresponds to the
355 # MAC_OS_X_VERSION_MIN_REQUIRED compile-time macro.
356 # To ensure these macros are available, #include <AvailabilityMacros.h>.
357 # Additional documentation on these macros is available at
358 # http://developer.apple.com/mac/library/technotes/tn2002/tn2064.html#SECTION3
359 # Chrome normally builds with the Mac OS X 10.5 SDK and sets the
360 # deployment target to 10.5. Other projects, such as O3D, may override
361 # these defaults.
362 'mac_sdk%': '10.5',
363 'mac_deployment_target%': '10.5',
[email protected]9543af052009-09-15 22:42:59364
[email protected]f5ecbba12009-04-03 04:35:18365 # Set to 1 to enable code coverage. In addition to build changes
366 # (e.g. extra CFLAGS), also creates a new target in the src/chrome
367 # project file called "coverage".
368 # Currently ignored on Windows.
369 'coverage%': 0,
[email protected]653bd5f032009-04-08 12:55:49370
[email protected]c61f6432009-04-22 01:16:42371 # Overridable specification for potential use of alternative
372 # JavaScript engines.
373 'javascript_engine%': 'v8',
374
[email protected]7477ea6f2009-12-22 23:28:15375 # Although base/allocator lets you select a heap library via an
[email protected]7e0d664a2009-12-03 21:07:47376 # environment variable, the libcmt shim it uses sometimes gets in
377 # the way. To disable it entirely, and switch to normal msvcrt, do e.g.
378 # 'win_use_allocator_shim': 0,
379 # 'win_release_RuntimeLibrary': 2
380 # to ~/.gyp/include.gypi, gclient runhooks --force, and do a release build.
[email protected]8974e042010-06-21 18:06:52381 'win_use_allocator_shim%': 1, # 1 = shim allocator via libcmt; 0 = msvcrt
[email protected]279cd4212009-09-11 22:32:11382
[email protected]95ff8082009-11-13 22:21:01383 # Whether usage of OpenMAX is enabled.
384 'enable_openmax%': 0,
385
[email protected]d01120e62010-05-10 17:04:48386 # Whether proprietary audio/video codecs are assumed to be included with
387 # this build (only meaningful if branding!=Chrome).
388 'proprietary_codecs%': 0,
389
[email protected]e5b2eaa2009-04-14 01:39:12390 # TODO(bradnelson): eliminate this when possible.
391 # To allow local gyp files to prevent release.vsprops from being included.
392 # Yes(1) means include release.vsprops.
393 # Once all vsprops settings are migrated into gyp, this can go away.
394 'msvs_use_common_release%': 1,
[email protected]606116d22009-05-06 22:38:23395
[email protected]cbd5fd52009-08-26 00:14:27396 # TODO(bradnelson): eliminate this when possible.
397 # To allow local gyp files to override additional linker options for msvs.
398 # Yes(1) means set use the common linker options.
[email protected]48c7af72009-07-03 22:00:19399 'msvs_use_common_linker_extras%': 1,
400
[email protected]1ffb6502009-06-02 07:46:24401 # TODO(sgk): eliminate this if possible.
402 # It would be nicer to support this via a setting in 'target_defaults'
403 # in chrome/app/locales/locales.gypi overriding the setting in the
404 # 'Debug' configuration in the 'target_defaults' dict below,
405 # but that doesn't work as we'd like.
406 'msvs_debug_link_incremental%': '2',
407
[email protected]1f790ef2011-01-11 20:45:36408 # Needed for some of the largest modules.
409 'msvs_debug_link_nonincremental%': '1',
410
[email protected]5ab8f482011-08-18 18:30:06411 # Turn on Use Library Dependency Inputs for linking chrome.dll on Windows
412 # to get incremental linking to be faster in debug builds.
413 'incremental_chrome_dll%': 0,
414
[email protected]573136142009-07-15 22:48:37415 # This is the location of the sandbox binary. Chrome looks for this before
416 # running the zygote process. If found, and SUID, it will be used to
417 # sandbox the zygote process and, thus, all renderer processes.
418 'linux_sandbox_path%': '',
419
[email protected]ad6d2c42009-09-15 20:13:38420 # Set this to true to enable SELinux support.
421 'selinux%': 0,
[email protected]4c9cc6c2009-10-01 18:54:57422
[email protected]58680ce2010-09-18 00:09:15423 # Set this to true when building with Clang.
424 # See http://code.google.com/p/chromium/wiki/Clang for details.
425 # TODO: eventually clang should behave identically to gcc, and this
426 # won't be necessary.
427 'clang%': 0,
428
[email protected]5e781232011-01-28 02:57:59429 # These two variables can be set in GYP_DEFINES while running
430 # |gclient runhooks| to let clang run a plugin in every compilation.
431 # Only has an effect if 'clang=1' is in GYP_DEFINES as well.
432 # Example:
[email protected]93120fe2011-02-03 20:46:42433 # 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:59434
435 'clang_load%': '',
436 'clang_add_plugin%': '',
437
[email protected]7664ab32011-02-01 23:35:25438 # Enable sampling based profiler.
439 # See http://google-perftools.googlecode.com/svn/trunk/doc/cpuprofile.html
440 'profiling%': '0',
441
[email protected]93b373502011-08-16 19:06:22442 # Enable strict glibc debug mode.
443 'glibcxx_debug%': 0,
444
[email protected]36532f332010-08-25 00:22:01445 # Override whether we should use Breakpad on Linux. I.e. for Chrome bot.
446 'linux_breakpad%': 0,
447 # And if we want to dump symbols for Breakpad-enabled builds.
448 'linux_dump_symbols%': 0,
449 # And if we want to strip the binary after dumping symbols.
[email protected]05cb6962009-10-01 23:29:03450 'linux_strip_binary%': 0,
[email protected]1d87c282010-09-15 22:24:49451 # Strip the test binaries needed for Linux reliability tests.
452 'linux_strip_reliability_tests%': 0,
[email protected]05cb6962009-10-01 23:29:03453
[email protected]46ce5b562010-06-16 18:39:53454 # Enable TCMalloc.
455 'linux_use_tcmalloc%': 1,
[email protected]01699e22009-11-11 19:24:24456
[email protected]39ca7de2010-04-16 08:04:03457 # Disable TCMalloc's debugallocation.
458 'linux_use_debugallocation%': 0,
459
[email protected]d8b60602010-03-26 09:41:22460 # Disable TCMalloc's heapchecker.
461 'linux_use_heapchecker%': 0,
462
[email protected]64e2d4a42010-08-27 10:13:21463 # Disable shadow stack keeping used by heapcheck to unwind the stacks
464 # better.
465 'linux_keep_shadow_stacks%': 0,
466
[email protected]6def64a2010-10-28 20:40:34467 # Set to 1 to turn on seccomp sandbox by default.
468 # (Note: this is ignored for official builds.)
469 'linux_use_seccomp_sandbox%': 0,
[email protected]39c4e1a82010-03-30 19:47:41470
[email protected]556c5d72010-06-10 05:45:01471 # Set to 1 to link against libgnome-keyring instead of using dlopen().
472 'linux_link_gnome_keyring%': 0,
[email protected]abcc9ac2011-05-16 20:04:35473 # Set to 1 to link against gsettings APIs instead of using dlopen().
474 'linux_link_gsettings%': 0,
[email protected]556c5d72010-06-10 05:45:01475
[email protected]d8c7cbcc2009-10-02 19:00:31476 # Used to disable Native Client at compile time, for platforms where it
477 # isn't supported
478 'disable_nacl%': 0,
479
[email protected]77c1b29392009-12-04 06:21:29480 # Set Thumb compilation flags.
481 'arm_thumb%': 0,
482
[email protected]53e0f642010-03-05 01:41:56483 # Set ARM fpu compilation flags (only meaningful if armv7==1 and
484 # arm_neon==0).
485 'arm_fpu%': 'vfpv3',
486
[email protected]9821d0d2010-04-16 22:40:37487 # Enable new NPDevice API.
488 'enable_new_npdevice_api%': 0,
[email protected]ed154592010-04-29 00:18:50489
490 # Enable EGLImage support in OpenMAX
[email protected]58023be2011-02-04 20:34:14491 'enable_eglimage%': 1,
[email protected]ed154592010-04-29 00:18:50492
[email protected]6f51b27e2010-06-22 20:43:53493 # Enable a variable used elsewhere throughout the GYP files to determine
494 # whether to compile in the sources for the GPU plugin / process.
495 'enable_gpu%': 1,
496
[email protected]32e1dee2010-12-09 18:36:24497 # Use OpenSSL instead of NSS. Under development: see http://crbug.com/62803
[email protected]d518cd92010-09-29 12:27:44498 'use_openssl%': 0,
499
[email protected]e72e55b2011-01-06 22:19:30500 # .gyp files or targets should set chromium_code to 1 if they build
501 # Chromium-specific code, as opposed to external code. This variable is
502 # used to control such things as the set of warnings to enable, and
503 # whether warnings are treated as errors.
504 'chromium_code%': 0,
505
506 # Set to 1 to compile with the built in pdf viewer.
507 'internal_pdf%': 0,
508
509 # This allows to use libcros from the current system, ie. /usr/lib/
510 # The cros_api will be pulled in as a static library, and all headers
511 # from the system include dirs.
[email protected]bb6aba32011-01-07 19:04:43512 'system_libcros%': 0,
[email protected]e72e55b2011-01-06 22:19:30513
[email protected]e72e55b2011-01-06 22:19:30514 # NOTE: When these end up in the Mac bundle, we need to replace '-' for '_'
515 # so Cocoa is happy (http://crbug.com/20441).
516 'locales': [
517 'am', 'ar', 'bg', 'bn', 'ca', 'cs', 'da', 'de', 'el', 'en-GB',
518 'en-US', 'es-419', 'es', 'et', 'fa', 'fi', 'fil', 'fr', 'gu', 'he',
519 'hi', 'hr', 'hu', 'id', 'it', 'ja', 'kn', 'ko', 'lt', 'lv',
520 'ml', 'mr', 'nb', 'nl', 'pl', 'pt-BR', 'pt-PT', 'ro', 'ru',
521 'sk', 'sl', 'sr', 'sv', 'sw', 'ta', 'te', 'th', 'tr', 'uk',
522 'vi', 'zh-CN', 'zh-TW',
523 ],
524
[email protected]cc0322d2011-07-24 09:29:19525 # Pseudo locales are special locales which are used for testing and
526 # debugging. They don't get copied to the final app. For more info,
527 # check out https://sites.google.com/a/chromium.org/dev/Home/fake-bidi
528 'pseudo_locales': [
529 'fake-bidi',
530 ],
531
[email protected]bb6aba32011-01-07 19:04:43532 'grit_defines': [],
533
[email protected]29c2daea2011-01-05 20:38:50534 # Use Harfbuzz-NG instead of Harfbuzz.
535 # Under development: http://crbug.com/68551
536 'use_harfbuzz_ng%': 0,
537
[email protected]bd3bd442011-03-28 07:58:51538 # If debug_devtools is set to 1, JavaScript files for DevTools are
539 # stored as is and loaded from disk. Otherwise, a concatenated file
540 # is stored in resources.pak. It is still possible to load JS files
541 # from disk by passing --debug-devtools cmdline switch.
542 'debug_devtools%': 0,
543
[email protected]be8a9272011-02-10 22:06:07544 # Point to ICU directory.
545 'icu_src_dir': '../third_party/icu',
546
[email protected]912c55c2009-07-31 23:33:55547 'conditions': [
[email protected]79e2336c2011-05-12 18:18:34548 ['os_posix==1 and OS!="mac"', {
[email protected]242a9e62009-11-03 17:32:10549 # This will set gcc_version to XY if you are running gcc X.Y.*.
550 # This is used to tweak build flags for gcc 4.4.
551 'gcc_version%': '<!(python <(DEPTH)/build/compiler_version.py)',
[email protected]4d83eb72010-03-04 16:42:23552 # Figure out the python architecture to decide if we build pyauto.
[email protected]efd68462010-03-04 17:07:54553 'python_arch%': '<!(<(DEPTH)/build/linux/python_arch.sh <(sysroot)/usr/lib/libpython<(python_ver).so.1.0)',
[email protected]cbd5fd52009-08-26 00:14:27554 'conditions': [
[email protected]2a77a9d2010-08-26 19:58:10555 ['branding=="Chrome"', {
[email protected]cbd5fd52009-08-26 00:14:27556 'linux_breakpad%': 1,
[email protected]cbd5fd52009-08-26 00:14:27557 }],
[email protected]4c9cc6c2009-10-01 18:54:57558 # All Chrome builds have breakpad symbols, but only process the
559 # symbols from official builds.
[email protected]c913cb82010-08-31 19:44:08560 ['(branding=="Chrome" and buildtype=="Official")', {
[email protected]4c9cc6c2009-10-01 18:54:57561 'linux_dump_symbols%': 1,
[email protected]4c9cc6c2009-10-01 18:54:57562 }],
[email protected]cbd5fd52009-08-26 00:14:27563 ],
[email protected]79e2336c2011-05-12 18:18:34564 }], # os_posix==1 and OS!="mac"
[email protected]bb6aba32011-01-07 19:04:43565
[email protected]e14a9f92009-08-05 19:26:07566 ['OS=="mac"', {
567 'conditions': [
568 # mac_product_name is set to the name of the .app bundle as it should
569 # appear on disk. This duplicates data from
570 # chrome/app/theme/chromium/BRANDING and
571 # chrome/app/theme/google_chrome/BRANDING, but is necessary to get
572 # these names into the build system.
573 ['branding=="Chrome"', {
574 'mac_product_name%': 'Google Chrome',
575 }, { # else: branding!="Chrome"
576 'mac_product_name%': 'Chromium',
577 }],
578
579 # Feature variables for enabling Mac Breakpad and Keystone auto-update
580 # support. Both features are on by default in official builds with
581 # Chrome branding.
582 ['branding=="Chrome" and buildtype=="Official"', {
583 'mac_breakpad%': 1,
584 'mac_keystone%': 1,
[email protected]08857c6c2011-08-10 00:11:49585
586 # Official builds use clang, but only on m15+. Since there's just
587 # one buildbot config for the builder for m13, m14, and m15, this
588 # can't be defined in the buildbot config but is instead defined
589 # here (it was added after the m14 branch was cut). This is in the
590 # buildtype=="Official" section so that developers don't see it
591 # for their local builds.
[email protected]da962efd2011-08-22 17:15:48592 'clang%': 1,
[email protected]e14a9f92009-08-05 19:26:07593 }, { # else: branding!="Chrome" or buildtype!="Official"
594 'mac_breakpad%': 0,
595 'mac_keystone%': 0,
596 }],
597 ],
598 }], # OS=="mac"
[email protected]bb6aba32011-01-07 19:04:43599
[email protected]912c55c2009-07-31 23:33:55600 # Whether to use multiple cores to compile with visual studio. This is
601 # optional because it sometimes causes corruption on VS 2005.
602 # It is on by default on VS 2008 and off on VS 2005.
603 ['OS=="win"', {
604 'conditions': [
[email protected]8974e042010-06-21 18:06:52605 ['component=="shared_library"', {
606 'win_use_allocator_shim%': 0,
607 }],
[email protected]912c55c2009-07-31 23:33:55608 ['MSVS_VERSION=="2005"', {
[email protected]669795372009-08-14 17:51:13609 'msvs_multi_core_compile%': 0,
[email protected]912c55c2009-07-31 23:33:55610 },{
611 'msvs_multi_core_compile%': 1,
612 }],
[email protected]10bb8c92009-08-07 21:16:03613 # Don't do incremental linking for large modules on 32-bit.
614 ['MSVS_OS_BITS==32', {
615 'msvs_large_module_debug_link_mode%': '1', # No
616 },{
617 'msvs_large_module_debug_link_mode%': '2', # Yes
618 }],
[email protected]3e2648a2011-03-21 20:58:50619 ['MSVS_VERSION=="2010e" or MSVS_VERSION=="2008e" or MSVS_VERSION=="2005e"', {
620 'msvs_express%': 1,
621 'secure_atl%': 0,
622 },{
623 'msvs_express%': 0,
624 'secure_atl%': 1,
625 }],
[email protected]912c55c2009-07-31 23:33:55626 ],
[email protected]ef4fa4072009-12-04 22:46:50627 'nacl_win64_defines': [
628 # This flag is used to minimize dependencies when building
629 # Native Client loader for 64-bit Windows.
630 'NACL_WIN64',
631 ],
[email protected]912c55c2009-07-31 23:33:55632 }],
[email protected]bb6aba32011-01-07 19:04:43633
[email protected]79e2336c2011-05-12 18:18:34634 ['os_posix==1 and chromeos==0 and target_arch!="arm"', {
[email protected]8e553f42010-10-25 20:05:44635 'use_cups%': 1,
636 }, {
637 'use_cups%': 0,
638 }],
[email protected]bb6aba32011-01-07 19:04:43639
[email protected]19fe8f0b2010-12-07 07:27:27640 # Set the relative path from this file to the GYP file of the JPEG
641 # library used by Chromium.
642 ['use_libjpeg_turbo==1', {
643 'libjpeg_gyp_path': '../third_party/libjpeg_turbo/libjpeg.gyp',
644 }, {
645 'libjpeg_gyp_path': '../third_party/libjpeg/libjpeg.gyp',
646 }], # use_libjpeg_turbo==1
[email protected]bb6aba32011-01-07 19:04:43647
[email protected]abcc9ac2011-05-16 20:04:35648 # Options controlling the use of GConf (the classic GNOME configuration
649 # system) and GIO, which contains GSettings (the new GNOME config system).
[email protected]1c6fe29302011-01-20 22:14:31650 ['chromeos==1', {
651 'use_gconf%': 0,
[email protected]abcc9ac2011-05-16 20:04:35652 'use_gio%': 0,
[email protected]1c6fe29302011-01-20 22:14:31653 }, {
654 'use_gconf%': 1,
[email protected]abcc9ac2011-05-16 20:04:35655 'use_gio%': 1,
[email protected]1c6fe29302011-01-20 22:14:31656 }],
657
[email protected]4de39f82011-03-28 12:01:29658 # Set up -D and -E flags passed into grit.
[email protected]1660bffd2011-03-23 16:24:29659 ['branding=="Chrome"', {
660 # TODO(mmoss) The .grd files look for _google_chrome, but for
661 # consistency they should look for google_chrome_build like C++.
[email protected]4de39f82011-03-28 12:01:29662 'grit_defines': ['-D', '_google_chrome',
663 '-E', 'CHROMIUM_BUILD=google_chrome'],
[email protected]1660bffd2011-03-23 16:24:29664 }, {
[email protected]4de39f82011-03-28 12:01:29665 'grit_defines': ['-D', '_chromium',
666 '-E', 'CHROMIUM_BUILD=chromium'],
[email protected]1660bffd2011-03-23 16:24:29667 }],
[email protected]bb6aba32011-01-07 19:04:43668 ['chromeos==1', {
669 'grit_defines': ['-D', 'chromeos'],
670 }],
671 ['toolkit_views==1', {
672 'grit_defines': ['-D', 'toolkit_views'],
673 }],
[email protected]1b546692011-06-30 18:22:30674 ['toolkit_uses_pure_views==1', {
675 'grit_defines': ['-D', 'toolkit_uses_pure_views'],
676 }],
[email protected]bb6aba32011-01-07 19:04:43677 ['touchui==1', {
678 'grit_defines': ['-D', 'touchui'],
679 }],
[email protected]4c9ee222011-08-17 19:51:35680 ['webui_dialogs==1', {
681 'grit_defines': ['-D', 'webui_dialogs'],
[email protected]8ebc9b42011-07-14 15:22:18682 }],
[email protected]e47c32032011-03-01 19:26:20683 ['file_manager_extension==1', {
684 'grit_defines': ['-D', 'file_manager_extension'],
685 }],
[email protected]8b2e9f392011-08-05 04:00:47686 ['webui_task_manager==1', {
687 'grit_defines': ['-D', 'webui_task_manager'],
688 }],
[email protected]9a425422011-01-11 00:53:18689 ['remoting==1', {
690 'grit_defines': ['-D', 'remoting'],
691 }],
[email protected]bb6aba32011-01-07 19:04:43692 ['use_titlecase_in_grd_files==1', {
693 'grit_defines': ['-D', 'use_titlecase'],
694 }],
[email protected]00dc155832011-02-01 18:51:19695 ['use_third_party_translations==1', {
696 'grit_defines': ['-D', 'use_third_party_translations'],
[email protected]fb6c1022011-06-27 21:58:12697 'locales': [
[email protected]8581e1ba2011-08-22 23:27:16698 'ast', 'bs', 'ca@valencia', 'en-AU', 'eo', 'eu', 'gl', 'hy', 'ia',
699 'ka', 'ku', 'kw', 'ms', 'ug'
[email protected]fb6c1022011-06-27 21:58:12700 ],
[email protected]00dc155832011-02-01 18:51:19701 }],
[email protected]5d451ad2011-02-11 16:43:46702
703 ['clang_use_chrome_plugins==1', {
704 'clang_chrome_plugins_flags':
705 '<!(<(DEPTH)/tools/clang/scripts/plugin_flags.sh)',
706 }],
[email protected]cfa2e1102011-04-27 22:30:23707
[email protected]452da69e2011-05-24 02:36:05708 # Set use_ibus to 1 to enable ibus support.
[email protected]cfa2e1102011-04-27 22:30:23709 ['touchui==1 and chromeos==1', {
710 'use_ibus%': 1,
711 }, {
712 'use_ibus%': 0,
[email protected]365dd5b92011-05-26 01:30:56713 }],
714
715 ['enable_register_protocol_handler==1', {
716 'grit_defines': ['-D', 'enable_register_protocol_handler'],
717 }],
[email protected]92799b632011-08-15 14:33:06718
719 ['asan==1', {
720 'clang%': 1,
721 }],
[email protected]912c55c2009-07-31 23:33:55722 ],
[email protected]2f80c312009-02-25 21:26:55723 },
724 'target_defaults': {
[email protected]1c966092009-08-20 21:19:26725 'variables': {
[email protected]a6e22132010-02-10 20:43:18726 # The condition that operates on chromium_code is in a target_conditions
727 # section, and will not have access to the default fallback value of
728 # chromium_code at the top of this file, or to the chromium_code
729 # variable placed at the root variables scope of .gyp files, because
730 # those variables are not set at target scope. As a workaround,
731 # if chromium_code is not set at target scope, define it in target scope
732 # to contain whatever value it has during early variable expansion.
733 # That's enough to make it available during target conditional
734 # processing.
735 'chromium_code%': '<(chromium_code)',
736
[email protected]7e0d664a2009-12-03 21:07:47737 # See http://gcc.gnu.org/onlinedocs/gcc-4.4.2/gcc/Optimize-Options.html
[email protected]d5d593a2009-08-28 23:23:29738 'mac_release_optimization%': '3', # Use -O3 unless overridden
[email protected]ffd984b12009-09-11 19:37:00739 'mac_debug_optimization%': '0', # Use -O0 unless overridden
[email protected]7e0d664a2009-12-03 21:07:47740 # See http://msdn.microsoft.com/en-us/library/aa652360(VS.71).aspx
741 'win_release_Optimization%': '2', # 2 = /Os
742 'win_debug_Optimization%': '0', # 0 = /Od
[email protected]6b0507b2010-05-07 07:41:21743 # See http://msdn.microsoft.com/en-us/library/8wtf2dfz(VS.71).aspx
744 'win_debug_RuntimeChecks%': '3', # 3 = all checks enabled, 0 = off
745 # See http://msdn.microsoft.com/en-us/library/47238hez(VS.71).aspx
[email protected]2ae6e022010-05-07 13:19:15746 'win_debug_InlineFunctionExpansion%': '', # empty = default, 0 = off,
747 'win_release_InlineFunctionExpansion%': '2', # 1 = only __inline, 2 = max
[email protected]fac10d12010-11-08 16:00:31748 # VS inserts quite a lot of extra checks to algorithms like
749 # std::partial_sort in Debug build which make them O(N^2)
750 # instead of O(N*logN). This is particularly slow under memory
751 # tools like ThreadSanitizer so we want it to be disablable.
752 # See http://msdn.microsoft.com/en-us/library/aa985982(v=VS.80).aspx
753 'win_debug_disable_iterator_debugging%': '0',
[email protected]7e0d664a2009-12-03 21:07:47754
[email protected]ffd984b12009-09-11 19:37:00755 'release_extra_cflags%': '',
756 'debug_extra_cflags%': '',
[email protected]92822e82009-09-18 14:26:56757 'release_valgrind_build%': 0,
[email protected]8974e042010-06-21 18:06:52758
759 'conditions': [
760 ['OS=="win" and component=="shared_library"', {
761 # See http://msdn.microsoft.com/en-us/library/aa652367.aspx
762 'win_release_RuntimeLibrary%': '2', # 2 = /MT (nondebug DLL)
763 'win_debug_RuntimeLibrary%': '3', # 3 = /MTd (debug DLL)
764 }, {
765 # See http://msdn.microsoft.com/en-us/library/aa652367.aspx
766 'win_release_RuntimeLibrary%': '0', # 0 = /MT (nondebug static)
767 'win_debug_RuntimeLibrary%': '1', # 1 = /MTd (debug static)
768 }],
769 ],
[email protected]1c966092009-08-20 21:19:26770 },
[email protected]32aa8cc2009-03-04 21:36:39771 'conditions': [
772 ['branding=="Chrome"', {
773 'defines': ['GOOGLE_CHROME_BUILD'],
774 }, { # else: branding!="Chrome"
775 'defines': ['CHROMIUM_BUILD'],
776 }],
[email protected]63e39a282011-07-13 20:41:28777 ['component=="shared_library"', {
778 'defines': ['COMPONENT_BUILD'],
779 }],
[email protected]06c756182010-04-27 18:31:31780 ['toolkit_views==1', {
[email protected]e6970232009-05-12 23:51:17781 'defines': ['TOOLKIT_VIEWS=1'],
782 }],
[email protected]1b546692011-06-30 18:22:30783 ['toolkit_uses_pure_views==1', {
784 'defines': ['TOOLKIT_USES_PURE_VIEWS=1'],
785 }],
[email protected]9c8a1982011-05-24 23:08:58786 ['views_compositor==1', {
[email protected]c3870f42011-06-10 16:43:27787 'defines': ['VIEWS_COMPOSITOR=1'],
[email protected]9c8a1982011-05-24 23:08:58788 }],
[email protected]e599f0132011-08-24 19:03:35789 ['aura_wm==1', {
790 'defines': ['AURA_WM=1'],
791 }],
[email protected]fdc5bed2010-01-09 01:16:57792 ['chromeos==1', {
[email protected]16779842009-07-08 23:45:29793 'defines': ['OS_CHROMEOS=1'],
[email protected]2b883b92009-06-02 22:57:50794 }],
[email protected]0094fbe2010-07-15 21:51:43795 ['touchui==1', {
796 'defines': ['TOUCH_UI=1'],
797 }],
[email protected]236754a2011-07-28 17:38:23798 ['use_wayland==1', {
799 'defines': ['USE_WAYLAND=1', 'WL_EGL_PLATFORM=1'],
800 }],
[email protected]e47c32032011-03-01 19:26:20801 ['file_manager_extension==1', {
802 'defines': ['FILE_MANAGER_EXTENSION=1'],
803 }],
[email protected]8b2e9f392011-08-05 04:00:47804 ['webui_task_manager==1', {
805 'defines': ['WEBUI_TASK_MANAGER=1'],
806 }],
[email protected]7664ab32011-02-01 23:35:25807 ['profiling==1', {
808 'defines': ['ENABLE_PROFILING=1'],
809 }],
[email protected]93b373502011-08-16 19:06:22810 ['OS=="linux" and glibcxx_debug==1', {
811 'defines': ['_GLIBCXX_DEBUG=1',],
812 'cflags_cc!': ['-fno-rtti'],
813 'cflags_cc+': ['-frtti', '-g'],
814 }],
[email protected]542bf24a2010-06-11 23:08:17815 ['remoting==1', {
816 'defines': ['ENABLE_REMOTING=1'],
[email protected]c0bac532010-06-11 00:39:00817 }],
[email protected]a026daa2011-04-20 15:49:51818 ['p2p_apis==1', {
819 'defines': ['ENABLE_P2P_APIS=1'],
820 }],
[email protected]d01120e62010-05-10 17:04:48821 ['proprietary_codecs==1', {
822 'defines': ['USE_PROPRIETARY_CODECS'],
823 }],
[email protected]1b4209f2011-01-07 00:25:40824 ['enable_flapper_hacks==1', {
825 'defines': ['ENABLE_FLAPPER_HACKS=1'],
826 }],
[email protected]f31e2e52011-07-14 16:01:19827 ['configuration_policy==1', {
828 'defines': ['ENABLE_CONFIGURATION_POLICY'],
829 }],
[email protected]9c1949e2009-10-02 19:59:54830 ['fastbuild!=0', {
831 'conditions': [
[email protected]1cc2fa72010-07-03 08:49:24832 # For Windows, we don't genererate debug information.
[email protected]9c1949e2009-10-02 19:59:54833 ['OS=="win"', {
834 'msvs_settings': {
835 'VCLinkerTool': {
836 'GenerateDebugInformation': 'false',
837 },
838 'VCCLCompilerTool': {
839 'DebugInformationFormat': '0',
840 }
841 }
[email protected]1cc2fa72010-07-03 08:49:24842 }, { # else: OS != "win", generate less debug information.
843 'variables': {
844 'debug_extra_cflags': '-g1',
845 },
[email protected]37c84192010-04-14 21:37:40846 }],
[email protected]aecc4d12011-01-19 05:32:33847 # Clang creates chubby debug information, which makes linking very
848 # slow. For now, don't create debug information with clang. See
849 # http://crbug.com/70000
850 ['OS=="linux" and clang==1', {
851 'variables': {
852 'debug_extra_cflags': '-g0',
853 },
854 }],
[email protected]9c1949e2009-10-02 19:59:54855 ], # conditions for fastbuild.
856 }], # fastbuild!=0
[email protected]ad6d2c42009-09-15 20:13:38857 ['selinux==1', {
858 'defines': ['CHROMIUM_SELINUX=1'],
859 }],
[email protected]7e0d664a2009-12-03 21:07:47860 ['win_use_allocator_shim==0', {
861 'conditions': [
862 ['OS=="win"', {
863 'defines': ['NO_TCMALLOC'],
864 }],
865 ],
866 }],
[email protected]43f28f832010-02-03 02:28:48867 ['enable_gpu==1', {
[email protected]7477ea6f2009-12-22 23:28:15868 'defines': [
869 'ENABLE_GPU=1',
870 ],
871 }],
[email protected]b1c2a5542010-10-08 12:44:40872 ['use_openssl==1', {
873 'defines': [
874 'USE_OPENSSL=1',
875 ],
876 }],
[email protected]ed154592010-04-29 00:18:50877 ['enable_eglimage==1', {
878 'defines': [
879 'ENABLE_EGLIMAGE=1',
880 ],
881 }],
[email protected]7d7564a12011-06-21 19:20:22882 ['use_skia==1', {
883 'defines': [
884 'USE_SKIA=1',
885 ],
886 }],
[email protected]f5ecbba12009-04-03 04:35:18887 ['coverage!=0', {
888 'conditions': [
889 ['OS=="mac"', {
890 'xcode_settings': {
[email protected]ab2956372009-08-13 18:11:04891 'GCC_INSTRUMENT_PROGRAM_FLOW_ARCS': 'YES', # -fprofile-arcs
892 'GCC_GENERATE_TEST_COVERAGE_FILES': 'YES', # -ftest-coverage
[email protected]5ae4f55e2009-04-13 23:19:47893 },
[email protected]e4fb84c2009-12-28 20:45:43894 # Add -lgcov for types executable, shared_library, and
[email protected]dc259ce52010-04-13 04:03:10895 # loadable_module; not for static_library.
[email protected]e4fb84c2009-12-28 20:45:43896 # This is a delayed conditional.
[email protected]f5ecbba12009-04-03 04:35:18897 'target_conditions': [
[email protected]e4fb84c2009-12-28 20:45:43898 ['_type!="static_library"', {
[email protected]f5ecbba12009-04-03 04:35:18899 'xcode_settings': { 'OTHER_LDFLAGS': [ '-lgcov' ] },
[email protected]5ae4f55e2009-04-13 23:19:47900 }],
901 ],
902 }],
[email protected]f5ecbba12009-04-03 04:35:18903 ['OS=="linux"', {
904 'cflags': [ '-ftest-coverage',
905 '-fprofile-arcs' ],
[email protected]7122ffd52009-04-30 23:19:00906 'link_settings': { 'libraries': [ '-lgcov' ] },
[email protected]f5ecbba12009-04-03 04:35:18907 }],
[email protected]e8f6ff42009-07-07 18:20:53908 # Finally, for Windows, we simply turn on profiling.
909 ['OS=="win"', {
910 'msvs_settings': {
911 'VCLinkerTool': {
912 'Profile': 'true',
913 },
[email protected]10bb8c92009-08-07 21:16:03914 'VCCLCompilerTool': {
[email protected]e8f6ff42009-07-07 18:20:53915 # /Z7, not /Zi, so coverage is happyb
916 'DebugInformationFormat': '1',
[email protected]1f9471a2010-01-04 06:40:16917 'AdditionalOptions': ['/Yd'],
[email protected]e8f6ff42009-07-07 18:20:53918 }
919 }
920 }], # OS==win
921 ], # conditions for coverage
922 }], # coverage!=0
[email protected]4e4d6042010-08-26 18:34:38923 ['OS=="win"', {
924 'defines': [
925 '__STD_C',
926 '_CRT_SECURE_NO_DEPRECATE',
927 '_SCL_SECURE_NO_DEPRECATE',
928 ],
929 'include_dirs': [
930 '<(DEPTH)/third_party/wtl/include',
931 ],
932 }], # OS==win
[email protected]365dd5b92011-05-26 01:30:56933 ['enable_register_protocol_handler==1', {
934 'defines': [
[email protected]06bba4fb2011-06-09 05:17:19935 'ENABLE_REGISTER_PROTOCOL_HANDLER=1',
[email protected]365dd5b92011-05-26 01:30:56936 ],
937 }],
[email protected]a6e22132010-02-10 20:43:18938 ], # conditions for 'target_defaults'
939 'target_conditions': [
[email protected]c14d8e772010-02-09 22:06:15940 ['chromium_code==0', {
[email protected]d8543312010-02-10 17:43:28941 'conditions': [
[email protected]79e2336c2011-05-12 18:18:34942 [ 'os_posix==1 and OS!="mac"', {
[email protected]c0a6b272011-02-09 22:32:33943 # We don't want to get warnings from third-party code,
944 # so remove any existing warning-enabling flags like -Wall.
[email protected]d8543312010-02-10 17:43:28945 'cflags!': [
946 '-Wall',
947 '-Wextra',
948 '-Werror',
949 ],
[email protected]ec1d155be2011-02-08 22:19:00950 'cflags': [
951 # Don't warn about hash_map in third-party code.
952 '-Wno-deprecated',
[email protected]c0a6b272011-02-09 22:32:33953 # Don't warn about printf format problems.
954 # This is off by default in gcc but on in Ubuntu's gcc(!).
[email protected]ec392872011-02-10 22:38:22955 '-Wno-format',
[email protected]ec1d155be2011-02-08 22:19:00956 ],
[email protected]d16bd642011-07-25 23:59:18957 'cflags_cc!': [
958 # TODO(fischman): remove this.
959 # http://code.google.com/p/chromium/issues/detail?id=90453
960 '-Wsign-compare',
961 ]
[email protected]d8543312010-02-10 17:43:28962 }],
[email protected]6e4451892011-07-27 10:32:11963 [ 'os_posix==1 and OS!="mac" and chromeos==0', {
964 'cflags': [
965 # Don't warn about ignoring the return value from e.g. close().
966 # This is off by default in some gccs but on by default in others.
967 # Currently this option is not set for Chrome OS build because
968 # the current version of gcc (4.3.4) used for building Chrome in
969 # Chrome OS chroot doesn't support this option.
970 # TODO(mazda): remove the conditional for Chrome OS when gcc
971 # version is upgraded.
972 '-Wno-unused-result',
973 ],
974 }],
[email protected]d8543312010-02-10 17:43:28975 [ 'OS=="win"', {
976 'defines': [
977 '_CRT_SECURE_NO_DEPRECATE',
978 '_CRT_NONSTDC_NO_WARNINGS',
979 '_CRT_NONSTDC_NO_DEPRECATE',
980 '_SCL_SECURE_NO_DEPRECATE',
981 ],
982 'msvs_disabled_warnings': [4800],
983 'msvs_settings': {
984 'VCCLCompilerTool': {
[email protected]942c3a60f2011-05-03 02:04:11985 'WarningLevel': '3',
986 'WarnAsError': 'false', # TODO(maruel): Enable it.
[email protected]d8543312010-02-10 17:43:28987 'Detect64BitPortabilityProblems': 'false',
988 },
989 },
990 }],
[email protected]ea47b6a2011-07-17 19:39:42991 # TODO(darin): Unfortunately, some third_party code depends on base/
992 [ 'OS=="win" and component=="shared_library"', {
993 'msvs_disabled_warnings': [
994 4251, # class 'std::xx' needs to have dll-interface.
995 ],
996 }],
[email protected]d8543312010-02-10 17:43:28997 [ 'OS=="mac"', {
998 'xcode_settings': {
999 'GCC_TREAT_WARNINGS_AS_ERRORS': 'NO',
[email protected]4c4c2e5332010-06-15 11:51:061000 'WARNING_CFLAGS!': ['-Wall', '-Wextra'],
[email protected]d8543312010-02-10 17:43:281001 },
1002 }],
[email protected]c14d8e772010-02-09 22:06:151003 ],
1004 }, {
1005 # In Chromium code, we define __STDC_FORMAT_MACROS in order to get the
1006 # C99 macros on Mac and Linux.
1007 'defines': [
1008 '__STDC_FORMAT_MACROS',
1009 ],
1010 'conditions': [
1011 ['OS!="win"', {
[email protected]40519592010-11-16 15:23:301012 'sources/': [ ['exclude', '_win(_unittest)?\\.(h|cc)$'],
[email protected]a316ca532010-11-15 14:08:161013 ['exclude', '(^|/)win/'],
[email protected]40519592010-11-16 15:23:301014 ['exclude', '(^|/)win_[^/]*\\.(h|cc)$'] ],
[email protected]c14d8e772010-02-09 22:06:151015 }],
1016 ['OS!="mac"', {
[email protected]40519592010-11-16 15:23:301017 'sources/': [ ['exclude', '_(cocoa|mac)(_unittest)?\\.(h|cc)$'],
[email protected]a316ca532010-11-15 14:08:161018 ['exclude', '(^|/)(cocoa|mac)/'],
1019 ['exclude', '\\.mm?$' ] ],
[email protected]c14d8e772010-02-09 22:06:151020 }],
[email protected]79e2336c2011-05-12 18:18:341021 ['toolkit_uses_gtk!=1', {
[email protected]c14d8e772010-02-09 22:06:151022 'sources/': [
[email protected]40519592010-11-16 15:23:301023 ['exclude', '_(chromeos|gtk|x|x11|xdg)(_unittest)?\\.(h|cc)$'],
[email protected]a316ca532010-11-15 14:08:161024 ['exclude', '(^|/)gtk/'],
[email protected]40519592010-11-16 15:23:301025 ['exclude', '(^|/)(gtk|x11)_[^/]*\\.(h|cc)$'],
[email protected]18cff3d2010-02-17 18:03:131026 ],
1027 }],
[email protected]f1b2cd02011-08-10 16:50:441028 ['use_wayland!=1', {
1029 'sources/': [
1030 ['exclude', '_(wayland)(_unittest)?\\.(h|cc)$'],
1031 ['exclude', '(^|/)wayland/'],
1032 ['exclude', '(^|/)(wayland)_[^/]*\\.(h|cc)$'],
1033 ],
1034 }],
[email protected]18cff3d2010-02-17 18:03:131035 ['OS!="linux"', {
1036 'sources/': [
[email protected]40519592010-11-16 15:23:301037 ['exclude', '_linux(_unittest)?\\.(h|cc)$'],
[email protected]a316ca532010-11-15 14:08:161038 ['exclude', '(^|/)linux/'],
[email protected]18cff3d2010-02-17 18:03:131039 ],
[email protected]c14d8e772010-02-09 22:06:151040 }],
1041 # We use "POSIX" to refer to all non-Windows operating systems.
1042 ['OS=="win"', {
[email protected]40519592010-11-16 15:23:301043 'sources/': [ ['exclude', '_posix\\.(h|cc)$'] ],
[email protected]f55bd4862010-05-27 15:38:071044 # turn on warnings for signed/unsigned mismatch on chromium code.
1045 'msvs_settings': {
1046 'VCCLCompilerTool': {
1047 'AdditionalOptions': ['/we4389'],
1048 },
1049 },
[email protected]c14d8e772010-02-09 22:06:151050 }],
[email protected]63e39a282011-07-13 20:41:281051 ['OS=="win" and component=="shared_library"', {
1052 'msvs_disabled_warnings': [
1053 4251, # class 'std::xx' needs to have dll-interface.
1054 ],
1055 }],
[email protected]c14d8e772010-02-09 22:06:151056 ['chromeos!=1', {
[email protected]40519592010-11-16 15:23:301057 'sources/': [ ['exclude', '_chromeos\\.(h|cc)$'] ]
[email protected]c14d8e772010-02-09 22:06:151058 }],
[email protected]06c756182010-04-27 18:31:311059 ['toolkit_views==0', {
[email protected]40519592010-11-16 15:23:301060 'sources/': [ ['exclude', '_views\\.(h|cc)$'] ]
[email protected]c14d8e772010-02-09 22:06:151061 }],
1062 ],
1063 }],
[email protected]a6e22132010-02-10 20:43:181064 ], # target_conditions for 'target_defaults'
[email protected]2f80c312009-02-25 21:26:551065 'default_configuration': 'Debug',
1066 'configurations': {
[email protected]5153767c2009-12-22 01:52:501067 # VCLinkerTool LinkIncremental values below:
1068 # 0 == default
1069 # 1 == /INCREMENTAL:NO
1070 # 2 == /INCREMENTAL
1071 # Debug links incremental, Release does not.
1072 #
[email protected]7b99801e2010-11-03 17:26:231073 # Abstract base configurations to cover common attributes.
[email protected]5153767c2009-12-22 01:52:501074 #
1075 'Common_Base': {
[email protected]bb05e452009-10-29 21:24:561076 'abstract': 1,
1077 'msvs_configuration_attributes': {
1078 'OutputDirectory': '$(SolutionDir)$(ConfigurationName)',
1079 'IntermediateDirectory': '$(OutDir)\\obj\\$(ProjectName)',
1080 'CharacterSet': '1',
1081 },
[email protected]5153767c2009-12-22 01:52:501082 },
1083 'x86_Base': {
1084 'abstract': 1,
[email protected]ef4fa4072009-12-04 22:46:501085 'msvs_settings': {
1086 'VCLinkerTool': {
1087 'TargetMachine': '1',
1088 },
1089 },
[email protected]2fa40782009-11-01 21:17:341090 'msvs_configuration_platform': 'Win32',
[email protected]bb05e452009-10-29 21:24:561091 },
[email protected]5153767c2009-12-22 01:52:501092 'x64_Base': {
1093 'abstract': 1,
1094 'msvs_configuration_platform': 'x64',
1095 'msvs_settings': {
1096 'VCLinkerTool': {
1097 'TargetMachine': '17', # x86 - 64
[email protected]5153767c2009-12-22 01:52:501098 'AdditionalLibraryDirectories!':
1099 ['<(DEPTH)/third_party/platformsdk_win7/files/Lib'],
1100 'AdditionalLibraryDirectories':
1101 ['<(DEPTH)/third_party/platformsdk_win7/files/Lib/x64'],
1102 },
[email protected]d26b4418ab2010-03-24 22:06:351103 'VCLibrarianTool': {
[email protected]5153767c2009-12-22 01:52:501104 'AdditionalLibraryDirectories!':
1105 ['<(DEPTH)/third_party/platformsdk_win7/files/Lib'],
1106 'AdditionalLibraryDirectories':
1107 ['<(DEPTH)/third_party/platformsdk_win7/files/Lib/x64'],
1108 },
1109 },
1110 'defines': [
1111 # Not sure if tcmalloc works on 64-bit Windows.
1112 'NO_TCMALLOC',
1113 ],
1114 },
1115 'Debug_Base': {
1116 'abstract': 1,
[email protected]14339762011-04-05 07:36:581117 'defines': [
1118 'DYNAMIC_ANNOTATIONS_ENABLED=1',
1119 'WTF_USE_DYNAMIC_ANNOTATIONS=1',
1120 ],
[email protected]1c966092009-08-20 21:19:261121 'xcode_settings': {
1122 'COPY_PHASE_STRIP': 'NO',
[email protected]d5d593a2009-08-28 23:23:291123 'GCC_OPTIMIZATION_LEVEL': '<(mac_debug_optimization)',
[email protected]a68c29a2011-07-01 16:23:491124 'OTHER_CFLAGS': [
[email protected]a68c29a2011-07-01 16:23:491125 '<@(debug_extra_cflags)',
1126 ],
[email protected]1c966092009-08-20 21:19:261127 },
[email protected]bb05e452009-10-29 21:24:561128 'msvs_settings': {
1129 'VCCLCompilerTool': {
[email protected]7e0d664a2009-12-03 21:07:471130 'Optimization': '<(win_debug_Optimization)',
[email protected]bb05e452009-10-29 21:24:561131 'PreprocessorDefinitions': ['_DEBUG'],
[email protected]6b0507b2010-05-07 07:41:211132 'BasicRuntimeChecks': '<(win_debug_RuntimeChecks)',
[email protected]7e0d664a2009-12-03 21:07:471133 'RuntimeLibrary': '<(win_debug_RuntimeLibrary)',
[email protected]2ae6e022010-05-07 13:19:151134 'conditions': [
1135 # According to MSVS, InlineFunctionExpansion=0 means
1136 # "default inlining", not "/Ob0".
1137 # Thus, we have to handle InlineFunctionExpansion==0 separately.
1138 ['win_debug_InlineFunctionExpansion==0', {
1139 'AdditionalOptions': ['/Ob0'],
1140 }],
1141 ['win_debug_InlineFunctionExpansion!=""', {
1142 'InlineFunctionExpansion':
1143 '<(win_debug_InlineFunctionExpansion)',
1144 }],
[email protected]fac10d12010-11-08 16:00:311145 ['win_debug_disable_iterator_debugging==1', {
1146 'PreprocessorDefinitions': ['_HAS_ITERATOR_DEBUGGING=0'],
1147 }],
[email protected]2ae6e022010-05-07 13:19:151148 ],
[email protected]bb05e452009-10-29 21:24:561149 },
1150 'VCLinkerTool': {
1151 'LinkIncremental': '<(msvs_debug_link_incremental)',
[email protected]646f6b42011-07-14 13:57:021152 # ASLR makes debugging with windbg difficult because Chrome.exe and
1153 # Chrome.dll share the same base name. As result, windbg will
1154 # name the Chrome.dll module like chrome_<base address>, where
1155 # <base address> typically changes with each launch. This in turn
1156 # means that breakpoints in Chrome.dll don't stick from one launch
1157 # to the next. For this reason, we turn ASLR off in debug builds.
1158 # Note that this is a three-way bool, where 0 means to pick up
1159 # the default setting, 1 is off and 2 is on.
1160 'RandomizedBaseAddress': 1,
[email protected]bb05e452009-10-29 21:24:561161 },
1162 'VCResourceCompilerTool': {
1163 'PreprocessorDefinitions': ['_DEBUG'],
1164 },
1165 },
[email protected]2f80c312009-02-25 21:26:551166 'conditions': [
[email protected]bb05e452009-10-29 21:24:561167 ['OS=="linux"', {
1168 'cflags': [
1169 '<@(debug_extra_cflags)',
1170 ],
[email protected]2f80c312009-02-25 21:26:551171 }],
[email protected]56cca4e2011-07-01 21:33:351172 ['release_valgrind_build==0', {
1173 'xcode_settings': {
1174 'OTHER_CFLAGS': [
1175 '-fstack-protector-all', # Implies -fstack-protector
1176 ],
1177 },
1178 }],
[email protected]2f80c312009-02-25 21:26:551179 ],
1180 },
[email protected]5153767c2009-12-22 01:52:501181 'Release_Base': {
1182 'abstract': 1,
[email protected]2f80c312009-02-25 21:26:551183 'defines': [
1184 'NDEBUG',
1185 ],
[email protected]1c966092009-08-20 21:19:261186 'xcode_settings': {
1187 'DEAD_CODE_STRIPPING': 'YES', # -Wl,-dead_strip
1188 'GCC_OPTIMIZATION_LEVEL': '<(mac_release_optimization)',
[email protected]ffd984b12009-09-11 19:37:001189 'OTHER_CFLAGS': [ '<@(release_extra_cflags)', ],
[email protected]1c966092009-08-20 21:19:261190 },
[email protected]bb05e452009-10-29 21:24:561191 'msvs_settings': {
[email protected]7e0d664a2009-12-03 21:07:471192 'VCCLCompilerTool': {
1193 'Optimization': '<(win_release_Optimization)',
1194 'RuntimeLibrary': '<(win_release_RuntimeLibrary)',
[email protected]2ae6e022010-05-07 13:19:151195 'conditions': [
1196 # According to MSVS, InlineFunctionExpansion=0 means
1197 # "default inlining", not "/Ob0".
1198 # Thus, we have to handle InlineFunctionExpansion==0 separately.
1199 ['win_release_InlineFunctionExpansion==0', {
1200 'AdditionalOptions': ['/Ob0'],
1201 }],
1202 ['win_release_InlineFunctionExpansion!=""', {
1203 'InlineFunctionExpansion':
1204 '<(win_release_InlineFunctionExpansion)',
1205 }],
1206 ],
[email protected]7e0d664a2009-12-03 21:07:471207 },
[email protected]bb05e452009-10-29 21:24:561208 'VCLinkerTool': {
[email protected]c059c612011-08-08 20:56:341209 # LinkIncremental is a tri-state boolean, where 0 means default
1210 # (i.e., inherit from parent solution), 1 means false, and
1211 # 2 means true.
[email protected]bb05e452009-10-29 21:24:561212 'LinkIncremental': '1',
[email protected]c059c612011-08-08 20:56:341213 # This corresponds to the /PROFILE flag which ensures the PDB
1214 # file contains FIXUP information (growing the PDB file by about
1215 # 5%) but does not otherwise alter the output binary. This
1216 # information is used by the Syzygy optimization tool when
1217 # decomposing the release image.
1218 'Profile': 'true',
[email protected]bb05e452009-10-29 21:24:561219 },
1220 },
[email protected]2f80c312009-02-25 21:26:551221 'conditions': [
[email protected]92822e82009-09-18 14:26:561222 ['release_valgrind_build==0', {
[email protected]14339762011-04-05 07:36:581223 'defines': [
1224 'NVALGRIND',
1225 'DYNAMIC_ANNOTATIONS_ENABLED=0',
1226 ],
[email protected]ee857512010-05-14 08:24:421227 }, {
[email protected]14339762011-04-05 07:36:581228 'defines': [
1229 'DYNAMIC_ANNOTATIONS_ENABLED=1',
1230 'WTF_USE_DYNAMIC_ANNOTATIONS=1',
1231 ],
[email protected]92822e82009-09-18 14:26:561232 }],
[email protected]7e0d664a2009-12-03 21:07:471233 ['win_use_allocator_shim==0', {
1234 'defines': ['NO_TCMALLOC'],
1235 }],
[email protected]bb05e452009-10-29 21:24:561236 ['OS=="linux"', {
1237 'cflags': [
[email protected]ffd984b12009-09-11 19:37:001238 '<@(release_extra_cflags)',
[email protected]bb05e452009-10-29 21:24:561239 ],
1240 }],
[email protected]2f80c312009-02-25 21:26:551241 ],
1242 },
[email protected]5153767c2009-12-22 01:52:501243 #
1244 # Concrete configurations
1245 #
1246 'Debug': {
1247 'inherit_from': ['Common_Base', 'x86_Base', 'Debug_Base'],
1248 },
1249 'Release': {
1250 'inherit_from': ['Common_Base', 'x86_Base', 'Release_Base'],
1251 'conditions': [
1252 ['msvs_use_common_release', {
[email protected]1f9471a2010-01-04 06:40:161253 'includes': ['release.gypi'],
[email protected]5153767c2009-12-22 01:52:501254 }],
1255 ]
1256 },
[email protected]f926fa0a2009-08-04 22:50:131257 'conditions': [
1258 [ 'OS=="win"', {
1259 # TODO(bradnelson): add a gyp mechanism to make this more graceful.
[email protected]ef4fa4072009-12-04 22:46:501260 'Debug_x64': {
[email protected]5153767c2009-12-22 01:52:501261 'inherit_from': ['Common_Base', 'x64_Base', 'Debug_Base'],
[email protected]78263c12009-11-01 23:45:301262 },
1263 'Release_x64': {
[email protected]5153767c2009-12-22 01:52:501264 'inherit_from': ['Common_Base', 'x64_Base', 'Release_Base'],
[email protected]78263c12009-11-01 23:45:301265 },
[email protected]f926fa0a2009-08-04 22:50:131266 }],
1267 ],
[email protected]2f80c312009-02-25 21:26:551268 },
1269 },
1270 'conditions': [
[email protected]79e2336c2011-05-12 18:18:341271 ['os_posix==1 and OS!="mac"', {
[email protected]9d384032009-03-20 23:13:261272 'target_defaults': {
[email protected]5315f2842009-04-28 00:43:271273 # Enable -Werror by default, but put it in a variable so it can
1274 # be disabled in ~/.gyp/include.gypi on the valgrind builders.
1275 'variables': {
[email protected]57e94022011-05-04 15:33:191276 # Use -fno-strict-aliasing, see http://crbug.com/32204
[email protected]ecf52cb82010-01-13 19:25:421277 'no_strict_aliasing%': 1,
[email protected]79e2336c2011-05-12 18:18:341278 'conditions': [
1279 ['OS=="linux"', {
1280 'werror%': '-Werror',
1281 }, { # turn off -Werror on other Unices
1282 'werror%': '',
1283 }],
[email protected]47deeb62009-12-17 14:49:391284 ],
[email protected]5315f2842009-04-28 00:43:271285 },
[email protected]9d384032009-03-20 23:13:261286 'cflags': [
[email protected]1bba09c2009-08-13 12:53:161287 '<(werror)', # See note above about the werror variable.
1288 '-pthread',
1289 '-fno-exceptions',
1290 '-Wall',
[email protected]0fa17082010-03-26 00:48:051291 # TODO(evan): turn this back on once all the builds work.
1292 # '-Wextra',
[email protected]225c8f52010-02-05 22:23:201293 # Don't warn about unused function params. We use those everywhere.
1294 '-Wno-unused-parameter',
1295 # Don't warn about the "struct foo f = {0};" initialization pattern.
1296 '-Wno-missing-field-initializers',
[email protected]1bba09c2009-08-13 12:53:161297 '-D_FILE_OFFSET_BITS=64',
[email protected]3df6e3a2010-01-21 20:23:121298 # Don't export any symbols (for example, to plugins we dlopen()).
1299 # Note: this is *required* to make some plugins work.
1300 '-fvisibility=hidden',
[email protected]7ca6ce12010-09-15 23:39:351301 '-pipe',
[email protected]8a2fcba2009-07-29 00:52:241302 ],
1303 'cflags_cc': [
[email protected]832d0212009-10-28 19:12:221304 '-fno-rtti',
[email protected]8a2fcba2009-07-29 00:52:241305 '-fno-threadsafe-statics',
[email protected]f5986c42009-11-17 18:39:361306 # Make inline functions have hidden visiblity by default.
1307 # Surprisingly, not covered by -fvisibility=hidden.
1308 '-fvisibility-inlines-hidden',
[email protected]554abd902011-07-25 04:03:171309 # GCC turns on -Wsign-compare for C++ under -Wall, but clang doesn't,
1310 # so we specify it explicitly.
1311 # TODO(fischman): remove this if http://llvm.org/PR10448 obsoletes it.
[email protected]d16bd642011-07-25 23:59:181312 # http://code.google.com/p/chromium/issues/detail?id=90453
[email protected]554abd902011-07-25 04:03:171313 '-Wsign-compare',
[email protected]9d384032009-03-20 23:13:261314 ],
[email protected]a6cf87e2009-04-03 04:07:381315 'ldflags': [
[email protected]138241f2010-03-30 23:53:101316 '-pthread', '-Wl,-z,noexecstack',
[email protected]9d384032009-03-20 23:13:261317 ],
[email protected]3aacaf952009-04-02 15:34:091318 'configurations': {
[email protected]5153767c2009-12-22 01:52:501319 'Debug_Base': {
[email protected]c5bdc032009-04-20 19:11:311320 'variables': {
1321 'debug_optimize%': '0',
1322 },
[email protected]3aacaf952009-04-02 15:34:091323 'defines': [
1324 '_DEBUG',
1325 ],
1326 'cflags': [
[email protected]9cb5cc702011-02-01 19:56:041327 '-O>(debug_optimize)',
[email protected]3aacaf952009-04-02 15:34:091328 '-g',
1329 ],
[email protected]5315f2842009-04-28 00:43:271330 },
[email protected]5153767c2009-12-22 01:52:501331 'Release_Base': {
[email protected]740e2de2009-07-21 11:41:011332 'variables': {
1333 'release_optimize%': '2',
[email protected]1dd529642010-05-15 01:02:511334 # Binaries become big and gold is unable to perform GC
1335 # and remove unused sections for some of test targets
1336 # on 32 bit platform.
1337 # (This is currently observed only in chromeos valgrind bots)
1338 # The following flag is to disable --gc-sections linker
1339 # option for these bots.
1340 'no_gc_sections%': 0,
[email protected]409dceef2011-05-10 19:49:121341
1342 # TODO(bradnelson): reexamine how this is done if we change the
1343 # expansion of configurations
1344 'release_valgrind_build%': 0,
[email protected]740e2de2009-07-21 11:41:011345 },
[email protected]3aacaf952009-04-02 15:34:091346 'cflags': [
[email protected]9cb5cc702011-02-01 19:56:041347 '-O>(release_optimize)',
[email protected]d8cc3a62009-04-08 18:29:531348 # Don't emit the GCC version ident directives, they just end up
1349 # in the .comment section taking up binary size.
1350 '-fno-ident',
1351 # Put data and code in their own sections, so that unused symbols
1352 # can be removed at link time with --gc-sections.
1353 '-fdata-sections',
1354 '-ffunction-sections',
[email protected]3aacaf952009-04-02 15:34:091355 ],
[email protected]c902f2c2010-08-06 20:04:181356 'ldflags': [
1357 # Specifically tell the linker to perform optimizations.
1358 # See http://lwn.net/Articles/192624/ .
1359 '-Wl,-O1',
[email protected]27c2e492010-08-06 22:55:221360 '-Wl,--as-needed',
[email protected]c902f2c2010-08-06 20:04:181361 ],
[email protected]1dd529642010-05-15 01:02:511362 'conditions' : [
1363 ['no_gc_sections==0', {
1364 'ldflags': [
1365 '-Wl,--gc-sections',
1366 ],
1367 }],
[email protected]ecf7b6482010-10-13 09:15:201368 ['clang==1', {
1369 'cflags!': [
1370 '-fno-ident',
1371 ],
1372 }],
[email protected]7664ab32011-02-01 23:35:251373 ['profiling==1', {
1374 'cflags': [
1375 '-fno-omit-frame-pointer',
1376 '-g',
1377 ],
1378 }],
[email protected]c75f33e42011-05-04 18:11:521379 # At gyp time, we test the linker for ICF support; this flag
1380 # is then provided to us by gyp. (Currently only gold supports
1381 # an --icf flag.)
[email protected]16d71b0d2011-06-22 00:43:531382 # There seems to be a conflict of --icf and -pie in gold which
1383 # can generate crashy binaries. As a security measure, -pie
1384 # takes precendence for now.
[email protected]409dceef2011-05-10 19:49:121385 ['LINKER_SUPPORTS_ICF==1 and release_valgrind_build==0', {
[email protected]f2fcf4df72011-06-03 20:05:461386 'target_conditions': [
1387 ['_toolset=="target"', {
1388 'ldflags': [
[email protected]16d71b0d2011-06-22 00:43:531389 #'-Wl,--icf=safe',
1390 '-Wl,--icf=none',
[email protected]f2fcf4df72011-06-03 20:05:461391 ]
1392 }]
[email protected]c75f33e42011-05-04 18:11:521393 ]
1394 }],
[email protected]1dd529642010-05-15 01:02:511395 ]
[email protected]3aacaf952009-04-02 15:34:091396 },
1397 },
[email protected]601b540222009-04-03 21:32:041398 'variants': {
1399 'coverage': {
1400 'cflags': ['-fprofile-arcs', '-ftest-coverage'],
1401 'ldflags': ['-fprofile-arcs'],
1402 },
1403 'profile': {
1404 'cflags': ['-pg', '-g'],
1405 'ldflags': ['-pg'],
1406 },
1407 'symbols': {
1408 'cflags': ['-g'],
1409 },
1410 },
[email protected]606116d22009-05-06 22:38:231411 'conditions': [
[email protected]7e8eb7612009-07-29 15:56:001412 [ 'target_arch=="ia32"', {
[email protected]606116d22009-05-06 22:38:231413 'asflags': [
1414 # Needed so that libs with .s files (e.g. libicudata.a)
1415 # are compatible with the general 32-bit-ness.
1416 '-32',
1417 ],
1418 # All floating-point computations on x87 happens in 80-bit
1419 # precision. Because the C and C++ language standards allow
1420 # the compiler to keep the floating-point values in higher
1421 # precision than what's specified in the source and doing so
1422 # is more efficient than constantly rounding up to 64-bit or
1423 # 32-bit precision as specified in the source, the compiler,
1424 # especially in the optimized mode, tries very hard to keep
1425 # values in x87 floating-point stack (in 80-bit precision)
1426 # as long as possible. This has important side effects, that
1427 # the real value used in computation may change depending on
1428 # how the compiler did the optimization - that is, the value
1429 # kept in 80-bit is different than the value rounded down to
1430 # 64-bit or 32-bit. There are possible compiler options to make
1431 # this behavior consistent (e.g. -ffloat-store would keep all
1432 # floating-values in the memory, thus force them to be rounded
1433 # to its original precision) but they have significant runtime
1434 # performance penalty.
1435 #
1436 # -mfpmath=sse -msse2 makes the compiler use SSE instructions
1437 # which keep floating-point values in SSE registers in its
1438 # native precision (32-bit for single precision, and 64-bit for
1439 # double precision values). This means the floating-point value
1440 # used during computation does not change depending on how the
1441 # compiler optimized the code, since the value is always kept
1442 # in its specified precision.
[email protected]ffde7932009-05-29 00:39:061443 'conditions': [
[email protected]ac120ff2010-04-28 02:14:221444 ['branding=="Chromium" and disable_sse2==0', {
[email protected]ffde7932009-05-29 00:39:061445 'cflags': [
1446 '-march=pentium4',
1447 '-msse2',
1448 '-mfpmath=sse',
1449 ],
1450 }],
[email protected]06c756182010-04-27 18:31:311451 # ChromeOS targets Pinetrail, which is sse3, but most of the
[email protected]0183dbb2010-04-16 02:00:441452 # benefit comes from sse2 so this setting allows ChromeOS
1453 # to build on other CPUs. In the future -march=atom would help
1454 # but requires a newer compiler.
[email protected]ac120ff2010-04-28 02:14:221455 ['chromeos==1 and disable_sse2==0', {
[email protected]0183dbb2010-04-16 02:00:441456 'cflags': [
1457 '-msse2',
1458 ],
1459 }],
[email protected]34799f9d2010-07-08 17:51:331460 # Install packages have started cropping up with
1461 # different headers between the 32-bit and 64-bit
1462 # versions, so we have to shadow those differences off
1463 # and make sure a 32-bit-on-64-bit build picks up the
1464 # right files.
1465 ['host_arch!="ia32"', {
1466 'include_dirs+': [
1467 '/usr/include32',
1468 ],
1469 }],
[email protected]ffde7932009-05-29 00:39:061470 ],
[email protected]dc259ce52010-04-13 04:03:101471 # -mmmx allows mmintrin.h to be used for mmx intrinsics.
1472 # video playback is mmx and sse2 optimized.
[email protected]606116d22009-05-06 22:38:231473 'cflags': [
1474 '-m32',
[email protected]dc259ce52010-04-13 04:03:101475 '-mmmx',
[email protected]1c6560af2009-07-14 11:02:161476 ],
[email protected]606116d22009-05-06 22:38:231477 'ldflags': [
1478 '-m32',
1479 ],
1480 }],
[email protected]3dda8a962009-08-10 18:58:071481 ['target_arch=="arm"', {
[email protected]77c1b29392009-12-04 06:21:291482 'target_conditions': [
1483 ['_toolset=="target"', {
1484 'cflags_cc': [
1485 # The codesourcery arm-2009q3 toolchain warns at that the ABI
1486 # has changed whenever it encounters a varargs function. This
1487 # silences those warnings, as they are not helpful and
1488 # clutter legitimate warnings.
1489 '-Wno-abi',
1490 ],
1491 'conditions': [
1492 ['arm_thumb == 1', {
1493 'cflags': [
1494 '-mthumb',
[email protected]77c1b29392009-12-04 06:21:291495 ]
1496 }],
1497 ['armv7==1', {
[email protected]dc9711f2009-11-13 19:30:251498 'cflags': [
1499 '-march=armv7-a',
1500 '-mtune=cortex-a8',
[email protected]dc9711f2009-11-13 19:30:251501 '-mfloat-abi=softfp',
1502 ],
[email protected]eafc0b452010-02-26 21:53:431503 'conditions': [
1504 ['arm_neon==1', {
1505 'cflags': [ '-mfpu=neon', ],
1506 }, {
[email protected]53e0f642010-03-05 01:41:561507 'cflags': [ '-mfpu=<(arm_fpu)', ],
[email protected]eafc0b452010-02-26 21:53:431508 }]
1509 ],
[email protected]dc9711f2009-11-13 19:30:251510 }],
[email protected]3dda8a962009-08-10 18:58:071511 ],
1512 }],
1513 ],
1514 }],
[email protected]2fb843b2010-08-12 02:11:081515 ['linux_fpic==1', {
[email protected]c76723a2010-01-25 23:10:581516 'cflags': [
1517 '-fPIC',
1518 ],
1519 }],
[email protected]ee28c9f2009-09-04 01:53:011520 ['sysroot!=""', {
[email protected]fd36ce822009-10-28 20:13:571521 'target_conditions': [
1522 ['_toolset=="target"', {
1523 'cflags': [
1524 '--sysroot=<(sysroot)',
1525 ],
1526 'ldflags': [
1527 '--sysroot=<(sysroot)',
1528 ],
1529 }]]
[email protected]ee28c9f2009-09-04 01:53:011530 }],
[email protected]58680ce2010-09-18 00:09:151531 ['clang==1', {
[email protected]18ca15a2011-08-10 03:07:121532 'cflags': [
1533 '-Wheader-hygiene',
1534 # Clang spots more unused functions.
1535 '-Wno-unused-function',
1536 # Don't die on dtoa code that uses a char as an array index.
1537 '-Wno-char-subscripts',
1538 # Survive EXPECT_EQ(unnamed_enum, unsigned int) -- see
1539 # http://code.google.com/p/googletest/source/detail?r=446 .
1540 # TODO(thakis): Use -isystem instead (http://crbug.com/58751 )
1541 '-Wno-unnamed-type-template-args',
1542 ],
1543 'cflags!': [
1544 # Clang doesn't seem to know know this flag.
1545 '-mfpmath=sse',
1546 ],
[email protected]58680ce2010-09-18 00:09:151547 }],
[email protected]5d451ad2011-02-11 16:43:461548 ['clang==1 and clang_use_chrome_plugins==1', {
[email protected]d23720682011-08-11 00:16:261549 'cflags': [
1550 '<(clang_chrome_plugins_flags)',
1551 ],
[email protected]5d451ad2011-02-11 16:43:461552 }],
[email protected]5e781232011-01-28 02:57:591553 ['clang==1 and clang_load!="" and clang_add_plugin!=""', {
[email protected]d23720682011-08-11 00:16:261554 'cflags': [
1555 '-Xclang', '-load', '-Xclang', '<(clang_load)',
1556 '-Xclang', '-add-plugin', '-Xclang', '<(clang_add_plugin)',
1557 ],
[email protected]5e781232011-01-28 02:57:591558 }],
[email protected]92799b632011-08-15 14:33:061559 ['asan==1', {
1560 # Only in the linux section for now, since ASAN doesn't
1561 # work on Mac yet.
1562 'cflags': [
1563 '-fasan -w',
1564 ],
1565 'ldflags': [
1566 '-fasan',
1567 ],
1568 }],
[email protected]cc4219a2009-08-14 05:30:521569 ['no_strict_aliasing==1', {
1570 'cflags': [
1571 '-fno-strict-aliasing',
1572 ],
1573 }],
[email protected]cbd5fd52009-08-26 00:14:271574 ['linux_breakpad==1', {
[email protected]c87efd42010-08-26 18:28:171575 'cflags': [ '-g' ],
[email protected]cbd5fd52009-08-26 00:14:271576 'defines': ['USE_LINUX_BREAKPAD'],
1577 }],
[email protected]d8b60602010-03-26 09:41:221578 ['linux_use_heapchecker==1', {
1579 'variables': {'linux_use_tcmalloc%': 1},
1580 }],
[email protected]61a9b2d82010-02-26 00:31:081581 ['linux_use_tcmalloc==0', {
1582 'defines': ['NO_TCMALLOC'],
[email protected]01699e22009-11-11 19:24:241583 }],
[email protected]d8b60602010-03-26 09:41:221584 ['linux_use_heapchecker==0', {
1585 'defines': ['NO_HEAPCHECKER'],
1586 }],
[email protected]64e2d4a42010-08-27 10:13:211587 ['linux_keep_shadow_stacks==1', {
1588 'defines': ['KEEP_SHADOW_STACKS'],
1589 'cflags': ['-finstrument-functions'],
1590 }],
[email protected]606116d22009-05-06 22:38:231591 ],
[email protected]9d384032009-03-20 23:13:261592 },
1593 }],
[email protected]c51e8d52009-12-11 20:04:061594 # FreeBSD-specific options; note that most FreeBSD options are set above,
1595 # with Linux.
1596 ['OS=="freebsd"', {
1597 'target_defaults': {
1598 'ldflags': [
1599 '-Wl,--no-keep-memory',
1600 ],
1601 },
1602 }],
[email protected]93f21e42010-04-01 00:35:151603 ['OS=="solaris"', {
1604 'cflags!': ['-fvisibility=hidden'],
1605 'cflags_cc!': ['-fvisibility-inlines-hidden'],
1606 }],
[email protected]2f80c312009-02-25 21:26:551607 ['OS=="mac"', {
1608 'target_defaults': {
[email protected]24700642009-06-01 16:01:201609 'variables': {
[email protected]9a5e72862010-09-02 16:16:581610 # These should be 'mac_real_dsym%' and 'mac_strip%', but there
1611 # seems to be a bug with % in variables that are intended to be
1612 # set to different values in different targets, like these two.
1613 'mac_strip': 1, # Strip debugging symbols from the target.
[email protected]24700642009-06-01 16:01:201614 'mac_real_dsym': 0, # Fake .dSYMs are fine in most cases.
1615 },
[email protected]d92c7c012009-03-19 19:26:421616 'mac_bundle': 0,
[email protected]2f80c312009-02-25 21:26:551617 'xcode_settings': {
1618 'ALWAYS_SEARCH_USER_PATHS': 'NO',
[email protected]ab2956372009-08-13 18:11:041619 'GCC_C_LANGUAGE_STANDARD': 'c99', # -std=c99
1620 'GCC_CW_ASM_SYNTAX': 'NO', # No -fasm-blocks
1621 'GCC_DYNAMIC_NO_PIC': 'NO', # No -mdynamic-no-pic
1622 # (Equivalent to -fPIC)
1623 'GCC_ENABLE_CPP_EXCEPTIONS': 'NO', # -fno-exceptions
1624 'GCC_ENABLE_CPP_RTTI': 'NO', # -fno-rtti
1625 'GCC_ENABLE_PASCAL_STRINGS': 'NO', # No -mpascal-strings
[email protected]3224dcd2009-09-16 17:31:251626 # GCC_INLINES_ARE_PRIVATE_EXTERN maps to -fvisibility-inlines-hidden
1627 'GCC_INLINES_ARE_PRIVATE_EXTERN': 'YES',
[email protected]ab2956372009-08-13 18:11:041628 'GCC_OBJC_CALL_CXX_CDTORS': 'YES', # -fobjc-call-cxx-cdtors
1629 'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES', # -fvisibility=hidden
1630 'GCC_THREADSAFE_STATICS': 'NO', # -fno-threadsafe-statics
1631 'GCC_TREAT_WARNINGS_AS_ERRORS': 'YES', # -Werror
[email protected]2f80c312009-02-25 21:26:551632 'GCC_VERSION': '4.2',
[email protected]ab2956372009-08-13 18:11:041633 'GCC_WARN_ABOUT_MISSING_NEWLINE': 'YES', # -Wnewline-eof
[email protected]3224dcd2009-09-16 17:31:251634 # MACOSX_DEPLOYMENT_TARGET maps to -mmacosx-version-min
1635 'MACOSX_DEPLOYMENT_TARGET': '<(mac_deployment_target)',
[email protected]ab2956372009-08-13 18:11:041636 'PREBINDING': 'NO', # No -Wl,-prebind
[email protected]2f80c312009-02-25 21:26:551637 'USE_HEADERMAP': 'NO',
[email protected]57e94022011-05-04 15:33:191638 'OTHER_CFLAGS': [
1639 '-fno-strict-aliasing', # See http://crbug.com/32204
1640 ],
[email protected]080e86f2010-06-21 15:19:041641 'WARNING_CFLAGS': [
1642 '-Wall',
1643 '-Wendif-labels',
1644 '-Wextra',
1645 # Don't warn about unused function parameters.
1646 '-Wno-unused-parameter',
1647 # Don't warn about the "struct foo f = {0};" initialization
1648 # pattern.
1649 '-Wno-missing-field-initializers',
1650 ],
[email protected]b3fb8092009-03-12 19:09:241651 'conditions': [
1652 ['chromium_mac_pch', {'GCC_PRECOMPILE_PREFIX_HEADER': 'YES'},
[email protected]9543af052009-09-15 22:42:591653 {'GCC_PRECOMPILE_PREFIX_HEADER': 'NO'}
1654 ],
[email protected]66733172010-09-22 00:09:281655 ['clang==1', {
1656 'WARNING_CFLAGS': [
[email protected]7f8d486f2011-04-05 19:49:071657 '-Wheader-hygiene',
[email protected]66733172010-09-22 00:09:281658 # Don't die on dtoa code that uses a char as an array index.
1659 # This is required solely for base/third_party/dmg_fp/dtoa.cc.
1660 '-Wno-char-subscripts',
[email protected]25d3bb722010-11-22 14:31:451661 # Clang spots more unused functions.
1662 '-Wno-unused-function',
[email protected]0fa0fbc2010-10-12 04:32:051663 # Survive EXPECT_EQ(unnamed_enum, unsigned int) -- see
1664 # http://code.google.com/p/googletest/source/detail?r=446 .
1665 # TODO(thakis): Use -isystem instead (http://crbug.com/58751 ).
1666 '-Wno-unnamed-type-template-args',
[email protected]d53680932011-06-08 16:40:061667 # TODO(thakis): Reenable once the one instance this warns on
1668 # is fixed.
1669 '-Wno-parentheses',
[email protected]66733172010-09-22 00:09:281670 ],
1671 }],
[email protected]5d451ad2011-02-11 16:43:461672 ['clang==1 and clang_use_chrome_plugins==1', {
1673 'OTHER_CFLAGS': [
1674 '<(clang_chrome_plugins_flags)',
1675 ],
1676 }],
[email protected]5e781232011-01-28 02:57:591677 ['clang==1 and clang_load!="" and clang_add_plugin!=""', {
1678 'OTHER_CFLAGS': [
1679 '-Xclang', '-load', '-Xclang', '<(clang_load)',
1680 '-Xclang', '-add-plugin', '-Xclang', '<(clang_add_plugin)',
1681 ],
1682 }],
[email protected]b3fb8092009-03-12 19:09:241683 ],
[email protected]2f80c312009-02-25 21:26:551684 },
1685 'target_conditions': [
[email protected]2f80c312009-02-25 21:26:551686 ['_type!="static_library"', {
[email protected]5d7dc972009-04-16 15:30:461687 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-search_paths_first']},
1688 }],
1689 ['_mac_bundle', {
1690 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-ObjC']},
[email protected]87fde4a2009-02-28 00:50:081691 }],
[email protected]6303fed2011-08-11 01:12:101692 ['_type=="executable"', {
1693 'postbuilds': [
1694 {
1695 # Arranges for data (heap) pages to be protected against
[email protected]8c40f322011-08-24 03:33:361696 # code execution when running on Mac OS X 10.7 ("Lion"), and
1697 # ensures that the position-independent executable (PIE) bit
1698 # is set for ASLR when running on Mac OS X 10.5 ("Leopard").
[email protected]6303fed2011-08-11 01:12:101699 'variables': {
[email protected]8c40f322011-08-24 03:33:361700 # Define change_mach_o_flags in a variable ending in _path
1701 # so that GYP understands it's a path and performs proper
1702 # relativization during dict merging.
1703 'change_mach_o_flags_path':
1704 'mac/change_mach_o_flags_from_xcode.sh',
[email protected]081c0342011-08-24 14:59:131705 'change_mach_o_flags_options': [
1706 ],
1707 'target_conditions': [
1708 ['release_valgrind_build==1', {
1709 'change_mach_o_flags_options': [
1710 # Turn off PIE when building for Valgrind because
1711 # Valgrind doesn't understand slide. TODO: Make
1712 # Valgrind on Mac OS X understand slide, and get rid
1713 # of the Valgrind check.
1714 '--no-pie',
1715 ],
1716 }],
1717 ],
[email protected]6303fed2011-08-11 01:12:101718 },
[email protected]8c40f322011-08-24 03:33:361719 'postbuild_name': 'Change Mach-O Flags',
1720 'action': [
1721 '<(change_mach_o_flags_path)',
[email protected]081c0342011-08-24 14:59:131722 '>@(change_mach_o_flags_options)',
[email protected]8c40f322011-08-24 03:33:361723 ],
[email protected]6303fed2011-08-11 01:12:101724 },
1725 ],
1726 }],
[email protected]6a0242bc2011-07-01 00:34:461727 ['_type=="executable" and release_valgrind_build==0', {
1728 # Turn on position-independence (ASLR) for executables. When PIE
1729 # is on for the Chrome executables, the framework will also be
1730 # subject to ASLR.
1731 # Don't do this when building for Valgrind because Valgrind
1732 # doesn't understand slide. TODO: Make Valgrind on Mac OS X
1733 # understand slide, and get rid of the Valgrind check.
1734 'xcode_settings': {
1735 'OTHER_LDFLAGS': [
1736 '-Wl,-pie', # Position-independent executable (MH_PIE)
1737 ],
1738 },
1739 }],
[email protected]9a5e72862010-09-02 16:16:581740 ['(_type=="executable" or _type=="shared_library" or \
1741 _type=="loadable_module") and mac_strip!=0', {
[email protected]24700642009-06-01 16:01:201742 'target_conditions': [
1743 ['mac_real_dsym == 1', {
1744 # To get a real .dSYM bundle produced by dsymutil, set the
1745 # debug information format to dwarf-with-dsym. Since
1746 # strip_from_xcode will not be used, set Xcode to do the
1747 # stripping as well.
1748 'configurations': {
[email protected]5153767c2009-12-22 01:52:501749 'Release_Base': {
[email protected]24700642009-06-01 16:01:201750 'xcode_settings': {
1751 'DEBUG_INFORMATION_FORMAT': 'dwarf-with-dsym',
1752 'DEPLOYMENT_POSTPROCESSING': 'YES',
1753 'STRIP_INSTALLED_PRODUCT': 'YES',
[email protected]e14a9f92009-08-05 19:26:071754 'target_conditions': [
[email protected]c2111422010-06-01 18:30:251755 ['_type=="shared_library" or _type=="loadable_module"', {
[email protected]e14a9f92009-08-05 19:26:071756 # The Xcode default is to strip debugging symbols
1757 # only (-S). Local symbols should be stripped as
1758 # well, which will be handled by -x. Xcode will
1759 # continue to insert -S when stripping even when
1760 # additional flags are added with STRIPFLAGS.
1761 'STRIPFLAGS': '-x',
[email protected]c2111422010-06-01 18:30:251762 }], # _type=="shared_library" or _type=="loadable_module"'
[email protected]e14a9f92009-08-05 19:26:071763 ], # target_conditions
1764 }, # xcode_settings
1765 }, # configuration "Release"
1766 }, # configurations
[email protected]24700642009-06-01 16:01:201767 }, { # mac_real_dsym != 1
1768 # To get a fast fake .dSYM bundle, use a post-build step to
1769 # produce the .dSYM and strip the executable. strip_from_xcode
1770 # only operates in the Release configuration.
1771 'postbuilds': [
1772 {
1773 'variables': {
1774 # Define strip_from_xcode in a variable ending in _path
1775 # so that gyp understands it's a path and performs proper
1776 # relativization during dict merging.
1777 'strip_from_xcode_path': 'mac/strip_from_xcode',
1778 },
1779 'postbuild_name': 'Strip If Needed',
1780 'action': ['<(strip_from_xcode_path)'],
1781 },
[email protected]e14a9f92009-08-05 19:26:071782 ], # postbuilds
1783 }], # mac_real_dsym
1784 ], # target_conditions
[email protected]9a5e72862010-09-02 16:16:581785 }], # (_type=="executable" or _type=="shared_library" or
1786 # _type=="loadable_module") and mac_strip!=0
[email protected]e14a9f92009-08-05 19:26:071787 ], # target_conditions
1788 }, # target_defaults
1789 }], # OS=="mac"
[email protected]2f80c312009-02-25 21:26:551790 ['OS=="win"', {
1791 'target_defaults': {
1792 'defines': [
[email protected]0bc63042011-08-13 02:19:251793 '_WIN32_WINNT=0x0600',
1794 'WINVER=0x0600',
[email protected]2f80c312009-02-25 21:26:551795 'WIN32',
1796 '_WINDOWS',
[email protected]2f80c312009-02-25 21:26:551797 'NOMINMAX',
[email protected]e3116282011-08-13 00:52:281798 'PSAPI_VERSION=1',
[email protected]2f80c312009-02-25 21:26:551799 '_CRT_RAND_S',
1800 'CERT_CHAIN_PARA_HAS_EXTRA_FIELDS',
1801 'WIN32_LEAN_AND_MEAN',
[email protected]7a812dd62010-06-30 18:52:271802 '_ATL_NO_OPENGL',
[email protected]adfb98c2009-06-23 20:08:451803 '_HAS_TR1=0',
[email protected]2f80c312009-02-25 21:26:551804 ],
[email protected]8974e042010-06-21 18:06:521805 'conditions': [
1806 ['component=="static_library"', {
1807 'defines': [
1808 '_HAS_EXCEPTIONS=0',
1809 ],
1810 }],
[email protected]3e2648a2011-03-21 20:58:501811 ['secure_atl', {
1812 'defines': [
1813 '_SECURE_ATL',
1814 ],
1815 }],
[email protected]8974e042010-06-21 18:06:521816 ],
[email protected]5b5ca7cb2009-07-20 23:00:201817 'msvs_system_include_dirs': [
[email protected]998b5152009-12-12 22:19:521818 '<(DEPTH)/third_party/platformsdk_win7/files/Include',
[email protected]a78da50e2010-06-09 21:31:371819 '<(DEPTH)/third_party/directxsdk/files/Include',
[email protected]2f80c312009-02-25 21:26:551820 '$(VSInstallDir)/VC/atlmfc/include',
1821 ],
[email protected]a8d99cef2009-08-26 20:47:491822 'msvs_cygwin_dirs': ['<(DEPTH)/third_party/cygwin'],
[email protected]942c3a60f2011-05-03 02:04:111823 'msvs_disabled_warnings': [4351, 4396, 4503, 4819,
1824 # TODO(maruel): These warnings are level 4. They will be slowly
1825 # removed as code is fixed.
1826 4100, 4121, 4125, 4127, 4130, 4131, 4189, 4201, 4238, 4244, 4245,
1827 4310, 4355, 4428, 4481, 4505, 4510, 4512, 4530, 4610, 4611, 4701,
1828 4702, 4706,
1829 ],
[email protected]2f80c312009-02-25 21:26:551830 'msvs_settings': {
1831 'VCCLCompilerTool': {
1832 'MinimalRebuild': 'false',
[email protected]2f80c312009-02-25 21:26:551833 'BufferSecurityCheck': 'true',
1834 'EnableFunctionLevelLinking': 'true',
1835 'RuntimeTypeInfo': 'false',
[email protected]942c3a60f2011-05-03 02:04:111836 'WarningLevel': '4',
[email protected]2f80c312009-02-25 21:26:551837 'WarnAsError': 'true',
1838 'DebugInformationFormat': '3',
[email protected]3fef6e62009-07-31 19:58:581839 'conditions': [
[email protected]3e2648a2011-03-21 20:58:501840 ['msvs_multi_core_compile', {
[email protected]1f9471a2010-01-04 06:40:161841 'AdditionalOptions': ['/MP'],
[email protected]912c55c2009-07-31 23:33:551842 }],
[email protected]3e2648a2011-03-21 20:58:501843 ['MSVS_VERSION=="2005e"', {
1844 'AdditionalOptions': ['/w44068'], # Unknown pragma to 4 (ATL)
1845 }],
[email protected]8974e042010-06-21 18:06:521846 ['component=="shared_library"', {
1847 'ExceptionHandling': '1', # /EHsc
1848 }, {
1849 'ExceptionHandling': '0',
1850 }],
[email protected]3fef6e62009-07-31 19:58:581851 ],
[email protected]2f80c312009-02-25 21:26:551852 },
1853 'VCLibrarianTool': {
[email protected]1f9471a2010-01-04 06:40:161854 'AdditionalOptions': ['/ignore:4221'],
[email protected]a78da50e2010-06-09 21:31:371855 'AdditionalLibraryDirectories': [
1856 '<(DEPTH)/third_party/platformsdk_win7/files/Lib',
1857 '<(DEPTH)/third_party/directxsdk/files/Lib/x86',
1858 ],
[email protected]2f80c312009-02-25 21:26:551859 },
1860 'VCLinkerTool': {
[email protected]2f80c312009-02-25 21:26:551861 'AdditionalDependencies': [
1862 'wininet.lib',
[email protected]b1d8c252011-01-13 20:27:501863 'dnsapi.lib',
[email protected]2f80c312009-02-25 21:26:551864 'version.lib',
1865 'msimg32.lib',
1866 'ws2_32.lib',
1867 'usp10.lib',
1868 'psapi.lib',
[email protected]96fd0032009-04-24 00:13:081869 'dbghelp.lib',
[email protected]dfdf7ee2011-04-28 18:51:481870 'winmm.lib',
1871 'shlwapi.lib',
[email protected]2f80c312009-02-25 21:26:551872 ],
[email protected]4de39f82011-03-28 12:01:291873 'conditions': [
[email protected]3e2648a2011-03-21 20:58:501874 ['msvs_express', {
1875 # Explicitly required when using the ATL with express
1876 'AdditionalDependencies': [
1877 'atlthunk.lib',
1878 ],
1879 }],
1880 ['MSVS_VERSION=="2005e"', {
1881 # Non-express versions link automatically to these
1882 'AdditionalDependencies': [
1883 'advapi32.lib',
1884 'comdlg32.lib',
1885 'ole32.lib',
1886 'shell32.lib',
1887 'user32.lib',
1888 'winspool.lib',
1889 ],
1890 }],
1891 ],
[email protected]a78da50e2010-06-09 21:31:371892 'AdditionalLibraryDirectories': [
1893 '<(DEPTH)/third_party/platformsdk_win7/files/Lib',
1894 '<(DEPTH)/third_party/directxsdk/files/Lib/x86',
1895 ],
[email protected]2f80c312009-02-25 21:26:551896 'GenerateDebugInformation': 'true',
1897 'MapFileName': '$(OutDir)\\$(TargetName).map',
1898 'ImportLibrary': '$(OutDir)\\lib\\$(TargetName).lib',
[email protected]2f80c312009-02-25 21:26:551899 'FixedBaseAddress': '1',
[email protected]825ff8d2009-05-22 01:40:481900 # SubSystem values:
1901 # 0 == not set
1902 # 1 == /SUBSYSTEM:CONSOLE
1903 # 2 == /SUBSYSTEM:WINDOWS
1904 # Most of the executables we'll ever create are tests
1905 # and utilities with console output.
1906 'SubSystem': '1',
[email protected]2f80c312009-02-25 21:26:551907 },
1908 'VCMIDLTool': {
1909 'GenerateStublessProxies': 'true',
1910 'TypeLibraryName': '$(InputName).tlb',
1911 'OutputDirectory': '$(IntDir)',
1912 'HeaderFileName': '$(InputName).h',
1913 'DLLDataFileName': 'dlldata.c',
1914 'InterfaceIdentifierFileName': '$(InputName)_i.c',
1915 'ProxyFileName': '$(InputName)_p.c',
1916 },
1917 'VCResourceCompilerTool': {
1918 'Culture' : '1033',
[email protected]4d91cbc2010-05-07 20:41:381919 'AdditionalIncludeDirectories': [
1920 '<(DEPTH)',
1921 '<(SHARED_INTERMEDIATE_DIR)',
1922 ],
[email protected]2f80c312009-02-25 21:26:551923 },
1924 },
1925 },
1926 }],
[email protected]79e2336c2011-05-12 18:18:341927 ['disable_nacl==1', {
[email protected]d8c7cbcc2009-10-02 19:00:311928 'target_defaults': {
1929 'defines': [
1930 'DISABLE_NACL',
1931 ],
1932 },
1933 }],
[email protected]cfbf9bc2009-12-07 22:07:561934 ['OS=="win" and msvs_use_common_linker_extras', {
[email protected]48c7af72009-07-03 22:00:191935 'target_defaults': {
1936 'msvs_settings': {
1937 'VCLinkerTool': {
[email protected]48c7af72009-07-03 22:00:191938 'DelayLoadDLLs': [
1939 'dbghelp.dll',
1940 'dwmapi.dll',
1941 'uxtheme.dll',
1942 ],
1943 },
1944 },
[email protected]ef4fa4072009-12-04 22:46:501945 'configurations': {
[email protected]5153767c2009-12-22 01:52:501946 'x86_Base': {
[email protected]ef4fa4072009-12-04 22:46:501947 'msvs_settings': {
1948 'VCLinkerTool': {
[email protected]1f9471a2010-01-04 06:40:161949 'AdditionalOptions': [
1950 '/safeseh',
1951 '/dynamicbase',
1952 '/ignore:4199',
1953 '/ignore:4221',
1954 '/nxcompat',
1955 ],
[email protected]ef4fa4072009-12-04 22:46:501956 },
1957 },
1958 },
[email protected]5153767c2009-12-22 01:52:501959 'x64_Base': {
[email protected]ef4fa4072009-12-04 22:46:501960 'msvs_settings': {
1961 'VCLinkerTool': {
[email protected]1f9471a2010-01-04 06:40:161962 'AdditionalOptions': [
[email protected]ef4fa4072009-12-04 22:46:501963 # safeseh is not compatible with x64
[email protected]1f9471a2010-01-04 06:40:161964 '/dynamicbase',
1965 '/ignore:4199',
1966 '/ignore:4221',
1967 '/nxcompat',
1968 ],
[email protected]ef4fa4072009-12-04 22:46:501969 },
1970 },
1971 },
1972 },
[email protected]48c7af72009-07-03 22:00:191973 },
1974 }],
[email protected]9821d0d2010-04-16 22:40:371975 ['enable_new_npdevice_api==1', {
1976 'target_defaults': {
1977 'defines': [
1978 'ENABLE_NEW_NPDEVICE_API',
1979 ],
1980 },
1981 }],
[email protected]2f80c312009-02-25 21:26:551982 ],
1983 'xcode_settings': {
[email protected]0c8ab452009-11-06 21:57:501984 # DON'T ADD ANYTHING NEW TO THIS BLOCK UNLESS YOU REALLY REALLY NEED IT!
1985 # This block adds *project-wide* configuration settings to each project
1986 # file. It's almost always wrong to put things here. Specify your
1987 # custom xcode_settings in target_defaults to add them to targets instead.
1988
1989 # In an Xcode Project Info window, the "Base SDK for All Configurations"
1990 # setting sets the SDK on a project-wide basis. In order to get the
1991 # configured SDK to show properly in the Xcode UI, SDKROOT must be set
1992 # here at the project level.
1993 'SDKROOT': 'macosx<(mac_sdk)', # -isysroot
1994
[email protected]2f80c312009-02-25 21:26:551995 # The Xcode generator will look for an xcode_settings section at the root
1996 # of each dict and use it to apply settings on a file-wide basis. Most
1997 # settings should not be here, they should be in target-specific
1998 # xcode_settings sections, or better yet, should use non-Xcode-specific
1999 # settings in target dicts. SYMROOT is a special case, because many other
2000 # Xcode variables depend on it, including variables such as
2001 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something
2002 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the
2003 # files to appear (when present) in the UI as actual files and not red
2004 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR,
2005 # and therefore SYMROOT, needs to be set at the project level.
[email protected]bfa24b962009-03-02 00:16:162006 'SYMROOT': '<(DEPTH)/xcodebuild',
[email protected]2f80c312009-02-25 21:26:552007 },
[email protected]ee28c9f2009-09-04 01:53:012008}