blob: 242fb17033d980def68e8debf740bb46adb3e06d [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.
[email protected]fd88a8842011-09-13 02:50:2228 # This turns on the USE_ONLY_PURE_VIEWS macro.
29 'use_only_pure_views%': 0,
[email protected]1b546692011-06-30 18:22:3030
[email protected]bb6aba32011-01-07 19:04:4331 # Disable touch support by default.
32 'touchui%': 0,
[email protected]9c8a1982011-05-24 23:08:5833
[email protected]4c9ee222011-08-17 19:51:3534 # Disable webui dialog replacements for native dialogs by default.
35 # TODO(flackr): Change this to a runtime flag triggered by
[email protected]7de46352011-09-12 15:39:1936 # --pure-views so that these dialogs can be easily tested.
[email protected]4c9ee222011-08-17 19:51:3537 'webui_dialogs%': 0,
[email protected]8ebc9b42011-07-14 15:22:1838
[email protected]9c8a1982011-05-24 23:08:5839 # Whether the compositor is enabled on views.
40 'views_compositor%': 0,
[email protected]7de46352011-09-12 15:39:1941
[email protected]e599f0132011-08-24 19:03:3542 # Whether or not we are building with the Aura window manager.
[email protected]41423092011-08-25 15:39:5843 'use_aura%': 0,
[email protected]bb6aba32011-01-07 19:04:4344 },
45 # Copy conditionally-set variables out one scope.
46 'chromeos%': '<(chromeos)',
[email protected]fd88a8842011-09-13 02:50:2247 'use_only_pure_views%': '<(use_only_pure_views)',
[email protected]bb6aba32011-01-07 19:04:4348 'touchui%': '<(touchui)',
[email protected]4c9ee222011-08-17 19:51:3549 'webui_dialogs%': '<(webui_dialogs)',
[email protected]9c8a1982011-05-24 23:08:5850 'views_compositor%': '<(views_compositor)',
[email protected]41423092011-08-25 15:39:5851 'use_aura%': '<(use_aura)',
[email protected]e72e55b2011-01-06 22:19:3052
[email protected]e72e55b2011-01-06 22:19:3053 # Compute the architecture that we're building on.
54 'conditions': [
[email protected]c49ab0c2011-05-18 17:25:3755 [ 'OS=="win" or OS=="mac"', {
56 'host_arch%': 'ia32',
57 }, {
[email protected]79e2336c2011-05-12 18:18:3458 # This handles the Unix platforms for which there is some support.
59 # Anything else gets passed through, which probably won't work very
60 # well; such hosts should pass an explicit target_arch to gyp.
[email protected]e72e55b2011-01-06 22:19:3061 'host_arch%':
[email protected]79e2336c2011-05-12 18:18:3462 '<!(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:3063 }],
[email protected]bb6aba32011-01-07 19:04:4364
[email protected]fd88a8842011-09-13 02:50:2265 # Set default value of toolkit_views on for Windows, Chrome OS,
66 # Touch and PureView.
67 ['OS=="win" or chromeos==1 or touchui==1 or use_only_pure_views==1', {
[email protected]bb6aba32011-01-07 19:04:4368 'toolkit_views%': 1,
69 }, {
70 'toolkit_views%': 0,
71 }],
[email protected]1b546692011-06-30 18:22:3072
[email protected]fd88a8842011-09-13 02:50:2273 # Views are always Pure in Touch case.
[email protected]1b546692011-06-30 18:22:3074 ['touchui==1', {
[email protected]fd88a8842011-09-13 02:50:2275 'use_only_pure_views%': 1,
[email protected]1b546692011-06-30 18:22:3076 }, {
[email protected]fd88a8842011-09-13 02:50:2277 'use_only_pure_views%': 0,
[email protected]1b546692011-06-30 18:22:3078 }],
[email protected]8ebc9b42011-07-14 15:22:1879
[email protected]fd88a8842011-09-13 02:50:2280 # Use WebUI dialogs in TouchUI and PureView builds.
81 ['touchui==1 or use_only_pure_views==1', {
[email protected]4c9ee222011-08-17 19:51:3582 'webui_dialogs%': 1,
[email protected]8ebc9b42011-07-14 15:22:1883 }],
[email protected]7de46352011-09-12 15:39:1984
[email protected]e599f0132011-08-24 19:03:3585 # Use the views compositor when using the Aura window manager.
[email protected]41423092011-08-25 15:39:5886 ['use_aura==1', {
[email protected]e599f0132011-08-24 19:03:3587 'views_compositor%': 1,
88 }],
[email protected]e72e55b2011-01-06 22:19:3089 ],
90 },
91
92 # Copy conditionally-set variables out one scope.
93 'chromeos%': '<(chromeos)',
94 'touchui%': '<(touchui)',
[email protected]4c9ee222011-08-17 19:51:3595 'webui_dialogs%': '<(webui_dialogs)',
[email protected]e72e55b2011-01-06 22:19:3096 'host_arch%': '<(host_arch)',
[email protected]bb6aba32011-01-07 19:04:4397 'toolkit_views%': '<(toolkit_views)',
[email protected]fd88a8842011-09-13 02:50:2298 'use_only_pure_views%': '<(use_only_pure_views)',
[email protected]9c8a1982011-05-24 23:08:5899 'views_compositor%': '<(views_compositor)',
[email protected]41423092011-08-25 15:39:58100 'use_aura%': '<(use_aura)',
[email protected]e72e55b2011-01-06 22:19:30101
[email protected]8fb0ef02011-05-20 00:53:50102 # We used to provide a variable for changing how libraries were built.
103 # This variable remains until we can clean up all the users.
104 # This needs to be one nested variables dict in so that dependent
105 # gyp files can make use of it in their outer variables. (Yikes!)
106 # http://code.google.com/p/chromium/issues/detail?id=83308
107 'library%': 'static_library',
108
[email protected]e14a9f92009-08-05 19:26:07109 # Override branding to select the desired branding flavor.
110 'branding%': 'Chromium',
111
112 # Override buildtype to select the desired build flavor.
113 # Dev - everyday build for development/testing
114 # Official - release build (generally implies additional processing)
115 # TODO(mmoss) Once 'buildtype' is fully supported (e.g. Windows gyp
116 # conversion is done), some of the things which are now controlled by
117 # 'branding', such as symbol generation, will need to be refactored based
118 # on 'buildtype' (i.e. we don't care about saving symbols for non-Official
119 # builds).
120 'buildtype%': 'Dev',
[email protected]cbd5fd52009-08-26 00:14:27121
[email protected]e72e55b2011-01-06 22:19:30122 # Default architecture we're building for is the architecture we're
123 # building on.
124 'target_arch%': '<(host_arch)',
[email protected]b3f23ba2010-04-26 22:58:17125
[email protected]e72e55b2011-01-06 22:19:30126 # This variable tells WebCore.gyp and JavaScriptCore.gyp whether they are
127 # are built under a chromium full build (1) or a webkit.org chromium
128 # build (0).
129 'inside_chromium_build%': 1,
[email protected]8974e042010-06-21 18:06:52130
[email protected]e72e55b2011-01-06 22:19:30131 # Set to 1 to enable fast builds. It disables debug info for fastest
132 # compilation.
133 'fastbuild%': 0,
[email protected]93012ca2010-08-10 20:10:49134
[email protected]3d38d8e2011-04-16 20:48:51135 # Disable file manager component extension by default.
136 'file_manager_extension%': 0,
137
[email protected]8b2e9f392011-08-05 04:00:47138 # Disable WebUI TaskManager by default.
139 'webui_task_manager%': 0,
140
[email protected]e72e55b2011-01-06 22:19:30141 # Python version.
[email protected]a43c5a02011-05-27 06:54:51142 'python_ver%': '2.6',
[email protected]b3f23ba2010-04-26 22:58:17143
[email protected]e72e55b2011-01-06 22:19:30144 # Set ARM-v7 compilation flags
145 'armv7%': 0,
146
147 # Set Neon compilation flags (only meaningful if armv7==1).
148 'arm_neon%': 1,
149
150 # The system root for cross-compiles. Default: none.
151 'sysroot%': '',
152
153 # On Linux, we build with sse2 for Chromium builds.
154 'disable_sse2%': 0,
155
156 # Use libjpeg-turbo as the JPEG codec used by Chromium.
[email protected]32e56e52011-02-28 02:28:03157 'use_libjpeg_turbo%': 1,
[email protected]e72e55b2011-01-06 22:19:30158
159 # Variable 'component' is for cases where we would like to build some
160 # components as dynamic shared libraries but still need variable
161 # 'library' for static libraries.
162 # By default, component is set to whatever library is set to and
163 # it can be overriden by the GYP command line or by ~/.gyp/include.gypi.
[email protected]5a547332011-05-19 23:18:53164 'component%': 'static_library',
[email protected]e72e55b2011-01-06 22:19:30165
[email protected]bb6aba32011-01-07 19:04:43166 # Set to select the Title Case versions of strings in GRD files.
167 'use_titlecase_in_grd_files%': 0,
[email protected]63692212010-09-16 00:22:21168
[email protected]98da0042011-02-02 00:10:27169 # Use translations provided by volunteers at launchpad.net. This
170 # currently only works on Linux.
[email protected]00dc155832011-02-01 18:51:19171 'use_third_party_translations%': 0,
172
[email protected]9a425422011-01-11 00:53:18173 # Remoting compilation is enabled by default. Set to 0 to disable.
174 'remoting%': 1,
175
[email protected]5834f4392011-09-13 20:06:17176 # Threaded compositing
177 'use_threaded_compositing%': 0,
178
[email protected]a026daa2011-04-20 15:49:51179 # P2P APIs are compiled in by default. Set to 0 to disable.
180 # Also note that this should be enabled for remoting to compile.
181 'p2p_apis%': 1,
182
[email protected]1ec68c42011-06-01 13:56:25183 # Configuration policy is enabled by default. Set to 0 to disable.
184 'configuration_policy%': 1,
185
[email protected]4b58e7d2011-07-11 10:22:56186 # Safe browsing is compiled in by default. Set to 0 to disable.
187 'safe_browsing%': 1,
188
[email protected]5d451ad2011-02-11 16:43:46189 # If this is set, the clang plugins used on the buildbot will be used.
190 # Run tools/clang/scripts/update.sh to make sure they are compiled.
191 # This causes 'clang_chrome_plugins_flags' to be set.
192 # Has no effect if 'clang' is not set as well.
193 'clang_use_chrome_plugins%': 0,
194
[email protected]92799b632011-08-15 14:33:06195 # Enable building with ASAN (Clang's -fasan option).
196 # -fasan only works with clang, but asan=1 implies clang=1
197 # See https://sites.google.com/a/chromium.org/dev/developers/testing/addresssanitizer
198 'asan%': 0,
199
[email protected]1ad5a7b2011-06-24 03:15:13200 # Set to 1 compile with -fPIC cflag on linux. This is a must for shared
201 # libraries on linux x86-64 and arm, plus ASLR.
202 'linux_fpic%': 1,
203
[email protected]c6a1f94172011-07-05 02:35:00204 # Enable navigator.registerProtocolHandler and supporting UI.
205 'enable_register_protocol_handler%': 1,
206
[email protected]62af76e2011-08-01 02:34:01207 # Enable Web Intents and supporting UI.
208 'enable_web_intents%': 0,
209
[email protected]32877d302011-07-07 17:57:49210 # Smooth scrolling is disabled by default.
211 'enable_smooth_scrolling%': 0,
212
[email protected]dda90ae2011-07-19 22:07:48213 # Webrtc compilation is enabled by default. Set to 0 to disable.
214 'enable_webrtc%': 1,
215
[email protected]bb6aba32011-01-07 19:04:43216 'conditions': [
[email protected]7d7564a12011-06-21 19:20:22217 # Use Skia as WebKit renderer on Mac
218 ['OS=="mac"', {
219 'use_skia%': 0,
220 }, {
221 'use_skia%': 1,
222 }],
223
[email protected]79e2336c2011-05-12 18:18:34224 # A flag for POSIX platforms
[email protected]c49ab0c2011-05-18 17:25:37225 ['OS=="win"', {
[email protected]79e2336c2011-05-12 18:18:34226 'os_posix%': 0,
[email protected]c49ab0c2011-05-18 17:25:37227 }, {
228 'os_posix%': 1,
[email protected]79e2336c2011-05-12 18:18:34229 }],
230
231 # Flags to use Gtk and X11 on non-Mac POSIX platforms
[email protected]c49ab0c2011-05-18 17:25:37232 ['OS=="win" or OS=="mac"', {
[email protected]79e2336c2011-05-12 18:18:34233 'toolkit_uses_gtk%': 0,
234 'use_x11%': 0,
[email protected]c49ab0c2011-05-18 17:25:37235 }, {
[email protected]236754a2011-07-28 17:38:23236 # TODO(dnicoara) Wayland build should have these disabled, but
237 # currently GTK and X is too spread and it's hard to completely
238 # remove every dependency.
[email protected]c49ab0c2011-05-18 17:25:37239 'toolkit_uses_gtk%': 1,
240 'use_x11%': 1,
[email protected]79e2336c2011-05-12 18:18:34241 }],
242
[email protected]63692212010-09-16 00:22:21243 # A flag to enable or disable our compile-time dependency
244 # on gnome-keyring. If that dependency is disabled, no gnome-keyring
245 # support will be available. This option is useful
246 # for Linux distributions.
247 ['chromeos==1', {
248 'use_gnome_keyring%': 0,
249 }, {
250 'use_gnome_keyring%': 1,
251 }],
[email protected]0afe5212010-10-01 18:56:11252
[email protected]bb6aba32011-01-07 19:04:43253 ['toolkit_views==0 or OS=="mac"', {
254 # GTK+ and Mac wants Title Case strings
255 'use_titlecase_in_grd_files%': 1,
256 }],
257
[email protected]1b4209f2011-01-07 00:25:40258 # Enable some hacks to support Flapper only on Chrome OS.
259 ['chromeos==1', {
260 'enable_flapper_hacks%': 1,
261 }, {
262 'enable_flapper_hacks%': 0,
263 }],
[email protected]3d38d8e2011-04-16 20:48:51264
265 # Enable file manager extension by default on Chrome OS.
266 ['chromeos==1', {
267 'file_manager_extension%': 1,
268 }, {
269 'file_manager_extension%': 0,
270 }],
[email protected]7de46352011-09-12 15:39:19271
[email protected]fd88a8842011-09-13 02:50:22272 # Enable WebUI TaskManager only on Chrome OS, Touch or PureView.
273 ['chromeos==1 or touchui==1 or use_only_pure_views==1', {
[email protected]8b2e9f392011-08-05 04:00:47274 'webui_task_manager%': 1,
275 }, {
276 'webui_task_manager%': 0,
277 }],
278
[email protected]554b7062011-09-03 03:09:40279 # Enable smooth scrolling for Mac, Win, Linux and ChromeOS
280 ['OS=="linux" or OS=="mac" or OS=="win"', {
[email protected]32877d302011-07-07 17:57:49281 'enable_smooth_scrolling%': 1,
282 }, {
283 'enable_smooth_scrolling%': 0,
284 }],
[email protected]b3f23ba2010-04-26 22:58:17285 ],
[email protected]e14a9f92009-08-05 19:26:07286 },
287
[email protected]e72e55b2011-01-06 22:19:30288 # Copy conditionally-set variables out one scope.
[email protected]e14a9f92009-08-05 19:26:07289 'branding%': '<(branding)',
290 'buildtype%': '<(buildtype)',
[email protected]e0d00142009-09-18 22:10:27291 'target_arch%': '<(target_arch)',
[email protected]cf185b32010-01-12 04:29:59292 'host_arch%': '<(host_arch)',
[email protected]8fb0ef02011-05-20 00:53:50293 'library%': 'static_library',
[email protected]c153e5352009-09-22 12:37:44294 'toolkit_views%': '<(toolkit_views)',
[email protected]fd88a8842011-09-13 02:50:22295 'use_only_pure_views%': '<(use_only_pure_views)',
[email protected]9c8a1982011-05-24 23:08:58296 'views_compositor%': '<(views_compositor)',
[email protected]41423092011-08-25 15:39:58297 'use_aura%': '<(use_aura)',
[email protected]79e2336c2011-05-12 18:18:34298 'os_posix%': '<(os_posix)',
299 'toolkit_uses_gtk%': '<(toolkit_uses_gtk)',
[email protected]7d7564a12011-06-21 19:20:22300 'use_skia%': '<(use_skia)',
[email protected]79e2336c2011-05-12 18:18:34301 'use_x11%': '<(use_x11)',
[email protected]63692212010-09-16 00:22:21302 'use_gnome_keyring%': '<(use_gnome_keyring)',
[email protected]0afe5212010-10-01 18:56:11303 'linux_fpic%': '<(linux_fpic)',
[email protected]1b4209f2011-01-07 00:25:40304 'enable_flapper_hacks%': '<(enable_flapper_hacks)',
[email protected]c153e5352009-09-22 12:37:44305 'chromeos%': '<(chromeos)',
[email protected]93012ca2010-08-10 20:10:49306 'touchui%': '<(touchui)',
[email protected]4c9ee222011-08-17 19:51:35307 'webui_dialogs%': '<(webui_dialogs)',
[email protected]e47c32032011-03-01 19:26:20308 'file_manager_extension%': '<(file_manager_extension)',
[email protected]8b2e9f392011-08-05 04:00:47309 'webui_task_manager%': '<(webui_task_manager)',
[email protected]b2f030c2009-09-24 20:36:21310 'inside_chromium_build%': '<(inside_chromium_build)',
[email protected]9c1949e2009-10-02 19:59:54311 'fastbuild%': '<(fastbuild)',
[email protected]a76fe1a2010-03-01 23:39:36312 'python_ver%': '<(python_ver)',
[email protected]eafc0b452010-02-26 21:53:43313 'armv7%': '<(armv7)',
314 'arm_neon%': '<(arm_neon)',
[email protected]4d83eb72010-03-04 16:42:23315 'sysroot%': '<(sysroot)',
[email protected]ac120ff2010-04-28 02:14:22316 'disable_sse2%': '<(disable_sse2)',
[email protected]8974e042010-06-21 18:06:52317 'component%': '<(component)',
[email protected]bb6aba32011-01-07 19:04:43318 'use_titlecase_in_grd_files%': '<(use_titlecase_in_grd_files)',
[email protected]9e94cca2011-02-04 17:38:17319 'use_third_party_translations%': '<(use_third_party_translations)',
[email protected]9a425422011-01-11 00:53:18320 'remoting%': '<(remoting)',
[email protected]5834f4392011-09-13 20:06:17321 'use_threaded_compositing%': '<(use_threaded_compositing)',
[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]41ed4e82011-08-25 23:02:07330 'enable_web_intents%': '<(enable_web_intents)',
[email protected]4076d2f2011-08-11 18:20:22331 # Whether to build for Wayland display server
332 'use_wayland%': 0,
[email protected]a22ebd812011-06-23 00:05:39333
[email protected]caa95c82009-11-23 22:39:32334 # The release channel that this build targets. This is used to restrict
335 # channel-specific build options, like which installer packages to create.
336 # The default is 'all', which does no channel-specific filtering.
337 'channel%': 'all',
338
[email protected]b3fb8092009-03-12 19:09:24339 # Override chromium_mac_pch and set it to 0 to suppress the use of
340 # precompiled headers on the Mac. Prefix header injection may still be
341 # used, but prefix headers will not be precompiled. This is useful when
342 # using distcc to distribute a build to compile slaves that don't
343 # share the same compiler executable as the system driving the compilation,
344 # because precompiled headers rely on pointers into a specific compiler
345 # executable's image. Setting this to 0 is needed to use an experimental
346 # Linux-Mac cross compiler distcc farm.
347 'chromium_mac_pch%': 1,
348
[email protected]3224dcd2009-09-16 17:31:25349 # Mac OS X SDK and deployment target support.
350 # The SDK identifies the version of the system headers that will be used,
351 # and corresponds to the MAC_OS_X_VERSION_MAX_ALLOWED compile-time macro.
352 # "Maximum allowed" refers to the operating system version whose APIs are
353 # available in the headers.
354 # The deployment target identifies the minimum system version that the
355 # built products are expected to function on. It corresponds to the
356 # MAC_OS_X_VERSION_MIN_REQUIRED compile-time macro.
357 # To ensure these macros are available, #include <AvailabilityMacros.h>.
358 # Additional documentation on these macros is available at
359 # http://developer.apple.com/mac/library/technotes/tn2002/tn2064.html#SECTION3
360 # Chrome normally builds with the Mac OS X 10.5 SDK and sets the
361 # deployment target to 10.5. Other projects, such as O3D, may override
362 # these defaults.
363 'mac_sdk%': '10.5',
364 'mac_deployment_target%': '10.5',
[email protected]9543af052009-09-15 22:42:59365
[email protected]f5ecbba12009-04-03 04:35:18366 # Set to 1 to enable code coverage. In addition to build changes
367 # (e.g. extra CFLAGS), also creates a new target in the src/chrome
368 # project file called "coverage".
369 # Currently ignored on Windows.
370 'coverage%': 0,
[email protected]653bd5f032009-04-08 12:55:49371
[email protected]7477ea6f2009-12-22 23:28:15372 # Although base/allocator lets you select a heap library via an
[email protected]7e0d664a2009-12-03 21:07:47373 # environment variable, the libcmt shim it uses sometimes gets in
374 # the way. To disable it entirely, and switch to normal msvcrt, do e.g.
375 # 'win_use_allocator_shim': 0,
376 # 'win_release_RuntimeLibrary': 2
377 # to ~/.gyp/include.gypi, gclient runhooks --force, and do a release build.
[email protected]8974e042010-06-21 18:06:52378 'win_use_allocator_shim%': 1, # 1 = shim allocator via libcmt; 0 = msvcrt
[email protected]279cd4212009-09-11 22:32:11379
[email protected]95ff8082009-11-13 22:21:01380 # Whether usage of OpenMAX is enabled.
381 'enable_openmax%': 0,
382
[email protected]d01120e62010-05-10 17:04:48383 # Whether proprietary audio/video codecs are assumed to be included with
384 # this build (only meaningful if branding!=Chrome).
385 'proprietary_codecs%': 0,
386
[email protected]e5b2eaa2009-04-14 01:39:12387 # TODO(bradnelson): eliminate this when possible.
388 # To allow local gyp files to prevent release.vsprops from being included.
389 # Yes(1) means include release.vsprops.
390 # Once all vsprops settings are migrated into gyp, this can go away.
391 'msvs_use_common_release%': 1,
[email protected]606116d22009-05-06 22:38:23392
[email protected]cbd5fd52009-08-26 00:14:27393 # TODO(bradnelson): eliminate this when possible.
394 # To allow local gyp files to override additional linker options for msvs.
395 # Yes(1) means set use the common linker options.
[email protected]48c7af72009-07-03 22:00:19396 'msvs_use_common_linker_extras%': 1,
397
[email protected]1ffb6502009-06-02 07:46:24398 # TODO(sgk): eliminate this if possible.
399 # It would be nicer to support this via a setting in 'target_defaults'
400 # in chrome/app/locales/locales.gypi overriding the setting in the
401 # 'Debug' configuration in the 'target_defaults' dict below,
402 # but that doesn't work as we'd like.
403 'msvs_debug_link_incremental%': '2',
404
[email protected]1f790ef2011-01-11 20:45:36405 # Needed for some of the largest modules.
406 'msvs_debug_link_nonincremental%': '1',
407
[email protected]5ab8f482011-08-18 18:30:06408 # Turn on Use Library Dependency Inputs for linking chrome.dll on Windows
409 # to get incremental linking to be faster in debug builds.
410 'incremental_chrome_dll%': 0,
411
[email protected]573136142009-07-15 22:48:37412 # This is the location of the sandbox binary. Chrome looks for this before
413 # running the zygote process. If found, and SUID, it will be used to
414 # sandbox the zygote process and, thus, all renderer processes.
415 'linux_sandbox_path%': '',
416
[email protected]ad6d2c42009-09-15 20:13:38417 # Set this to true to enable SELinux support.
418 'selinux%': 0,
[email protected]4c9cc6c2009-10-01 18:54:57419
[email protected]58680ce2010-09-18 00:09:15420 # Set this to true when building with Clang.
421 # See http://code.google.com/p/chromium/wiki/Clang for details.
422 # TODO: eventually clang should behave identically to gcc, and this
423 # won't be necessary.
424 'clang%': 0,
425
[email protected]5e781232011-01-28 02:57:59426 # These two variables can be set in GYP_DEFINES while running
427 # |gclient runhooks| to let clang run a plugin in every compilation.
428 # Only has an effect if 'clang=1' is in GYP_DEFINES as well.
429 # Example:
[email protected]93120fe2011-02-03 20:46:42430 # 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:59431
432 'clang_load%': '',
433 'clang_add_plugin%': '',
434
[email protected]7664ab32011-02-01 23:35:25435 # Enable sampling based profiler.
436 # See http://google-perftools.googlecode.com/svn/trunk/doc/cpuprofile.html
437 'profiling%': '0',
438
[email protected]93b373502011-08-16 19:06:22439 # Enable strict glibc debug mode.
440 'glibcxx_debug%': 0,
441
[email protected]36532f332010-08-25 00:22:01442 # Override whether we should use Breakpad on Linux. I.e. for Chrome bot.
443 'linux_breakpad%': 0,
444 # And if we want to dump symbols for Breakpad-enabled builds.
445 'linux_dump_symbols%': 0,
446 # And if we want to strip the binary after dumping symbols.
[email protected]05cb6962009-10-01 23:29:03447 'linux_strip_binary%': 0,
[email protected]1d87c282010-09-15 22:24:49448 # Strip the test binaries needed for Linux reliability tests.
449 'linux_strip_reliability_tests%': 0,
[email protected]05cb6962009-10-01 23:29:03450
[email protected]46ce5b562010-06-16 18:39:53451 # Enable TCMalloc.
452 'linux_use_tcmalloc%': 1,
[email protected]01699e22009-11-11 19:24:24453
[email protected]39ca7de2010-04-16 08:04:03454 # Disable TCMalloc's debugallocation.
455 'linux_use_debugallocation%': 0,
456
[email protected]d8b60602010-03-26 09:41:22457 # Disable TCMalloc's heapchecker.
458 'linux_use_heapchecker%': 0,
459
[email protected]64e2d4a42010-08-27 10:13:21460 # Disable shadow stack keeping used by heapcheck to unwind the stacks
461 # better.
462 'linux_keep_shadow_stacks%': 0,
463
[email protected]6def64a2010-10-28 20:40:34464 # Set to 1 to turn on seccomp sandbox by default.
465 # (Note: this is ignored for official builds.)
466 'linux_use_seccomp_sandbox%': 0,
[email protected]39c4e1a82010-03-30 19:47:41467
[email protected]556c5d72010-06-10 05:45:01468 # Set to 1 to link against libgnome-keyring instead of using dlopen().
469 'linux_link_gnome_keyring%': 0,
[email protected]abcc9ac2011-05-16 20:04:35470 # Set to 1 to link against gsettings APIs instead of using dlopen().
471 'linux_link_gsettings%': 0,
[email protected]556c5d72010-06-10 05:45:01472
[email protected]d8c7cbcc2009-10-02 19:00:31473 # Used to disable Native Client at compile time, for platforms where it
474 # isn't supported
475 'disable_nacl%': 0,
476
[email protected]77c1b29392009-12-04 06:21:29477 # Set Thumb compilation flags.
478 'arm_thumb%': 0,
479
[email protected]53e0f642010-03-05 01:41:56480 # Set ARM fpu compilation flags (only meaningful if armv7==1 and
481 # arm_neon==0).
482 'arm_fpu%': 'vfpv3',
483
[email protected]9821d0d2010-04-16 22:40:37484 # Enable new NPDevice API.
485 'enable_new_npdevice_api%': 0,
[email protected]ed154592010-04-29 00:18:50486
487 # Enable EGLImage support in OpenMAX
[email protected]58023be2011-02-04 20:34:14488 'enable_eglimage%': 1,
[email protected]ed154592010-04-29 00:18:50489
[email protected]6f51b27e2010-06-22 20:43:53490 # Enable a variable used elsewhere throughout the GYP files to determine
491 # whether to compile in the sources for the GPU plugin / process.
492 'enable_gpu%': 1,
493
[email protected]32e1dee2010-12-09 18:36:24494 # Use OpenSSL instead of NSS. Under development: see http://crbug.com/62803
[email protected]d518cd92010-09-29 12:27:44495 'use_openssl%': 0,
496
[email protected]e72e55b2011-01-06 22:19:30497 # .gyp files or targets should set chromium_code to 1 if they build
498 # Chromium-specific code, as opposed to external code. This variable is
499 # used to control such things as the set of warnings to enable, and
500 # whether warnings are treated as errors.
501 'chromium_code%': 0,
502
503 # Set to 1 to compile with the built in pdf viewer.
504 'internal_pdf%': 0,
505
506 # This allows to use libcros from the current system, ie. /usr/lib/
507 # The cros_api will be pulled in as a static library, and all headers
508 # from the system include dirs.
[email protected]bb6aba32011-01-07 19:04:43509 'system_libcros%': 0,
[email protected]e72e55b2011-01-06 22:19:30510
[email protected]e72e55b2011-01-06 22:19:30511 # NOTE: When these end up in the Mac bundle, we need to replace '-' for '_'
512 # so Cocoa is happy (http://crbug.com/20441).
513 'locales': [
514 'am', 'ar', 'bg', 'bn', 'ca', 'cs', 'da', 'de', 'el', 'en-GB',
515 'en-US', 'es-419', 'es', 'et', 'fa', 'fi', 'fil', 'fr', 'gu', 'he',
516 'hi', 'hr', 'hu', 'id', 'it', 'ja', 'kn', 'ko', 'lt', 'lv',
517 'ml', 'mr', 'nb', 'nl', 'pl', 'pt-BR', 'pt-PT', 'ro', 'ru',
518 'sk', 'sl', 'sr', 'sv', 'sw', 'ta', 'te', 'th', 'tr', 'uk',
519 'vi', 'zh-CN', 'zh-TW',
520 ],
521
[email protected]cc0322d2011-07-24 09:29:19522 # Pseudo locales are special locales which are used for testing and
523 # debugging. They don't get copied to the final app. For more info,
524 # check out https://sites.google.com/a/chromium.org/dev/Home/fake-bidi
525 'pseudo_locales': [
526 'fake-bidi',
527 ],
528
[email protected]bb6aba32011-01-07 19:04:43529 'grit_defines': [],
530
[email protected]29c2daea2011-01-05 20:38:50531 # Use Harfbuzz-NG instead of Harfbuzz.
532 # Under development: http://crbug.com/68551
533 'use_harfbuzz_ng%': 0,
534
[email protected]bd3bd442011-03-28 07:58:51535 # If debug_devtools is set to 1, JavaScript files for DevTools are
536 # stored as is and loaded from disk. Otherwise, a concatenated file
537 # is stored in resources.pak. It is still possible to load JS files
538 # from disk by passing --debug-devtools cmdline switch.
539 'debug_devtools%': 0,
540
[email protected]be8a9272011-02-10 22:06:07541 # Point to ICU directory.
542 'icu_src_dir': '../third_party/icu',
543
[email protected]912c55c2009-07-31 23:33:55544 'conditions': [
[email protected]79e2336c2011-05-12 18:18:34545 ['os_posix==1 and OS!="mac"', {
[email protected]242a9e62009-11-03 17:32:10546 # This will set gcc_version to XY if you are running gcc X.Y.*.
547 # This is used to tweak build flags for gcc 4.4.
548 'gcc_version%': '<!(python <(DEPTH)/build/compiler_version.py)',
[email protected]4d83eb72010-03-04 16:42:23549 # Figure out the python architecture to decide if we build pyauto.
[email protected]efd68462010-03-04 17:07:54550 'python_arch%': '<!(<(DEPTH)/build/linux/python_arch.sh <(sysroot)/usr/lib/libpython<(python_ver).so.1.0)',
[email protected]cbd5fd52009-08-26 00:14:27551 'conditions': [
[email protected]2a77a9d2010-08-26 19:58:10552 ['branding=="Chrome"', {
[email protected]cbd5fd52009-08-26 00:14:27553 'linux_breakpad%': 1,
[email protected]cbd5fd52009-08-26 00:14:27554 }],
[email protected]4c9cc6c2009-10-01 18:54:57555 # All Chrome builds have breakpad symbols, but only process the
556 # symbols from official builds.
[email protected]c913cb82010-08-31 19:44:08557 ['(branding=="Chrome" and buildtype=="Official")', {
[email protected]4c9cc6c2009-10-01 18:54:57558 'linux_dump_symbols%': 1,
[email protected]4c9cc6c2009-10-01 18:54:57559 }],
[email protected]cbd5fd52009-08-26 00:14:27560 ],
[email protected]79e2336c2011-05-12 18:18:34561 }], # os_posix==1 and OS!="mac"
[email protected]bb6aba32011-01-07 19:04:43562
[email protected]e14a9f92009-08-05 19:26:07563 ['OS=="mac"', {
[email protected]e1ece302011-09-15 03:58:11564 # Enable clang on mac by default!
565 'clang%': 1,
[email protected]e14a9f92009-08-05 19:26:07566 'conditions': [
567 # mac_product_name is set to the name of the .app bundle as it should
568 # appear on disk. This duplicates data from
569 # chrome/app/theme/chromium/BRANDING and
570 # chrome/app/theme/google_chrome/BRANDING, but is necessary to get
571 # these names into the build system.
572 ['branding=="Chrome"', {
573 'mac_product_name%': 'Google Chrome',
574 }, { # else: branding!="Chrome"
575 'mac_product_name%': 'Chromium',
576 }],
577
578 # Feature variables for enabling Mac Breakpad and Keystone auto-update
579 # support. Both features are on by default in official builds with
580 # Chrome branding.
581 ['branding=="Chrome" and buildtype=="Official"', {
582 'mac_breakpad%': 1,
583 'mac_keystone%': 1,
584 }, { # else: branding!="Chrome" or buildtype!="Official"
585 'mac_breakpad%': 0,
586 'mac_keystone%': 0,
587 }],
588 ],
589 }], # OS=="mac"
[email protected]bb6aba32011-01-07 19:04:43590
[email protected]912c55c2009-07-31 23:33:55591 # Whether to use multiple cores to compile with visual studio. This is
592 # optional because it sometimes causes corruption on VS 2005.
593 # It is on by default on VS 2008 and off on VS 2005.
594 ['OS=="win"', {
595 'conditions': [
[email protected]8974e042010-06-21 18:06:52596 ['component=="shared_library"', {
597 'win_use_allocator_shim%': 0,
598 }],
[email protected]912c55c2009-07-31 23:33:55599 ['MSVS_VERSION=="2005"', {
[email protected]669795372009-08-14 17:51:13600 'msvs_multi_core_compile%': 0,
[email protected]912c55c2009-07-31 23:33:55601 },{
602 'msvs_multi_core_compile%': 1,
603 }],
[email protected]10bb8c92009-08-07 21:16:03604 # Don't do incremental linking for large modules on 32-bit.
605 ['MSVS_OS_BITS==32', {
606 'msvs_large_module_debug_link_mode%': '1', # No
607 },{
608 'msvs_large_module_debug_link_mode%': '2', # Yes
609 }],
[email protected]3e2648a2011-03-21 20:58:50610 ['MSVS_VERSION=="2010e" or MSVS_VERSION=="2008e" or MSVS_VERSION=="2005e"', {
611 'msvs_express%': 1,
612 'secure_atl%': 0,
613 },{
614 'msvs_express%': 0,
615 'secure_atl%': 1,
616 }],
[email protected]912c55c2009-07-31 23:33:55617 ],
[email protected]ef4fa4072009-12-04 22:46:50618 'nacl_win64_defines': [
619 # This flag is used to minimize dependencies when building
620 # Native Client loader for 64-bit Windows.
621 'NACL_WIN64',
622 ],
[email protected]912c55c2009-07-31 23:33:55623 }],
[email protected]bb6aba32011-01-07 19:04:43624
[email protected]79e2336c2011-05-12 18:18:34625 ['os_posix==1 and chromeos==0 and target_arch!="arm"', {
[email protected]8e553f42010-10-25 20:05:44626 'use_cups%': 1,
627 }, {
628 'use_cups%': 0,
629 }],
[email protected]bb6aba32011-01-07 19:04:43630
[email protected]19fe8f0b2010-12-07 07:27:27631 # Set the relative path from this file to the GYP file of the JPEG
632 # library used by Chromium.
633 ['use_libjpeg_turbo==1', {
634 'libjpeg_gyp_path': '../third_party/libjpeg_turbo/libjpeg.gyp',
635 }, {
636 'libjpeg_gyp_path': '../third_party/libjpeg/libjpeg.gyp',
637 }], # use_libjpeg_turbo==1
[email protected]bb6aba32011-01-07 19:04:43638
[email protected]abcc9ac2011-05-16 20:04:35639 # Options controlling the use of GConf (the classic GNOME configuration
640 # system) and GIO, which contains GSettings (the new GNOME config system).
[email protected]1c6fe29302011-01-20 22:14:31641 ['chromeos==1', {
642 'use_gconf%': 0,
[email protected]abcc9ac2011-05-16 20:04:35643 'use_gio%': 0,
[email protected]1c6fe29302011-01-20 22:14:31644 }, {
645 'use_gconf%': 1,
[email protected]abcc9ac2011-05-16 20:04:35646 'use_gio%': 1,
[email protected]1c6fe29302011-01-20 22:14:31647 }],
648
[email protected]4de39f82011-03-28 12:01:29649 # Set up -D and -E flags passed into grit.
[email protected]1660bffd2011-03-23 16:24:29650 ['branding=="Chrome"', {
651 # TODO(mmoss) The .grd files look for _google_chrome, but for
652 # consistency they should look for google_chrome_build like C++.
[email protected]4de39f82011-03-28 12:01:29653 'grit_defines': ['-D', '_google_chrome',
654 '-E', 'CHROMIUM_BUILD=google_chrome'],
[email protected]1660bffd2011-03-23 16:24:29655 }, {
[email protected]4de39f82011-03-28 12:01:29656 'grit_defines': ['-D', '_chromium',
657 '-E', 'CHROMIUM_BUILD=chromium'],
[email protected]1660bffd2011-03-23 16:24:29658 }],
[email protected]bb6aba32011-01-07 19:04:43659 ['chromeos==1', {
660 'grit_defines': ['-D', 'chromeos'],
661 }],
662 ['toolkit_views==1', {
663 'grit_defines': ['-D', 'toolkit_views'],
664 }],
[email protected]fd88a8842011-09-13 02:50:22665 ['use_only_pure_views==1', {
666 'grit_defines': ['-D', 'use_only_pure_views'],
[email protected]1b546692011-06-30 18:22:30667 }],
[email protected]bb6aba32011-01-07 19:04:43668 ['touchui==1', {
669 'grit_defines': ['-D', 'touchui'],
670 }],
[email protected]4c9ee222011-08-17 19:51:35671 ['webui_dialogs==1', {
672 'grit_defines': ['-D', 'webui_dialogs'],
[email protected]8ebc9b42011-07-14 15:22:18673 }],
[email protected]e47c32032011-03-01 19:26:20674 ['file_manager_extension==1', {
675 'grit_defines': ['-D', 'file_manager_extension'],
676 }],
[email protected]8b2e9f392011-08-05 04:00:47677 ['webui_task_manager==1', {
678 'grit_defines': ['-D', 'webui_task_manager'],
679 }],
[email protected]9a425422011-01-11 00:53:18680 ['remoting==1', {
681 'grit_defines': ['-D', 'remoting'],
682 }],
[email protected]bb6aba32011-01-07 19:04:43683 ['use_titlecase_in_grd_files==1', {
684 'grit_defines': ['-D', 'use_titlecase'],
685 }],
[email protected]00dc155832011-02-01 18:51:19686 ['use_third_party_translations==1', {
687 'grit_defines': ['-D', 'use_third_party_translations'],
[email protected]fb6c1022011-06-27 21:58:12688 'locales': [
[email protected]8581e1ba2011-08-22 23:27:16689 'ast', 'bs', 'ca@valencia', 'en-AU', 'eo', 'eu', 'gl', 'hy', 'ia',
690 'ka', 'ku', 'kw', 'ms', 'ug'
[email protected]fb6c1022011-06-27 21:58:12691 ],
[email protected]00dc155832011-02-01 18:51:19692 }],
[email protected]5d451ad2011-02-11 16:43:46693
694 ['clang_use_chrome_plugins==1', {
695 'clang_chrome_plugins_flags':
696 '<!(<(DEPTH)/tools/clang/scripts/plugin_flags.sh)',
697 }],
[email protected]cfa2e1102011-04-27 22:30:23698
[email protected]452da69e2011-05-24 02:36:05699 # Set use_ibus to 1 to enable ibus support.
[email protected]cfa2e1102011-04-27 22:30:23700 ['touchui==1 and chromeos==1', {
701 'use_ibus%': 1,
702 }, {
703 'use_ibus%': 0,
[email protected]365dd5b92011-05-26 01:30:56704 }],
705
706 ['enable_register_protocol_handler==1', {
707 'grit_defines': ['-D', 'enable_register_protocol_handler'],
708 }],
[email protected]92799b632011-08-15 14:33:06709
[email protected]41ed4e82011-08-25 23:02:07710 ['enable_web_intents==1', {
711 'grit_defines': ['-D', 'enable_web_intents'],
712 }],
713
[email protected]92799b632011-08-15 14:33:06714 ['asan==1', {
715 'clang%': 1,
716 }],
[email protected]912c55c2009-07-31 23:33:55717 ],
[email protected]2f80c312009-02-25 21:26:55718 },
719 'target_defaults': {
[email protected]1c966092009-08-20 21:19:26720 'variables': {
[email protected]a6e22132010-02-10 20:43:18721 # The condition that operates on chromium_code is in a target_conditions
722 # section, and will not have access to the default fallback value of
723 # chromium_code at the top of this file, or to the chromium_code
724 # variable placed at the root variables scope of .gyp files, because
725 # those variables are not set at target scope. As a workaround,
726 # if chromium_code is not set at target scope, define it in target scope
727 # to contain whatever value it has during early variable expansion.
728 # That's enough to make it available during target conditional
729 # processing.
730 'chromium_code%': '<(chromium_code)',
731
[email protected]7e0d664a2009-12-03 21:07:47732 # See http://gcc.gnu.org/onlinedocs/gcc-4.4.2/gcc/Optimize-Options.html
[email protected]d5d593a2009-08-28 23:23:29733 'mac_release_optimization%': '3', # Use -O3 unless overridden
[email protected]ffd984b12009-09-11 19:37:00734 'mac_debug_optimization%': '0', # Use -O0 unless overridden
[email protected]7e0d664a2009-12-03 21:07:47735 # See http://msdn.microsoft.com/en-us/library/aa652360(VS.71).aspx
736 'win_release_Optimization%': '2', # 2 = /Os
737 'win_debug_Optimization%': '0', # 0 = /Od
[email protected]6b0507b2010-05-07 07:41:21738 # See http://msdn.microsoft.com/en-us/library/8wtf2dfz(VS.71).aspx
739 'win_debug_RuntimeChecks%': '3', # 3 = all checks enabled, 0 = off
740 # See http://msdn.microsoft.com/en-us/library/47238hez(VS.71).aspx
[email protected]2ae6e022010-05-07 13:19:15741 'win_debug_InlineFunctionExpansion%': '', # empty = default, 0 = off,
742 'win_release_InlineFunctionExpansion%': '2', # 1 = only __inline, 2 = max
[email protected]fac10d12010-11-08 16:00:31743 # VS inserts quite a lot of extra checks to algorithms like
744 # std::partial_sort in Debug build which make them O(N^2)
745 # instead of O(N*logN). This is particularly slow under memory
746 # tools like ThreadSanitizer so we want it to be disablable.
747 # See http://msdn.microsoft.com/en-us/library/aa985982(v=VS.80).aspx
748 'win_debug_disable_iterator_debugging%': '0',
[email protected]7e0d664a2009-12-03 21:07:47749
[email protected]ffd984b12009-09-11 19:37:00750 'release_extra_cflags%': '',
751 'debug_extra_cflags%': '',
[email protected]92822e82009-09-18 14:26:56752 'release_valgrind_build%': 0,
[email protected]8974e042010-06-21 18:06:52753
754 'conditions': [
755 ['OS=="win" and component=="shared_library"', {
756 # See http://msdn.microsoft.com/en-us/library/aa652367.aspx
757 'win_release_RuntimeLibrary%': '2', # 2 = /MT (nondebug DLL)
758 'win_debug_RuntimeLibrary%': '3', # 3 = /MTd (debug DLL)
759 }, {
760 # See http://msdn.microsoft.com/en-us/library/aa652367.aspx
761 'win_release_RuntimeLibrary%': '0', # 0 = /MT (nondebug static)
762 'win_debug_RuntimeLibrary%': '1', # 1 = /MTd (debug static)
763 }],
764 ],
[email protected]1c966092009-08-20 21:19:26765 },
[email protected]32aa8cc2009-03-04 21:36:39766 'conditions': [
767 ['branding=="Chrome"', {
768 'defines': ['GOOGLE_CHROME_BUILD'],
769 }, { # else: branding!="Chrome"
770 'defines': ['CHROMIUM_BUILD'],
771 }],
[email protected]63e39a282011-07-13 20:41:28772 ['component=="shared_library"', {
773 'defines': ['COMPONENT_BUILD'],
774 }],
[email protected]06c756182010-04-27 18:31:31775 ['toolkit_views==1', {
[email protected]e6970232009-05-12 23:51:17776 'defines': ['TOOLKIT_VIEWS=1'],
777 }],
[email protected]fd88a8842011-09-13 02:50:22778 ['use_only_pure_views==1', {
779 'defines': ['USE_ONLY_PURE_VIEWS=1'],
[email protected]1b546692011-06-30 18:22:30780 }],
[email protected]9c8a1982011-05-24 23:08:58781 ['views_compositor==1', {
[email protected]c3870f42011-06-10 16:43:27782 'defines': ['VIEWS_COMPOSITOR=1'],
[email protected]9c8a1982011-05-24 23:08:58783 }],
[email protected]41423092011-08-25 15:39:58784 ['use_aura==1', {
785 'defines': ['USE_AURA=1'],
[email protected]e599f0132011-08-24 19:03:35786 }],
[email protected]fdc5bed2010-01-09 01:16:57787 ['chromeos==1', {
[email protected]16779842009-07-08 23:45:29788 'defines': ['OS_CHROMEOS=1'],
[email protected]2b883b92009-06-02 22:57:50789 }],
[email protected]0094fbe2010-07-15 21:51:43790 ['touchui==1', {
791 'defines': ['TOUCH_UI=1'],
792 }],
[email protected]236754a2011-07-28 17:38:23793 ['use_wayland==1', {
794 'defines': ['USE_WAYLAND=1', 'WL_EGL_PLATFORM=1'],
795 }],
[email protected]e47c32032011-03-01 19:26:20796 ['file_manager_extension==1', {
797 'defines': ['FILE_MANAGER_EXTENSION=1'],
798 }],
[email protected]8b2e9f392011-08-05 04:00:47799 ['webui_task_manager==1', {
800 'defines': ['WEBUI_TASK_MANAGER=1'],
801 }],
[email protected]7664ab32011-02-01 23:35:25802 ['profiling==1', {
803 'defines': ['ENABLE_PROFILING=1'],
804 }],
[email protected]93b373502011-08-16 19:06:22805 ['OS=="linux" and glibcxx_debug==1', {
806 'defines': ['_GLIBCXX_DEBUG=1',],
807 'cflags_cc!': ['-fno-rtti'],
808 'cflags_cc+': ['-frtti', '-g'],
809 }],
[email protected]542bf24a2010-06-11 23:08:17810 ['remoting==1', {
811 'defines': ['ENABLE_REMOTING=1'],
[email protected]c0bac532010-06-11 00:39:00812 }],
[email protected]5834f4392011-09-13 20:06:17813 ['use_threaded_compositing==1', {
814 'defines': ['WTF_USE_THREADED_COMPOSITING'],
815 }],
[email protected]a026daa2011-04-20 15:49:51816 ['p2p_apis==1', {
817 'defines': ['ENABLE_P2P_APIS=1'],
818 }],
[email protected]d01120e62010-05-10 17:04:48819 ['proprietary_codecs==1', {
820 'defines': ['USE_PROPRIETARY_CODECS'],
821 }],
[email protected]1b4209f2011-01-07 00:25:40822 ['enable_flapper_hacks==1', {
823 'defines': ['ENABLE_FLAPPER_HACKS=1'],
824 }],
[email protected]f31e2e52011-07-14 16:01:19825 ['configuration_policy==1', {
826 'defines': ['ENABLE_CONFIGURATION_POLICY'],
827 }],
[email protected]9c1949e2009-10-02 19:59:54828 ['fastbuild!=0', {
[email protected]5834f4392011-09-13 20:06:17829
[email protected]9c1949e2009-10-02 19:59:54830 'conditions': [
[email protected]1cc2fa72010-07-03 08:49:24831 # For Windows, we don't genererate debug information.
[email protected]9c1949e2009-10-02 19:59:54832 ['OS=="win"', {
833 'msvs_settings': {
834 'VCLinkerTool': {
835 'GenerateDebugInformation': 'false',
836 },
837 'VCCLCompilerTool': {
838 'DebugInformationFormat': '0',
839 }
840 }
[email protected]1cc2fa72010-07-03 08:49:24841 }, { # else: OS != "win", generate less debug information.
842 'variables': {
843 'debug_extra_cflags': '-g1',
844 },
[email protected]37c84192010-04-14 21:37:40845 }],
[email protected]aecc4d12011-01-19 05:32:33846 # Clang creates chubby debug information, which makes linking very
847 # slow. For now, don't create debug information with clang. See
848 # http://crbug.com/70000
849 ['OS=="linux" and clang==1', {
850 'variables': {
851 'debug_extra_cflags': '-g0',
852 },
853 }],
[email protected]9c1949e2009-10-02 19:59:54854 ], # conditions for fastbuild.
855 }], # fastbuild!=0
[email protected]ad6d2c42009-09-15 20:13:38856 ['selinux==1', {
857 'defines': ['CHROMIUM_SELINUX=1'],
858 }],
[email protected]7e0d664a2009-12-03 21:07:47859 ['win_use_allocator_shim==0', {
860 'conditions': [
861 ['OS=="win"', {
862 'defines': ['NO_TCMALLOC'],
863 }],
864 ],
865 }],
[email protected]43f28f832010-02-03 02:28:48866 ['enable_gpu==1', {
[email protected]7477ea6f2009-12-22 23:28:15867 'defines': [
868 'ENABLE_GPU=1',
869 ],
870 }],
[email protected]b1c2a5542010-10-08 12:44:40871 ['use_openssl==1', {
872 'defines': [
873 'USE_OPENSSL=1',
874 ],
875 }],
[email protected]ed154592010-04-29 00:18:50876 ['enable_eglimage==1', {
877 'defines': [
878 'ENABLE_EGLIMAGE=1',
879 ],
880 }],
[email protected]7d7564a12011-06-21 19:20:22881 ['use_skia==1', {
882 'defines': [
883 'USE_SKIA=1',
884 ],
885 }],
[email protected]f5ecbba12009-04-03 04:35:18886 ['coverage!=0', {
887 'conditions': [
888 ['OS=="mac"', {
889 'xcode_settings': {
[email protected]ab2956372009-08-13 18:11:04890 'GCC_INSTRUMENT_PROGRAM_FLOW_ARCS': 'YES', # -fprofile-arcs
891 'GCC_GENERATE_TEST_COVERAGE_FILES': 'YES', # -ftest-coverage
[email protected]5ae4f55e2009-04-13 23:19:47892 },
[email protected]e4fb84c2009-12-28 20:45:43893 # Add -lgcov for types executable, shared_library, and
[email protected]dc259ce52010-04-13 04:03:10894 # loadable_module; not for static_library.
[email protected]e4fb84c2009-12-28 20:45:43895 # This is a delayed conditional.
[email protected]f5ecbba12009-04-03 04:35:18896 'target_conditions': [
[email protected]e4fb84c2009-12-28 20:45:43897 ['_type!="static_library"', {
[email protected]f5ecbba12009-04-03 04:35:18898 'xcode_settings': { 'OTHER_LDFLAGS': [ '-lgcov' ] },
[email protected]5ae4f55e2009-04-13 23:19:47899 }],
900 ],
901 }],
[email protected]f5ecbba12009-04-03 04:35:18902 ['OS=="linux"', {
903 'cflags': [ '-ftest-coverage',
904 '-fprofile-arcs' ],
[email protected]7122ffd52009-04-30 23:19:00905 'link_settings': { 'libraries': [ '-lgcov' ] },
[email protected]f5ecbba12009-04-03 04:35:18906 }],
[email protected]e8f6ff42009-07-07 18:20:53907 # Finally, for Windows, we simply turn on profiling.
908 ['OS=="win"', {
909 'msvs_settings': {
910 'VCLinkerTool': {
911 'Profile': 'true',
912 },
[email protected]10bb8c92009-08-07 21:16:03913 'VCCLCompilerTool': {
[email protected]e8f6ff42009-07-07 18:20:53914 # /Z7, not /Zi, so coverage is happyb
915 'DebugInformationFormat': '1',
[email protected]1f9471a2010-01-04 06:40:16916 'AdditionalOptions': ['/Yd'],
[email protected]e8f6ff42009-07-07 18:20:53917 }
918 }
919 }], # OS==win
920 ], # conditions for coverage
921 }], # coverage!=0
[email protected]4e4d6042010-08-26 18:34:38922 ['OS=="win"', {
923 'defines': [
924 '__STD_C',
925 '_CRT_SECURE_NO_DEPRECATE',
926 '_SCL_SECURE_NO_DEPRECATE',
927 ],
928 'include_dirs': [
929 '<(DEPTH)/third_party/wtl/include',
930 ],
931 }], # OS==win
[email protected]365dd5b92011-05-26 01:30:56932 ['enable_register_protocol_handler==1', {
933 'defines': [
[email protected]06bba4fb2011-06-09 05:17:19934 'ENABLE_REGISTER_PROTOCOL_HANDLER=1',
[email protected]365dd5b92011-05-26 01:30:56935 ],
936 }],
[email protected]41ed4e82011-08-25 23:02:07937 ['enable_web_intents==1', {
938 'defines': [
939 'ENABLE_INTENTS=1',
940 ],
941 }],
[email protected]a6e22132010-02-10 20:43:18942 ], # conditions for 'target_defaults'
943 'target_conditions': [
[email protected]c14d8e772010-02-09 22:06:15944 ['chromium_code==0', {
[email protected]d8543312010-02-10 17:43:28945 'conditions': [
[email protected]79e2336c2011-05-12 18:18:34946 [ 'os_posix==1 and OS!="mac"', {
[email protected]c0a6b272011-02-09 22:32:33947 # We don't want to get warnings from third-party code,
948 # so remove any existing warning-enabling flags like -Wall.
[email protected]d8543312010-02-10 17:43:28949 'cflags!': [
950 '-Wall',
951 '-Wextra',
952 '-Werror',
953 ],
[email protected]ec1d155be2011-02-08 22:19:00954 'cflags': [
955 # Don't warn about hash_map in third-party code.
956 '-Wno-deprecated',
[email protected]c0a6b272011-02-09 22:32:33957 # Don't warn about printf format problems.
958 # This is off by default in gcc but on in Ubuntu's gcc(!).
[email protected]ec392872011-02-10 22:38:22959 '-Wno-format',
[email protected]ec1d155be2011-02-08 22:19:00960 ],
[email protected]d16bd642011-07-25 23:59:18961 'cflags_cc!': [
962 # TODO(fischman): remove this.
963 # http://code.google.com/p/chromium/issues/detail?id=90453
964 '-Wsign-compare',
965 ]
[email protected]d8543312010-02-10 17:43:28966 }],
[email protected]6e4451892011-07-27 10:32:11967 [ 'os_posix==1 and OS!="mac" and chromeos==0', {
968 'cflags': [
969 # Don't warn about ignoring the return value from e.g. close().
970 # This is off by default in some gccs but on by default in others.
971 # Currently this option is not set for Chrome OS build because
972 # the current version of gcc (4.3.4) used for building Chrome in
973 # Chrome OS chroot doesn't support this option.
974 # TODO(mazda): remove the conditional for Chrome OS when gcc
975 # version is upgraded.
976 '-Wno-unused-result',
977 ],
978 }],
[email protected]d8543312010-02-10 17:43:28979 [ 'OS=="win"', {
980 'defines': [
981 '_CRT_SECURE_NO_DEPRECATE',
982 '_CRT_NONSTDC_NO_WARNINGS',
983 '_CRT_NONSTDC_NO_DEPRECATE',
984 '_SCL_SECURE_NO_DEPRECATE',
985 ],
986 'msvs_disabled_warnings': [4800],
987 'msvs_settings': {
988 'VCCLCompilerTool': {
[email protected]942c3a60f2011-05-03 02:04:11989 'WarningLevel': '3',
990 'WarnAsError': 'false', # TODO(maruel): Enable it.
[email protected]d8543312010-02-10 17:43:28991 'Detect64BitPortabilityProblems': 'false',
992 },
993 },
994 }],
[email protected]ea47b6a2011-07-17 19:39:42995 # TODO(darin): Unfortunately, some third_party code depends on base/
996 [ 'OS=="win" and component=="shared_library"', {
997 'msvs_disabled_warnings': [
998 4251, # class 'std::xx' needs to have dll-interface.
999 ],
1000 }],
[email protected]d8543312010-02-10 17:43:281001 [ 'OS=="mac"', {
1002 'xcode_settings': {
1003 'GCC_TREAT_WARNINGS_AS_ERRORS': 'NO',
[email protected]4c4c2e5332010-06-15 11:51:061004 'WARNING_CFLAGS!': ['-Wall', '-Wextra'],
[email protected]d8543312010-02-10 17:43:281005 },
1006 }],
[email protected]c14d8e772010-02-09 22:06:151007 ],
1008 }, {
1009 # In Chromium code, we define __STDC_FORMAT_MACROS in order to get the
1010 # C99 macros on Mac and Linux.
1011 'defines': [
1012 '__STDC_FORMAT_MACROS',
1013 ],
1014 'conditions': [
1015 ['OS!="win"', {
[email protected]40519592010-11-16 15:23:301016 'sources/': [ ['exclude', '_win(_unittest)?\\.(h|cc)$'],
[email protected]a316ca532010-11-15 14:08:161017 ['exclude', '(^|/)win/'],
[email protected]40519592010-11-16 15:23:301018 ['exclude', '(^|/)win_[^/]*\\.(h|cc)$'] ],
[email protected]c14d8e772010-02-09 22:06:151019 }],
1020 ['OS!="mac"', {
[email protected]40519592010-11-16 15:23:301021 'sources/': [ ['exclude', '_(cocoa|mac)(_unittest)?\\.(h|cc)$'],
[email protected]a316ca532010-11-15 14:08:161022 ['exclude', '(^|/)(cocoa|mac)/'],
1023 ['exclude', '\\.mm?$' ] ],
[email protected]c14d8e772010-02-09 22:06:151024 }],
[email protected]79e2336c2011-05-12 18:18:341025 ['toolkit_uses_gtk!=1', {
[email protected]c14d8e772010-02-09 22:06:151026 'sources/': [
[email protected]40519592010-11-16 15:23:301027 ['exclude', '_(chromeos|gtk|x|x11|xdg)(_unittest)?\\.(h|cc)$'],
[email protected]a316ca532010-11-15 14:08:161028 ['exclude', '(^|/)gtk/'],
[email protected]40519592010-11-16 15:23:301029 ['exclude', '(^|/)(gtk|x11)_[^/]*\\.(h|cc)$'],
[email protected]18cff3d2010-02-17 18:03:131030 ],
1031 }],
[email protected]f1b2cd02011-08-10 16:50:441032 ['use_wayland!=1', {
1033 'sources/': [
1034 ['exclude', '_(wayland)(_unittest)?\\.(h|cc)$'],
1035 ['exclude', '(^|/)wayland/'],
1036 ['exclude', '(^|/)(wayland)_[^/]*\\.(h|cc)$'],
1037 ],
1038 }],
[email protected]18cff3d2010-02-17 18:03:131039 ['OS!="linux"', {
1040 'sources/': [
[email protected]40519592010-11-16 15:23:301041 ['exclude', '_linux(_unittest)?\\.(h|cc)$'],
[email protected]a316ca532010-11-15 14:08:161042 ['exclude', '(^|/)linux/'],
[email protected]18cff3d2010-02-17 18:03:131043 ],
[email protected]c14d8e772010-02-09 22:06:151044 }],
[email protected]f98d7b92011-09-09 10:17:351045 ['OS!="android"', {
1046 'sources/': [
1047 ['exclude', '_android(_unittest)?\\.cc$'],
1048 ['exclude', '(^|/)android/'],
1049 ],
1050 }],
[email protected]c14d8e772010-02-09 22:06:151051 # We use "POSIX" to refer to all non-Windows operating systems.
1052 ['OS=="win"', {
[email protected]40519592010-11-16 15:23:301053 'sources/': [ ['exclude', '_posix\\.(h|cc)$'] ],
[email protected]f55bd4862010-05-27 15:38:071054 # turn on warnings for signed/unsigned mismatch on chromium code.
1055 'msvs_settings': {
1056 'VCCLCompilerTool': {
1057 'AdditionalOptions': ['/we4389'],
1058 },
1059 },
[email protected]c14d8e772010-02-09 22:06:151060 }],
[email protected]63e39a282011-07-13 20:41:281061 ['OS=="win" and component=="shared_library"', {
1062 'msvs_disabled_warnings': [
1063 4251, # class 'std::xx' needs to have dll-interface.
1064 ],
1065 }],
[email protected]c14d8e772010-02-09 22:06:151066 ['chromeos!=1', {
[email protected]40519592010-11-16 15:23:301067 'sources/': [ ['exclude', '_chromeos\\.(h|cc)$'] ]
[email protected]c14d8e772010-02-09 22:06:151068 }],
[email protected]06c756182010-04-27 18:31:311069 ['toolkit_views==0', {
[email protected]40519592010-11-16 15:23:301070 'sources/': [ ['exclude', '_views\\.(h|cc)$'] ]
[email protected]c14d8e772010-02-09 22:06:151071 }],
[email protected]41423092011-08-25 15:39:581072 ['use_aura==0', {
1073 'sources/': [ ['exclude', '_aura\\.(h|cc)$'] ]
1074 }],
[email protected]c14d8e772010-02-09 22:06:151075 ],
1076 }],
[email protected]a6e22132010-02-10 20:43:181077 ], # target_conditions for 'target_defaults'
[email protected]2f80c312009-02-25 21:26:551078 'default_configuration': 'Debug',
1079 'configurations': {
[email protected]5153767c2009-12-22 01:52:501080 # VCLinkerTool LinkIncremental values below:
1081 # 0 == default
1082 # 1 == /INCREMENTAL:NO
1083 # 2 == /INCREMENTAL
1084 # Debug links incremental, Release does not.
1085 #
[email protected]7b99801e2010-11-03 17:26:231086 # Abstract base configurations to cover common attributes.
[email protected]5153767c2009-12-22 01:52:501087 #
1088 'Common_Base': {
[email protected]bb05e452009-10-29 21:24:561089 'abstract': 1,
1090 'msvs_configuration_attributes': {
1091 'OutputDirectory': '$(SolutionDir)$(ConfigurationName)',
1092 'IntermediateDirectory': '$(OutDir)\\obj\\$(ProjectName)',
1093 'CharacterSet': '1',
1094 },
[email protected]5153767c2009-12-22 01:52:501095 },
1096 'x86_Base': {
1097 'abstract': 1,
[email protected]ef4fa4072009-12-04 22:46:501098 'msvs_settings': {
1099 'VCLinkerTool': {
1100 'TargetMachine': '1',
1101 },
1102 },
[email protected]2fa40782009-11-01 21:17:341103 'msvs_configuration_platform': 'Win32',
[email protected]bb05e452009-10-29 21:24:561104 },
[email protected]5153767c2009-12-22 01:52:501105 'x64_Base': {
1106 'abstract': 1,
1107 'msvs_configuration_platform': 'x64',
1108 'msvs_settings': {
1109 'VCLinkerTool': {
1110 'TargetMachine': '17', # x86 - 64
[email protected]5153767c2009-12-22 01:52:501111 'AdditionalLibraryDirectories!':
1112 ['<(DEPTH)/third_party/platformsdk_win7/files/Lib'],
1113 'AdditionalLibraryDirectories':
1114 ['<(DEPTH)/third_party/platformsdk_win7/files/Lib/x64'],
1115 },
[email protected]d26b4418ab2010-03-24 22:06:351116 'VCLibrarianTool': {
[email protected]5153767c2009-12-22 01:52:501117 'AdditionalLibraryDirectories!':
1118 ['<(DEPTH)/third_party/platformsdk_win7/files/Lib'],
1119 'AdditionalLibraryDirectories':
1120 ['<(DEPTH)/third_party/platformsdk_win7/files/Lib/x64'],
1121 },
1122 },
1123 'defines': [
1124 # Not sure if tcmalloc works on 64-bit Windows.
1125 'NO_TCMALLOC',
1126 ],
1127 },
1128 'Debug_Base': {
1129 'abstract': 1,
[email protected]14339762011-04-05 07:36:581130 'defines': [
1131 'DYNAMIC_ANNOTATIONS_ENABLED=1',
1132 'WTF_USE_DYNAMIC_ANNOTATIONS=1',
1133 ],
[email protected]1c966092009-08-20 21:19:261134 'xcode_settings': {
1135 'COPY_PHASE_STRIP': 'NO',
[email protected]d5d593a2009-08-28 23:23:291136 'GCC_OPTIMIZATION_LEVEL': '<(mac_debug_optimization)',
[email protected]a68c29a2011-07-01 16:23:491137 'OTHER_CFLAGS': [
[email protected]a68c29a2011-07-01 16:23:491138 '<@(debug_extra_cflags)',
1139 ],
[email protected]1c966092009-08-20 21:19:261140 },
[email protected]bb05e452009-10-29 21:24:561141 'msvs_settings': {
1142 'VCCLCompilerTool': {
[email protected]7e0d664a2009-12-03 21:07:471143 'Optimization': '<(win_debug_Optimization)',
[email protected]bb05e452009-10-29 21:24:561144 'PreprocessorDefinitions': ['_DEBUG'],
[email protected]6b0507b2010-05-07 07:41:211145 'BasicRuntimeChecks': '<(win_debug_RuntimeChecks)',
[email protected]7e0d664a2009-12-03 21:07:471146 'RuntimeLibrary': '<(win_debug_RuntimeLibrary)',
[email protected]2ae6e022010-05-07 13:19:151147 'conditions': [
1148 # According to MSVS, InlineFunctionExpansion=0 means
1149 # "default inlining", not "/Ob0".
1150 # Thus, we have to handle InlineFunctionExpansion==0 separately.
1151 ['win_debug_InlineFunctionExpansion==0', {
1152 'AdditionalOptions': ['/Ob0'],
1153 }],
1154 ['win_debug_InlineFunctionExpansion!=""', {
1155 'InlineFunctionExpansion':
1156 '<(win_debug_InlineFunctionExpansion)',
1157 }],
[email protected]fac10d12010-11-08 16:00:311158 ['win_debug_disable_iterator_debugging==1', {
1159 'PreprocessorDefinitions': ['_HAS_ITERATOR_DEBUGGING=0'],
1160 }],
[email protected]2ae6e022010-05-07 13:19:151161 ],
[email protected]bb05e452009-10-29 21:24:561162 },
1163 'VCLinkerTool': {
1164 'LinkIncremental': '<(msvs_debug_link_incremental)',
[email protected]646f6b42011-07-14 13:57:021165 # ASLR makes debugging with windbg difficult because Chrome.exe and
1166 # Chrome.dll share the same base name. As result, windbg will
1167 # name the Chrome.dll module like chrome_<base address>, where
1168 # <base address> typically changes with each launch. This in turn
1169 # means that breakpoints in Chrome.dll don't stick from one launch
1170 # to the next. For this reason, we turn ASLR off in debug builds.
1171 # Note that this is a three-way bool, where 0 means to pick up
1172 # the default setting, 1 is off and 2 is on.
1173 'RandomizedBaseAddress': 1,
[email protected]bb05e452009-10-29 21:24:561174 },
1175 'VCResourceCompilerTool': {
1176 'PreprocessorDefinitions': ['_DEBUG'],
1177 },
1178 },
[email protected]2f80c312009-02-25 21:26:551179 'conditions': [
[email protected]bb05e452009-10-29 21:24:561180 ['OS=="linux"', {
1181 'cflags': [
1182 '<@(debug_extra_cflags)',
1183 ],
[email protected]2f80c312009-02-25 21:26:551184 }],
[email protected]56cca4e2011-07-01 21:33:351185 ['release_valgrind_build==0', {
1186 'xcode_settings': {
1187 'OTHER_CFLAGS': [
1188 '-fstack-protector-all', # Implies -fstack-protector
1189 ],
1190 },
1191 }],
[email protected]2f80c312009-02-25 21:26:551192 ],
1193 },
[email protected]5153767c2009-12-22 01:52:501194 'Release_Base': {
1195 'abstract': 1,
[email protected]2f80c312009-02-25 21:26:551196 'defines': [
1197 'NDEBUG',
1198 ],
[email protected]1c966092009-08-20 21:19:261199 'xcode_settings': {
1200 'DEAD_CODE_STRIPPING': 'YES', # -Wl,-dead_strip
1201 'GCC_OPTIMIZATION_LEVEL': '<(mac_release_optimization)',
[email protected]ffd984b12009-09-11 19:37:001202 'OTHER_CFLAGS': [ '<@(release_extra_cflags)', ],
[email protected]1c966092009-08-20 21:19:261203 },
[email protected]bb05e452009-10-29 21:24:561204 'msvs_settings': {
[email protected]7e0d664a2009-12-03 21:07:471205 'VCCLCompilerTool': {
1206 'Optimization': '<(win_release_Optimization)',
1207 'RuntimeLibrary': '<(win_release_RuntimeLibrary)',
[email protected]2ae6e022010-05-07 13:19:151208 'conditions': [
1209 # According to MSVS, InlineFunctionExpansion=0 means
1210 # "default inlining", not "/Ob0".
1211 # Thus, we have to handle InlineFunctionExpansion==0 separately.
1212 ['win_release_InlineFunctionExpansion==0', {
1213 'AdditionalOptions': ['/Ob0'],
1214 }],
1215 ['win_release_InlineFunctionExpansion!=""', {
1216 'InlineFunctionExpansion':
1217 '<(win_release_InlineFunctionExpansion)',
1218 }],
1219 ],
[email protected]7e0d664a2009-12-03 21:07:471220 },
[email protected]bb05e452009-10-29 21:24:561221 'VCLinkerTool': {
[email protected]c059c612011-08-08 20:56:341222 # LinkIncremental is a tri-state boolean, where 0 means default
1223 # (i.e., inherit from parent solution), 1 means false, and
1224 # 2 means true.
[email protected]bb05e452009-10-29 21:24:561225 'LinkIncremental': '1',
[email protected]c059c612011-08-08 20:56:341226 # This corresponds to the /PROFILE flag which ensures the PDB
1227 # file contains FIXUP information (growing the PDB file by about
1228 # 5%) but does not otherwise alter the output binary. This
1229 # information is used by the Syzygy optimization tool when
1230 # decomposing the release image.
1231 'Profile': 'true',
[email protected]bb05e452009-10-29 21:24:561232 },
1233 },
[email protected]2f80c312009-02-25 21:26:551234 'conditions': [
[email protected]92822e82009-09-18 14:26:561235 ['release_valgrind_build==0', {
[email protected]14339762011-04-05 07:36:581236 'defines': [
1237 'NVALGRIND',
1238 'DYNAMIC_ANNOTATIONS_ENABLED=0',
1239 ],
[email protected]ee857512010-05-14 08:24:421240 }, {
[email protected]14339762011-04-05 07:36:581241 'defines': [
1242 'DYNAMIC_ANNOTATIONS_ENABLED=1',
1243 'WTF_USE_DYNAMIC_ANNOTATIONS=1',
1244 ],
[email protected]92822e82009-09-18 14:26:561245 }],
[email protected]7e0d664a2009-12-03 21:07:471246 ['win_use_allocator_shim==0', {
1247 'defines': ['NO_TCMALLOC'],
1248 }],
[email protected]bb05e452009-10-29 21:24:561249 ['OS=="linux"', {
1250 'cflags': [
[email protected]ffd984b12009-09-11 19:37:001251 '<@(release_extra_cflags)',
[email protected]bb05e452009-10-29 21:24:561252 ],
1253 }],
[email protected]2f80c312009-02-25 21:26:551254 ],
1255 },
[email protected]5153767c2009-12-22 01:52:501256 #
1257 # Concrete configurations
1258 #
1259 'Debug': {
1260 'inherit_from': ['Common_Base', 'x86_Base', 'Debug_Base'],
1261 },
1262 'Release': {
1263 'inherit_from': ['Common_Base', 'x86_Base', 'Release_Base'],
1264 'conditions': [
1265 ['msvs_use_common_release', {
[email protected]1f9471a2010-01-04 06:40:161266 'includes': ['release.gypi'],
[email protected]5153767c2009-12-22 01:52:501267 }],
1268 ]
1269 },
[email protected]f926fa0a2009-08-04 22:50:131270 'conditions': [
1271 [ 'OS=="win"', {
1272 # TODO(bradnelson): add a gyp mechanism to make this more graceful.
[email protected]ef4fa4072009-12-04 22:46:501273 'Debug_x64': {
[email protected]5153767c2009-12-22 01:52:501274 'inherit_from': ['Common_Base', 'x64_Base', 'Debug_Base'],
[email protected]78263c12009-11-01 23:45:301275 },
1276 'Release_x64': {
[email protected]5153767c2009-12-22 01:52:501277 'inherit_from': ['Common_Base', 'x64_Base', 'Release_Base'],
[email protected]78263c12009-11-01 23:45:301278 },
[email protected]f926fa0a2009-08-04 22:50:131279 }],
1280 ],
[email protected]2f80c312009-02-25 21:26:551281 },
1282 },
1283 'conditions': [
[email protected]79e2336c2011-05-12 18:18:341284 ['os_posix==1 and OS!="mac"', {
[email protected]9d384032009-03-20 23:13:261285 'target_defaults': {
[email protected]5315f2842009-04-28 00:43:271286 # Enable -Werror by default, but put it in a variable so it can
1287 # be disabled in ~/.gyp/include.gypi on the valgrind builders.
1288 'variables': {
[email protected]57e94022011-05-04 15:33:191289 # Use -fno-strict-aliasing, see http://crbug.com/32204
[email protected]ecf52cb82010-01-13 19:25:421290 'no_strict_aliasing%': 1,
[email protected]79e2336c2011-05-12 18:18:341291 'conditions': [
1292 ['OS=="linux"', {
1293 'werror%': '-Werror',
1294 }, { # turn off -Werror on other Unices
1295 'werror%': '',
1296 }],
[email protected]47deeb62009-12-17 14:49:391297 ],
[email protected]5315f2842009-04-28 00:43:271298 },
[email protected]9d384032009-03-20 23:13:261299 'cflags': [
[email protected]1bba09c2009-08-13 12:53:161300 '<(werror)', # See note above about the werror variable.
1301 '-pthread',
1302 '-fno-exceptions',
1303 '-Wall',
[email protected]0fa17082010-03-26 00:48:051304 # TODO(evan): turn this back on once all the builds work.
1305 # '-Wextra',
[email protected]225c8f52010-02-05 22:23:201306 # Don't warn about unused function params. We use those everywhere.
1307 '-Wno-unused-parameter',
1308 # Don't warn about the "struct foo f = {0};" initialization pattern.
1309 '-Wno-missing-field-initializers',
[email protected]1bba09c2009-08-13 12:53:161310 '-D_FILE_OFFSET_BITS=64',
[email protected]3df6e3a2010-01-21 20:23:121311 # Don't export any symbols (for example, to plugins we dlopen()).
1312 # Note: this is *required* to make some plugins work.
1313 '-fvisibility=hidden',
[email protected]7ca6ce12010-09-15 23:39:351314 '-pipe',
[email protected]8a2fcba2009-07-29 00:52:241315 ],
1316 'cflags_cc': [
[email protected]832d0212009-10-28 19:12:221317 '-fno-rtti',
[email protected]8a2fcba2009-07-29 00:52:241318 '-fno-threadsafe-statics',
[email protected]f5986c42009-11-17 18:39:361319 # Make inline functions have hidden visiblity by default.
1320 # Surprisingly, not covered by -fvisibility=hidden.
1321 '-fvisibility-inlines-hidden',
[email protected]554abd902011-07-25 04:03:171322 # GCC turns on -Wsign-compare for C++ under -Wall, but clang doesn't,
1323 # so we specify it explicitly.
1324 # TODO(fischman): remove this if http://llvm.org/PR10448 obsoletes it.
[email protected]d16bd642011-07-25 23:59:181325 # http://code.google.com/p/chromium/issues/detail?id=90453
[email protected]554abd902011-07-25 04:03:171326 '-Wsign-compare',
[email protected]9d384032009-03-20 23:13:261327 ],
[email protected]a6cf87e2009-04-03 04:07:381328 'ldflags': [
[email protected]138241f2010-03-30 23:53:101329 '-pthread', '-Wl,-z,noexecstack',
[email protected]9d384032009-03-20 23:13:261330 ],
[email protected]3aacaf952009-04-02 15:34:091331 'configurations': {
[email protected]5153767c2009-12-22 01:52:501332 'Debug_Base': {
[email protected]c5bdc032009-04-20 19:11:311333 'variables': {
1334 'debug_optimize%': '0',
1335 },
[email protected]3aacaf952009-04-02 15:34:091336 'defines': [
1337 '_DEBUG',
1338 ],
1339 'cflags': [
[email protected]9cb5cc702011-02-01 19:56:041340 '-O>(debug_optimize)',
[email protected]3aacaf952009-04-02 15:34:091341 '-g',
1342 ],
[email protected]5315f2842009-04-28 00:43:271343 },
[email protected]5153767c2009-12-22 01:52:501344 'Release_Base': {
[email protected]740e2de2009-07-21 11:41:011345 'variables': {
1346 'release_optimize%': '2',
[email protected]1dd529642010-05-15 01:02:511347 # Binaries become big and gold is unable to perform GC
1348 # and remove unused sections for some of test targets
1349 # on 32 bit platform.
1350 # (This is currently observed only in chromeos valgrind bots)
1351 # The following flag is to disable --gc-sections linker
1352 # option for these bots.
1353 'no_gc_sections%': 0,
[email protected]409dceef2011-05-10 19:49:121354
1355 # TODO(bradnelson): reexamine how this is done if we change the
1356 # expansion of configurations
1357 'release_valgrind_build%': 0,
[email protected]740e2de2009-07-21 11:41:011358 },
[email protected]3aacaf952009-04-02 15:34:091359 'cflags': [
[email protected]9cb5cc702011-02-01 19:56:041360 '-O>(release_optimize)',
[email protected]d8cc3a62009-04-08 18:29:531361 # Don't emit the GCC version ident directives, they just end up
1362 # in the .comment section taking up binary size.
1363 '-fno-ident',
1364 # Put data and code in their own sections, so that unused symbols
1365 # can be removed at link time with --gc-sections.
1366 '-fdata-sections',
1367 '-ffunction-sections',
[email protected]3aacaf952009-04-02 15:34:091368 ],
[email protected]c902f2c2010-08-06 20:04:181369 'ldflags': [
1370 # Specifically tell the linker to perform optimizations.
1371 # See http://lwn.net/Articles/192624/ .
1372 '-Wl,-O1',
[email protected]27c2e492010-08-06 22:55:221373 '-Wl,--as-needed',
[email protected]c902f2c2010-08-06 20:04:181374 ],
[email protected]1dd529642010-05-15 01:02:511375 'conditions' : [
1376 ['no_gc_sections==0', {
1377 'ldflags': [
1378 '-Wl,--gc-sections',
1379 ],
1380 }],
[email protected]ecf7b6482010-10-13 09:15:201381 ['clang==1', {
1382 'cflags!': [
1383 '-fno-ident',
1384 ],
1385 }],
[email protected]7664ab32011-02-01 23:35:251386 ['profiling==1', {
1387 'cflags': [
1388 '-fno-omit-frame-pointer',
1389 '-g',
1390 ],
1391 }],
[email protected]c75f33e42011-05-04 18:11:521392 # At gyp time, we test the linker for ICF support; this flag
1393 # is then provided to us by gyp. (Currently only gold supports
1394 # an --icf flag.)
[email protected]16d71b0d2011-06-22 00:43:531395 # There seems to be a conflict of --icf and -pie in gold which
1396 # can generate crashy binaries. As a security measure, -pie
1397 # takes precendence for now.
[email protected]409dceef2011-05-10 19:49:121398 ['LINKER_SUPPORTS_ICF==1 and release_valgrind_build==0', {
[email protected]f2fcf4df72011-06-03 20:05:461399 'target_conditions': [
1400 ['_toolset=="target"', {
1401 'ldflags': [
[email protected]16d71b0d2011-06-22 00:43:531402 #'-Wl,--icf=safe',
1403 '-Wl,--icf=none',
[email protected]f2fcf4df72011-06-03 20:05:461404 ]
1405 }]
[email protected]c75f33e42011-05-04 18:11:521406 ]
1407 }],
[email protected]1dd529642010-05-15 01:02:511408 ]
[email protected]3aacaf952009-04-02 15:34:091409 },
1410 },
[email protected]601b540222009-04-03 21:32:041411 'variants': {
1412 'coverage': {
1413 'cflags': ['-fprofile-arcs', '-ftest-coverage'],
1414 'ldflags': ['-fprofile-arcs'],
1415 },
1416 'profile': {
1417 'cflags': ['-pg', '-g'],
1418 'ldflags': ['-pg'],
1419 },
1420 'symbols': {
1421 'cflags': ['-g'],
1422 },
1423 },
[email protected]606116d22009-05-06 22:38:231424 'conditions': [
[email protected]04b482602011-09-14 02:36:211425 ['target_arch=="ia32"', {
1426 'target_conditions': [
1427 ['_toolset=="target"', {
1428 'asflags': [
1429 # Needed so that libs with .s files (e.g. libicudata.a)
1430 # are compatible with the general 32-bit-ness.
1431 '-32',
1432 ],
1433 # All floating-point computations on x87 happens in 80-bit
1434 # precision. Because the C and C++ language standards allow
1435 # the compiler to keep the floating-point values in higher
1436 # precision than what's specified in the source and doing so
1437 # is more efficient than constantly rounding up to 64-bit or
1438 # 32-bit precision as specified in the source, the compiler,
1439 # especially in the optimized mode, tries very hard to keep
1440 # values in x87 floating-point stack (in 80-bit precision)
1441 # as long as possible. This has important side effects, that
1442 # the real value used in computation may change depending on
1443 # how the compiler did the optimization - that is, the value
1444 # kept in 80-bit is different than the value rounded down to
1445 # 64-bit or 32-bit. There are possible compiler options to
1446 # make this behavior consistent (e.g. -ffloat-store would keep
1447 # all floating-values in the memory, thus force them to be
1448 # rounded to its original precision) but they have significant
1449 # runtime performance penalty.
1450 #
1451 # -mfpmath=sse -msse2 makes the compiler use SSE instructions
1452 # which keep floating-point values in SSE registers in its
1453 # native precision (32-bit for single precision, and 64-bit
1454 # for double precision values). This means the floating-point
1455 # value used during computation does not change depending on
1456 # how the compiler optimized the code, since the value is
1457 # always kept in its specified precision.
1458 'conditions': [
1459 ['branding=="Chromium" and disable_sse2==0', {
1460 'cflags': [
1461 '-march=pentium4',
1462 '-msse2',
1463 '-mfpmath=sse',
1464 ],
1465 }],
1466 # ChromeOS targets Pinetrail, which is sse3, but most of the
1467 # benefit comes from sse2 so this setting allows ChromeOS
1468 # to build on other CPUs. In the future -march=atom would
1469 # help but requires a newer compiler.
1470 ['chromeos==1 and disable_sse2==0', {
1471 'cflags': [
1472 '-msse2',
1473 ],
1474 }],
1475 # Install packages have started cropping up with
1476 # different headers between the 32-bit and 64-bit
1477 # versions, so we have to shadow those differences off
1478 # and make sure a 32-bit-on-64-bit build picks up the
1479 # right files.
1480 ['host_arch!="ia32"', {
1481 'include_dirs+': [
1482 '/usr/include32',
1483 ],
1484 }],
1485 ],
1486 # -mmmx allows mmintrin.h to be used for mmx intrinsics.
1487 # video playback is mmx and sse2 optimized.
[email protected]ffde7932009-05-29 00:39:061488 'cflags': [
[email protected]04b482602011-09-14 02:36:211489 '-m32',
1490 '-mmmx',
1491 ],
1492 'ldflags': [
1493 '-m32',
[email protected]ffde7932009-05-29 00:39:061494 ],
1495 }],
[email protected]606116d22009-05-06 22:38:231496 ],
1497 }],
[email protected]3dda8a962009-08-10 18:58:071498 ['target_arch=="arm"', {
[email protected]77c1b29392009-12-04 06:21:291499 'target_conditions': [
1500 ['_toolset=="target"', {
1501 'cflags_cc': [
1502 # The codesourcery arm-2009q3 toolchain warns at that the ABI
1503 # has changed whenever it encounters a varargs function. This
1504 # silences those warnings, as they are not helpful and
1505 # clutter legitimate warnings.
1506 '-Wno-abi',
1507 ],
1508 'conditions': [
1509 ['arm_thumb == 1', {
1510 'cflags': [
1511 '-mthumb',
[email protected]77c1b29392009-12-04 06:21:291512 ]
1513 }],
1514 ['armv7==1', {
[email protected]dc9711f2009-11-13 19:30:251515 'cflags': [
1516 '-march=armv7-a',
1517 '-mtune=cortex-a8',
[email protected]dc9711f2009-11-13 19:30:251518 '-mfloat-abi=softfp',
1519 ],
[email protected]eafc0b452010-02-26 21:53:431520 'conditions': [
1521 ['arm_neon==1', {
1522 'cflags': [ '-mfpu=neon', ],
1523 }, {
[email protected]53e0f642010-03-05 01:41:561524 'cflags': [ '-mfpu=<(arm_fpu)', ],
[email protected]eafc0b452010-02-26 21:53:431525 }]
1526 ],
[email protected]dc9711f2009-11-13 19:30:251527 }],
[email protected]3dda8a962009-08-10 18:58:071528 ],
1529 }],
1530 ],
1531 }],
[email protected]2fb843b2010-08-12 02:11:081532 ['linux_fpic==1', {
[email protected]c76723a2010-01-25 23:10:581533 'cflags': [
1534 '-fPIC',
1535 ],
1536 }],
[email protected]ee28c9f2009-09-04 01:53:011537 ['sysroot!=""', {
[email protected]fd36ce822009-10-28 20:13:571538 'target_conditions': [
1539 ['_toolset=="target"', {
1540 'cflags': [
1541 '--sysroot=<(sysroot)',
1542 ],
1543 'ldflags': [
1544 '--sysroot=<(sysroot)',
1545 ],
1546 }]]
[email protected]ee28c9f2009-09-04 01:53:011547 }],
[email protected]58680ce2010-09-18 00:09:151548 ['clang==1', {
[email protected]18ca15a2011-08-10 03:07:121549 'cflags': [
1550 '-Wheader-hygiene',
1551 # Clang spots more unused functions.
1552 '-Wno-unused-function',
1553 # Don't die on dtoa code that uses a char as an array index.
1554 '-Wno-char-subscripts',
[email protected]d6431722011-09-01 00:46:331555 # Especially needed for gtest macros using enum values from Mac
1556 # system headers.
1557 # TODO(pkasting): In C++11 this is legal, so this should be
1558 # removed when we change to that. (This is also why we don't
1559 # bother fixing all these cases today.)
[email protected]18ca15a2011-08-10 03:07:121560 '-Wno-unnamed-type-template-args',
1561 ],
1562 'cflags!': [
1563 # Clang doesn't seem to know know this flag.
1564 '-mfpmath=sse',
1565 ],
[email protected]58680ce2010-09-18 00:09:151566 }],
[email protected]5d451ad2011-02-11 16:43:461567 ['clang==1 and clang_use_chrome_plugins==1', {
[email protected]d23720682011-08-11 00:16:261568 'cflags': [
1569 '<(clang_chrome_plugins_flags)',
1570 ],
[email protected]5d451ad2011-02-11 16:43:461571 }],
[email protected]5e781232011-01-28 02:57:591572 ['clang==1 and clang_load!="" and clang_add_plugin!=""', {
[email protected]d23720682011-08-11 00:16:261573 'cflags': [
1574 '-Xclang', '-load', '-Xclang', '<(clang_load)',
1575 '-Xclang', '-add-plugin', '-Xclang', '<(clang_add_plugin)',
1576 ],
[email protected]5e781232011-01-28 02:57:591577 }],
[email protected]92799b632011-08-15 14:33:061578 ['asan==1', {
1579 # Only in the linux section for now, since ASAN doesn't
1580 # work on Mac yet.
1581 'cflags': [
1582 '-fasan -w',
1583 ],
1584 'ldflags': [
1585 '-fasan',
1586 ],
1587 }],
[email protected]cc4219a2009-08-14 05:30:521588 ['no_strict_aliasing==1', {
1589 'cflags': [
1590 '-fno-strict-aliasing',
1591 ],
1592 }],
[email protected]cbd5fd52009-08-26 00:14:271593 ['linux_breakpad==1', {
[email protected]c87efd42010-08-26 18:28:171594 'cflags': [ '-g' ],
[email protected]cbd5fd52009-08-26 00:14:271595 'defines': ['USE_LINUX_BREAKPAD'],
1596 }],
[email protected]d8b60602010-03-26 09:41:221597 ['linux_use_heapchecker==1', {
1598 'variables': {'linux_use_tcmalloc%': 1},
1599 }],
[email protected]61a9b2d82010-02-26 00:31:081600 ['linux_use_tcmalloc==0', {
1601 'defines': ['NO_TCMALLOC'],
[email protected]01699e22009-11-11 19:24:241602 }],
[email protected]d8b60602010-03-26 09:41:221603 ['linux_use_heapchecker==0', {
1604 'defines': ['NO_HEAPCHECKER'],
1605 }],
[email protected]64e2d4a42010-08-27 10:13:211606 ['linux_keep_shadow_stacks==1', {
1607 'defines': ['KEEP_SHADOW_STACKS'],
1608 'cflags': ['-finstrument-functions'],
1609 }],
[email protected]606116d22009-05-06 22:38:231610 ],
[email protected]9d384032009-03-20 23:13:261611 },
1612 }],
[email protected]c51e8d52009-12-11 20:04:061613 # FreeBSD-specific options; note that most FreeBSD options are set above,
1614 # with Linux.
1615 ['OS=="freebsd"', {
1616 'target_defaults': {
1617 'ldflags': [
1618 '-Wl,--no-keep-memory',
1619 ],
1620 },
1621 }],
[email protected]93f21e42010-04-01 00:35:151622 ['OS=="solaris"', {
1623 'cflags!': ['-fvisibility=hidden'],
1624 'cflags_cc!': ['-fvisibility-inlines-hidden'],
1625 }],
[email protected]2f80c312009-02-25 21:26:551626 ['OS=="mac"', {
1627 'target_defaults': {
[email protected]24700642009-06-01 16:01:201628 'variables': {
[email protected]162407f2011-09-08 15:33:171629 # These should end with %, but there seems to be a bug with % in
1630 # variables that are intended to be set to different values in
1631 # different targets, like these.
1632 'mac_pie': 1, # Most executables can be position-independent.
[email protected]24700642009-06-01 16:01:201633 'mac_real_dsym': 0, # Fake .dSYMs are fine in most cases.
[email protected]162407f2011-09-08 15:33:171634 'mac_strip': 1, # Strip debugging symbols from the target.
[email protected]24700642009-06-01 16:01:201635 },
[email protected]d92c7c012009-03-19 19:26:421636 'mac_bundle': 0,
[email protected]2f80c312009-02-25 21:26:551637 'xcode_settings': {
1638 'ALWAYS_SEARCH_USER_PATHS': 'NO',
[email protected]ab2956372009-08-13 18:11:041639 'GCC_C_LANGUAGE_STANDARD': 'c99', # -std=c99
1640 'GCC_CW_ASM_SYNTAX': 'NO', # No -fasm-blocks
1641 'GCC_DYNAMIC_NO_PIC': 'NO', # No -mdynamic-no-pic
1642 # (Equivalent to -fPIC)
1643 'GCC_ENABLE_CPP_EXCEPTIONS': 'NO', # -fno-exceptions
1644 'GCC_ENABLE_CPP_RTTI': 'NO', # -fno-rtti
1645 'GCC_ENABLE_PASCAL_STRINGS': 'NO', # No -mpascal-strings
[email protected]3224dcd2009-09-16 17:31:251646 # GCC_INLINES_ARE_PRIVATE_EXTERN maps to -fvisibility-inlines-hidden
1647 'GCC_INLINES_ARE_PRIVATE_EXTERN': 'YES',
[email protected]ab2956372009-08-13 18:11:041648 'GCC_OBJC_CALL_CXX_CDTORS': 'YES', # -fobjc-call-cxx-cdtors
1649 'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES', # -fvisibility=hidden
1650 'GCC_THREADSAFE_STATICS': 'NO', # -fno-threadsafe-statics
1651 'GCC_TREAT_WARNINGS_AS_ERRORS': 'YES', # -Werror
[email protected]2f80c312009-02-25 21:26:551652 'GCC_VERSION': '4.2',
[email protected]ab2956372009-08-13 18:11:041653 'GCC_WARN_ABOUT_MISSING_NEWLINE': 'YES', # -Wnewline-eof
[email protected]3224dcd2009-09-16 17:31:251654 # MACOSX_DEPLOYMENT_TARGET maps to -mmacosx-version-min
1655 'MACOSX_DEPLOYMENT_TARGET': '<(mac_deployment_target)',
[email protected]ab2956372009-08-13 18:11:041656 'PREBINDING': 'NO', # No -Wl,-prebind
[email protected]e1ece302011-09-15 03:58:111657 # Keep pch files below xcodebuild/.
1658 'SHARED_PRECOMPS_DIR': '$(CONFIGURATION_BUILD_DIR)/SharedPrecompiledHeaders',
[email protected]2f80c312009-02-25 21:26:551659 'USE_HEADERMAP': 'NO',
[email protected]57e94022011-05-04 15:33:191660 'OTHER_CFLAGS': [
1661 '-fno-strict-aliasing', # See http://crbug.com/32204
1662 ],
[email protected]080e86f2010-06-21 15:19:041663 'WARNING_CFLAGS': [
1664 '-Wall',
1665 '-Wendif-labels',
1666 '-Wextra',
1667 # Don't warn about unused function parameters.
1668 '-Wno-unused-parameter',
1669 # Don't warn about the "struct foo f = {0};" initialization
1670 # pattern.
1671 '-Wno-missing-field-initializers',
1672 ],
[email protected]b3fb8092009-03-12 19:09:241673 'conditions': [
1674 ['chromium_mac_pch', {'GCC_PRECOMPILE_PREFIX_HEADER': 'YES'},
[email protected]9543af052009-09-15 22:42:591675 {'GCC_PRECOMPILE_PREFIX_HEADER': 'NO'}
1676 ],
[email protected]66733172010-09-22 00:09:281677 ['clang==1', {
[email protected]34f40892011-09-06 21:53:301678 'CC': '$(SOURCE_ROOT)/<(clang_dir)/clang',
1679 'LDPLUSPLUS': '$(SOURCE_ROOT)/<(clang_dir)/clang++',
1680 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0',
[email protected]66733172010-09-22 00:09:281681 'WARNING_CFLAGS': [
[email protected]7f8d486f2011-04-05 19:49:071682 '-Wheader-hygiene',
[email protected]66733172010-09-22 00:09:281683 # Don't die on dtoa code that uses a char as an array index.
1684 # This is required solely for base/third_party/dmg_fp/dtoa.cc.
1685 '-Wno-char-subscripts',
[email protected]25d3bb722010-11-22 14:31:451686 # Clang spots more unused functions.
1687 '-Wno-unused-function',
[email protected]d6431722011-09-01 00:46:331688 # See comments on this flag higher up in this file.
[email protected]0fa0fbc2010-10-12 04:32:051689 '-Wno-unnamed-type-template-args',
[email protected]d53680932011-06-08 16:40:061690 # TODO(thakis): Reenable once the one instance this warns on
1691 # is fixed.
1692 '-Wno-parentheses',
[email protected]66733172010-09-22 00:09:281693 ],
1694 }],
[email protected]5d451ad2011-02-11 16:43:461695 ['clang==1 and clang_use_chrome_plugins==1', {
1696 'OTHER_CFLAGS': [
1697 '<(clang_chrome_plugins_flags)',
1698 ],
1699 }],
[email protected]5e781232011-01-28 02:57:591700 ['clang==1 and clang_load!="" and clang_add_plugin!=""', {
1701 'OTHER_CFLAGS': [
1702 '-Xclang', '-load', '-Xclang', '<(clang_load)',
1703 '-Xclang', '-add-plugin', '-Xclang', '<(clang_add_plugin)',
1704 ],
1705 }],
[email protected]b3fb8092009-03-12 19:09:241706 ],
[email protected]2f80c312009-02-25 21:26:551707 },
[email protected]34f40892011-09-06 21:53:301708 'conditions': [
1709 ['clang==1', {
1710 'variables': {
1711 'clang_dir': '../third_party/llvm-build/Release+Asserts/bin',
1712 },
1713 }],
1714 ],
[email protected]2f80c312009-02-25 21:26:551715 'target_conditions': [
[email protected]2f80c312009-02-25 21:26:551716 ['_type!="static_library"', {
[email protected]5d7dc972009-04-16 15:30:461717 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-search_paths_first']},
1718 }],
1719 ['_mac_bundle', {
1720 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-ObjC']},
[email protected]87fde4a2009-02-28 00:50:081721 }],
[email protected]6303fed2011-08-11 01:12:101722 ['_type=="executable"', {
1723 'postbuilds': [
1724 {
1725 # Arranges for data (heap) pages to be protected against
[email protected]8c40f322011-08-24 03:33:361726 # code execution when running on Mac OS X 10.7 ("Lion"), and
1727 # ensures that the position-independent executable (PIE) bit
1728 # is set for ASLR when running on Mac OS X 10.5 ("Leopard").
[email protected]6303fed2011-08-11 01:12:101729 'variables': {
[email protected]8c40f322011-08-24 03:33:361730 # Define change_mach_o_flags in a variable ending in _path
1731 # so that GYP understands it's a path and performs proper
1732 # relativization during dict merging.
1733 'change_mach_o_flags_path':
1734 'mac/change_mach_o_flags_from_xcode.sh',
[email protected]162407f2011-09-08 15:33:171735 'change_mach_o_flags_options%': [
[email protected]081c0342011-08-24 14:59:131736 ],
1737 'target_conditions': [
[email protected]162407f2011-09-08 15:33:171738 ['mac_pie==0 or release_valgrind_build==1', {
1739 # Don't enable PIE if it's unwanted. It's unwanted if
1740 # the target specifies mac_pie=0 or if building for
1741 # Valgrind, because Valgrind doesn't understand slide.
1742 # See the similar mac_pie/release_valgrind_build check
1743 # below.
[email protected]081c0342011-08-24 14:59:131744 'change_mach_o_flags_options': [
[email protected]081c0342011-08-24 14:59:131745 '--no-pie',
1746 ],
1747 }],
1748 ],
[email protected]6303fed2011-08-11 01:12:101749 },
[email protected]8c40f322011-08-24 03:33:361750 'postbuild_name': 'Change Mach-O Flags',
1751 'action': [
1752 '<(change_mach_o_flags_path)',
[email protected]081c0342011-08-24 14:59:131753 '>@(change_mach_o_flags_options)',
[email protected]8c40f322011-08-24 03:33:361754 ],
[email protected]6303fed2011-08-11 01:12:101755 },
1756 ],
[email protected]5a5d97aa2011-09-02 15:34:001757 'conditions': [
1758 ['asan==1', {
1759 'variables': {
1760 'asan_saves_file': 'asan.saves',
1761 },
1762 'xcode_settings': {
1763 'CHROMIUM_STRIP_SAVE_FILE': '<(asan_saves_file)'
1764 },
1765 }],
1766 ],
[email protected]162407f2011-09-08 15:33:171767 'target_conditions': [
1768 ['mac_pie==1 and release_valgrind_build==0', {
1769 # Turn on position-independence (ASLR) for executables. When
1770 # PIE is on for the Chrome executables, the framework will
1771 # also be subject to ASLR.
1772 # Don't do this when building for Valgrind, because Valgrind
1773 # doesn't understand slide. TODO: Make Valgrind on Mac OS X
1774 # understand slide, and get rid of the Valgrind check.
1775 'xcode_settings': {
1776 'OTHER_LDFLAGS': [
1777 '-Wl,-pie', # Position-independent executable (MH_PIE)
1778 ],
1779 },
1780 }],
1781 ],
[email protected]6a0242bc2011-07-01 00:34:461782 }],
[email protected]9a5e72862010-09-02 16:16:581783 ['(_type=="executable" or _type=="shared_library" or \
1784 _type=="loadable_module") and mac_strip!=0', {
[email protected]24700642009-06-01 16:01:201785 'target_conditions': [
1786 ['mac_real_dsym == 1', {
1787 # To get a real .dSYM bundle produced by dsymutil, set the
1788 # debug information format to dwarf-with-dsym. Since
1789 # strip_from_xcode will not be used, set Xcode to do the
1790 # stripping as well.
1791 'configurations': {
[email protected]5153767c2009-12-22 01:52:501792 'Release_Base': {
[email protected]24700642009-06-01 16:01:201793 'xcode_settings': {
1794 'DEBUG_INFORMATION_FORMAT': 'dwarf-with-dsym',
1795 'DEPLOYMENT_POSTPROCESSING': 'YES',
1796 'STRIP_INSTALLED_PRODUCT': 'YES',
[email protected]e14a9f92009-08-05 19:26:071797 'target_conditions': [
[email protected]c2111422010-06-01 18:30:251798 ['_type=="shared_library" or _type=="loadable_module"', {
[email protected]e14a9f92009-08-05 19:26:071799 # The Xcode default is to strip debugging symbols
1800 # only (-S). Local symbols should be stripped as
1801 # well, which will be handled by -x. Xcode will
1802 # continue to insert -S when stripping even when
1803 # additional flags are added with STRIPFLAGS.
1804 'STRIPFLAGS': '-x',
[email protected]c2111422010-06-01 18:30:251805 }], # _type=="shared_library" or _type=="loadable_module"'
[email protected]e14a9f92009-08-05 19:26:071806 ], # target_conditions
1807 }, # xcode_settings
1808 }, # configuration "Release"
1809 }, # configurations
[email protected]24700642009-06-01 16:01:201810 }, { # mac_real_dsym != 1
1811 # To get a fast fake .dSYM bundle, use a post-build step to
1812 # produce the .dSYM and strip the executable. strip_from_xcode
1813 # only operates in the Release configuration.
1814 'postbuilds': [
1815 {
1816 'variables': {
1817 # Define strip_from_xcode in a variable ending in _path
1818 # so that gyp understands it's a path and performs proper
1819 # relativization during dict merging.
1820 'strip_from_xcode_path': 'mac/strip_from_xcode',
1821 },
1822 'postbuild_name': 'Strip If Needed',
1823 'action': ['<(strip_from_xcode_path)'],
1824 },
[email protected]e14a9f92009-08-05 19:26:071825 ], # postbuilds
1826 }], # mac_real_dsym
1827 ], # target_conditions
[email protected]9a5e72862010-09-02 16:16:581828 }], # (_type=="executable" or _type=="shared_library" or
1829 # _type=="loadable_module") and mac_strip!=0
[email protected]e14a9f92009-08-05 19:26:071830 ], # target_conditions
1831 }, # target_defaults
1832 }], # OS=="mac"
[email protected]2f80c312009-02-25 21:26:551833 ['OS=="win"', {
1834 'target_defaults': {
1835 'defines': [
[email protected]0bc63042011-08-13 02:19:251836 '_WIN32_WINNT=0x0600',
1837 'WINVER=0x0600',
[email protected]2f80c312009-02-25 21:26:551838 'WIN32',
1839 '_WINDOWS',
[email protected]2f80c312009-02-25 21:26:551840 'NOMINMAX',
[email protected]e3116282011-08-13 00:52:281841 'PSAPI_VERSION=1',
[email protected]2f80c312009-02-25 21:26:551842 '_CRT_RAND_S',
1843 'CERT_CHAIN_PARA_HAS_EXTRA_FIELDS',
1844 'WIN32_LEAN_AND_MEAN',
[email protected]7a812dd62010-06-30 18:52:271845 '_ATL_NO_OPENGL',
[email protected]adfb98c2009-06-23 20:08:451846 '_HAS_TR1=0',
[email protected]2f80c312009-02-25 21:26:551847 ],
[email protected]8974e042010-06-21 18:06:521848 'conditions': [
1849 ['component=="static_library"', {
1850 'defines': [
1851 '_HAS_EXCEPTIONS=0',
1852 ],
1853 }],
[email protected]3e2648a2011-03-21 20:58:501854 ['secure_atl', {
1855 'defines': [
1856 '_SECURE_ATL',
1857 ],
1858 }],
[email protected]8974e042010-06-21 18:06:521859 ],
[email protected]5b5ca7cb2009-07-20 23:00:201860 'msvs_system_include_dirs': [
[email protected]998b5152009-12-12 22:19:521861 '<(DEPTH)/third_party/platformsdk_win7/files/Include',
[email protected]a78da50e2010-06-09 21:31:371862 '<(DEPTH)/third_party/directxsdk/files/Include',
[email protected]2f80c312009-02-25 21:26:551863 '$(VSInstallDir)/VC/atlmfc/include',
1864 ],
[email protected]a8d99cef2009-08-26 20:47:491865 'msvs_cygwin_dirs': ['<(DEPTH)/third_party/cygwin'],
[email protected]942c3a60f2011-05-03 02:04:111866 'msvs_disabled_warnings': [4351, 4396, 4503, 4819,
1867 # TODO(maruel): These warnings are level 4. They will be slowly
1868 # removed as code is fixed.
1869 4100, 4121, 4125, 4127, 4130, 4131, 4189, 4201, 4238, 4244, 4245,
1870 4310, 4355, 4428, 4481, 4505, 4510, 4512, 4530, 4610, 4611, 4701,
1871 4702, 4706,
1872 ],
[email protected]2f80c312009-02-25 21:26:551873 'msvs_settings': {
1874 'VCCLCompilerTool': {
1875 'MinimalRebuild': 'false',
[email protected]2f80c312009-02-25 21:26:551876 'BufferSecurityCheck': 'true',
1877 'EnableFunctionLevelLinking': 'true',
1878 'RuntimeTypeInfo': 'false',
[email protected]942c3a60f2011-05-03 02:04:111879 'WarningLevel': '4',
[email protected]2f80c312009-02-25 21:26:551880 'WarnAsError': 'true',
1881 'DebugInformationFormat': '3',
[email protected]3fef6e62009-07-31 19:58:581882 'conditions': [
[email protected]3e2648a2011-03-21 20:58:501883 ['msvs_multi_core_compile', {
[email protected]1f9471a2010-01-04 06:40:161884 'AdditionalOptions': ['/MP'],
[email protected]912c55c2009-07-31 23:33:551885 }],
[email protected]3e2648a2011-03-21 20:58:501886 ['MSVS_VERSION=="2005e"', {
1887 'AdditionalOptions': ['/w44068'], # Unknown pragma to 4 (ATL)
1888 }],
[email protected]8974e042010-06-21 18:06:521889 ['component=="shared_library"', {
1890 'ExceptionHandling': '1', # /EHsc
1891 }, {
1892 'ExceptionHandling': '0',
1893 }],
[email protected]3fef6e62009-07-31 19:58:581894 ],
[email protected]2f80c312009-02-25 21:26:551895 },
1896 'VCLibrarianTool': {
[email protected]1f9471a2010-01-04 06:40:161897 'AdditionalOptions': ['/ignore:4221'],
[email protected]a78da50e2010-06-09 21:31:371898 'AdditionalLibraryDirectories': [
1899 '<(DEPTH)/third_party/platformsdk_win7/files/Lib',
1900 '<(DEPTH)/third_party/directxsdk/files/Lib/x86',
1901 ],
[email protected]2f80c312009-02-25 21:26:551902 },
1903 'VCLinkerTool': {
[email protected]2f80c312009-02-25 21:26:551904 'AdditionalDependencies': [
1905 'wininet.lib',
[email protected]b1d8c252011-01-13 20:27:501906 'dnsapi.lib',
[email protected]2f80c312009-02-25 21:26:551907 'version.lib',
1908 'msimg32.lib',
1909 'ws2_32.lib',
1910 'usp10.lib',
1911 'psapi.lib',
[email protected]96fd0032009-04-24 00:13:081912 'dbghelp.lib',
[email protected]dfdf7ee2011-04-28 18:51:481913 'winmm.lib',
1914 'shlwapi.lib',
[email protected]2f80c312009-02-25 21:26:551915 ],
[email protected]4de39f82011-03-28 12:01:291916 'conditions': [
[email protected]3e2648a2011-03-21 20:58:501917 ['msvs_express', {
1918 # Explicitly required when using the ATL with express
1919 'AdditionalDependencies': [
1920 'atlthunk.lib',
1921 ],
1922 }],
1923 ['MSVS_VERSION=="2005e"', {
1924 # Non-express versions link automatically to these
1925 'AdditionalDependencies': [
1926 'advapi32.lib',
1927 'comdlg32.lib',
1928 'ole32.lib',
1929 'shell32.lib',
1930 'user32.lib',
1931 'winspool.lib',
1932 ],
1933 }],
1934 ],
[email protected]a78da50e2010-06-09 21:31:371935 'AdditionalLibraryDirectories': [
1936 '<(DEPTH)/third_party/platformsdk_win7/files/Lib',
1937 '<(DEPTH)/third_party/directxsdk/files/Lib/x86',
1938 ],
[email protected]2f80c312009-02-25 21:26:551939 'GenerateDebugInformation': 'true',
1940 'MapFileName': '$(OutDir)\\$(TargetName).map',
1941 'ImportLibrary': '$(OutDir)\\lib\\$(TargetName).lib',
[email protected]2f80c312009-02-25 21:26:551942 'FixedBaseAddress': '1',
[email protected]825ff8d2009-05-22 01:40:481943 # SubSystem values:
1944 # 0 == not set
1945 # 1 == /SUBSYSTEM:CONSOLE
1946 # 2 == /SUBSYSTEM:WINDOWS
1947 # Most of the executables we'll ever create are tests
1948 # and utilities with console output.
1949 'SubSystem': '1',
[email protected]2f80c312009-02-25 21:26:551950 },
1951 'VCMIDLTool': {
1952 'GenerateStublessProxies': 'true',
1953 'TypeLibraryName': '$(InputName).tlb',
1954 'OutputDirectory': '$(IntDir)',
1955 'HeaderFileName': '$(InputName).h',
1956 'DLLDataFileName': 'dlldata.c',
1957 'InterfaceIdentifierFileName': '$(InputName)_i.c',
1958 'ProxyFileName': '$(InputName)_p.c',
1959 },
1960 'VCResourceCompilerTool': {
1961 'Culture' : '1033',
[email protected]4d91cbc2010-05-07 20:41:381962 'AdditionalIncludeDirectories': [
1963 '<(DEPTH)',
1964 '<(SHARED_INTERMEDIATE_DIR)',
1965 ],
[email protected]2f80c312009-02-25 21:26:551966 },
1967 },
1968 },
1969 }],
[email protected]79e2336c2011-05-12 18:18:341970 ['disable_nacl==1', {
[email protected]d8c7cbcc2009-10-02 19:00:311971 'target_defaults': {
1972 'defines': [
1973 'DISABLE_NACL',
1974 ],
1975 },
1976 }],
[email protected]cfbf9bc2009-12-07 22:07:561977 ['OS=="win" and msvs_use_common_linker_extras', {
[email protected]48c7af72009-07-03 22:00:191978 'target_defaults': {
1979 'msvs_settings': {
1980 'VCLinkerTool': {
[email protected]48c7af72009-07-03 22:00:191981 'DelayLoadDLLs': [
1982 'dbghelp.dll',
1983 'dwmapi.dll',
1984 'uxtheme.dll',
1985 ],
1986 },
1987 },
[email protected]ef4fa4072009-12-04 22:46:501988 'configurations': {
[email protected]5153767c2009-12-22 01:52:501989 'x86_Base': {
[email protected]ef4fa4072009-12-04 22:46:501990 'msvs_settings': {
1991 'VCLinkerTool': {
[email protected]1f9471a2010-01-04 06:40:161992 'AdditionalOptions': [
1993 '/safeseh',
1994 '/dynamicbase',
1995 '/ignore:4199',
1996 '/ignore:4221',
1997 '/nxcompat',
1998 ],
[email protected]ef4fa4072009-12-04 22:46:501999 },
2000 },
2001 },
[email protected]5153767c2009-12-22 01:52:502002 'x64_Base': {
[email protected]ef4fa4072009-12-04 22:46:502003 'msvs_settings': {
2004 'VCLinkerTool': {
[email protected]1f9471a2010-01-04 06:40:162005 'AdditionalOptions': [
[email protected]ef4fa4072009-12-04 22:46:502006 # safeseh is not compatible with x64
[email protected]1f9471a2010-01-04 06:40:162007 '/dynamicbase',
2008 '/ignore:4199',
2009 '/ignore:4221',
2010 '/nxcompat',
2011 ],
[email protected]ef4fa4072009-12-04 22:46:502012 },
2013 },
2014 },
2015 },
[email protected]48c7af72009-07-03 22:00:192016 },
2017 }],
[email protected]9821d0d2010-04-16 22:40:372018 ['enable_new_npdevice_api==1', {
2019 'target_defaults': {
2020 'defines': [
2021 'ENABLE_NEW_NPDEVICE_API',
2022 ],
2023 },
2024 }],
[email protected]34f40892011-09-06 21:53:302025 ['clang==1', {
2026 'make_global_settings': [
2027 ['CC', 'third_party/llvm-build/Release+Asserts/bin/clang'],
2028 ['CXX', 'third_party/llvm-build/Release+Asserts/bin/clang++'],
[email protected]60550c82011-09-06 23:51:072029 ['LINK', '$(CXX)'],
[email protected]34f40892011-09-06 21:53:302030 ['CC.host', '$(CC)'],
2031 ['CXX.host', '$(CXX)'],
2032 ['LINK.host', '$(LINK)'],
2033 ],
2034 }],
[email protected]2f80c312009-02-25 21:26:552035 ],
2036 'xcode_settings': {
[email protected]0c8ab452009-11-06 21:57:502037 # DON'T ADD ANYTHING NEW TO THIS BLOCK UNLESS YOU REALLY REALLY NEED IT!
2038 # This block adds *project-wide* configuration settings to each project
2039 # file. It's almost always wrong to put things here. Specify your
2040 # custom xcode_settings in target_defaults to add them to targets instead.
2041
2042 # In an Xcode Project Info window, the "Base SDK for All Configurations"
2043 # setting sets the SDK on a project-wide basis. In order to get the
2044 # configured SDK to show properly in the Xcode UI, SDKROOT must be set
2045 # here at the project level.
2046 'SDKROOT': 'macosx<(mac_sdk)', # -isysroot
2047
[email protected]2f80c312009-02-25 21:26:552048 # The Xcode generator will look for an xcode_settings section at the root
2049 # of each dict and use it to apply settings on a file-wide basis. Most
2050 # settings should not be here, they should be in target-specific
2051 # xcode_settings sections, or better yet, should use non-Xcode-specific
2052 # settings in target dicts. SYMROOT is a special case, because many other
2053 # Xcode variables depend on it, including variables such as
2054 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something
2055 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the
2056 # files to appear (when present) in the UI as actual files and not red
2057 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR,
2058 # and therefore SYMROOT, needs to be set at the project level.
[email protected]bfa24b962009-03-02 00:16:162059 'SYMROOT': '<(DEPTH)/xcodebuild',
[email protected]2f80c312009-02-25 21:26:552060 },
[email protected]ee28c9f2009-09-04 01:53:012061}