blob: 8379384b5cacba6d100bcbd12079324aaa46d114 [file] [log] [blame]
[email protected]ed329be2012-01-03 22:02:161# Copyright (c) 2012 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]9a8175892012-03-20 02:11:5816 # dict that operate on these variables.
[email protected]e14a9f92009-08-05 19:26:0717 'variables': {
[email protected]e72e55b2011-01-06 22:19:3018 'variables': {
[email protected]bb6aba32011-01-07 19:04:4319 'variables': {
20 # Whether we're building a ChromeOS build.
21 'chromeos%': 0,
[email protected]e72e55b2011-01-06 22:19:3022
[email protected]3fa441d2011-09-18 17:28:5023 # Whether we are using Views Toolkit
24 'toolkit_views%': 0,
25
[email protected]ed329be2012-01-03 22:02:1626 # Whether or not we are using the Aura windowing framework.
[email protected]41423092011-08-25 15:39:5827 'use_aura%': 0,
[email protected]1353a092012-01-13 03:34:2828
[email protected]ed329be2012-01-03 22:02:1629 # Whether or not we are building the Ash shell.
30 'use_ash%': 0,
[email protected]e0b85a52011-10-06 03:30:4231
32 # Use OpenSSL instead of NSS. Under development: see http://crbug.com/62803
33 'use_openssl%': 0,
[email protected]023d8242011-11-22 01:25:2734
[email protected]da5f1952012-05-22 05:55:1535 'use_ibus%': 0,
[email protected]774e0612011-11-28 18:53:4836
[email protected]7ddea9802012-02-22 23:08:0537 # Disable viewport meta tag by default.
38 'enable_viewport%': 0,
[email protected]1efbaaa2012-04-24 02:43:2439
40 # Enable HiDPI support.
41 'enable_hidpi%': 0,
[email protected]219c7312012-05-10 20:32:4042
[email protected]6155e702012-05-02 17:56:0643 # Enable touch optimized art assets and metrics.
44 'enable_touch_ui%': 0,
[email protected]8973c3a2012-04-25 02:24:1845
[email protected]e0825562012-05-10 01:50:4746 # Is this change part of the android upstream bringup?
47 # Allows us to *temporarily* disable certain things for
48 # staging. Only set to 1 in a GYP_DEFINES.
49 'android_upstream_bringup%': 0,
[email protected]f1f362b42012-05-15 17:46:5850
51 # Override buildtype to select the desired build flavor.
52 # Dev - everyday build for development/testing
53 # Official - release build (generally implies additional processing)
54 # TODO(mmoss) Once 'buildtype' is fully supported (e.g. Windows gyp
55 # conversion is done), some of the things which are now controlled by
56 # 'branding', such as symbol generation, will need to be refactored
57 # based on 'buildtype' (i.e. we don't care about saving symbols for
58 # non-Official # builds).
59 'buildtype%': 'Dev',
[email protected]bb6aba32011-01-07 19:04:4360 },
61 # Copy conditionally-set variables out one scope.
62 'chromeos%': '<(chromeos)',
[email protected]41423092011-08-25 15:39:5863 'use_aura%': '<(use_aura)',
[email protected]ed329be2012-01-03 22:02:1664 'use_ash%': '<(use_ash)',
[email protected]e0b85a52011-10-06 03:30:4265 'use_openssl%': '<(use_openssl)',
[email protected]da5f1952012-05-22 05:55:1566 'use_ibus%': '<(use_ibus)',
[email protected]7ddea9802012-02-22 23:08:0567 'enable_viewport%': '<(enable_viewport)',
[email protected]1efbaaa2012-04-24 02:43:2468 'enable_hidpi%': '<(enable_hidpi)',
[email protected]6155e702012-05-02 17:56:0669 'enable_touch_ui%': '<(enable_touch_ui)',
[email protected]e0825562012-05-10 01:50:4770 'android_upstream_bringup%': '<(android_upstream_bringup)',
[email protected]f1f362b42012-05-15 17:46:5871 'buildtype%': '<(buildtype)',
72
[email protected]e72e55b2011-01-06 22:19:3073 # Compute the architecture that we're building on.
74 'conditions': [
[email protected]177cd082011-10-04 18:36:3875 [ 'OS=="win" or OS=="mac"', {
[email protected]c49ab0c2011-05-18 17:25:3776 'host_arch%': 'ia32',
77 }, {
[email protected]79e2336c2011-05-12 18:18:3478 # This handles the Unix platforms for which there is some support.
79 # Anything else gets passed through, which probably won't work very
80 # well; such hosts should pass an explicit target_arch to gyp.
[email protected]e72e55b2011-01-06 22:19:3081 'host_arch%':
[email protected]79e2336c2011-05-12 18:18:3482 '<!(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:3083 }],
[email protected]1353a092012-01-13 03:34:2884
[email protected]838a3cd2012-03-19 16:10:5585 # Chromeos implies ash.
[email protected]5f887612012-03-01 21:34:0686 ['chromeos==1', {
87 'use_ash%': 1,
[email protected]ed329be2012-01-03 22:02:1688 'use_aura%': 1,
89 }],
[email protected]bb6aba32011-01-07 19:04:4390
[email protected]5f887612012-03-01 21:34:0691 # For now, Windows *AND* Linux builds that |use_aura| should also
92 # imply using ash. This rule should be removed for the future when
93 # both Linux and Windows are using the aura windows without the ash
94 # interface.
[email protected]24f9d022012-05-19 00:05:0395 ['use_aura==1 and OS=="win"', {
[email protected]5f887612012-03-01 21:34:0696 'use_ash%': 1,
97 }],
[email protected]d02c4162012-05-04 20:51:5198 ['use_ash==1', {
99 'use_aura%': 1,
100 }],
[email protected]5f887612012-03-01 21:34:06101
[email protected]ab2017e2012-02-07 01:54:50102 # Set default value of toolkit_views based on OS.
[email protected]6e00601b72012-03-19 15:40:35103 ['OS=="win" or chromeos==1 or use_aura==1', {
[email protected]bb6aba32011-01-07 19:04:43104 'toolkit_views%': 1,
105 }, {
106 'toolkit_views%': 0,
107 }],
[email protected]1efbaaa2012-04-24 02:43:24108
109 # Enable HiDPI on Mac OS.
110 ['OS=="mac"', {
111 'enable_hidpi%': 1,
112 }],
[email protected]219c7312012-05-10 20:32:40113
[email protected]6155e702012-05-02 17:56:06114 # Enable touch UI on Metro and Chrome OS.
[email protected]46971922012-05-26 04:34:16115 ['OS=="win" or chromeos==1', {
[email protected]6155e702012-05-02 17:56:06116 'enable_touch_ui%': 1,
117 }],
[email protected]e72e55b2011-01-06 22:19:30118 ],
119 },
120
121 # Copy conditionally-set variables out one scope.
122 'chromeos%': '<(chromeos)',
[email protected]e72e55b2011-01-06 22:19:30123 'host_arch%': '<(host_arch)',
[email protected]bb6aba32011-01-07 19:04:43124 'toolkit_views%': '<(toolkit_views)',
[email protected]41423092011-08-25 15:39:58125 'use_aura%': '<(use_aura)',
[email protected]ed329be2012-01-03 22:02:16126 'use_ash%': '<(use_ash)',
[email protected]e0b85a52011-10-06 03:30:42127 'use_openssl%': '<(use_openssl)',
[email protected]da5f1952012-05-22 05:55:15128 'use_ibus%': '<(use_ibus)',
[email protected]7ddea9802012-02-22 23:08:05129 'enable_viewport%': '<(enable_viewport)',
[email protected]1efbaaa2012-04-24 02:43:24130 'enable_hidpi%': '<(enable_hidpi)',
[email protected]6155e702012-05-02 17:56:06131 'enable_touch_ui%': '<(enable_touch_ui)',
[email protected]08d910e22012-05-11 05:42:35132 'android_upstream_bringup%': '<(android_upstream_bringup)',
[email protected]023d8242011-11-22 01:25:27133
[email protected]8fb0ef02011-05-20 00:53:50134 # We used to provide a variable for changing how libraries were built.
135 # This variable remains until we can clean up all the users.
136 # This needs to be one nested variables dict in so that dependent
137 # gyp files can make use of it in their outer variables. (Yikes!)
138 # http://code.google.com/p/chromium/issues/detail?id=83308
139 'library%': 'static_library',
140
[email protected]e14a9f92009-08-05 19:26:07141 # Override branding to select the desired branding flavor.
142 'branding%': 'Chromium',
143
[email protected]f1f362b42012-05-15 17:46:58144 'buildtype%': '<(buildtype)',
[email protected]cbd5fd52009-08-26 00:14:27145
[email protected]e72e55b2011-01-06 22:19:30146 # Default architecture we're building for is the architecture we're
147 # building on.
148 'target_arch%': '<(host_arch)',
[email protected]b3f23ba2010-04-26 22:58:17149
[email protected]e72e55b2011-01-06 22:19:30150 # This variable tells WebCore.gyp and JavaScriptCore.gyp whether they are
151 # are built under a chromium full build (1) or a webkit.org chromium
152 # build (0).
153 'inside_chromium_build%': 1,
[email protected]8974e042010-06-21 18:06:52154
[email protected]e72e55b2011-01-06 22:19:30155 # Set to 1 to enable fast builds. It disables debug info for fastest
156 # compilation.
157 'fastbuild%': 0,
[email protected]93012ca2010-08-10 20:10:49158
[email protected]20960e072011-09-20 20:59:01159 # Set to 1 to enable dcheck in release without having to use the flag.
160 'dcheck_always_on%': 0,
161
[email protected]464750f2011-10-24 23:16:18162 # Disable file manager component extension by default.
[email protected]3d38d8e2011-04-16 20:48:51163 'file_manager_extension%': 0,
164
[email protected]e72e55b2011-01-06 22:19:30165 # Python version.
[email protected]a43c5a02011-05-27 06:54:51166 'python_ver%': '2.6',
[email protected]b3f23ba2010-04-26 22:58:17167
[email protected]e72e55b2011-01-06 22:19:30168 # Set ARM-v7 compilation flags
169 'armv7%': 0,
170
171 # Set Neon compilation flags (only meaningful if armv7==1).
172 'arm_neon%': 1,
173
174 # The system root for cross-compiles. Default: none.
175 'sysroot%': '',
176
[email protected]945361a2011-09-30 04:38:43177 # The system libdir used for this ABI.
178 'system_libdir%': 'lib',
179
[email protected]e72e55b2011-01-06 22:19:30180 # On Linux, we build with sse2 for Chromium builds.
181 'disable_sse2%': 0,
182
183 # Use libjpeg-turbo as the JPEG codec used by Chromium.
[email protected]32e56e52011-02-28 02:28:03184 'use_libjpeg_turbo%': 1,
[email protected]e72e55b2011-01-06 22:19:30185
186 # Variable 'component' is for cases where we would like to build some
187 # components as dynamic shared libraries but still need variable
188 # 'library' for static libraries.
189 # By default, component is set to whatever library is set to and
190 # it can be overriden by the GYP command line or by ~/.gyp/include.gypi.
[email protected]5a547332011-05-19 23:18:53191 'component%': 'static_library',
[email protected]e72e55b2011-01-06 22:19:30192
[email protected]bb6aba32011-01-07 19:04:43193 # Set to select the Title Case versions of strings in GRD files.
194 'use_titlecase_in_grd_files%': 0,
[email protected]63692212010-09-16 00:22:21195
[email protected]98da0042011-02-02 00:10:27196 # Use translations provided by volunteers at launchpad.net. This
197 # currently only works on Linux.
[email protected]00dc155832011-02-01 18:51:19198 'use_third_party_translations%': 0,
199
[email protected]9a425422011-01-11 00:53:18200 # Remoting compilation is enabled by default. Set to 0 to disable.
201 'remoting%': 1,
202
[email protected]1ec68c42011-06-01 13:56:25203 # Configuration policy is enabled by default. Set to 0 to disable.
204 'configuration_policy%': 1,
205
[email protected]4b58e7d2011-07-11 10:22:56206 # Safe browsing is compiled in by default. Set to 0 to disable.
207 'safe_browsing%': 1,
208
[email protected]9eb100e2011-10-14 05:08:22209 # Speech input is compiled in by default. Set to 0 to disable.
210 'input_speech%': 1,
211
[email protected]7cce3232011-10-28 10:41:57212 # Notifications are compiled in by default. Set to 0 to disable.
213 'notifications%' : 1,
214
[email protected]5d451ad2011-02-11 16:43:46215 # If this is set, the clang plugins used on the buildbot will be used.
216 # Run tools/clang/scripts/update.sh to make sure they are compiled.
217 # This causes 'clang_chrome_plugins_flags' to be set.
218 # Has no effect if 'clang' is not set as well.
[email protected]3bb37e62012-04-19 03:40:08219 'clang_use_chrome_plugins%': 1,
[email protected]5d451ad2011-02-11 16:43:46220
[email protected]f36f3742011-11-21 13:12:14221 # Enable building with ASAN (Clang's -faddress-sanitizer option).
222 # -faddress-sanitizer only works with clang, but asan=1 implies clang=1
[email protected]92799b632011-08-15 14:33:06223 # See https://sites.google.com/a/chromium.org/dev/developers/testing/addresssanitizer
224 'asan%': 0,
225
[email protected]8a6abd12012-05-16 10:04:44226 # Set to true to instrument the code with function call logger.
227 # See src/third_party/cygprofile/cyg-profile.cc for details.
228 'order_profiling%': 0,
229
[email protected]00b0a7f2012-01-25 15:30:46230 # Use the provided profiled order file to link Chrome image with it.
231 # This makes Chrome faster by better using CPU cache when executing code.
232 # This is known as PGO (profile guided optimization).
233 # See https://sites.google.com/a/google.com/chrome-msk/dev/boot-speed-up-effort
234 'order_text_section%' : "",
235
[email protected]1ad5a7b2011-06-24 03:15:13236 # Set to 1 compile with -fPIC cflag on linux. This is a must for shared
237 # libraries on linux x86-64 and arm, plus ASLR.
238 'linux_fpic%': 1,
239
[email protected]bd7b6fe2012-03-05 21:02:40240 # Whether one-click signin is enabled or not.
241 'enable_one_click_signin%': 0,
242
[email protected]bbf766d2012-05-18 16:30:21243 # Enable Web Intents support in WebKit.
[email protected]5ffb0a42012-01-27 09:36:11244 'enable_web_intents%': 1,
245
[email protected]6a3cd37e2012-04-17 17:13:34246 # Enable Chrome browser extensions
247 'enable_extensions%': 1,
248
[email protected]658677f2012-06-09 06:04:02249 # Enable browser automation.
250 'enable_automation%': 1,
251
252 # Enable printing support and UI.
253 'enable_printing%': 1,
254
[email protected]5ffb0a42012-01-27 09:36:11255 # Enable Web Intents web content registration via HTML element
256 # and WebUI managing such registrations.
257 'enable_web_intents_tag%': 0,
[email protected]62af76e2011-08-01 02:34:01258
[email protected]dda90ae2011-07-19 22:07:48259 # Webrtc compilation is enabled by default. Set to 0 to disable.
260 'enable_webrtc%': 1,
261
[email protected]67c125d2011-10-11 18:58:22262 # PPAPI by default does not support plugins making calls off the main
263 # thread. Set to 1 to turn on experimental support for out-of-process
264 # plugins to make call of the main thread.
265 'enable_pepper_threading%': 0,
266
[email protected]b11afaf2012-05-17 22:25:10267 # Include the PPAPI IPC proxy for NaCl. This is a work-in-progress; this
268 # allows us to build this feature locally without it affecting others
269 # working in affected subsystems like base and ipc.
270 'build_ppapi_ipc_proxy_untrusted%': 0,
271
[email protected]cdb756ef2012-04-05 18:34:53272 # Enables use of the session service, which is enabled by default.
273 # Support for disabling depends on the platform.
274 'enable_session_service%': 1,
275
[email protected]6b40bb582012-03-15 20:50:38276 # Enables theme support, which is enabled by default. Support for
277 # disabling depends on the platform.
278 'enable_themes%': 1,
279
[email protected]0acdd772012-04-05 22:53:00280 # Enables support for background apps.
281 'enable_background%': 1,
282
[email protected]44879ed2012-04-06 01:11:02283 # Enable the task manager by default.
284 'enable_task_manager%': 1,
[email protected]e1de87f2012-05-02 17:20:45285
[email protected]58242012012-04-12 16:14:31286 # Enables support for promo resource service.
287 'enable_promo_resource_service%': 1,
[email protected]44879ed2012-04-06 01:11:02288
[email protected]22d6dd72012-05-15 07:29:55289 # XInput2 multitouch support is disabled by default (use_xi2_mt=0).
290 # Setting to non-zero value enables XI2 MT. When XI2 MT is enabled,
291 # the input value also defines the required XI2 minor minimum version.
292 # For example, use_xi2_mt=2 means XI2.2 or above version is required.
293 'use_xi2_mt%': 0,
294
[email protected]9061bee82012-01-16 11:45:17295 # Use of precompiled headers on Windows.
296 #
297 # This is on by default in VS 2010, but off by default for VS
298 # 2008 because of complications that it can cause with our
299 # trybots etc.
300 #
301 # This variable may be explicitly set to 1 (enabled) or 0
302 # (disabled) in ~/.gyp/include.gypi or via the GYP command line.
303 # This setting will override the default.
304 #
305 # Note that a setting of 1 is probably suitable for most or all
306 # Windows developers using VS 2008, since precompiled headers
307 # provide a build speedup of 20-25%. There are a couple of
308 # small workarounds you may need to use when using VS 2008 (but
309 # not 2010), see
310 # http://code.google.com/p/chromium/wiki/WindowsPrecompiledHeaders
311 # for details.
[email protected]d5cf9fb2011-09-27 00:15:16312 'chromium_win_pch%': 0,
313
[email protected]3bb37e62012-04-19 03:40:08314 # Set this to true when building with Clang.
315 # See http://code.google.com/p/chromium/wiki/Clang for details.
316 'clang%': 0,
317
[email protected]18e0f39b2012-01-17 16:47:34318 # Enable plug-in installation by default.
319 'enable_plugin_installation%': 1,
320
[email protected]ddcaa412012-03-30 19:57:29321 # Enable protector service by default.
322 'enable_protector_service%': 1,
323
[email protected]62424a52012-03-18 03:09:50324 # Specifies whether to use canvas_skia.cc in place of platform
[email protected]4ddae4b2012-03-15 17:32:42325 # specific implementations of gfx::Canvas. Affects text drawing in the
[email protected]d18e50312012-01-25 17:49:35326 # Chrome UI.
327 # TODO(asvitkine): Enable this on all platforms and delete this flag.
328 # http://crbug.com/105550
[email protected]62424a52012-03-18 03:09:50329 'use_canvas_skia%': 0,
[email protected]d18e50312012-01-25 17:49:35330
[email protected]a9318c72012-03-01 01:29:47331 # Set to "tsan", "memcheck", or "drmemory" to configure the build to work
332 # with one of those tools.
333 'build_for_tool%': '',
334
[email protected]01971642012-03-07 14:39:56335 # Whether tests targets should be run, archived or just have the
336 # dependencies verified. All the tests targets have the '_run' suffix,
337 # e.g. base_unittests_run runs the target base_unittests. The test target
338 # always calls tools/isolate/isolate.py. See the script's --help for more
339 # information and the valid --mode values. Meant to be overriden with
340 # GYP_DEFINES.
[email protected]5d606072012-04-30 20:14:13341 # TODO(maruel): Converted the default from 'check' to 'noop' so work can
342 # be done while the builders are being reconfigured to check out test data
343 # files.
[email protected]0ef3a522012-05-15 14:56:33344 'test_isolation_mode%': 'noop',
345 # It must not be '<(PRODUCT_DIR)' alone, the '/' is necessary otherwise
346 # gyp will remove duplicate flags, causing isolate.py to be confused.
[email protected]2fb94e92012-05-18 18:49:39347 'test_isolation_outdir%': '<(PRODUCT_DIR)/isolate',
[email protected]01971642012-03-07 14:39:56348
[email protected]81d9b72d2012-03-26 22:29:17349 # Force rlz to use chrome's networking stack.
350 'force_rlz_use_chrome_net%': 1,
351
[email protected]49ae3e52012-04-12 09:50:12352 'platformsdk_path%': '<(DEPTH)/third_party/platformsdk_win7/files',
353 'wix_path%': '<(DEPTH)/third_party/wix',
354
[email protected]bb6aba32011-01-07 19:04:43355 'conditions': [
[email protected]33423fa2011-09-23 18:18:14356 # TODO(epoger): Figure out how to set use_skia=1 for Mac outside of
357 # the 'conditions' clause. Initial attempts resulted in chromium and
358 # webkit disagreeing on its setting.
[email protected]7d7564a12011-06-21 19:20:22359 ['OS=="mac"', {
[email protected]53c98db2012-03-14 16:02:21360 'use_skia%': 1,
[email protected]7d7564a12011-06-21 19:20:22361 }, {
362 'use_skia%': 1,
363 }],
364
[email protected]79e2336c2011-05-12 18:18:34365 # A flag for POSIX platforms
[email protected]c49ab0c2011-05-18 17:25:37366 ['OS=="win"', {
[email protected]79e2336c2011-05-12 18:18:34367 'os_posix%': 0,
[email protected]c49ab0c2011-05-18 17:25:37368 }, {
369 'os_posix%': 1,
[email protected]79e2336c2011-05-12 18:18:34370 }],
371
[email protected]df9167b2011-11-14 19:15:25372 # A flag for BSD platforms
373 ['OS=="freebsd" or OS=="openbsd"', {
374 'os_bsd%': 1,
375 }, {
376 'os_bsd%': 0,
377 }],
378
[email protected]c329adf82011-10-05 14:34:57379 # NSS usage.
[email protected]e0b85a52011-10-06 03:30:42380 ['(OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris") and use_openssl==0', {
[email protected]c329adf82011-10-05 14:34:57381 'use_nss%': 1,
382 }, {
383 'use_nss%': 0,
384 }],
[email protected]e0b85a52011-10-06 03:30:42385
[email protected]258dca42011-09-21 00:17:19386 # Flags to use X11 on non-Mac POSIX platforms
[email protected]da1c8d692011-09-20 20:35:01387 ['OS=="win" or OS=="mac" or OS=="android"', {
[email protected]258dca42011-09-21 00:17:19388 'use_glib%': 0,
[email protected]79e2336c2011-05-12 18:18:34389 'use_x11%': 0,
[email protected]c49ab0c2011-05-18 17:25:37390 }, {
[email protected]258dca42011-09-21 00:17:19391 'use_glib%': 1,
[email protected]c49ab0c2011-05-18 17:25:37392 'use_x11%': 1,
[email protected]79e2336c2011-05-12 18:18:34393 }],
[email protected]9a8175892012-03-20 02:11:58394
395 # Set toolkit_uses_gtk for the Chromium browser on Linux.
[email protected]17b11af2012-03-21 21:46:17396 ['(OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris") and use_aura==0', {
[email protected]9a8175892012-03-20 02:11:58397 'toolkit_uses_gtk%': 1,
398 }, {
399 'toolkit_uses_gtk%': 0,
400 }],
401
[email protected]efadeacf2011-10-27 19:01:00402 # We always use skia text rendering in Aura on Windows, since GDI
403 # doesn't agree with our BackingStore.
404 # TODO(beng): remove once skia text rendering is on by default.
405 ['use_aura==1 and OS=="win"', {
406 'enable_skia_text%': 1,
407 }],
[email protected]9edeb712011-09-20 21:20:33408
[email protected]63692212010-09-16 00:22:21409 # A flag to enable or disable our compile-time dependency
410 # on gnome-keyring. If that dependency is disabled, no gnome-keyring
411 # support will be available. This option is useful
[email protected]25bc66a22011-09-24 18:32:49412 # for Linux distributions and for Aura.
[email protected]ab2017e2012-02-07 01:54:50413 ['chromeos==1 or use_aura==1', {
[email protected]63692212010-09-16 00:22:21414 'use_gnome_keyring%': 0,
415 }, {
416 'use_gnome_keyring%': 1,
417 }],
[email protected]0afe5212010-10-01 18:56:11418
[email protected]bb6aba32011-01-07 19:04:43419 ['toolkit_views==0 or OS=="mac"', {
420 # GTK+ and Mac wants Title Case strings
421 'use_titlecase_in_grd_files%': 1,
422 }],
423
[email protected]5f887612012-03-01 21:34:06424 # Enable file manager extension on Chrome OS.
425 ['chromeos==1', {
[email protected]ab2017e2012-02-07 01:54:50426 'file_manager_extension%': 1,
427 }, {
[email protected]3d38d8e2011-04-16 20:48:51428 'file_manager_extension%': 0,
429 }],
[email protected]7de46352011-09-12 15:39:19430
[email protected]f032fe92012-06-12 19:20:01431 ['OS=="win" or OS=="mac" or (OS=="linux" and use_aura==0)', {
432 'enable_one_click_signin%': 1,
[email protected]e4b66bf2012-05-29 20:39:51433 }],
434
[email protected]da1c8d692011-09-20 20:35:01435 ['OS=="android"', {
436 'proprietary_codecs%': 1,
437 'enable_webrtc%': 0,
438 }],
[email protected]839d5172011-10-13 17:18:11439
440 # Use GPU accelerated cross process image transport by default
[email protected]023d8242011-11-22 01:25:27441 # on linux builds with the Aura window manager
[email protected]f83c6f7f2012-01-28 03:23:01442 ['use_aura==1 and OS=="linux"', {
[email protected]1ee7c56c2011-10-19 14:51:33443 'ui_compositor_image_transport%': 1,
[email protected]839d5172011-10-13 17:18:11444 }, {
[email protected]1ee7c56c2011-10-19 14:51:33445 'ui_compositor_image_transport%': 0,
[email protected]839d5172011-10-13 17:18:11446 }],
[email protected]9061bee82012-01-16 11:45:17447
[email protected]75de7212012-05-12 01:14:46448 # Turn precompiled headers on by default for VS 2010.
[email protected]f1f362b42012-05-15 17:46:58449 ['OS=="win" and MSVS_VERSION=="2010" and buildtype!="Official"', {
[email protected]9061bee82012-01-16 11:45:17450 'chromium_win_pch%': 1
451 }],
[email protected]18e0f39b2012-01-17 16:47:34452
[email protected]3d5173ec2012-03-27 04:08:23453 ['use_aura==1 or chromeos==1 or OS=="android"', {
[email protected]18e0f39b2012-01-17 16:47:34454 'enable_plugin_installation%': 0,
455 }, {
456 'enable_plugin_installation%': 1,
457 }],
[email protected]b07806c12012-02-03 22:44:59458
[email protected]ddcaa412012-03-30 19:57:29459 ['OS=="android"', {
460 'enable_protector_service%': 0,
461 }, {
462 'enable_protector_service%': 1,
463 }],
464
[email protected]8d726a42012-02-09 03:49:00465 # linux_use_gold_binary: whether to use the binary checked into
466 # third_party/gold.
[email protected]1d4ace782012-03-07 09:20:40467 ['OS=="linux"', {
[email protected]1e033482012-02-09 19:33:51468 'linux_use_gold_binary%': 1,
469 }, {
470 'linux_use_gold_binary%': 0,
471 }],
472
[email protected]be239492012-02-09 19:00:17473 # linux_use_gold_flags: whether to use build flags that rely on gold.
474 # On by default for x64 Linux. Temporarily off for ChromeOS as
475 # it failed on a buildbot.
[email protected]1d4ace782012-03-07 09:20:40476 ['OS=="linux" and chromeos==0', {
[email protected]be239492012-02-09 19:00:17477 'linux_use_gold_flags%': 1,
478 }, {
[email protected]8d726a42012-02-09 03:49:00479 'linux_use_gold_flags%': 0,
[email protected]b07806c12012-02-03 22:44:59480 }],
[email protected]2e22e2f2012-03-15 21:53:10481
[email protected]e6026962012-06-14 21:28:32482 ['OS=="android"', {
483 'enable_captive_portal_detection%': 0,
484 }, {
485 'enable_captive_portal_detection%': 1,
486 }],
487
[email protected]3bd47e022012-03-22 04:19:12488 # Enable Skia UI text drawing incrementally on different platforms.
489 # http://crbug.com/105550
490 #
491 # On Aura, this allows per-tile painting to be used in the browser
492 # compositor.
[email protected]9197a9282012-05-30 14:12:32493 ['OS!="mac" and OS!="android"', {
[email protected]3bd47e022012-03-22 04:19:12494 'use_canvas_skia%': 1,
495 }],
[email protected]b3f23ba2010-04-26 22:58:17496 ],
[email protected]e14a9f92009-08-05 19:26:07497 },
498
[email protected]e72e55b2011-01-06 22:19:30499 # Copy conditionally-set variables out one scope.
[email protected]e14a9f92009-08-05 19:26:07500 'branding%': '<(branding)',
501 'buildtype%': '<(buildtype)',
[email protected]e0d00142009-09-18 22:10:27502 'target_arch%': '<(target_arch)',
[email protected]cf185b32010-01-12 04:29:59503 'host_arch%': '<(host_arch)',
[email protected]8fb0ef02011-05-20 00:53:50504 'library%': 'static_library',
[email protected]c153e5352009-09-22 12:37:44505 'toolkit_views%': '<(toolkit_views)',
[email protected]1ee7c56c2011-10-19 14:51:33506 'ui_compositor_image_transport%': '<(ui_compositor_image_transport)',
[email protected]41423092011-08-25 15:39:58507 'use_aura%': '<(use_aura)',
[email protected]ed329be2012-01-03 22:02:16508 'use_ash%': '<(use_ash)',
[email protected]e0b85a52011-10-06 03:30:42509 'use_openssl%': '<(use_openssl)',
[email protected]da5f1952012-05-22 05:55:15510 'use_ibus%': '<(use_ibus)',
[email protected]c329adf82011-10-05 14:34:57511 'use_nss%': '<(use_nss)',
[email protected]df9167b2011-11-14 19:15:25512 'os_bsd%': '<(os_bsd)',
[email protected]79e2336c2011-05-12 18:18:34513 'os_posix%': '<(os_posix)',
[email protected]258dca42011-09-21 00:17:19514 'use_glib%': '<(use_glib)',
[email protected]79e2336c2011-05-12 18:18:34515 'toolkit_uses_gtk%': '<(toolkit_uses_gtk)',
[email protected]7d7564a12011-06-21 19:20:22516 'use_skia%': '<(use_skia)',
[email protected]79e2336c2011-05-12 18:18:34517 'use_x11%': '<(use_x11)',
[email protected]63692212010-09-16 00:22:21518 'use_gnome_keyring%': '<(use_gnome_keyring)',
[email protected]0afe5212010-10-01 18:56:11519 'linux_fpic%': '<(linux_fpic)',
[email protected]67c125d2011-10-11 18:58:22520 'enable_pepper_threading%': '<(enable_pepper_threading)',
[email protected]b11afaf2012-05-17 22:25:10521 'build_ppapi_ipc_proxy_untrusted%': '<(build_ppapi_ipc_proxy_untrusted)',
[email protected]c153e5352009-09-22 12:37:44522 'chromeos%': '<(chromeos)',
[email protected]7ddea9802012-02-22 23:08:05523 'enable_viewport%': '<(enable_viewport)',
[email protected]1efbaaa2012-04-24 02:43:24524 'enable_hidpi%': '<(enable_hidpi)',
[email protected]6155e702012-05-02 17:56:06525 'enable_touch_ui%': '<(enable_touch_ui)',
[email protected]f56797b2011-09-25 00:04:35526 'use_xi2_mt%':'<(use_xi2_mt)',
[email protected]e47c32032011-03-01 19:26:20527 'file_manager_extension%': '<(file_manager_extension)',
[email protected]b2f030c2009-09-24 20:36:21528 'inside_chromium_build%': '<(inside_chromium_build)',
[email protected]9c1949e2009-10-02 19:59:54529 'fastbuild%': '<(fastbuild)',
[email protected]20960e072011-09-20 20:59:01530 'dcheck_always_on%': '<(dcheck_always_on)',
[email protected]a76fe1a2010-03-01 23:39:36531 'python_ver%': '<(python_ver)',
[email protected]eafc0b452010-02-26 21:53:43532 'armv7%': '<(armv7)',
533 'arm_neon%': '<(arm_neon)',
[email protected]4d83eb72010-03-04 16:42:23534 'sysroot%': '<(sysroot)',
[email protected]945361a2011-09-30 04:38:43535 'system_libdir%': '<(system_libdir)',
[email protected]ac120ff2010-04-28 02:14:22536 'disable_sse2%': '<(disable_sse2)',
[email protected]8974e042010-06-21 18:06:52537 'component%': '<(component)',
[email protected]bb6aba32011-01-07 19:04:43538 'use_titlecase_in_grd_files%': '<(use_titlecase_in_grd_files)',
[email protected]9e94cca2011-02-04 17:38:17539 'use_third_party_translations%': '<(use_third_party_translations)',
[email protected]9a425422011-01-11 00:53:18540 'remoting%': '<(remoting)',
[email protected]bd7b6fe2012-03-05 21:02:40541 'enable_one_click_signin%': '<(enable_one_click_signin)',
[email protected]dda90ae2011-07-19 22:07:48542 'enable_webrtc%': '<(enable_webrtc)',
[email protected]d5cf9fb2011-09-27 00:15:16543 'chromium_win_pch%': '<(chromium_win_pch)',
[email protected]1ec68c42011-06-01 13:56:25544 'configuration_policy%': '<(configuration_policy)',
[email protected]4b58e7d2011-07-11 10:22:56545 'safe_browsing%': '<(safe_browsing)',
[email protected]9eb100e2011-10-14 05:08:22546 'input_speech%': '<(input_speech)',
[email protected]7cce3232011-10-28 10:41:57547 'notifications%': '<(notifications)',
[email protected]5d451ad2011-02-11 16:43:46548 'clang_use_chrome_plugins%': '<(clang_use_chrome_plugins)',
[email protected]92799b632011-08-15 14:33:06549 'asan%': '<(asan)',
[email protected]8a6abd12012-05-16 10:04:44550 'order_profiling%': '<(order_profiling)',
[email protected]00b0a7f2012-01-25 15:30:46551 'order_text_section%': '<(order_text_section)',
[email protected]6a3cd37e2012-04-17 17:13:34552 'enable_extensions%': '<(enable_extensions)',
[email protected]41ed4e82011-08-25 23:02:07553 'enable_web_intents%': '<(enable_web_intents)',
[email protected]5ffb0a42012-01-27 09:36:11554 'enable_web_intents_tag%': '<(enable_web_intents_tag)',
[email protected]18e0f39b2012-01-17 16:47:34555 'enable_plugin_installation%': '<(enable_plugin_installation)',
[email protected]ddcaa412012-03-30 19:57:29556 'enable_protector_service%': '<(enable_protector_service)',
[email protected]cdb756ef2012-04-05 18:34:53557 'enable_session_service%': '<(enable_session_service)',
[email protected]6b40bb582012-03-15 20:50:38558 'enable_themes%': '<(enable_themes)',
[email protected]0acdd772012-04-05 22:53:00559 'enable_background%': '<(enable_background)',
[email protected]58242012012-04-12 16:14:31560 'enable_promo_resource_service%': '<(enable_promo_resource_service)',
[email protected]b07806c12012-02-03 22:44:59561 'linux_use_gold_binary%': '<(linux_use_gold_binary)',
[email protected]8d726a42012-02-09 03:49:00562 'linux_use_gold_flags%': '<(linux_use_gold_flags)',
[email protected]62424a52012-03-18 03:09:50563 'use_canvas_skia%': '<(use_canvas_skia)',
[email protected]0ef3a522012-05-15 14:56:33564 'test_isolation_mode%': '<(test_isolation_mode)',
565 'test_isolation_outdir%': '<(test_isolation_outdir)',
[email protected]2e22e2f2012-03-15 21:53:10566 'enable_automation%': '<(enable_automation)',
[email protected]658677f2012-06-09 06:04:02567 'enable_printing%': '<(enable_printing)',
[email protected]e6026962012-06-14 21:28:32568 'enable_captive_portal_detection%': '<(enable_captive_portal_detection)',
[email protected]81d9b72d2012-03-26 22:29:17569 'force_rlz_use_chrome_net%': '<(force_rlz_use_chrome_net)',
[email protected]44879ed2012-04-06 01:11:02570 'enable_task_manager%': '<(enable_task_manager)',
[email protected]49ae3e52012-04-12 09:50:12571 'platformsdk_path%': '<(platformsdk_path)',
572 'wix_path%': '<(wix_path)',
[email protected]08d910e22012-05-11 05:42:35573 'android_upstream_bringup%': '<(android_upstream_bringup)',
[email protected]01971642012-03-07 14:39:56574
[email protected]371e1092011-10-12 20:37:36575 # Use system yasm instead of bundled one.
576 'use_system_yasm%': 0,
577
[email protected]cd00bd862012-02-29 00:40:36578 # Default to enabled PIE; this is important for ASLR but we may need to be
579 # able to turn it off for various reasons.
580 'linux_disable_pie%': 0,
581
[email protected]caa95c82009-11-23 22:39:32582 # The release channel that this build targets. This is used to restrict
583 # channel-specific build options, like which installer packages to create.
584 # The default is 'all', which does no channel-specific filtering.
585 'channel%': 'all',
586
[email protected]b3fb8092009-03-12 19:09:24587 # Override chromium_mac_pch and set it to 0 to suppress the use of
588 # precompiled headers on the Mac. Prefix header injection may still be
589 # used, but prefix headers will not be precompiled. This is useful when
590 # using distcc to distribute a build to compile slaves that don't
591 # share the same compiler executable as the system driving the compilation,
592 # because precompiled headers rely on pointers into a specific compiler
593 # executable's image. Setting this to 0 is needed to use an experimental
594 # Linux-Mac cross compiler distcc farm.
595 'chromium_mac_pch%': 1,
596
[email protected]3224dcd2009-09-16 17:31:25597 # Mac OS X SDK and deployment target support.
598 # The SDK identifies the version of the system headers that will be used,
599 # and corresponds to the MAC_OS_X_VERSION_MAX_ALLOWED compile-time macro.
600 # "Maximum allowed" refers to the operating system version whose APIs are
601 # available in the headers.
602 # The deployment target identifies the minimum system version that the
603 # built products are expected to function on. It corresponds to the
604 # MAC_OS_X_VERSION_MIN_REQUIRED compile-time macro.
605 # To ensure these macros are available, #include <AvailabilityMacros.h>.
606 # Additional documentation on these macros is available at
607 # http://developer.apple.com/mac/library/technotes/tn2002/tn2064.html#SECTION3
608 # Chrome normally builds with the Mac OS X 10.5 SDK and sets the
609 # deployment target to 10.5. Other projects, such as O3D, may override
610 # these defaults.
611 'mac_sdk%': '10.5',
612 'mac_deployment_target%': '10.5',
[email protected]9543af052009-09-15 22:42:59613
[email protected]27b687ec42012-03-26 22:22:15614 # The default value for mac_strip in target_defaults. This cannot be
615 # set there, per the comment about variable% in a target_defaults.
616 'mac_strip_release%': 1,
617
[email protected]f5ecbba12009-04-03 04:35:18618 # Set to 1 to enable code coverage. In addition to build changes
619 # (e.g. extra CFLAGS), also creates a new target in the src/chrome
620 # project file called "coverage".
621 # Currently ignored on Windows.
622 'coverage%': 0,
[email protected]653bd5f032009-04-08 12:55:49623
[email protected]9619e65d2012-05-23 19:06:52624 # Set to 1 to force Visual C++ to use legacy debug information format /Z7.
625 # This is useful for parallel compilation tools which can't support /Zi.
626 # Only used on Windows.
627 'win_z7%' : 0,
628
[email protected]7477ea6f2009-12-22 23:28:15629 # Although base/allocator lets you select a heap library via an
[email protected]7e0d664a2009-12-03 21:07:47630 # environment variable, the libcmt shim it uses sometimes gets in
631 # the way. To disable it entirely, and switch to normal msvcrt, do e.g.
632 # 'win_use_allocator_shim': 0,
633 # 'win_release_RuntimeLibrary': 2
634 # to ~/.gyp/include.gypi, gclient runhooks --force, and do a release build.
[email protected]8974e042010-06-21 18:06:52635 'win_use_allocator_shim%': 1, # 1 = shim allocator via libcmt; 0 = msvcrt
[email protected]279cd4212009-09-11 22:32:11636
[email protected]95ff8082009-11-13 22:21:01637 # Whether usage of OpenMAX is enabled.
638 'enable_openmax%': 0,
639
[email protected]d01120e62010-05-10 17:04:48640 # Whether proprietary audio/video codecs are assumed to be included with
641 # this build (only meaningful if branding!=Chrome).
642 'proprietary_codecs%': 0,
643
[email protected]e5b2eaa2009-04-14 01:39:12644 # TODO(bradnelson): eliminate this when possible.
645 # To allow local gyp files to prevent release.vsprops from being included.
646 # Yes(1) means include release.vsprops.
647 # Once all vsprops settings are migrated into gyp, this can go away.
648 'msvs_use_common_release%': 1,
[email protected]606116d22009-05-06 22:38:23649
[email protected]cbd5fd52009-08-26 00:14:27650 # TODO(bradnelson): eliminate this when possible.
651 # To allow local gyp files to override additional linker options for msvs.
652 # Yes(1) means set use the common linker options.
[email protected]48c7af72009-07-03 22:00:19653 'msvs_use_common_linker_extras%': 1,
654
[email protected]1ffb6502009-06-02 07:46:24655 # TODO(sgk): eliminate this if possible.
656 # It would be nicer to support this via a setting in 'target_defaults'
657 # in chrome/app/locales/locales.gypi overriding the setting in the
658 # 'Debug' configuration in the 'target_defaults' dict below,
659 # but that doesn't work as we'd like.
660 'msvs_debug_link_incremental%': '2',
661
[email protected]1f790ef2011-01-11 20:45:36662 # Needed for some of the largest modules.
663 'msvs_debug_link_nonincremental%': '1',
664
[email protected]5ab8f482011-08-18 18:30:06665 # Turn on Use Library Dependency Inputs for linking chrome.dll on Windows
666 # to get incremental linking to be faster in debug builds.
[email protected]f1b6f9912011-09-30 16:37:51667 'incremental_chrome_dll%': '<!(python <(DEPTH)/tools/win/supalink/check_installed.py)',
[email protected]5ab8f482011-08-18 18:30:06668
[email protected]573136142009-07-15 22:48:37669 # This is the location of the sandbox binary. Chrome looks for this before
670 # running the zygote process. If found, and SUID, it will be used to
671 # sandbox the zygote process and, thus, all renderer processes.
672 'linux_sandbox_path%': '',
673
[email protected]ad6d2c42009-09-15 20:13:38674 # Set this to true to enable SELinux support.
675 'selinux%': 0,
[email protected]4c9cc6c2009-10-01 18:54:57676
[email protected]3bb37e62012-04-19 03:40:08677 # Clang stuff.
678 'clang%': '<(clang)',
[email protected]e4ddf332011-10-20 21:52:24679 'make_clang_dir%': 'third_party/llvm-build/Release+Asserts',
[email protected]58680ce2010-09-18 00:09:15680
[email protected]5e781232011-01-28 02:57:59681 # These two variables can be set in GYP_DEFINES while running
682 # |gclient runhooks| to let clang run a plugin in every compilation.
683 # Only has an effect if 'clang=1' is in GYP_DEFINES as well.
684 # Example:
[email protected]93120fe2011-02-03 20:46:42685 # 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:59686
687 'clang_load%': '',
688 'clang_add_plugin%': '',
689
[email protected]da1c8d692011-09-20 20:35:01690 # The default type of gtest.
691 'gtest_target_type%': 'executable',
692
[email protected]7664ab32011-02-01 23:35:25693 # Enable sampling based profiler.
694 # See http://google-perftools.googlecode.com/svn/trunk/doc/cpuprofile.html
695 'profiling%': '0',
696
[email protected]93b373502011-08-16 19:06:22697 # Enable strict glibc debug mode.
698 'glibcxx_debug%': 0,
699
[email protected]36532f332010-08-25 00:22:01700 # Override whether we should use Breakpad on Linux. I.e. for Chrome bot.
701 'linux_breakpad%': 0,
702 # And if we want to dump symbols for Breakpad-enabled builds.
703 'linux_dump_symbols%': 0,
704 # And if we want to strip the binary after dumping symbols.
[email protected]05cb6962009-10-01 23:29:03705 'linux_strip_binary%': 0,
[email protected]1d87c282010-09-15 22:24:49706 # Strip the test binaries needed for Linux reliability tests.
707 'linux_strip_reliability_tests%': 0,
[email protected]05cb6962009-10-01 23:29:03708
[email protected]46ce5b562010-06-16 18:39:53709 # Enable TCMalloc.
710 'linux_use_tcmalloc%': 1,
[email protected]01699e22009-11-11 19:24:24711
[email protected]39ca7de2010-04-16 08:04:03712 # Disable TCMalloc's debugallocation.
713 'linux_use_debugallocation%': 0,
714
[email protected]d8b60602010-03-26 09:41:22715 # Disable TCMalloc's heapchecker.
716 'linux_use_heapchecker%': 0,
717
[email protected]64e2d4a42010-08-27 10:13:21718 # Disable shadow stack keeping used by heapcheck to unwind the stacks
719 # better.
720 'linux_keep_shadow_stacks%': 0,
721
[email protected]556c5d72010-06-10 05:45:01722 # Set to 1 to link against libgnome-keyring instead of using dlopen().
723 'linux_link_gnome_keyring%': 0,
[email protected]abcc9ac2011-05-16 20:04:35724 # Set to 1 to link against gsettings APIs instead of using dlopen().
725 'linux_link_gsettings%': 0,
[email protected]556c5d72010-06-10 05:45:01726
[email protected]77c1b29392009-12-04 06:21:29727 # Set Thumb compilation flags.
728 'arm_thumb%': 0,
729
[email protected]53e0f642010-03-05 01:41:56730 # Set ARM fpu compilation flags (only meaningful if armv7==1 and
731 # arm_neon==0).
732 'arm_fpu%': 'vfpv3',
733
[email protected]5252af72012-05-04 19:26:40734 # Set ARM float abi compilation flag.
735 'arm_float_abi%': 'softfp',
736
[email protected]9821d0d2010-04-16 22:40:37737 # Enable new NPDevice API.
738 'enable_new_npdevice_api%': 0,
[email protected]ed154592010-04-29 00:18:50739
740 # Enable EGLImage support in OpenMAX
[email protected]58023be2011-02-04 20:34:14741 'enable_eglimage%': 1,
[email protected]ed154592010-04-29 00:18:50742
[email protected]6f51b27e2010-06-22 20:43:53743 # Enable a variable used elsewhere throughout the GYP files to determine
744 # whether to compile in the sources for the GPU plugin / process.
745 'enable_gpu%': 1,
746
[email protected]e72e55b2011-01-06 22:19:30747 # .gyp files or targets should set chromium_code to 1 if they build
748 # Chromium-specific code, as opposed to external code. This variable is
749 # used to control such things as the set of warnings to enable, and
750 # whether warnings are treated as errors.
751 'chromium_code%': 0,
752
[email protected]8d726a42012-02-09 03:49:00753 'release_valgrind_build%': 0,
754
[email protected]b1eb341c2011-11-09 18:46:07755 # TODO(thakis): Make this a blacklist instead, http://crbug.com/101600
756 'enable_wexit_time_destructors%': 0,
757
[email protected]e72e55b2011-01-06 22:19:30758 # Set to 1 to compile with the built in pdf viewer.
759 'internal_pdf%': 0,
760
[email protected]e72e55b2011-01-06 22:19:30761 # NOTE: When these end up in the Mac bundle, we need to replace '-' for '_'
762 # so Cocoa is happy (http://crbug.com/20441).
763 'locales': [
764 'am', 'ar', 'bg', 'bn', 'ca', 'cs', 'da', 'de', 'el', 'en-GB',
765 'en-US', 'es-419', 'es', 'et', 'fa', 'fi', 'fil', 'fr', 'gu', 'he',
766 'hi', 'hr', 'hu', 'id', 'it', 'ja', 'kn', 'ko', 'lt', 'lv',
[email protected]925f94eb2012-01-28 00:57:19767 'ml', 'mr', 'ms', 'nb', 'nl', 'pl', 'pt-BR', 'pt-PT', 'ro', 'ru',
[email protected]e72e55b2011-01-06 22:19:30768 'sk', 'sl', 'sr', 'sv', 'sw', 'ta', 'te', 'th', 'tr', 'uk',
769 'vi', 'zh-CN', 'zh-TW',
770 ],
771
[email protected]cc0322d2011-07-24 09:29:19772 # Pseudo locales are special locales which are used for testing and
773 # debugging. They don't get copied to the final app. For more info,
774 # check out https://sites.google.com/a/chromium.org/dev/Home/fake-bidi
775 'pseudo_locales': [
776 'fake-bidi',
777 ],
778
[email protected]bb6aba32011-01-07 19:04:43779 'grit_defines': [],
780
[email protected]bd3bd442011-03-28 07:58:51781 # If debug_devtools is set to 1, JavaScript files for DevTools are
782 # stored as is and loaded from disk. Otherwise, a concatenated file
783 # is stored in resources.pak. It is still possible to load JS files
784 # from disk by passing --debug-devtools cmdline switch.
785 'debug_devtools%': 0,
786
[email protected]464750f2011-10-24 23:16:18787 # The Java Bridge is not compiled in by default.
788 'java_bridge%': 0,
789
[email protected]33e1c372011-12-14 16:32:07790 # This flag is only used when disable_nacl==0 and disables all those
791 # subcomponents which would require the installation of a native_client
792 # untrusted toolchain.
793 'disable_nacl_untrusted%': 0,
794
[email protected]407dfa632011-12-23 11:59:35795 # Disable Dart by default.
796 'enable_dart%': 0,
797
[email protected]ff10b132012-02-29 22:53:30798 # The desired version of Windows SDK can be set in ~/.gyp/include.gypi.
799 'msbuild_toolset%': '',
800
[email protected]836285f22012-04-03 16:19:26801 # Native Client is enabled by default.
802 'disable_nacl%': 0,
803
[email protected]49ae3e52012-04-12 09:50:12804 'platformsdk_exists': '<!(python <(DEPTH)/build/dir_exists.py <(platformsdk_path))',
805 'wix_exists': '<!(python <(DEPTH)/build/dir_exists.py <(wix_path))',
806
[email protected]912c55c2009-07-31 23:33:55807 'conditions': [
[email protected]556869e2012-06-15 14:46:18808 ['os_posix==1 and OS!="mac"', {
[email protected]242a9e62009-11-03 17:32:10809 # This will set gcc_version to XY if you are running gcc X.Y.*.
810 # This is used to tweak build flags for gcc 4.4.
811 'gcc_version%': '<!(python <(DEPTH)/build/compiler_version.py)',
[email protected]4d83eb72010-03-04 16:42:23812 # Figure out the python architecture to decide if we build pyauto.
[email protected]945361a2011-09-30 04:38:43813 'python_arch%': '<!(<(DEPTH)/build/linux/python_arch.sh <(sysroot)/usr/<(system_libdir)/libpython<(python_ver).so.1.0)',
[email protected]cbd5fd52009-08-26 00:14:27814 'conditions': [
[email protected]2a77a9d2010-08-26 19:58:10815 ['branding=="Chrome"', {
[email protected]cbd5fd52009-08-26 00:14:27816 'linux_breakpad%': 1,
[email protected]cbd5fd52009-08-26 00:14:27817 }],
[email protected]4c9cc6c2009-10-01 18:54:57818 # All Chrome builds have breakpad symbols, but only process the
819 # symbols from official builds.
[email protected]c913cb82010-08-31 19:44:08820 ['(branding=="Chrome" and buildtype=="Official")', {
[email protected]4c9cc6c2009-10-01 18:54:57821 'linux_dump_symbols%': 1,
[email protected]4c9cc6c2009-10-01 18:54:57822 }],
[email protected]cbd5fd52009-08-26 00:14:27823 ],
[email protected]556869e2012-06-15 14:46:18824 }],
[email protected]da1c8d692011-09-20 20:35:01825 ['OS=="android"', {
826 # Location of Android NDK.
827 'variables': {
828 'variables': {
829 'android_ndk_root%': '<!(/bin/echo -n $ANDROID_NDK_ROOT)',
[email protected]219c7312012-05-10 20:32:40830 # Android uses x86 instead of ia32 for their target_arch
[email protected]febd3572012-05-03 09:17:45831 # designation.
[email protected]219c7312012-05-10 20:32:40832 # TODO(wistoch): Adjust the target_arch naming scheme to avoid
[email protected]febd3572012-05-03 09:17:45833 # confusion.
834 # http://crbug.com/125329
835 'conditions': [
836 ['target_arch == "ia32"', {
837 'target_arch': 'x86',
[email protected]de5b7a42012-05-16 06:18:41838 'android_app_abi%': 'x86',
839 }],
840 ['target_arch=="arm" and armv7==0', {
841 'android_app_abi%': 'armeabi',
842 }],
843 ['target_arch=="arm" and armv7==1', {
844 'android_app_abi%': 'armeabi-v7a',
[email protected]febd3572012-05-03 09:17:45845 }],
846 ],
[email protected]bb6aba32011-01-07 19:04:43847
[email protected]da1c8d692011-09-20 20:35:01848 # Switch between different build types, currently only '0' is
849 # supported.
850 'android_build_type%': 0,
851 },
852 'android_ndk_root%': '<(android_ndk_root)',
[email protected]febc41db2012-03-24 02:44:43853 'android_ndk_sysroot': '<(android_ndk_root)/platforms/android-9/arch-<(target_arch)',
[email protected]da1c8d692011-09-20 20:35:01854 'android_build_type%': '<(android_build_type)',
[email protected]de5b7a42012-05-16 06:18:41855 'android_app_abi%': '<(android_app_abi)',
[email protected]da1c8d692011-09-20 20:35:01856 },
857 'android_ndk_root%': '<(android_ndk_root)',
858 'android_ndk_sysroot': '<(android_ndk_sysroot)',
859 'android_ndk_include': '<(android_ndk_sysroot)/usr/include',
860 'android_ndk_lib': '<(android_ndk_sysroot)/usr/lib',
[email protected]de5b7a42012-05-16 06:18:41861 'android_app_abi%': '<(android_app_abi)',
[email protected]da1c8d692011-09-20 20:35:01862
[email protected]ef7ed7a2012-05-29 23:19:13863 # Provides an absolute path to PRODUCT_DIR (e.g. out/Release). Used
864 # to specify the output directory for Ant in the Android build.
865 'ant_build_out': '`cd <(PRODUCT_DIR) && pwd -P`',
866
[email protected]da1c8d692011-09-20 20:35:01867 # Uses Android's crash report system
868 'linux_breakpad%': 0,
869
870 # Always uses openssl.
871 'use_openssl%': 1,
872
873 'proprietary_codecs%': '<(proprietary_codecs)',
[email protected]44879ed2012-04-06 01:11:02874 'enable_task_manager%': 0,
[email protected]da1c8d692011-09-20 20:35:01875 'safe_browsing%': 0,
876 'configuration_policy%': 0,
[email protected]9eb100e2011-10-14 05:08:22877 'input_speech%': 0,
[email protected]7e199322012-03-13 20:04:56878 'enable_web_intents%': 0,
[email protected]6a3cd37e2012-04-17 17:13:34879 'enable_extensions%': 0,
[email protected]658677f2012-06-09 06:04:02880 'enable_automation%': 0,
881 'enable_printing%': 0,
[email protected]464750f2011-10-24 23:16:18882 'java_bridge%': 1,
[email protected]658677f2012-06-09 06:04:02883
[email protected]6b40bb582012-03-15 20:50:38884 # Android does not support themes.
885 'enable_themes%': 0,
[email protected]58242012012-04-12 16:14:31886
887 # Android does not support background apps.
[email protected]0acdd772012-04-05 22:53:00888 'enable_background%': 0,
[email protected]5fd2e842012-03-01 00:29:11889
[email protected]58242012012-04-12 16:14:31890 # Android does not support promo resources service.
891 'enable_promo_resource_service%': 0,
892
[email protected]cdb756ef2012-04-05 18:34:53893 # Sessions are store separately in the Java side.
894 'enable_session_service%': 0,
895
[email protected]5fd2e842012-03-01 00:29:11896 # Set to 1 once we have a notification system for Android.
897 # http://crbug.com/115320
[email protected]7cce3232011-10-28 10:41:57898 'notifications%': 0,
[email protected]da1c8d692011-09-20 20:35:01899
[email protected]c6911392012-03-24 04:44:41900 'gtest_target_type%': '<(gtest_target_type)',
[email protected]7b56f1872012-05-23 00:48:50901 # TODO(jrg): when 'gtest_target_type'=='shared_library' and
[email protected]d9f96952012-04-19 21:02:09902 # OS==android, make all gtest_targets depend on
903 # testing/android/native_test.gyp:native_test_apk.
904 ### 'gtest_target_type': 'shared_libary',
[email protected]da1c8d692011-09-20 20:35:01905
906 # Uses system APIs for decoding audio and video.
907 'use_libffmpeg%': '0',
908
909 # Always use the chromium skia. The use_system_harfbuzz needs to
910 # match use_system_skia.
911 'use_system_skia%': '0',
912 'use_system_harfbuzz%': '0',
913
914 # Use the system icu.
[email protected]965b6b22011-09-29 16:07:28915 'use_system_icu%': 0,
[email protected]da1c8d692011-09-20 20:35:01916
[email protected]7c3dc4732012-04-13 07:37:15917 # TODO(yfriedman): Remove once unit_tests can link for Android.
918 # To override it specify:
919 # GYP_DEFINES="$GYP_DEFINES android_unit_test_target_type=executable"
920 # android_gyp
921 'android_unit_test_target_type%': 'static_library',
922
[email protected]da1c8d692011-09-20 20:35:01923 # Choose static link by build type.
924 'conditions': [
925 ['android_build_type==0', {
926 'static_link_system_icu%': 1,
927 }, {
928 'static_link_system_icu%': 0,
929 }],
930 ],
[email protected]3a820d12012-06-27 12:56:32931 # TODO(steveblock): Investigate using the system versions of sqlite,
932 # libjpeg, expat and stlport.
[email protected]da1c8d692011-09-20 20:35:01933 # Enable to use system sqlite.
[email protected]3a820d12012-06-27 12:56:32934 'use_system_sqlite%': 0, # '<(android_build_type)',
[email protected]d5cf9fb2011-09-27 00:15:16935 # Enable to use system libjpeg.
[email protected]3a820d12012-06-27 12:56:32936 'use_system_libjpeg%': 0, # '<(android_build_type)',
[email protected]da1c8d692011-09-20 20:35:01937 # Enable to use the system libexpat.
[email protected]3a820d12012-06-27 12:56:32938 'use_system_libexpat%': 0, # '<(android_build_type)',
[email protected]da1c8d692011-09-20 20:35:01939 # Enable to use the system stlport, otherwise statically
940 # link the NDK one?
[email protected]3a820d12012-06-27 12:56:32941 'use_system_stlport%': 0, # '<(android_build_type)',
[email protected]da1c8d692011-09-20 20:35:01942 # Copy it out one scope.
943 'android_build_type%': '<(android_build_type)',
944 }], # OS=="android"
[email protected]e14a9f92009-08-05 19:26:07945 ['OS=="mac"', {
[email protected]e1ece302011-09-15 03:58:11946 # Enable clang on mac by default!
947 'clang%': 1,
[email protected]794fb4782011-12-14 19:10:56948 # Compile in Breakpad support by default so that it can be
949 # tested, even if it is not enabled by default at runtime.
950 'mac_breakpad_compiled_in%': 1,
[email protected]e14a9f92009-08-05 19:26:07951 'conditions': [
952 # mac_product_name is set to the name of the .app bundle as it should
953 # appear on disk. This duplicates data from
954 # chrome/app/theme/chromium/BRANDING and
955 # chrome/app/theme/google_chrome/BRANDING, but is necessary to get
956 # these names into the build system.
957 ['branding=="Chrome"', {
958 'mac_product_name%': 'Google Chrome',
959 }, { # else: branding!="Chrome"
960 'mac_product_name%': 'Chromium',
961 }],
962
[email protected]e14a9f92009-08-05 19:26:07963 ['branding=="Chrome" and buildtype=="Official"', {
[email protected]794fb4782011-12-14 19:10:56964 # Enable uploading crash dumps.
965 'mac_breakpad_uploads%': 1,
966 # Enable dumping symbols at build time for use by Mac Breakpad.
[email protected]e14a9f92009-08-05 19:26:07967 'mac_breakpad%': 1,
[email protected]794fb4782011-12-14 19:10:56968 # Enable Keystone auto-update support.
[email protected]e14a9f92009-08-05 19:26:07969 'mac_keystone%': 1,
970 }, { # else: branding!="Chrome" or buildtype!="Official"
[email protected]794fb4782011-12-14 19:10:56971 'mac_breakpad_uploads%': 0,
[email protected]e14a9f92009-08-05 19:26:07972 'mac_breakpad%': 0,
973 'mac_keystone%': 0,
974 }],
975 ],
976 }], # OS=="mac"
[email protected]bb6aba32011-01-07 19:04:43977
[email protected]912c55c2009-07-31 23:33:55978 ['OS=="win"', {
979 'conditions': [
[email protected]8974e042010-06-21 18:06:52980 ['component=="shared_library"', {
981 'win_use_allocator_shim%': 0,
982 }],
[email protected]2212d272011-12-20 21:37:37983 # Whether to use multiple cores to compile with visual studio. This is
984 # optional because it sometimes causes corruption on VS 2005.
985 # It is on by default on VS 2008 and off on VS 2005.
[email protected]912c55c2009-07-31 23:33:55986 ['MSVS_VERSION=="2005"', {
[email protected]669795372009-08-14 17:51:13987 'msvs_multi_core_compile%': 0,
[email protected]912c55c2009-07-31 23:33:55988 },{
989 'msvs_multi_core_compile%': 1,
990 }],
[email protected]10bb8c92009-08-07 21:16:03991 # Don't do incremental linking for large modules on 32-bit.
992 ['MSVS_OS_BITS==32', {
993 'msvs_large_module_debug_link_mode%': '1', # No
994 },{
995 'msvs_large_module_debug_link_mode%': '2', # Yes
996 }],
[email protected]3e2648a2011-03-21 20:58:50997 ['MSVS_VERSION=="2010e" or MSVS_VERSION=="2008e" or MSVS_VERSION=="2005e"', {
998 'msvs_express%': 1,
999 'secure_atl%': 0,
1000 },{
1001 'msvs_express%': 0,
1002 'secure_atl%': 1,
1003 }],
[email protected]912c55c2009-07-31 23:33:551004 ],
[email protected]ef4fa4072009-12-04 22:46:501005 'nacl_win64_defines': [
1006 # This flag is used to minimize dependencies when building
1007 # Native Client loader for 64-bit Windows.
1008 'NACL_WIN64',
1009 ],
[email protected]912c55c2009-07-31 23:33:551010 }],
[email protected]bb6aba32011-01-07 19:04:431011
[email protected]febd3572012-05-03 09:17:451012 ['os_posix==1 and chromeos==0 and OS!="android"', {
[email protected]8e553f492010-10-25 20:05:441013 'use_cups%': 1,
1014 }, {
1015 'use_cups%': 0,
1016 }],
[email protected]bb6aba32011-01-07 19:04:431017
[email protected]2f7da672012-06-21 08:38:321018 # Native Client glibc toolchain is enabled by default except on arm.
1019 ['target_arch=="arm"', {
1020 'disable_glibc%': 1,
1021 }, {
1022 'disable_glibc%': 0,
1023 }],
1024
[email protected]19fe8f0b2010-12-07 07:27:271025 # Set the relative path from this file to the GYP file of the JPEG
1026 # library used by Chromium.
1027 ['use_libjpeg_turbo==1', {
1028 'libjpeg_gyp_path': '../third_party/libjpeg_turbo/libjpeg.gyp',
1029 }, {
1030 'libjpeg_gyp_path': '../third_party/libjpeg/libjpeg.gyp',
1031 }], # use_libjpeg_turbo==1
[email protected]bb6aba32011-01-07 19:04:431032
[email protected]abcc9ac2011-05-16 20:04:351033 # Options controlling the use of GConf (the classic GNOME configuration
1034 # system) and GIO, which contains GSettings (the new GNOME config system).
[email protected]1c6fe29302011-01-20 22:14:311035 ['chromeos==1', {
1036 'use_gconf%': 0,
[email protected]abcc9ac2011-05-16 20:04:351037 'use_gio%': 0,
[email protected]1c6fe29302011-01-20 22:14:311038 }, {
1039 'use_gconf%': 1,
[email protected]abcc9ac2011-05-16 20:04:351040 'use_gio%': 1,
[email protected]1c6fe29302011-01-20 22:14:311041 }],
1042
[email protected]4de39f82011-03-28 12:01:291043 # Set up -D and -E flags passed into grit.
[email protected]1660bffd2011-03-23 16:24:291044 ['branding=="Chrome"', {
1045 # TODO(mmoss) The .grd files look for _google_chrome, but for
1046 # consistency they should look for google_chrome_build like C++.
[email protected]4de39f82011-03-28 12:01:291047 'grit_defines': ['-D', '_google_chrome',
1048 '-E', 'CHROMIUM_BUILD=google_chrome'],
[email protected]1660bffd2011-03-23 16:24:291049 }, {
[email protected]4de39f82011-03-28 12:01:291050 'grit_defines': ['-D', '_chromium',
1051 '-E', 'CHROMIUM_BUILD=chromium'],
[email protected]1660bffd2011-03-23 16:24:291052 }],
[email protected]bb6aba32011-01-07 19:04:431053 ['chromeos==1', {
[email protected]d4d81e92012-06-04 20:10:131054 'grit_defines': ['-D', 'chromeos', '-D', 'scale_factors=2x'],
[email protected]bb6aba32011-01-07 19:04:431055 }],
1056 ['toolkit_views==1', {
1057 'grit_defines': ['-D', 'toolkit_views'],
1058 }],
[email protected]8dd791d2011-09-16 16:37:301059 ['use_aura==1', {
1060 'grit_defines': ['-D', 'use_aura'],
1061 }],
[email protected]ed329be2012-01-03 22:02:161062 ['use_ash==1', {
1063 'grit_defines': ['-D', 'use_ash'],
1064 }],
[email protected]c329adf82011-10-05 14:34:571065 ['use_nss==1', {
1066 'grit_defines': ['-D', 'use_nss'],
1067 }],
[email protected]e47c32032011-03-01 19:26:201068 ['file_manager_extension==1', {
1069 'grit_defines': ['-D', 'file_manager_extension'],
1070 }],
[email protected]9a425422011-01-11 00:53:181071 ['remoting==1', {
1072 'grit_defines': ['-D', 'remoting'],
1073 }],
[email protected]bb6aba32011-01-07 19:04:431074 ['use_titlecase_in_grd_files==1', {
1075 'grit_defines': ['-D', 'use_titlecase'],
1076 }],
[email protected]00dc155832011-02-01 18:51:191077 ['use_third_party_translations==1', {
1078 'grit_defines': ['-D', 'use_third_party_translations'],
[email protected]fb6c1022011-06-27 21:58:121079 'locales': [
[email protected]8581e1ba2011-08-22 23:27:161080 'ast', 'bs', 'ca@valencia', 'en-AU', 'eo', 'eu', 'gl', 'hy', 'ia',
1081 'ka', 'ku', 'kw', 'ms', 'ug'
[email protected]fb6c1022011-06-27 21:58:121082 ],
[email protected]00dc155832011-02-01 18:51:191083 }],
[email protected]da1c8d692011-09-20 20:35:011084 ['OS=="android"', {
1085 'grit_defines': ['-D', 'android'],
1086 }],
[email protected]d39e3862012-06-26 22:38:231087 ['OS=="mac"', {
1088 'grit_defines': ['-D', 'scale_factors=2x'],
1089 }],
[email protected]6a3cd37e2012-04-17 17:13:341090 ['enable_extensions==1', {
1091 'grit_defines': ['-D', 'enable_extensions'],
1092 }],
[email protected]658677f2012-06-09 06:04:021093 ['enable_printing==1', {
1094 'grit_defines': ['-D', 'enable_printing'],
1095 }],
[email protected]3bb37e62012-04-19 03:40:081096 ['clang_use_chrome_plugins==1 and OS!="win"', {
[email protected]890ebb72012-06-27 05:02:201097 'clang_chrome_plugins_flags': [
1098 '<!@(<(DEPTH)/tools/clang/scripts/plugin_flags.sh)'
[email protected]c872dc52012-05-19 06:36:311099 ],
[email protected]5d451ad2011-02-11 16:43:461100 }],
[email protected]cfa2e1102011-04-27 22:30:231101
[email protected]5ffb0a42012-01-27 09:36:111102 ['enable_web_intents_tag==1', {
1103 'grit_defines': ['-D', 'enable_web_intents_tag'],
[email protected]41ed4e82011-08-25 23:02:071104 }],
1105
[email protected]92799b632011-08-15 14:33:061106 ['asan==1', {
1107 'clang%': 1,
[email protected]5dc6aaac2011-10-12 16:55:201108 # Do not use Chrome plugins for Clang. The Clang version in
1109 # third_party/asan may be different from the default one.
1110 'clang_use_chrome_plugins%': 0,
[email protected]92799b632011-08-15 14:33:061111 }],
[email protected]a9318c72012-03-01 01:29:471112
1113 # On valgrind bots, override the optimizer settings so we don't inline too
1114 # much and make the stacks harder to figure out.
1115 #
1116 # TODO(rnk): Kill off variables that no one else uses and just implement
1117 # them under a build_for_tool== condition.
1118 ['build_for_tool=="memcheck" or build_for_tool=="tsan"', {
1119 # gcc flags
1120 'mac_debug_optimization': '1',
1121 'mac_release_optimization': '1',
1122 'release_optimize': '1',
1123 'no_gc_sections': 1,
1124 'debug_extra_cflags': '-g -fno-inline -fno-omit-frame-pointer '
1125 '-fno-builtin -fno-optimize-sibling-calls',
1126 'release_extra_cflags': '-g -fno-inline -fno-omit-frame-pointer '
1127 '-fno-builtin -fno-optimize-sibling-calls',
1128
1129 # MSVS flags for TSan on Pin and Windows.
1130 'win_debug_RuntimeChecks': '0',
1131 'win_debug_disable_iterator_debugging': '1',
1132 'win_debug_Optimization': '1',
1133 'win_debug_InlineFunctionExpansion': '0',
1134 'win_release_InlineFunctionExpansion': '0',
1135 'win_release_OmitFramePointers': '0',
1136
1137 'linux_use_tcmalloc': 1,
1138 'release_valgrind_build': 1,
1139 'werror': '',
1140 'component': 'static_library',
1141 'use_system_zlib': 0,
1142 }],
1143
1144 # Build tweaks for DrMemory.
1145 # TODO(rnk): Combine with tsan config to share the builder.
1146 # http://crbug.com/108155
1147 ['build_for_tool=="drmemory"', {
1148 # DrMemory can't handle the debug CRT dll, so build static.
1149 'component': 'static_library',
1150 # These runtime checks force initialization of stack vars which blocks
1151 # DrMemory's uninit detection.
1152 'win_debug_RuntimeChecks': '0',
1153 # Iterator debugging is slow.
1154 'win_debug_disable_iterator_debugging': '1',
1155 # Try to disable optimizations that mess up stacks in a release build.
1156 'win_release_InlineFunctionExpansion': '0',
1157 'win_release_OmitFramePointers': '0',
1158 # Keep the code under #ifndef NVALGRIND.
1159 'release_valgrind_build': 1,
1160 }],
[email protected]912c55c2009-07-31 23:33:551161 ],
[email protected]a9318c72012-03-01 01:29:471162
[email protected]35958422011-09-28 02:03:591163 # List of default apps to install in new profiles. The first list contains
1164 # the source files as found in svn. The second list, used only for linux,
[email protected]20cc0bb72011-10-26 00:57:061165 # contains the destination location for each of the files. When a crx
1166 # is added or removed from the list, the chrome/browser/resources/
1167 # default_apps/external_extensions.json file must also be updated.
[email protected]35958422011-09-28 02:03:591168 'default_apps_list': [
[email protected]9d6052a12012-06-25 18:40:101169 'browser/resources/default_apps/drive.crx',
[email protected]35958422011-09-28 02:03:591170 'browser/resources/default_apps/external_extensions.json',
1171 'browser/resources/default_apps/gmail.crx',
[email protected]20cc0bb72011-10-26 00:57:061172 'browser/resources/default_apps/search.crx',
[email protected]35958422011-09-28 02:03:591173 'browser/resources/default_apps/youtube.crx',
1174 ],
1175 'default_apps_list_linux_dest': [
[email protected]9d6052a12012-06-25 18:40:101176 '<(PRODUCT_DIR)/default_apps/drive.crx',
[email protected]35958422011-09-28 02:03:591177 '<(PRODUCT_DIR)/default_apps/external_extensions.json',
1178 '<(PRODUCT_DIR)/default_apps/gmail.crx',
[email protected]20cc0bb72011-10-26 00:57:061179 '<(PRODUCT_DIR)/default_apps/search.crx',
[email protected]35958422011-09-28 02:03:591180 '<(PRODUCT_DIR)/default_apps/youtube.crx',
1181 ],
[email protected]2f80c312009-02-25 21:26:551182 },
1183 'target_defaults': {
[email protected]1c966092009-08-20 21:19:261184 'variables': {
[email protected]a6e22132010-02-10 20:43:181185 # The condition that operates on chromium_code is in a target_conditions
1186 # section, and will not have access to the default fallback value of
1187 # chromium_code at the top of this file, or to the chromium_code
1188 # variable placed at the root variables scope of .gyp files, because
1189 # those variables are not set at target scope. As a workaround,
1190 # if chromium_code is not set at target scope, define it in target scope
1191 # to contain whatever value it has during early variable expansion.
1192 # That's enough to make it available during target conditional
1193 # processing.
1194 'chromium_code%': '<(chromium_code)',
1195
[email protected]7e0d664a2009-12-03 21:07:471196 # See http://gcc.gnu.org/onlinedocs/gcc-4.4.2/gcc/Optimize-Options.html
[email protected]d5d593a2009-08-28 23:23:291197 'mac_release_optimization%': '3', # Use -O3 unless overridden
[email protected]ffd984b12009-09-11 19:37:001198 'mac_debug_optimization%': '0', # Use -O0 unless overridden
[email protected]626d2d22011-10-11 15:47:331199
[email protected]7e0d664a2009-12-03 21:07:471200 # See http://msdn.microsoft.com/en-us/library/aa652360(VS.71).aspx
1201 'win_release_Optimization%': '2', # 2 = /Os
1202 'win_debug_Optimization%': '0', # 0 = /Od
[email protected]626d2d22011-10-11 15:47:331203
1204 # See http://msdn.microsoft.com/en-us/library/2kxx5t2c(v=vs.80).aspx
[email protected]ef5c5f1b2011-12-17 02:16:241205 # Tri-state: blank is default, 1 on, 0 off
[email protected]65d61e62012-06-01 21:52:111206 'win_release_OmitFramePointers%': '0',
[email protected]ef5c5f1b2011-12-17 02:16:241207 # Tri-state: blank is default, 1 on, 0 off
1208 'win_debug_OmitFramePointers%': '',
[email protected]626d2d22011-10-11 15:47:331209
[email protected]6b0507b2010-05-07 07:41:211210 # See http://msdn.microsoft.com/en-us/library/8wtf2dfz(VS.71).aspx
1211 'win_debug_RuntimeChecks%': '3', # 3 = all checks enabled, 0 = off
[email protected]626d2d22011-10-11 15:47:331212
[email protected]6b0507b2010-05-07 07:41:211213 # See http://msdn.microsoft.com/en-us/library/47238hez(VS.71).aspx
[email protected]2ae6e022010-05-07 13:19:151214 'win_debug_InlineFunctionExpansion%': '', # empty = default, 0 = off,
1215 'win_release_InlineFunctionExpansion%': '2', # 1 = only __inline, 2 = max
[email protected]626d2d22011-10-11 15:47:331216
[email protected]fac10d12010-11-08 16:00:311217 # VS inserts quite a lot of extra checks to algorithms like
1218 # std::partial_sort in Debug build which make them O(N^2)
1219 # instead of O(N*logN). This is particularly slow under memory
1220 # tools like ThreadSanitizer so we want it to be disablable.
1221 # See http://msdn.microsoft.com/en-us/library/aa985982(v=VS.80).aspx
1222 'win_debug_disable_iterator_debugging%': '0',
[email protected]7e0d664a2009-12-03 21:07:471223
[email protected]ffd984b12009-09-11 19:37:001224 'release_extra_cflags%': '',
1225 'debug_extra_cflags%': '',
[email protected]8d726a42012-02-09 03:49:001226
1227 'release_valgrind_build%': '<(release_valgrind_build)',
[email protected]8974e042010-06-21 18:06:521228
[email protected]ef5c5f1b2011-12-17 02:16:241229 # the non-qualified versions are widely assumed to be *nix-only
1230 'win_release_extra_cflags%': '',
1231 'win_debug_extra_cflags%': '',
1232
[email protected]b1eb341c2011-11-09 18:46:071233 # TODO(thakis): Make this a blacklist instead, http://crbug.com/101600
1234 'enable_wexit_time_destructors%': '<(enable_wexit_time_destructors)',
1235
[email protected]ef3326702011-10-06 18:06:441236 # Only used by Windows build for now. Can be used to build into a
1237 # differet output directory, e.g., a build_dir_prefix of VS2010_ would
1238 # output files in src/build/VS2010_{Debug,Release}.
1239 'build_dir_prefix%': '',
1240
[email protected]9ac2db692012-06-08 01:01:571241 # Targets are by default not nacl untrusted code.
1242 'nacl_untrusted_build%': 0,
1243
[email protected]8974e042010-06-21 18:06:521244 'conditions': [
1245 ['OS=="win" and component=="shared_library"', {
1246 # See http://msdn.microsoft.com/en-us/library/aa652367.aspx
[email protected]49e8e022012-03-16 15:22:161247 'win_release_RuntimeLibrary%': '2', # 2 = /MD (nondebug DLL)
1248 'win_debug_RuntimeLibrary%': '3', # 3 = /MDd (debug DLL)
[email protected]8974e042010-06-21 18:06:521249 }, {
1250 # See http://msdn.microsoft.com/en-us/library/aa652367.aspx
1251 'win_release_RuntimeLibrary%': '0', # 0 = /MT (nondebug static)
1252 'win_debug_RuntimeLibrary%': '1', # 1 = /MTd (debug static)
1253 }],
1254 ],
[email protected]1c966092009-08-20 21:19:261255 },
[email protected]32aa8cc2009-03-04 21:36:391256 'conditions': [
[email protected]ff10b132012-02-29 22:53:301257 ['OS=="win" and "<(msbuild_toolset)"!=""', {
1258 'msbuild_toolset': '<(msbuild_toolset)',
1259 }],
[email protected]32aa8cc2009-03-04 21:36:391260 ['branding=="Chrome"', {
1261 'defines': ['GOOGLE_CHROME_BUILD'],
1262 }, { # else: branding!="Chrome"
1263 'defines': ['CHROMIUM_BUILD'],
1264 }],
[email protected]286d9a12012-05-30 16:20:381265 ['OS=="mac" and component=="shared_library"', {
1266 'xcode_settings': {
1267 'DYLIB_INSTALL_NAME_BASE': '@rpath',
1268 'LD_RUNPATH_SEARCH_PATHS': [
1269 # For unbundled binaries.
1270 '@loader_path/.',
1271 # For bundled binaries, to get back from Binary.app/Contents/MacOS.
1272 '@loader_path/../../..',
1273 ],
1274 },
1275 }],
[email protected]81d9b72d2012-03-26 22:29:171276 ['branding=="Chrome" and (OS=="win" or OS=="mac")', {
1277 'defines': ['ENABLE_RLZ'],
1278 }],
[email protected]63e39a282011-07-13 20:41:281279 ['component=="shared_library"', {
1280 'defines': ['COMPONENT_BUILD'],
1281 }],
[email protected]06c756182010-04-27 18:31:311282 ['toolkit_views==1', {
[email protected]e6970232009-05-12 23:51:171283 'defines': ['TOOLKIT_VIEWS=1'],
1284 }],
[email protected]1ee7c56c2011-10-19 14:51:331285 ['ui_compositor_image_transport==1', {
[email protected]839d5172011-10-13 17:18:111286 'defines': ['UI_COMPOSITOR_IMAGE_TRANSPORT'],
1287 }],
[email protected]41423092011-08-25 15:39:581288 ['use_aura==1', {
1289 'defines': ['USE_AURA=1'],
[email protected]e599f0132011-08-24 19:03:351290 }],
[email protected]ed329be2012-01-03 22:02:161291 ['use_ash==1', {
1292 'defines': ['USE_ASH=1'],
1293 }],
[email protected]c329adf82011-10-05 14:34:571294 ['use_nss==1', {
1295 'defines': ['USE_NSS=1'],
1296 }],
[email protected]bd7b6fe2012-03-05 21:02:401297 ['enable_one_click_signin==1', {
1298 'defines': ['ENABLE_ONE_CLICK_SIGNIN'],
1299 }],
[email protected]a47aa892011-11-22 03:12:311300 ['toolkit_uses_gtk==1 and toolkit_views==0', {
1301 # TODO(erg): We are progressively sealing up use of deprecated features
1302 # in gtk in preparation for an eventual porting to gtk3.
1303 'defines': ['GTK_DISABLE_SINGLE_INCLUDES=1'],
1304 }],
[email protected]fdc5bed2010-01-09 01:16:571305 ['chromeos==1', {
[email protected]16779842009-07-08 23:45:291306 'defines': ['OS_CHROMEOS=1'],
[email protected]2b883b92009-06-02 22:57:501307 }],
[email protected]f56797b2011-09-25 00:04:351308 ['use_xi2_mt!=0', {
1309 'defines': ['USE_XI2_MT=<(use_xi2_mt)'],
1310 }],
[email protected]e47c32032011-03-01 19:26:201311 ['file_manager_extension==1', {
1312 'defines': ['FILE_MANAGER_EXTENSION=1'],
1313 }],
[email protected]7664ab32011-02-01 23:35:251314 ['profiling==1', {
1315 'defines': ['ENABLE_PROFILING=1'],
1316 }],
[email protected]93b373502011-08-16 19:06:221317 ['OS=="linux" and glibcxx_debug==1', {
1318 'defines': ['_GLIBCXX_DEBUG=1',],
1319 'cflags_cc!': ['-fno-rtti'],
1320 'cflags_cc+': ['-frtti', '-g'],
1321 }],
[email protected]542bf24a2010-06-11 23:08:171322 ['remoting==1', {
1323 'defines': ['ENABLE_REMOTING=1'],
[email protected]c0bac532010-06-11 00:39:001324 }],
[email protected]5b87e782012-02-09 18:19:321325 ['enable_webrtc==1', {
1326 'defines': ['ENABLE_WEBRTC=1'],
1327 }],
[email protected]d01120e62010-05-10 17:04:481328 ['proprietary_codecs==1', {
1329 'defines': ['USE_PROPRIETARY_CODECS'],
1330 }],
[email protected]67c125d2011-10-11 18:58:221331 ['enable_pepper_threading==1', {
1332 'defines': ['ENABLE_PEPPER_THREADING'],
1333 }],
[email protected]7ddea9802012-02-22 23:08:051334 ['enable_viewport==1', {
1335 'defines': ['ENABLE_VIEWPORT'],
1336 }],
[email protected]f31e2e52011-07-14 16:01:191337 ['configuration_policy==1', {
1338 'defines': ['ENABLE_CONFIGURATION_POLICY'],
1339 }],
[email protected]9eb100e2011-10-14 05:08:221340 ['input_speech==1', {
1341 'defines': ['ENABLE_INPUT_SPEECH'],
1342 }],
[email protected]7cce3232011-10-28 10:41:571343 ['notifications==1', {
1344 'defines': ['ENABLE_NOTIFICATIONS'],
1345 }],
[email protected]1efbaaa2012-04-24 02:43:241346 ['enable_hidpi==1', {
1347 'defines': ['ENABLE_HIDPI=1'],
1348 }],
[email protected]7b56f1872012-05-23 00:48:501349 ['OS=="android" and gtest_target_type=="shared_library"', {
1350 'defines': ['ANDROID_APK_TEST_TARGET=1'],
1351 }],
[email protected]9c1949e2009-10-02 19:59:541352 ['fastbuild!=0', {
[email protected]5834f4392011-09-13 20:06:171353
[email protected]9c1949e2009-10-02 19:59:541354 'conditions': [
[email protected]da4d4ea2011-09-22 20:23:141355 # For Windows and Mac, we don't genererate debug information.
1356 ['OS=="win" or OS=="mac"', {
[email protected]9c1949e2009-10-02 19:59:541357 'msvs_settings': {
1358 'VCLinkerTool': {
1359 'GenerateDebugInformation': 'false',
1360 },
1361 'VCCLCompilerTool': {
1362 'DebugInformationFormat': '0',
1363 }
[email protected]da4d4ea2011-09-22 20:23:141364 },
1365 'xcode_settings': {
1366 'GCC_GENERATE_DEBUGGING_SYMBOLS': 'NO',
1367 },
[email protected]1cc2fa72010-07-03 08:49:241368 }, { # else: OS != "win", generate less debug information.
1369 'variables': {
1370 'debug_extra_cflags': '-g1',
1371 },
[email protected]37c84192010-04-14 21:37:401372 }],
[email protected]aecc4d12011-01-19 05:32:331373 # Clang creates chubby debug information, which makes linking very
1374 # slow. For now, don't create debug information with clang. See
1375 # http://crbug.com/70000
1376 ['OS=="linux" and clang==1', {
1377 'variables': {
1378 'debug_extra_cflags': '-g0',
1379 },
1380 }],
[email protected]9c1949e2009-10-02 19:59:541381 ], # conditions for fastbuild.
1382 }], # fastbuild!=0
[email protected]20960e072011-09-20 20:59:011383 ['dcheck_always_on!=0', {
1384 'defines': ['DCHECK_ALWAYS_ON=1'],
1385 }], # dcheck_always_on!=0
[email protected]ad6d2c42009-09-15 20:13:381386 ['selinux==1', {
1387 'defines': ['CHROMIUM_SELINUX=1'],
1388 }],
[email protected]7e0d664a2009-12-03 21:07:471389 ['win_use_allocator_shim==0', {
1390 'conditions': [
1391 ['OS=="win"', {
1392 'defines': ['NO_TCMALLOC'],
1393 }],
1394 ],
1395 }],
[email protected]43f28f832010-02-03 02:28:481396 ['enable_gpu==1', {
[email protected]7477ea6f2009-12-22 23:28:151397 'defines': [
1398 'ENABLE_GPU=1',
1399 ],
1400 }],
[email protected]b1c2a5542010-10-08 12:44:401401 ['use_openssl==1', {
1402 'defines': [
1403 'USE_OPENSSL=1',
1404 ],
1405 }],
[email protected]ed154592010-04-29 00:18:501406 ['enable_eglimage==1', {
1407 'defines': [
1408 'ENABLE_EGLIMAGE=1',
1409 ],
1410 }],
[email protected]7d7564a12011-06-21 19:20:221411 ['use_skia==1', {
1412 'defines': [
1413 'USE_SKIA=1',
1414 ],
1415 }],
[email protected]f5ecbba12009-04-03 04:35:181416 ['coverage!=0', {
1417 'conditions': [
1418 ['OS=="mac"', {
1419 'xcode_settings': {
[email protected]ab2956372009-08-13 18:11:041420 'GCC_INSTRUMENT_PROGRAM_FLOW_ARCS': 'YES', # -fprofile-arcs
1421 'GCC_GENERATE_TEST_COVERAGE_FILES': 'YES', # -ftest-coverage
[email protected]5ae4f55e2009-04-13 23:19:471422 },
[email protected]e4fb84c2009-12-28 20:45:431423 # Add -lgcov for types executable, shared_library, and
[email protected]dc259ce52010-04-13 04:03:101424 # loadable_module; not for static_library.
[email protected]e4fb84c2009-12-28 20:45:431425 # This is a delayed conditional.
[email protected]f5ecbba12009-04-03 04:35:181426 'target_conditions': [
[email protected]e4fb84c2009-12-28 20:45:431427 ['_type!="static_library"', {
[email protected]f5ecbba12009-04-03 04:35:181428 'xcode_settings': { 'OTHER_LDFLAGS': [ '-lgcov' ] },
[email protected]5ae4f55e2009-04-13 23:19:471429 }],
1430 ],
1431 }],
[email protected]da1c8d692011-09-20 20:35:011432 ['OS=="linux" or OS=="android"', {
[email protected]f5ecbba12009-04-03 04:35:181433 'cflags': [ '-ftest-coverage',
1434 '-fprofile-arcs' ],
[email protected]7122ffd52009-04-30 23:19:001435 'link_settings': { 'libraries': [ '-lgcov' ] },
[email protected]f5ecbba12009-04-03 04:35:181436 }],
[email protected]e8f6ff42009-07-07 18:20:531437 # Finally, for Windows, we simply turn on profiling.
1438 ['OS=="win"', {
1439 'msvs_settings': {
1440 'VCLinkerTool': {
1441 'Profile': 'true',
1442 },
[email protected]10bb8c92009-08-07 21:16:031443 'VCCLCompilerTool': {
[email protected]e8f6ff42009-07-07 18:20:531444 # /Z7, not /Zi, so coverage is happyb
1445 'DebugInformationFormat': '1',
[email protected]1f9471a2010-01-04 06:40:161446 'AdditionalOptions': ['/Yd'],
[email protected]e8f6ff42009-07-07 18:20:531447 }
1448 }
1449 }], # OS==win
1450 ], # conditions for coverage
1451 }], # coverage!=0
[email protected]4e4d6042010-08-26 18:34:381452 ['OS=="win"', {
1453 'defines': [
1454 '__STD_C',
1455 '_CRT_SECURE_NO_DEPRECATE',
1456 '_SCL_SECURE_NO_DEPRECATE',
1457 ],
1458 'include_dirs': [
1459 '<(DEPTH)/third_party/wtl/include',
1460 ],
[email protected]9619e65d2012-05-23 19:06:521461 'conditions': [
1462 ['win_z7!=0', {
1463 'msvs_settings': {
1464 'VCCLCompilerTool': {
1465 'DebugInformationFormat': '1',
1466 }
1467 }
1468 }],
1469 ], # win_z7!=0
[email protected]4e4d6042010-08-26 18:34:381470 }], # OS==win
[email protected]44879ed2012-04-06 01:11:021471 ['enable_task_manager==1', {
1472 'defines': [
1473 'ENABLE_TASK_MANAGER=1',
1474 ],
1475 }],
[email protected]41ed4e82011-08-25 23:02:071476 ['enable_web_intents==1', {
1477 'defines': [
[email protected]1f2d9ed2011-10-04 20:18:471478 'ENABLE_WEB_INTENTS=1',
[email protected]41ed4e82011-08-25 23:02:071479 ],
1480 }],
[email protected]6a3cd37e2012-04-17 17:13:341481 ['enable_extensions==1', {
1482 'defines': [
1483 'ENABLE_EXTENSIONS=1',
1484 ],
1485 }],
[email protected]13eb97d2012-01-05 01:07:121486 ['OS=="win" and branding=="Chrome"', {
1487 'defines': ['ENABLE_SWIFTSHADER'],
1488 }],
[email protected]407dfa632011-12-23 11:59:351489 ['enable_dart==1', {
1490 'defines': ['WEBKIT_USING_DART=1'],
1491 }],
[email protected]18e0f39b2012-01-17 16:47:341492 ['enable_plugin_installation==1', {
1493 'defines': ['ENABLE_PLUGIN_INSTALLATION=1'],
1494 }],
[email protected]ddcaa412012-03-30 19:57:291495 ['enable_protector_service==1', {
1496 'defines': ['ENABLE_PROTECTOR_SERVICE=1'],
1497 }],
[email protected]cdb756ef2012-04-05 18:34:531498 ['enable_session_service==1', {
1499 'defines': ['ENABLE_SESSION_SERVICE=1'],
1500 }],
[email protected]6b40bb582012-03-15 20:50:381501 ['enable_themes==1', {
1502 'defines': ['ENABLE_THEMES=1'],
1503 }],
[email protected]0acdd772012-04-05 22:53:001504 ['enable_background==1', {
1505 'defines': ['ENABLE_BACKGROUND=1'],
1506 }],
[email protected]58242012012-04-12 16:14:311507 ['enable_promo_resource_service==1', {
1508 'defines': ['ENABLE_PROMO_RESOURCE_SERVICE=1'],
1509 }],
[email protected]2e22e2f2012-03-15 21:53:101510 ['enable_automation==1', {
1511 'defines': ['ENABLE_AUTOMATION=1'],
1512 }],
[email protected]658677f2012-06-09 06:04:021513 ['enable_printing==1', {
1514 'defines': ['ENABLE_PRINTING=1'],
1515 }],
[email protected]e6026962012-06-14 21:28:321516 ['enable_captive_portal_detection==1', {
1517 'defines': ['ENABLE_CAPTIVE_PORTAL_DETECTION=1'],
1518 }],
[email protected]a6e22132010-02-10 20:43:181519 ], # conditions for 'target_defaults'
1520 'target_conditions': [
[email protected]b1eb341c2011-11-09 18:46:071521 ['enable_wexit_time_destructors==1', {
1522 'conditions': [
1523 [ 'clang==1', {
1524 'cflags': [
1525 '-Wexit-time-destructors',
1526 ],
1527 'xcode_settings': {
1528 'WARNING_CFLAGS': [
1529 '-Wexit-time-destructors',
1530 ],
1531 },
1532 }],
1533 ],
1534 }],
[email protected]c14d8e772010-02-09 22:06:151535 ['chromium_code==0', {
[email protected]d8543312010-02-10 17:43:281536 'conditions': [
[email protected]79e2336c2011-05-12 18:18:341537 [ 'os_posix==1 and OS!="mac"', {
[email protected]c0a6b272011-02-09 22:32:331538 # We don't want to get warnings from third-party code,
1539 # so remove any existing warning-enabling flags like -Wall.
[email protected]d8543312010-02-10 17:43:281540 'cflags!': [
1541 '-Wall',
1542 '-Wextra',
1543 '-Werror',
1544 ],
[email protected]167ec822011-10-24 22:05:271545 'cflags_cc': [
[email protected]ec1d155be2011-02-08 22:19:001546 # Don't warn about hash_map in third-party code.
1547 '-Wno-deprecated',
[email protected]167ec822011-10-24 22:05:271548 ],
1549 'cflags': [
[email protected]c0a6b272011-02-09 22:32:331550 # Don't warn about printf format problems.
1551 # This is off by default in gcc but on in Ubuntu's gcc(!).
[email protected]ec392872011-02-10 22:38:221552 '-Wno-format',
[email protected]ec1d155be2011-02-08 22:19:001553 ],
[email protected]d16bd642011-07-25 23:59:181554 'cflags_cc!': [
1555 # TODO(fischman): remove this.
1556 # http://code.google.com/p/chromium/issues/detail?id=90453
1557 '-Wsign-compare',
1558 ]
[email protected]d8543312010-02-10 17:43:281559 }],
[email protected]bc073c062012-01-13 06:28:031560 [ 'os_posix==1 and os_bsd!=1 and OS!="mac" and OS!="android"', {
[email protected]6e4451892011-07-27 10:32:111561 'cflags': [
1562 # Don't warn about ignoring the return value from e.g. close().
1563 # This is off by default in some gccs but on by default in others.
[email protected]bc073c062012-01-13 06:28:031564 # BSD systems do not support this option, since they are usually
1565 # using gcc 4.2.1, which does not have this flag yet.
[email protected]6e4451892011-07-27 10:32:111566 '-Wno-unused-result',
1567 ],
1568 }],
[email protected]d8543312010-02-10 17:43:281569 [ 'OS=="win"', {
1570 'defines': [
1571 '_CRT_SECURE_NO_DEPRECATE',
1572 '_CRT_NONSTDC_NO_WARNINGS',
1573 '_CRT_NONSTDC_NO_DEPRECATE',
1574 '_SCL_SECURE_NO_DEPRECATE',
1575 ],
1576 'msvs_disabled_warnings': [4800],
1577 'msvs_settings': {
1578 'VCCLCompilerTool': {
[email protected]942c3a60f2011-05-03 02:04:111579 'WarningLevel': '3',
1580 'WarnAsError': 'false', # TODO(maruel): Enable it.
[email protected]d8543312010-02-10 17:43:281581 'Detect64BitPortabilityProblems': 'false',
1582 },
1583 },
1584 }],
[email protected]ea47b6a2011-07-17 19:39:421585 # TODO(darin): Unfortunately, some third_party code depends on base/
1586 [ 'OS=="win" and component=="shared_library"', {
1587 'msvs_disabled_warnings': [
1588 4251, # class 'std::xx' needs to have dll-interface.
1589 ],
1590 }],
[email protected]d8543312010-02-10 17:43:281591 [ 'OS=="mac"', {
1592 'xcode_settings': {
[email protected]4c4c2e5332010-06-15 11:51:061593 'WARNING_CFLAGS!': ['-Wall', '-Wextra'],
[email protected]d8543312010-02-10 17:43:281594 },
[email protected]3a352c362012-05-08 19:45:491595 'conditions': [
1596 ['buildtype=="Official"', {
1597 'xcode_settings': {
1598 'GCC_TREAT_WARNINGS_AS_ERRORS': 'NO', # -Werror
1599 },
1600 }],
1601 ],
[email protected]d8543312010-02-10 17:43:281602 }],
[email protected]c14d8e772010-02-09 22:06:151603 ],
1604 }, {
[email protected]a5c598152012-01-27 04:55:131605 'includes': [
1606 # Rules for excluding e.g. foo_win.cc from the build on non-Windows.
1607 'filename_rules.gypi',
1608 ],
[email protected]c14d8e772010-02-09 22:06:151609 # In Chromium code, we define __STDC_FORMAT_MACROS in order to get the
1610 # C99 macros on Mac and Linux.
1611 'defines': [
1612 '__STDC_FORMAT_MACROS',
1613 ],
1614 'conditions': [
[email protected]c14d8e772010-02-09 22:06:151615 ['OS=="win"', {
[email protected]f55bd4862010-05-27 15:38:071616 # turn on warnings for signed/unsigned mismatch on chromium code.
1617 'msvs_settings': {
1618 'VCCLCompilerTool': {
1619 'AdditionalOptions': ['/we4389'],
1620 },
1621 },
[email protected]c14d8e772010-02-09 22:06:151622 }],
[email protected]63e39a282011-07-13 20:41:281623 ['OS=="win" and component=="shared_library"', {
1624 'msvs_disabled_warnings': [
1625 4251, # class 'std::xx' needs to have dll-interface.
1626 ],
1627 }],
[email protected]c14d8e772010-02-09 22:06:151628 ],
1629 }],
[email protected]a6e22132010-02-10 20:43:181630 ], # target_conditions for 'target_defaults'
[email protected]2f80c312009-02-25 21:26:551631 'default_configuration': 'Debug',
1632 'configurations': {
[email protected]5153767c2009-12-22 01:52:501633 # VCLinkerTool LinkIncremental values below:
1634 # 0 == default
1635 # 1 == /INCREMENTAL:NO
1636 # 2 == /INCREMENTAL
1637 # Debug links incremental, Release does not.
1638 #
[email protected]7b99801e2010-11-03 17:26:231639 # Abstract base configurations to cover common attributes.
[email protected]5153767c2009-12-22 01:52:501640 #
1641 'Common_Base': {
[email protected]bb05e452009-10-29 21:24:561642 'abstract': 1,
1643 'msvs_configuration_attributes': {
[email protected]534303c2011-09-28 00:02:511644 'OutputDirectory': '<(DEPTH)\\build\\<(build_dir_prefix)$(ConfigurationName)',
[email protected]bb05e452009-10-29 21:24:561645 'IntermediateDirectory': '$(OutDir)\\obj\\$(ProjectName)',
1646 'CharacterSet': '1',
1647 },
[email protected]5153767c2009-12-22 01:52:501648 },
1649 'x86_Base': {
1650 'abstract': 1,
[email protected]ef4fa4072009-12-04 22:46:501651 'msvs_settings': {
1652 'VCLinkerTool': {
1653 'TargetMachine': '1',
1654 },
1655 },
[email protected]2fa40782009-11-01 21:17:341656 'msvs_configuration_platform': 'Win32',
[email protected]bb05e452009-10-29 21:24:561657 },
[email protected]5153767c2009-12-22 01:52:501658 'x64_Base': {
1659 'abstract': 1,
1660 'msvs_configuration_platform': 'x64',
1661 'msvs_settings': {
1662 'VCLinkerTool': {
1663 'TargetMachine': '17', # x86 - 64
[email protected]5153767c2009-12-22 01:52:501664 'AdditionalLibraryDirectories!':
1665 ['<(DEPTH)/third_party/platformsdk_win7/files/Lib'],
1666 'AdditionalLibraryDirectories':
1667 ['<(DEPTH)/third_party/platformsdk_win7/files/Lib/x64'],
1668 },
[email protected]d26b4418ab2010-03-24 22:06:351669 'VCLibrarianTool': {
[email protected]5153767c2009-12-22 01:52:501670 'AdditionalLibraryDirectories!':
1671 ['<(DEPTH)/third_party/platformsdk_win7/files/Lib'],
1672 'AdditionalLibraryDirectories':
1673 ['<(DEPTH)/third_party/platformsdk_win7/files/Lib/x64'],
1674 },
1675 },
1676 'defines': [
1677 # Not sure if tcmalloc works on 64-bit Windows.
1678 'NO_TCMALLOC',
1679 ],
1680 },
1681 'Debug_Base': {
1682 'abstract': 1,
[email protected]14339762011-04-05 07:36:581683 'defines': [
1684 'DYNAMIC_ANNOTATIONS_ENABLED=1',
1685 'WTF_USE_DYNAMIC_ANNOTATIONS=1',
1686 ],
[email protected]1c966092009-08-20 21:19:261687 'xcode_settings': {
1688 'COPY_PHASE_STRIP': 'NO',
[email protected]d5d593a2009-08-28 23:23:291689 'GCC_OPTIMIZATION_LEVEL': '<(mac_debug_optimization)',
[email protected]a68c29a2011-07-01 16:23:491690 'OTHER_CFLAGS': [
[email protected]a68c29a2011-07-01 16:23:491691 '<@(debug_extra_cflags)',
1692 ],
[email protected]1c966092009-08-20 21:19:261693 },
[email protected]bb05e452009-10-29 21:24:561694 'msvs_settings': {
1695 'VCCLCompilerTool': {
[email protected]7e0d664a2009-12-03 21:07:471696 'Optimization': '<(win_debug_Optimization)',
[email protected]bb05e452009-10-29 21:24:561697 'PreprocessorDefinitions': ['_DEBUG'],
[email protected]6b0507b2010-05-07 07:41:211698 'BasicRuntimeChecks': '<(win_debug_RuntimeChecks)',
[email protected]7e0d664a2009-12-03 21:07:471699 'RuntimeLibrary': '<(win_debug_RuntimeLibrary)',
[email protected]2ae6e022010-05-07 13:19:151700 'conditions': [
1701 # According to MSVS, InlineFunctionExpansion=0 means
1702 # "default inlining", not "/Ob0".
1703 # Thus, we have to handle InlineFunctionExpansion==0 separately.
1704 ['win_debug_InlineFunctionExpansion==0', {
1705 'AdditionalOptions': ['/Ob0'],
1706 }],
1707 ['win_debug_InlineFunctionExpansion!=""', {
1708 'InlineFunctionExpansion':
1709 '<(win_debug_InlineFunctionExpansion)',
1710 }],
[email protected]fac10d12010-11-08 16:00:311711 ['win_debug_disable_iterator_debugging==1', {
1712 'PreprocessorDefinitions': ['_HAS_ITERATOR_DEBUGGING=0'],
1713 }],
[email protected]ef5c5f1b2011-12-17 02:16:241714
1715 # if win_debug_OmitFramePointers is blank, leave as default
1716 ['win_debug_OmitFramePointers==1', {
1717 'OmitFramePointers': 'true',
1718 }],
1719 ['win_debug_OmitFramePointers==0', {
1720 'OmitFramePointers': 'false',
1721 # The above is not sufficient (http://crbug.com/106711): it
1722 # simply eliminates an explicit "/Oy", but both /O2 and /Ox
1723 # perform FPO regardless, so we must explicitly disable.
1724 # We still want the false setting above to avoid having
1725 # "/Oy /Oy-" and warnings about overriding.
1726 'AdditionalOptions': ['/Oy-'],
1727 }],
[email protected]2ae6e022010-05-07 13:19:151728 ],
[email protected]ef5c5f1b2011-12-17 02:16:241729 'AdditionalOptions': [ '<@(win_debug_extra_cflags)', ],
[email protected]bb05e452009-10-29 21:24:561730 },
1731 'VCLinkerTool': {
1732 'LinkIncremental': '<(msvs_debug_link_incremental)',
[email protected]7cf23ce62012-01-13 02:43:331733 # ASLR makes debugging with windbg difficult because Chrome.exe and
1734 # Chrome.dll share the same base name. As result, windbg will
1735 # name the Chrome.dll module like chrome_<base address>, where
1736 # <base address> typically changes with each launch. This in turn
1737 # means that breakpoints in Chrome.dll don't stick from one launch
1738 # to the next. For this reason, we turn ASLR off in debug builds.
1739 # Note that this is a three-way bool, where 0 means to pick up
1740 # the default setting, 1 is off and 2 is on.
1741 'RandomizedBaseAddress': 1,
[email protected]bb05e452009-10-29 21:24:561742 },
1743 'VCResourceCompilerTool': {
1744 'PreprocessorDefinitions': ['_DEBUG'],
1745 },
1746 },
[email protected]2f80c312009-02-25 21:26:551747 'conditions': [
[email protected]bb05e452009-10-29 21:24:561748 ['OS=="linux"', {
[email protected]d8e3b122012-05-31 23:07:541749 'target_conditions': [
1750 ['_toolset=="target"', {
1751 'cflags': [
1752 '<@(debug_extra_cflags)',
1753 ],
1754 }],
[email protected]bb05e452009-10-29 21:24:561755 ],
[email protected]2f80c312009-02-25 21:26:551756 }],
[email protected]56cca4e2011-07-01 21:33:351757 ['release_valgrind_build==0', {
1758 'xcode_settings': {
1759 'OTHER_CFLAGS': [
1760 '-fstack-protector-all', # Implies -fstack-protector
1761 ],
1762 },
1763 }],
[email protected]2f80c312009-02-25 21:26:551764 ],
1765 },
[email protected]5153767c2009-12-22 01:52:501766 'Release_Base': {
1767 'abstract': 1,
[email protected]2f80c312009-02-25 21:26:551768 'defines': [
1769 'NDEBUG',
1770 ],
[email protected]1c966092009-08-20 21:19:261771 'xcode_settings': {
1772 'DEAD_CODE_STRIPPING': 'YES', # -Wl,-dead_strip
1773 'GCC_OPTIMIZATION_LEVEL': '<(mac_release_optimization)',
[email protected]ffd984b12009-09-11 19:37:001774 'OTHER_CFLAGS': [ '<@(release_extra_cflags)', ],
[email protected]1c966092009-08-20 21:19:261775 },
[email protected]bb05e452009-10-29 21:24:561776 'msvs_settings': {
[email protected]7e0d664a2009-12-03 21:07:471777 'VCCLCompilerTool': {
[email protected]7e0d664a2009-12-03 21:07:471778 'RuntimeLibrary': '<(win_release_RuntimeLibrary)',
[email protected]2ae6e022010-05-07 13:19:151779 'conditions': [
[email protected]2212d272011-12-20 21:37:371780 # In official builds, each target will self-select
1781 # an optimization level.
1782 ['buildtype!="Official"', {
1783 'Optimization': '<(win_release_Optimization)',
1784 },
1785 ],
[email protected]2ae6e022010-05-07 13:19:151786 # According to MSVS, InlineFunctionExpansion=0 means
1787 # "default inlining", not "/Ob0".
1788 # Thus, we have to handle InlineFunctionExpansion==0 separately.
1789 ['win_release_InlineFunctionExpansion==0', {
1790 'AdditionalOptions': ['/Ob0'],
1791 }],
1792 ['win_release_InlineFunctionExpansion!=""', {
1793 'InlineFunctionExpansion':
1794 '<(win_release_InlineFunctionExpansion)',
1795 }],
[email protected]626d2d22011-10-11 15:47:331796
[email protected]ef5c5f1b2011-12-17 02:16:241797 # if win_release_OmitFramePointers is blank, leave as default
[email protected]626d2d22011-10-11 15:47:331798 ['win_release_OmitFramePointers==1', {
1799 'OmitFramePointers': 'true',
1800 }],
1801 ['win_release_OmitFramePointers==0', {
1802 'OmitFramePointers': 'false',
[email protected]ef5c5f1b2011-12-17 02:16:241803 # The above is not sufficient (http://crbug.com/106711): it
1804 # simply eliminates an explicit "/Oy", but both /O2 and /Ox
1805 # perform FPO regardless, so we must explicitly disable.
1806 # We still want the false setting above to avoid having
1807 # "/Oy /Oy-" and warnings about overriding.
1808 'AdditionalOptions': ['/Oy-'],
[email protected]626d2d22011-10-11 15:47:331809 }],
[email protected]2ae6e022010-05-07 13:19:151810 ],
[email protected]ef5c5f1b2011-12-17 02:16:241811 'AdditionalOptions': [ '<@(win_release_extra_cflags)', ],
[email protected]7e0d664a2009-12-03 21:07:471812 },
[email protected]bb05e452009-10-29 21:24:561813 'VCLinkerTool': {
[email protected]c059c612011-08-08 20:56:341814 # LinkIncremental is a tri-state boolean, where 0 means default
1815 # (i.e., inherit from parent solution), 1 means false, and
1816 # 2 means true.
[email protected]bb05e452009-10-29 21:24:561817 'LinkIncremental': '1',
[email protected]c059c612011-08-08 20:56:341818 # This corresponds to the /PROFILE flag which ensures the PDB
1819 # file contains FIXUP information (growing the PDB file by about
1820 # 5%) but does not otherwise alter the output binary. This
1821 # information is used by the Syzygy optimization tool when
1822 # decomposing the release image.
1823 'Profile': 'true',
[email protected]bb05e452009-10-29 21:24:561824 },
1825 },
[email protected]2f80c312009-02-25 21:26:551826 'conditions': [
[email protected]fd3fb3bf2012-05-23 22:15:161827 ['msvs_use_common_release', {
1828 'includes': ['release.gypi'],
1829 }],
[email protected]92822e82009-09-18 14:26:561830 ['release_valgrind_build==0', {
[email protected]14339762011-04-05 07:36:581831 'defines': [
1832 'NVALGRIND',
1833 'DYNAMIC_ANNOTATIONS_ENABLED=0',
1834 ],
[email protected]ee857512010-05-14 08:24:421835 }, {
[email protected]14339762011-04-05 07:36:581836 'defines': [
1837 'DYNAMIC_ANNOTATIONS_ENABLED=1',
1838 'WTF_USE_DYNAMIC_ANNOTATIONS=1',
1839 ],
[email protected]92822e82009-09-18 14:26:561840 }],
[email protected]7e0d664a2009-12-03 21:07:471841 ['win_use_allocator_shim==0', {
1842 'defines': ['NO_TCMALLOC'],
1843 }],
[email protected]bb05e452009-10-29 21:24:561844 ['OS=="linux"', {
[email protected]d8e3b122012-05-31 23:07:541845 'target_conditions': [
1846 ['_toolset=="target"', {
1847 'cflags': [
1848 '<@(release_extra_cflags)',
1849 ],
1850 }],
[email protected]bb05e452009-10-29 21:24:561851 ],
1852 }],
[email protected]2f80c312009-02-25 21:26:551853 ],
1854 },
[email protected]5153767c2009-12-22 01:52:501855 #
1856 # Concrete configurations
1857 #
1858 'Debug': {
1859 'inherit_from': ['Common_Base', 'x86_Base', 'Debug_Base'],
1860 },
1861 'Release': {
1862 'inherit_from': ['Common_Base', 'x86_Base', 'Release_Base'],
[email protected]5153767c2009-12-22 01:52:501863 },
[email protected]f926fa0a2009-08-04 22:50:131864 'conditions': [
1865 [ 'OS=="win"', {
1866 # TODO(bradnelson): add a gyp mechanism to make this more graceful.
[email protected]ef4fa4072009-12-04 22:46:501867 'Debug_x64': {
[email protected]5153767c2009-12-22 01:52:501868 'inherit_from': ['Common_Base', 'x64_Base', 'Debug_Base'],
[email protected]78263c12009-11-01 23:45:301869 },
1870 'Release_x64': {
[email protected]5153767c2009-12-22 01:52:501871 'inherit_from': ['Common_Base', 'x64_Base', 'Release_Base'],
[email protected]78263c12009-11-01 23:45:301872 },
[email protected]f926fa0a2009-08-04 22:50:131873 }],
1874 ],
[email protected]2f80c312009-02-25 21:26:551875 },
1876 },
1877 'conditions': [
[email protected]79e2336c2011-05-12 18:18:341878 ['os_posix==1 and OS!="mac"', {
[email protected]9d384032009-03-20 23:13:261879 'target_defaults': {
[email protected]5315f2842009-04-28 00:43:271880 # Enable -Werror by default, but put it in a variable so it can
1881 # be disabled in ~/.gyp/include.gypi on the valgrind builders.
1882 'variables': {
[email protected]cbbb3472012-01-25 18:32:311883 'werror%': '-Werror',
[email protected]b7cc5321c2012-04-12 21:24:361884 'libraries_for_target%': '',
[email protected]5315f2842009-04-28 00:43:271885 },
[email protected]6863896f2012-01-25 17:51:361886 'defines': [
1887 '_FILE_OFFSET_BITS=64',
1888 ],
[email protected]9d384032009-03-20 23:13:261889 'cflags': [
[email protected]1bba09c2009-08-13 12:53:161890 '<(werror)', # See note above about the werror variable.
1891 '-pthread',
1892 '-fno-exceptions',
[email protected]ef8c3cf2012-01-24 04:37:291893 '-fno-strict-aliasing', # See http://crbug.com/32204
[email protected]1bba09c2009-08-13 12:53:161894 '-Wall',
[email protected]0fa17082010-03-26 00:48:051895 # TODO(evan): turn this back on once all the builds work.
1896 # '-Wextra',
[email protected]225c8f52010-02-05 22:23:201897 # Don't warn about unused function params. We use those everywhere.
1898 '-Wno-unused-parameter',
1899 # Don't warn about the "struct foo f = {0};" initialization pattern.
1900 '-Wno-missing-field-initializers',
[email protected]3df6e3a2010-01-21 20:23:121901 # Don't export any symbols (for example, to plugins we dlopen()).
1902 # Note: this is *required* to make some plugins work.
1903 '-fvisibility=hidden',
[email protected]7ca6ce12010-09-15 23:39:351904 '-pipe',
[email protected]8a2fcba2009-07-29 00:52:241905 ],
1906 'cflags_cc': [
[email protected]832d0212009-10-28 19:12:221907 '-fno-rtti',
[email protected]8a2fcba2009-07-29 00:52:241908 '-fno-threadsafe-statics',
[email protected]f5986c42009-11-17 18:39:361909 # Make inline functions have hidden visiblity by default.
1910 # Surprisingly, not covered by -fvisibility=hidden.
1911 '-fvisibility-inlines-hidden',
[email protected]554abd902011-07-25 04:03:171912 # GCC turns on -Wsign-compare for C++ under -Wall, but clang doesn't,
1913 # so we specify it explicitly.
1914 # TODO(fischman): remove this if http://llvm.org/PR10448 obsoletes it.
[email protected]d16bd642011-07-25 23:59:181915 # http://code.google.com/p/chromium/issues/detail?id=90453
[email protected]554abd902011-07-25 04:03:171916 '-Wsign-compare',
[email protected]9d384032009-03-20 23:13:261917 ],
[email protected]a6cf87e2009-04-03 04:07:381918 'ldflags': [
[email protected]138241f2010-03-30 23:53:101919 '-pthread', '-Wl,-z,noexecstack',
[email protected]9d384032009-03-20 23:13:261920 ],
[email protected]b7cc5321c2012-04-12 21:24:361921 'libraries' : [
1922 '<(libraries_for_target)',
1923 ],
[email protected]3aacaf952009-04-02 15:34:091924 'configurations': {
[email protected]5153767c2009-12-22 01:52:501925 'Debug_Base': {
[email protected]c5bdc032009-04-20 19:11:311926 'variables': {
1927 'debug_optimize%': '0',
1928 },
[email protected]3aacaf952009-04-02 15:34:091929 'defines': [
1930 '_DEBUG',
1931 ],
1932 'cflags': [
[email protected]9cb5cc702011-02-01 19:56:041933 '-O>(debug_optimize)',
[email protected]3aacaf952009-04-02 15:34:091934 '-g',
1935 ],
[email protected]da1c8d692011-09-20 20:35:011936 'conditions' : [
1937 ['OS=="android"', {
1938 'cflags': [
1939 '-fno-omit-frame-pointer',
1940 ],
1941 }],
1942 ],
1943 'target_conditions' : [
1944 ['_toolset=="target"', {
1945 'conditions': [
[email protected]d42124bc2012-05-10 05:40:501946 ['OS=="android" and debug_optimize==0 and target_arch=="arm"', {
[email protected]da1c8d692011-09-20 20:35:011947 'cflags': [
1948 '-mlong-calls', # Needed when compiling with -O0
1949 ],
1950 }],
1951 ['arm_thumb==1', {
1952 'cflags': [
1953 '-marm',
1954 ],
1955 }],
1956 ],
1957 }],
1958 ],
[email protected]5315f2842009-04-28 00:43:271959 },
[email protected]5153767c2009-12-22 01:52:501960 'Release_Base': {
[email protected]740e2de2009-07-21 11:41:011961 'variables': {
1962 'release_optimize%': '2',
[email protected]1dd529642010-05-15 01:02:511963 # Binaries become big and gold is unable to perform GC
1964 # and remove unused sections for some of test targets
1965 # on 32 bit platform.
1966 # (This is currently observed only in chromeos valgrind bots)
1967 # The following flag is to disable --gc-sections linker
1968 # option for these bots.
1969 'no_gc_sections%': 0,
[email protected]409dceef2011-05-10 19:49:121970
1971 # TODO(bradnelson): reexamine how this is done if we change the
1972 # expansion of configurations
1973 'release_valgrind_build%': 0,
[email protected]740e2de2009-07-21 11:41:011974 },
[email protected]3aacaf952009-04-02 15:34:091975 'cflags': [
[email protected]9cb5cc702011-02-01 19:56:041976 '-O>(release_optimize)',
[email protected]d8cc3a62009-04-08 18:29:531977 # Don't emit the GCC version ident directives, they just end up
1978 # in the .comment section taking up binary size.
1979 '-fno-ident',
1980 # Put data and code in their own sections, so that unused symbols
1981 # can be removed at link time with --gc-sections.
1982 '-fdata-sections',
1983 '-ffunction-sections',
[email protected]3aacaf952009-04-02 15:34:091984 ],
[email protected]c902f2c2010-08-06 20:04:181985 'ldflags': [
1986 # Specifically tell the linker to perform optimizations.
1987 # See http://lwn.net/Articles/192624/ .
1988 '-Wl,-O1',
[email protected]27c2e492010-08-06 22:55:221989 '-Wl,--as-needed',
[email protected]c902f2c2010-08-06 20:04:181990 ],
[email protected]1dd529642010-05-15 01:02:511991 'conditions' : [
1992 ['no_gc_sections==0', {
1993 'ldflags': [
1994 '-Wl,--gc-sections',
1995 ],
1996 }],
[email protected]da1c8d692011-09-20 20:35:011997 ['OS=="android"', {
1998 'cflags': [
1999 '-fomit-frame-pointer',
2000 ],
2001 }],
[email protected]ecf7b6482010-10-13 09:15:202002 ['clang==1', {
2003 'cflags!': [
2004 '-fno-ident',
2005 ],
2006 }],
[email protected]7664ab32011-02-01 23:35:252007 ['profiling==1', {
2008 'cflags': [
2009 '-fno-omit-frame-pointer',
2010 '-g',
2011 ],
2012 }],
[email protected]8d726a42012-02-09 03:49:002013 ],
[email protected]3aacaf952009-04-02 15:34:092014 },
2015 },
[email protected]601b540222009-04-03 21:32:042016 'variants': {
2017 'coverage': {
2018 'cflags': ['-fprofile-arcs', '-ftest-coverage'],
2019 'ldflags': ['-fprofile-arcs'],
2020 },
2021 'profile': {
2022 'cflags': ['-pg', '-g'],
2023 'ldflags': ['-pg'],
2024 },
2025 'symbols': {
2026 'cflags': ['-g'],
2027 },
2028 },
[email protected]606116d22009-05-06 22:38:232029 'conditions': [
[email protected]04b482602011-09-14 02:36:212030 ['target_arch=="ia32"', {
2031 'target_conditions': [
2032 ['_toolset=="target"', {
2033 'asflags': [
2034 # Needed so that libs with .s files (e.g. libicudata.a)
2035 # are compatible with the general 32-bit-ness.
2036 '-32',
2037 ],
2038 # All floating-point computations on x87 happens in 80-bit
2039 # precision. Because the C and C++ language standards allow
2040 # the compiler to keep the floating-point values in higher
2041 # precision than what's specified in the source and doing so
2042 # is more efficient than constantly rounding up to 64-bit or
2043 # 32-bit precision as specified in the source, the compiler,
2044 # especially in the optimized mode, tries very hard to keep
2045 # values in x87 floating-point stack (in 80-bit precision)
2046 # as long as possible. This has important side effects, that
2047 # the real value used in computation may change depending on
2048 # how the compiler did the optimization - that is, the value
2049 # kept in 80-bit is different than the value rounded down to
2050 # 64-bit or 32-bit. There are possible compiler options to
2051 # make this behavior consistent (e.g. -ffloat-store would keep
2052 # all floating-values in the memory, thus force them to be
2053 # rounded to its original precision) but they have significant
2054 # runtime performance penalty.
2055 #
2056 # -mfpmath=sse -msse2 makes the compiler use SSE instructions
2057 # which keep floating-point values in SSE registers in its
2058 # native precision (32-bit for single precision, and 64-bit
2059 # for double precision values). This means the floating-point
2060 # value used during computation does not change depending on
2061 # how the compiler optimized the code, since the value is
2062 # always kept in its specified precision.
2063 'conditions': [
2064 ['branding=="Chromium" and disable_sse2==0', {
2065 'cflags': [
2066 '-march=pentium4',
2067 '-msse2',
2068 '-mfpmath=sse',
2069 ],
2070 }],
2071 # ChromeOS targets Pinetrail, which is sse3, but most of the
2072 # benefit comes from sse2 so this setting allows ChromeOS
2073 # to build on other CPUs. In the future -march=atom would
2074 # help but requires a newer compiler.
2075 ['chromeos==1 and disable_sse2==0', {
2076 'cflags': [
2077 '-msse2',
2078 ],
2079 }],
2080 # Install packages have started cropping up with
2081 # different headers between the 32-bit and 64-bit
2082 # versions, so we have to shadow those differences off
2083 # and make sure a 32-bit-on-64-bit build picks up the
2084 # right files.
[email protected]32594022012-05-10 03:22:282085 # For android build, use NDK headers instead of host headers
2086 ['host_arch!="ia32" and OS!="android"', {
[email protected]04b482602011-09-14 02:36:212087 'include_dirs+': [
2088 '/usr/include32',
2089 ],
2090 }],
2091 ],
2092 # -mmmx allows mmintrin.h to be used for mmx intrinsics.
2093 # video playback is mmx and sse2 optimized.
[email protected]ffde7932009-05-29 00:39:062094 'cflags': [
[email protected]04b482602011-09-14 02:36:212095 '-m32',
2096 '-mmmx',
2097 ],
2098 'ldflags': [
2099 '-m32',
[email protected]ffde7932009-05-29 00:39:062100 ],
2101 }],
[email protected]606116d22009-05-06 22:38:232102 ],
2103 }],
[email protected]3dda8a962009-08-10 18:58:072104 ['target_arch=="arm"', {
[email protected]77c1b29392009-12-04 06:21:292105 'target_conditions': [
2106 ['_toolset=="target"', {
2107 'cflags_cc': [
2108 # The codesourcery arm-2009q3 toolchain warns at that the ABI
2109 # has changed whenever it encounters a varargs function. This
2110 # silences those warnings, as they are not helpful and
2111 # clutter legitimate warnings.
2112 '-Wno-abi',
2113 ],
2114 'conditions': [
[email protected]da1c8d692011-09-20 20:35:012115 ['arm_thumb==1', {
[email protected]77c1b29392009-12-04 06:21:292116 'cflags': [
2117 '-mthumb',
[email protected]77c1b29392009-12-04 06:21:292118 ]
2119 }],
2120 ['armv7==1', {
[email protected]dc9711f2009-11-13 19:30:252121 'cflags': [
2122 '-march=armv7-a',
2123 '-mtune=cortex-a8',
[email protected]5252af72012-05-04 19:26:402124 '-mfloat-abi=<(arm_float_abi)',
[email protected]dc9711f2009-11-13 19:30:252125 ],
[email protected]eafc0b452010-02-26 21:53:432126 'conditions': [
2127 ['arm_neon==1', {
2128 'cflags': [ '-mfpu=neon', ],
2129 }, {
[email protected]53e0f642010-03-05 01:41:562130 'cflags': [ '-mfpu=<(arm_fpu)', ],
[email protected]eafc0b452010-02-26 21:53:432131 }]
2132 ],
[email protected]dc9711f2009-11-13 19:30:252133 }],
[email protected]da1c8d692011-09-20 20:35:012134 ['OS=="android"', {
[email protected]7b1112c2012-03-16 22:03:532135 # Most of the following flags are derived from what Android
2136 # uses by default when building for arm, reference for which
2137 # can be found in the following file in the Android NDK:
2138 # toolchains/arm-linux-androideabi-4.4.3/setup.mk
2139 'cflags': [
2140 # The tree-sra optimization (scalar replacement for
2141 # aggregates enabling subsequent optimizations) leads to
2142 # invalid code generation when using the Android NDK's
2143 # compiler (r5-r7). This can be verified using
2144 # TestWebKitAPI's WTF.Checked_int8_t test.
2145 '-fno-tree-sra',
2146 '-Wno-psabi',
2147 ],
[email protected]da1c8d692011-09-20 20:35:012148 'conditions': [
2149 ['arm_thumb == 1', {
2150 # Android toolchain doesn't support -mimplicit-it=thumb
2151 'cflags!': [ '-Wa,-mimplicit-it=thumb', ],
2152 'cflags': [ '-mthumb-interwork', ],
2153 }],
2154 ['armv7==0', {
2155 # Flags suitable for Android emulator
2156 'cflags': [
2157 '-march=armv5te',
2158 '-mtune=xscale',
2159 '-msoft-float',
[email protected]6863896f2012-01-25 17:51:362160 ],
2161 'defines': [
2162 '__ARM_ARCH_5__',
2163 '__ARM_ARCH_5T__',
2164 '__ARM_ARCH_5E__',
2165 '__ARM_ARCH_5TE__',
[email protected]da1c8d692011-09-20 20:35:012166 ],
2167 }],
2168 ],
2169 }],
[email protected]3dda8a962009-08-10 18:58:072170 ],
2171 }],
2172 ],
2173 }],
[email protected]2fb843b2010-08-12 02:11:082174 ['linux_fpic==1', {
[email protected]c76723a2010-01-25 23:10:582175 'cflags': [
2176 '-fPIC',
2177 ],
[email protected]d3f692b32011-12-14 19:04:352178 'ldflags': [
2179 '-fPIC',
2180 ],
[email protected]c76723a2010-01-25 23:10:582181 }],
[email protected]ee28c9f2009-09-04 01:53:012182 ['sysroot!=""', {
[email protected]fd36ce822009-10-28 20:13:572183 'target_conditions': [
2184 ['_toolset=="target"', {
2185 'cflags': [
2186 '--sysroot=<(sysroot)',
2187 ],
2188 'ldflags': [
2189 '--sysroot=<(sysroot)',
2190 ],
2191 }]]
[email protected]ee28c9f2009-09-04 01:53:012192 }],
[email protected]58680ce2010-09-18 00:09:152193 ['clang==1', {
[email protected]18ca15a2011-08-10 03:07:122194 'cflags': [
2195 '-Wheader-hygiene',
2196 # Clang spots more unused functions.
2197 '-Wno-unused-function',
2198 # Don't die on dtoa code that uses a char as an array index.
2199 '-Wno-char-subscripts',
[email protected]d6431722011-09-01 00:46:332200 # Especially needed for gtest macros using enum values from Mac
2201 # system headers.
2202 # TODO(pkasting): In C++11 this is legal, so this should be
2203 # removed when we change to that. (This is also why we don't
2204 # bother fixing all these cases today.)
[email protected]18ca15a2011-08-10 03:07:122205 '-Wno-unnamed-type-template-args',
[email protected]241109b52011-10-15 19:00:302206 # This (rightyfully) complains about 'override', which we use
2207 # heavily.
2208 '-Wno-c++11-extensions',
[email protected]9242c7642012-01-29 09:02:102209
2210 # Warns on switches on enums that cover all enum values but
2211 # also contain a default: branch. Chrome is full of that.
2212 '-Wno-covered-switch-default',
[email protected]18ca15a2011-08-10 03:07:122213 ],
2214 'cflags!': [
2215 # Clang doesn't seem to know know this flag.
2216 '-mfpmath=sse',
2217 ],
[email protected]58680ce2010-09-18 00:09:152218 }],
[email protected]5d451ad2011-02-11 16:43:462219 ['clang==1 and clang_use_chrome_plugins==1', {
[email protected]d23720682011-08-11 00:16:262220 'cflags': [
[email protected]c872dc52012-05-19 06:36:312221 '<@(clang_chrome_plugins_flags)',
[email protected]d23720682011-08-11 00:16:262222 ],
[email protected]5d451ad2011-02-11 16:43:462223 }],
[email protected]4a9ac22e2011-12-02 03:41:532224 ['clang==1 and clang_load!=""', {
[email protected]d23720682011-08-11 00:16:262225 'cflags': [
2226 '-Xclang', '-load', '-Xclang', '<(clang_load)',
[email protected]4a9ac22e2011-12-02 03:41:532227 ],
2228 }],
2229 ['clang==1 and clang_add_plugin!=""', {
2230 'cflags': [
[email protected]d23720682011-08-11 00:16:262231 '-Xclang', '-add-plugin', '-Xclang', '<(clang_add_plugin)',
2232 ],
[email protected]5e781232011-01-28 02:57:592233 }],
[email protected]2616d45d2012-01-19 03:15:482234 ['clang==1 and "<(GENERATOR)"=="ninja"', {
2235 'cflags': [
2236 # See http://crbug.com/110262
2237 '-fcolor-diagnostics',
2238 ],
2239 }],
[email protected]92799b632011-08-15 14:33:062240 ['asan==1', {
[email protected]1ffc3b3962012-05-16 14:08:422241 'target_conditions': [
2242 ['_toolset=="target"', {
2243 'cflags': [
2244 '-faddress-sanitizer',
2245 '-fno-omit-frame-pointer',
[email protected]1ffc3b3962012-05-16 14:08:422246 ],
2247 'ldflags': [
2248 '-faddress-sanitizer',
2249 ],
2250 'defines': [
2251 'ADDRESS_SANITIZER',
2252 ],
2253 }],
[email protected]921c7b52011-11-25 10:34:352254 ],
[email protected]92799b632011-08-15 14:33:062255 }],
[email protected]8a6abd12012-05-16 10:04:442256 ['order_profiling!=0 and (chromeos==1 or OS=="linux")', {
2257 'target_conditions' : [
2258 ['_toolset=="target"', {
2259 'cflags': [
2260 '-finstrument-functions',
2261 ],
2262 }],
2263 ],
2264 }],
[email protected]cbd5fd52009-08-26 00:14:272265 ['linux_breakpad==1', {
[email protected]c87efd42010-08-26 18:28:172266 'cflags': [ '-g' ],
[email protected]cbd5fd52009-08-26 00:14:272267 'defines': ['USE_LINUX_BREAKPAD'],
2268 }],
[email protected]d8b60602010-03-26 09:41:222269 ['linux_use_heapchecker==1', {
2270 'variables': {'linux_use_tcmalloc%': 1},
[email protected]cea4aec2012-01-24 12:26:402271 'defines': ['USE_HEAPCHECKER'],
[email protected]d8b60602010-03-26 09:41:222272 }],
[email protected]61a9b2d82010-02-26 00:31:082273 ['linux_use_tcmalloc==0', {
2274 'defines': ['NO_TCMALLOC'],
[email protected]01699e22009-11-11 19:24:242275 }],
[email protected]64e2d4a42010-08-27 10:13:212276 ['linux_keep_shadow_stacks==1', {
2277 'defines': ['KEEP_SHADOW_STACKS'],
[email protected]987a7422012-02-23 19:10:512278 'cflags': [
2279 '-finstrument-functions',
2280 # Allow mmx intrinsics to inline, so that the compiler can expand
2281 # the intrinsics.
2282 '-finstrument-functions-exclude-file-list=mmintrin.h',
2283 ],
[email protected]64e2d4a42010-08-27 10:13:212284 }],
[email protected]8d726a42012-02-09 03:49:002285 ['linux_use_gold_flags==1', {
[email protected]be239492012-02-09 19:00:172286 'ldflags': [
2287 # Experimentation found that using four linking threads
2288 # saved ~20% of link time.
2289 # https://groups.google.com/a/chromium.org/group/chromium-dev/browse_thread/thread/281527606915bb36
2290 '-Wl,--threads',
2291 '-Wl,--thread-count=4',
2292 ],
[email protected]8d726a42012-02-09 03:49:002293 'conditions': [
2294 ['release_valgrind_build==0', {
2295 'target_conditions': [
2296 ['_toolset=="target"', {
2297 'ldflags': [
2298 # There seems to be a conflict of --icf and -pie
2299 # in gold which can generate crashy binaries. As
2300 # a security measure, -pie takes precendence for
2301 # now.
2302 #'-Wl,--icf=safe',
2303 '-Wl,--icf=none',
2304 ],
2305 }],
2306 ],
2307 }],
2308 ],
2309 }],
[email protected]b07806c12012-02-03 22:44:592310 ['linux_use_gold_binary==1', {
2311 'variables': {
[email protected]516312d2012-02-28 05:17:262312 'conditions': [
2313 ['inside_chromium_build==1', {
2314 # We pass the path to gold to the compiler. gyp leaves
2315 # unspecified what the cwd is when running the compiler,
2316 # so the normal gyp path-munging fails us. This hack
2317 # gets the right path.
2318 'gold_path': '<(PRODUCT_DIR)/../../third_party/gold',
2319 }, {
2320 'gold_path': '<(PRODUCT_DIR)/../../Source/WebKit/chromium/third_party/gold',
2321 }]
2322 ]
[email protected]b07806c12012-02-03 22:44:592323 },
2324 'ldflags': [
2325 # Put our gold binary in the search path for the linker.
2326 '-B<(gold_path)',
2327 ],
2328 }],
[email protected]606116d22009-05-06 22:38:232329 ],
[email protected]9d384032009-03-20 23:13:262330 },
2331 }],
[email protected]c51e8d52009-12-11 20:04:062332 # FreeBSD-specific options; note that most FreeBSD options are set above,
2333 # with Linux.
2334 ['OS=="freebsd"', {
2335 'target_defaults': {
2336 'ldflags': [
2337 '-Wl,--no-keep-memory',
2338 ],
2339 },
2340 }],
[email protected]da1c8d692011-09-20 20:35:012341 # Android-specific options; note that most are set above with Linux.
2342 ['OS=="android"', {
2343 'variables': {
[email protected]febc41db2012-03-24 02:44:432344 'target_arch%': 'arm', # target_arch in android terms.
[email protected]da1c8d692011-09-20 20:35:012345 'conditions': [
2346 # Android uses x86 instead of ia32 for their target_arch designation.
2347 ['target_arch=="ia32"', {
[email protected]febc41db2012-03-24 02:44:432348 'target_arch%': 'x86',
[email protected]da1c8d692011-09-20 20:35:012349 }],
2350 # Use shared stlport library when system one used.
2351 # Figure this out early since it needs symbols from libgcc.a, so it
2352 # has to be before that in the set of libraries.
2353 ['use_system_stlport==1', {
2354 'android_stlport_library': 'stlport',
2355 }, {
2356 'android_stlport_library': 'stlport_static',
2357 }],
2358 ],
2359
2360 # Placing this variable here prevents from forking libvpx, used
2361 # by remoting. Remoting is off, so it needn't built,
2362 # so forking it's deps seems like overkill.
2363 # But this variable need defined to properly run gyp.
2364 # A proper solution is to have an OS==android conditional
2365 # in third_party/libvpx/libvpx.gyp to define it.
2366 'libvpx_path': 'lib/linux/arm',
2367 },
2368 'target_defaults': {
2369 # Build a Release build by default to match Android build behavior.
2370 # This is typical with Android because Debug builds tend to be much
2371 # larger and run very slowly on constrained devices. It is still
2372 # possible to do a Debug build by specifying BUILDTYPE=Debug on the
2373 # 'make' command line.
2374 'default_configuration': 'Release',
2375
2376 'variables': {
2377 'release_extra_cflags%': '',
2378 },
2379
2380 'target_conditions': [
2381 # Settings for building device targets using Android's toolchain.
2382 # These are based on the setup.mk file from the Android NDK.
2383 #
2384 # The NDK Android executable link step looks as follows:
2385 # $LDFLAGS
2386 # $(TARGET_CRTBEGIN_DYNAMIC_O) <-- crtbegin.o
2387 # $(PRIVATE_OBJECTS) <-- The .o that we built
2388 # $(PRIVATE_STATIC_LIBRARIES) <-- The .a that we built
2389 # $(TARGET_LIBGCC) <-- libgcc.a
2390 # $(PRIVATE_SHARED_LIBRARIES) <-- The .so that we built
2391 # $(PRIVATE_LDLIBS) <-- System .so
2392 # $(TARGET_CRTEND_O) <-- crtend.o
2393 #
2394 # For now the above are approximated for executables by adding
2395 # crtbegin.o to the end of the ldflags and 'crtend.o' to the end
2396 # of 'libraries'.
2397 #
2398 # The NDK Android shared library link step looks as follows:
2399 # $LDFLAGS
2400 # $(PRIVATE_OBJECTS) <-- The .o that we built
2401 # -l,--whole-archive
2402 # $(PRIVATE_WHOLE_STATIC_LIBRARIES)
2403 # -l,--no-whole-archive
2404 # $(PRIVATE_STATIC_LIBRARIES) <-- The .a that we built
2405 # $(TARGET_LIBGCC) <-- libgcc.a
2406 # $(PRIVATE_SHARED_LIBRARIES) <-- The .so that we built
2407 # $(PRIVATE_LDLIBS) <-- System .so
2408 #
2409 # For now, assume not need any whole static libs.
2410 #
2411 # For both executables and shared libraries, add the proper
2412 # libgcc.a to the start of libraries which puts it in the
2413 # proper spot after .o and .a files get linked in.
2414 #
2415 # TODO: The proper thing to do longer-tem would be proper gyp
2416 # support for a custom link command line.
2417 ['_toolset=="target"', {
2418 'cflags!': [
2419 '-pthread', # Not supported by Android toolchain.
2420 ],
2421 'cflags': [
2422 '-U__linux__', # Don't allow toolchain to claim -D__linux__
2423 '-ffunction-sections',
2424 '-funwind-tables',
2425 '-g',
2426 '-fstack-protector',
2427 '-fno-short-enums',
2428 '-finline-limit=64',
2429 '-Wa,--noexecstack',
2430 '-Wno-error=non-virtual-dtor', # TODO(michaelbai): Fix warnings.
2431 '<@(release_extra_cflags)',
2432 # Note: This include is in cflags to ensure that it comes after
2433 # all of the includes.
2434 '-I<(android_ndk_include)',
2435 ],
2436 'defines': [
2437 'ANDROID',
2438 '__GNU_SOURCE=1', # Necessary for clone()
2439 'USE_STLPORT=1',
2440 '_STLP_USE_PTR_SPECIALIZATIONS=1',
2441 'HAVE_OFF64_T',
2442 'HAVE_SYS_UIO_H',
2443 'ANDROID_BINSIZE_HACK', # Enable temporary hacks to reduce binsize.
2444 ],
2445 'ldflags!': [
2446 '-pthread', # Not supported by Android toolchain.
2447 ],
2448 'ldflags': [
2449 '-nostdlib',
2450 '-Wl,--no-undefined',
[email protected]da1c8d692011-09-20 20:35:012451 # Don't export symbols from statically linked libraries.
2452 '-Wl,--exclude-libs=ALL',
2453 ],
[email protected]a0e48b02011-11-22 07:53:012454 'libraries': [
2455 '-l<(android_stlport_library)',
2456 # Manually link the libgcc.a that the cross compiler uses.
[email protected]d10e2cc2012-03-20 10:45:272457 '<!(${ANDROID_TOOLCHAIN}/*-gcc -print-libgcc-file-name)',
[email protected]a0e48b02011-11-22 07:53:012458 '-lc',
2459 '-ldl',
2460 '-lstdc++',
2461 '-lm',
[email protected]da1c8d692011-09-20 20:35:012462 ],
2463 'conditions': [
[email protected]e0825562012-05-10 01:50:472464 ['android_upstream_bringup==1', {
2465 'defines': ['ANDROID_UPSTREAM_BRINGUP=1',],
2466 }],
[email protected]da1c8d692011-09-20 20:35:012467 ['android_build_type==0', {
2468 'ldflags': [
[email protected]5baf7482011-12-13 16:00:522469 '--sysroot=<(android_ndk_sysroot)',
[email protected]da1c8d692011-09-20 20:35:012470 ],
2471 }],
[email protected]febd3572012-05-03 09:17:452472 ['target_arch == "arm"', {
2473 'ldflags': [
2474 # Enable identical code folding to reduce size.
2475 '-Wl,--icf=safe',
2476 ],
2477 }],
[email protected]da1c8d692011-09-20 20:35:012478 # NOTE: The stlport header include paths below are specified in
2479 # cflags rather than include_dirs because they need to come
2480 # after include_dirs. Think of them like system headers, but
2481 # don't use '-isystem' because the arm-linux-androideabi-4.4.3
2482 # toolchain (circa Gingerbread) will exhibit strange errors.
2483 # The include ordering here is important; change with caution.
2484 ['use_system_stlport==0', {
2485 'cflags': [
2486 '-I<(android_ndk_root)/sources/cxx-stl/stlport/stlport',
2487 ],
2488 'conditions': [
2489 ['target_arch=="arm" and armv7==1', {
2490 'ldflags': [
2491 '-L<(android_ndk_root)/sources/cxx-stl/stlport/libs/armeabi-v7a',
2492 ],
2493 }],
2494 ['target_arch=="arm" and armv7==0', {
2495 'ldflags': [
2496 '-L<(android_ndk_root)/sources/cxx-stl/stlport/libs/armeabi',
2497 ],
2498 }],
2499 ['target_arch=="ia32"', {
2500 'ldflags': [
2501 '-L<(android_ndk_root)/sources/cxx-stl/stlport/libs/x86',
2502 ],
2503 }],
2504 ],
2505 }],
2506 ['target_arch=="ia32"', {
2507 # The x86 toolchain currently has problems with stack-protector.
2508 'cflags!': [
2509 '-fstack-protector',
2510 ],
2511 'cflags': [
2512 '-fno-stack-protector',
2513 ],
2514 }],
2515 ],
2516 'target_conditions': [
2517 ['_type=="executable"', {
2518 'ldflags': [
2519 '-Bdynamic',
2520 '-Wl,-dynamic-linker,/system/bin/linker',
2521 '-Wl,--gc-sections',
2522 '-Wl,-z,nocopyreloc',
2523 # crtbegin_dynamic.o should be the last item in ldflags.
2524 '<(android_ndk_lib)/crtbegin_dynamic.o',
2525 ],
2526 'libraries': [
2527 # crtend_android.o needs to be the last item in libraries.
2528 # Do not add any libraries after this!
2529 '<(android_ndk_lib)/crtend_android.o',
2530 ],
2531 }],
2532 ['_type=="shared_library"', {
2533 'ldflags': [
2534 '-Wl,-shared,-Bsymbolic',
[email protected]a08029b42012-04-25 03:18:462535 # crtbegin_so.o should be the last item in ldflags.
2536 '<(android_ndk_lib)/crtbegin_so.o',
[email protected]da1c8d692011-09-20 20:35:012537 ],
[email protected]a08029b42012-04-25 03:18:462538 'libraries': [
2539 # crtend_so.o needs to be the last item in libraries.
2540 # Do not add any libraries after this!
2541 '<(android_ndk_lib)/crtend_so.o',
2542 ],
[email protected]da1c8d692011-09-20 20:35:012543 }],
2544 ],
2545 }],
2546 # Settings for building host targets using the system toolchain.
2547 ['_toolset=="host"', {
[email protected]3984aaf2012-02-16 11:42:122548 'cflags!': [
2549 # Due to issues in Clang build system, using ASan on 32-bit
2550 # binaries on x86_64 host is problematic.
2551 # TODO(eugenis): re-enable.
2552 '-faddress-sanitizer',
2553 ],
[email protected]da1c8d692011-09-20 20:35:012554 'ldflags!': [
[email protected]3984aaf2012-02-16 11:42:122555 '-faddress-sanitizer',
[email protected]da1c8d692011-09-20 20:35:012556 '-Wl,-z,noexecstack',
2557 '-Wl,--gc-sections',
2558 '-Wl,-O1',
2559 '-Wl,--as-needed',
2560 ],
[email protected]965b6b22011-09-29 16:07:282561 'sources/': [
2562 ['exclude', '_android(_unittest)?\\.cc$'],
2563 ['exclude', '(^|/)android/']
2564 ],
[email protected]da1c8d692011-09-20 20:35:012565 }],
2566 ],
2567 },
2568 }],
[email protected]93f21e42010-04-01 00:35:152569 ['OS=="solaris"', {
2570 'cflags!': ['-fvisibility=hidden'],
2571 'cflags_cc!': ['-fvisibility-inlines-hidden'],
2572 }],
[email protected]2f80c312009-02-25 21:26:552573 ['OS=="mac"', {
2574 'target_defaults': {
[email protected]24700642009-06-01 16:01:202575 'variables': {
[email protected]162407f2011-09-08 15:33:172576 # These should end with %, but there seems to be a bug with % in
2577 # variables that are intended to be set to different values in
2578 # different targets, like these.
2579 'mac_pie': 1, # Most executables can be position-independent.
[email protected]24700642009-06-01 16:01:202580 'mac_real_dsym': 0, # Fake .dSYMs are fine in most cases.
[email protected]27b687ec42012-03-26 22:22:152581 # Strip debugging symbols from the target.
2582 'mac_strip': '<(mac_strip_release)',
[email protected]24700642009-06-01 16:01:202583 },
[email protected]d92c7c012009-03-19 19:26:422584 'mac_bundle': 0,
[email protected]2f80c312009-02-25 21:26:552585 'xcode_settings': {
2586 'ALWAYS_SEARCH_USER_PATHS': 'NO',
[email protected]ab2956372009-08-13 18:11:042587 'GCC_C_LANGUAGE_STANDARD': 'c99', # -std=c99
2588 'GCC_CW_ASM_SYNTAX': 'NO', # No -fasm-blocks
2589 'GCC_DYNAMIC_NO_PIC': 'NO', # No -mdynamic-no-pic
2590 # (Equivalent to -fPIC)
2591 'GCC_ENABLE_CPP_EXCEPTIONS': 'NO', # -fno-exceptions
2592 'GCC_ENABLE_CPP_RTTI': 'NO', # -fno-rtti
2593 'GCC_ENABLE_PASCAL_STRINGS': 'NO', # No -mpascal-strings
[email protected]3224dcd2009-09-16 17:31:252594 # GCC_INLINES_ARE_PRIVATE_EXTERN maps to -fvisibility-inlines-hidden
2595 'GCC_INLINES_ARE_PRIVATE_EXTERN': 'YES',
[email protected]ab2956372009-08-13 18:11:042596 'GCC_OBJC_CALL_CXX_CDTORS': 'YES', # -fobjc-call-cxx-cdtors
2597 'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES', # -fvisibility=hidden
2598 'GCC_THREADSAFE_STATICS': 'NO', # -fno-threadsafe-statics
2599 'GCC_TREAT_WARNINGS_AS_ERRORS': 'YES', # -Werror
[email protected]2f80c312009-02-25 21:26:552600 'GCC_VERSION': '4.2',
[email protected]ab2956372009-08-13 18:11:042601 'GCC_WARN_ABOUT_MISSING_NEWLINE': 'YES', # -Wnewline-eof
[email protected]3224dcd2009-09-16 17:31:252602 # MACOSX_DEPLOYMENT_TARGET maps to -mmacosx-version-min
2603 'MACOSX_DEPLOYMENT_TARGET': '<(mac_deployment_target)',
[email protected]e1ece302011-09-15 03:58:112604 # Keep pch files below xcodebuild/.
2605 'SHARED_PRECOMPS_DIR': '$(CONFIGURATION_BUILD_DIR)/SharedPrecompiledHeaders',
[email protected]2f80c312009-02-25 21:26:552606 'USE_HEADERMAP': 'NO',
[email protected]57e94022011-05-04 15:33:192607 'OTHER_CFLAGS': [
2608 '-fno-strict-aliasing', # See http://crbug.com/32204
2609 ],
[email protected]080e86f2010-06-21 15:19:042610 'WARNING_CFLAGS': [
2611 '-Wall',
2612 '-Wendif-labels',
2613 '-Wextra',
2614 # Don't warn about unused function parameters.
2615 '-Wno-unused-parameter',
2616 # Don't warn about the "struct foo f = {0};" initialization
2617 # pattern.
2618 '-Wno-missing-field-initializers',
2619 ],
[email protected]b3fb8092009-03-12 19:09:242620 'conditions': [
2621 ['chromium_mac_pch', {'GCC_PRECOMPILE_PREFIX_HEADER': 'YES'},
[email protected]9543af052009-09-15 22:42:592622 {'GCC_PRECOMPILE_PREFIX_HEADER': 'NO'}
2623 ],
[email protected]66733172010-09-22 00:09:282624 ['clang==1', {
[email protected]34f40892011-09-06 21:53:302625 'CC': '$(SOURCE_ROOT)/<(clang_dir)/clang',
2626 'LDPLUSPLUS': '$(SOURCE_ROOT)/<(clang_dir)/clang++',
[email protected]a79fd882011-10-03 18:22:382627
[email protected]6c648f12011-12-24 07:50:432628 # Don't use -Wc++0x-extensions, which Xcode 4 enables by default
2629 # when buliding with clang. This warning is triggered when the
2630 # override keyword is used via the OVERRIDE macro from
2631 # base/compiler_specific.h.
2632 'CLANG_WARN_CXX0X_EXTENSIONS': 'NO',
[email protected]a79fd882011-10-03 18:22:382633
[email protected]34f40892011-09-06 21:53:302634 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0',
[email protected]66733172010-09-22 00:09:282635 'WARNING_CFLAGS': [
[email protected]7f8d486f2011-04-05 19:49:072636 '-Wheader-hygiene',
[email protected]66733172010-09-22 00:09:282637 # Don't die on dtoa code that uses a char as an array index.
2638 # This is required solely for base/third_party/dmg_fp/dtoa.cc.
2639 '-Wno-char-subscripts',
[email protected]25d3bb722010-11-22 14:31:452640 # Clang spots more unused functions.
2641 '-Wno-unused-function',
[email protected]d6431722011-09-01 00:46:332642 # See comments on this flag higher up in this file.
[email protected]0fa0fbc2010-10-12 04:32:052643 '-Wno-unnamed-type-template-args',
[email protected]241109b52011-10-15 19:00:302644 # This (rightyfully) complains about 'override', which we use
2645 # heavily.
2646 '-Wno-c++11-extensions',
[email protected]9242c7642012-01-29 09:02:102647
2648 # Warns on switches on enums that cover all enum values but
2649 # also contain a default: branch. Chrome is full of that.
2650 '-Wno-covered-switch-default',
[email protected]66733172010-09-22 00:09:282651 ],
2652 }],
[email protected]5d451ad2011-02-11 16:43:462653 ['clang==1 and clang_use_chrome_plugins==1', {
2654 'OTHER_CFLAGS': [
[email protected]c872dc52012-05-19 06:36:312655 '<@(clang_chrome_plugins_flags)',
[email protected]5d451ad2011-02-11 16:43:462656 ],
2657 }],
[email protected]4a9ac22e2011-12-02 03:41:532658 ['clang==1 and clang_load!=""', {
[email protected]5e781232011-01-28 02:57:592659 'OTHER_CFLAGS': [
2660 '-Xclang', '-load', '-Xclang', '<(clang_load)',
[email protected]4a9ac22e2011-12-02 03:41:532661 ],
2662 }],
2663 ['clang==1 and clang_add_plugin!=""', {
2664 'OTHER_CFLAGS': [
[email protected]5e781232011-01-28 02:57:592665 '-Xclang', '-add-plugin', '-Xclang', '<(clang_add_plugin)',
2666 ],
2667 }],
[email protected]2616d45d2012-01-19 03:15:482668 ['clang==1 and "<(GENERATOR)"=="ninja"', {
2669 'OTHER_CFLAGS': [
2670 # See http://crbug.com/110262
2671 '-fcolor-diagnostics',
2672 ],
2673 }],
[email protected]b3fb8092009-03-12 19:09:242674 ],
[email protected]2f80c312009-02-25 21:26:552675 },
[email protected]34f40892011-09-06 21:53:302676 'conditions': [
2677 ['clang==1', {
2678 'variables': {
2679 'clang_dir': '../third_party/llvm-build/Release+Asserts/bin',
2680 },
2681 }],
[email protected]921c7b52011-11-25 10:34:352682 ['asan==1', {
2683 'xcode_settings': {
2684 'OTHER_CFLAGS': [
[email protected]921c7b52011-11-25 10:34:352685 '-faddress-sanitizer',
[email protected]921c7b52011-11-25 10:34:352686 ],
2687 'OTHER_LDFLAGS': [
[email protected]921c7b52011-11-25 10:34:352688 '-faddress-sanitizer',
2689 # The symbols below are referenced in the ASan runtime
[email protected]2212d272011-12-20 21:37:372690 # library (compiled on OS X 10.6), but may be unavailable
[email protected]921c7b52011-11-25 10:34:352691 # on the prior OS X versions. Because Chromium is currently
2692 # targeting 10.5.0, we need to explicitly mark these
2693 # symbols as dynamic_lookup.
2694 '-Wl,-U,_malloc_default_purgeable_zone',
2695 '-Wl,-U,_malloc_zone_memalign',
2696 '-Wl,-U,_dispatch_sync_f',
2697 '-Wl,-U,_dispatch_async_f',
2698 '-Wl,-U,_dispatch_barrier_async_f',
2699 '-Wl,-U,_dispatch_group_async_f',
2700 '-Wl,-U,_dispatch_after_f',
2701 ],
2702 },
2703 'defines': [
2704 'ADDRESS_SANITIZER',
2705 ],
2706 }],
[email protected]34f40892011-09-06 21:53:302707 ],
[email protected]2f80c312009-02-25 21:26:552708 'target_conditions': [
[email protected]2f80c312009-02-25 21:26:552709 ['_type!="static_library"', {
[email protected]5d7dc972009-04-16 15:30:462710 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-search_paths_first']},
2711 }],
2712 ['_mac_bundle', {
2713 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-ObjC']},
[email protected]87fde4a2009-02-28 00:50:082714 }],
[email protected]6303fed2011-08-11 01:12:102715 ['_type=="executable"', {
2716 'postbuilds': [
2717 {
2718 # Arranges for data (heap) pages to be protected against
[email protected]8c40f322011-08-24 03:33:362719 # code execution when running on Mac OS X 10.7 ("Lion"), and
2720 # ensures that the position-independent executable (PIE) bit
2721 # is set for ASLR when running on Mac OS X 10.5 ("Leopard").
[email protected]6303fed2011-08-11 01:12:102722 'variables': {
[email protected]8c40f322011-08-24 03:33:362723 # Define change_mach_o_flags in a variable ending in _path
2724 # so that GYP understands it's a path and performs proper
2725 # relativization during dict merging.
2726 'change_mach_o_flags_path':
2727 'mac/change_mach_o_flags_from_xcode.sh',
[email protected]162407f2011-09-08 15:33:172728 'change_mach_o_flags_options%': [
[email protected]081c0342011-08-24 14:59:132729 ],
2730 'target_conditions': [
[email protected]162407f2011-09-08 15:33:172731 ['mac_pie==0 or release_valgrind_build==1', {
2732 # Don't enable PIE if it's unwanted. It's unwanted if
2733 # the target specifies mac_pie=0 or if building for
2734 # Valgrind, because Valgrind doesn't understand slide.
2735 # See the similar mac_pie/release_valgrind_build check
2736 # below.
[email protected]081c0342011-08-24 14:59:132737 'change_mach_o_flags_options': [
[email protected]081c0342011-08-24 14:59:132738 '--no-pie',
2739 ],
2740 }],
2741 ],
[email protected]6303fed2011-08-11 01:12:102742 },
[email protected]8c40f322011-08-24 03:33:362743 'postbuild_name': 'Change Mach-O Flags',
2744 'action': [
2745 '<(change_mach_o_flags_path)',
[email protected]081c0342011-08-24 14:59:132746 '>@(change_mach_o_flags_options)',
[email protected]8c40f322011-08-24 03:33:362747 ],
[email protected]6303fed2011-08-11 01:12:102748 },
2749 ],
[email protected]5a5d97aa2011-09-02 15:34:002750 'conditions': [
2751 ['asan==1', {
2752 'variables': {
2753 'asan_saves_file': 'asan.saves',
2754 },
2755 'xcode_settings': {
[email protected]6a4cad02011-11-25 07:26:562756 'CHROMIUM_STRIP_SAVE_FILE': '<(asan_saves_file)',
[email protected]5a5d97aa2011-09-02 15:34:002757 },
2758 }],
2759 ],
[email protected]162407f2011-09-08 15:33:172760 'target_conditions': [
2761 ['mac_pie==1 and release_valgrind_build==0', {
2762 # Turn on position-independence (ASLR) for executables. When
2763 # PIE is on for the Chrome executables, the framework will
2764 # also be subject to ASLR.
2765 # Don't do this when building for Valgrind, because Valgrind
2766 # doesn't understand slide. TODO: Make Valgrind on Mac OS X
2767 # understand slide, and get rid of the Valgrind check.
2768 'xcode_settings': {
2769 'OTHER_LDFLAGS': [
2770 '-Wl,-pie', # Position-independent executable (MH_PIE)
2771 ],
2772 },
2773 }],
2774 ],
[email protected]6a0242bc2011-07-01 00:34:462775 }],
[email protected]9a5e72862010-09-02 16:16:582776 ['(_type=="executable" or _type=="shared_library" or \
2777 _type=="loadable_module") and mac_strip!=0', {
[email protected]24700642009-06-01 16:01:202778 'target_conditions': [
2779 ['mac_real_dsym == 1', {
2780 # To get a real .dSYM bundle produced by dsymutil, set the
2781 # debug information format to dwarf-with-dsym. Since
2782 # strip_from_xcode will not be used, set Xcode to do the
2783 # stripping as well.
2784 'configurations': {
[email protected]5153767c2009-12-22 01:52:502785 'Release_Base': {
[email protected]24700642009-06-01 16:01:202786 'xcode_settings': {
2787 'DEBUG_INFORMATION_FORMAT': 'dwarf-with-dsym',
2788 'DEPLOYMENT_POSTPROCESSING': 'YES',
2789 'STRIP_INSTALLED_PRODUCT': 'YES',
[email protected]e14a9f92009-08-05 19:26:072790 'target_conditions': [
[email protected]c2111422010-06-01 18:30:252791 ['_type=="shared_library" or _type=="loadable_module"', {
[email protected]e14a9f92009-08-05 19:26:072792 # The Xcode default is to strip debugging symbols
2793 # only (-S). Local symbols should be stripped as
2794 # well, which will be handled by -x. Xcode will
2795 # continue to insert -S when stripping even when
2796 # additional flags are added with STRIPFLAGS.
2797 'STRIPFLAGS': '-x',
[email protected]c2111422010-06-01 18:30:252798 }], # _type=="shared_library" or _type=="loadable_module"'
[email protected]e14a9f92009-08-05 19:26:072799 ], # target_conditions
2800 }, # xcode_settings
2801 }, # configuration "Release"
2802 }, # configurations
[email protected]24700642009-06-01 16:01:202803 }, { # mac_real_dsym != 1
2804 # To get a fast fake .dSYM bundle, use a post-build step to
2805 # produce the .dSYM and strip the executable. strip_from_xcode
2806 # only operates in the Release configuration.
2807 'postbuilds': [
2808 {
2809 'variables': {
2810 # Define strip_from_xcode in a variable ending in _path
2811 # so that gyp understands it's a path and performs proper
2812 # relativization during dict merging.
2813 'strip_from_xcode_path': 'mac/strip_from_xcode',
2814 },
2815 'postbuild_name': 'Strip If Needed',
2816 'action': ['<(strip_from_xcode_path)'],
2817 },
[email protected]e14a9f92009-08-05 19:26:072818 ], # postbuilds
2819 }], # mac_real_dsym
2820 ], # target_conditions
[email protected]9a5e72862010-09-02 16:16:582821 }], # (_type=="executable" or _type=="shared_library" or
2822 # _type=="loadable_module") and mac_strip!=0
[email protected]e14a9f92009-08-05 19:26:072823 ], # target_conditions
2824 }, # target_defaults
2825 }], # OS=="mac"
[email protected]2f80c312009-02-25 21:26:552826 ['OS=="win"', {
2827 'target_defaults': {
2828 'defines': [
[email protected]a89e0942011-09-26 16:06:472829 '_WIN32_WINNT=0x0601',
2830 'WINVER=0x0601',
[email protected]2f80c312009-02-25 21:26:552831 'WIN32',
2832 '_WINDOWS',
[email protected]2f80c312009-02-25 21:26:552833 'NOMINMAX',
[email protected]e3116282011-08-13 00:52:282834 'PSAPI_VERSION=1',
[email protected]2f80c312009-02-25 21:26:552835 '_CRT_RAND_S',
2836 'CERT_CHAIN_PARA_HAS_EXTRA_FIELDS',
2837 'WIN32_LEAN_AND_MEAN',
[email protected]7a812dd62010-06-30 18:52:272838 '_ATL_NO_OPENGL',
[email protected]2f80c312009-02-25 21:26:552839 ],
[email protected]8974e042010-06-21 18:06:522840 'conditions': [
[email protected]2212d272011-12-20 21:37:372841 ['buildtype=="Official"', {
2842 # In official builds, targets can self-select an optimization
2843 # level by defining a variable named 'optimize', and setting it
2844 # to one of
2845 # - "size", optimizes for minimal code size - the default.
2846 # - "speed", optimizes for speed over code size.
2847 # - "max", whole program optimization and link-time code
2848 # generation. This is very expensive and should be used
2849 # sparingly.
2850 'variables': {
2851 'optimize%': 'size',
2852 },
2853 'target_conditions': [
2854 ['optimize=="size"', {
2855 'msvs_settings': {
2856 'VCCLCompilerTool': {
2857 # 1, optimizeMinSpace, Minimize Size (/O1)
2858 'Optimization': '1',
2859 # 2, favorSize - Favor small code (/Os)
2860 'FavorSizeOrSpeed': '2',
2861 },
2862 },
2863 },
2864 ],
2865 ['optimize=="speed"', {
2866 'msvs_settings': {
2867 'VCCLCompilerTool': {
2868 # 2, optimizeMaxSpeed, Maximize Speed (/O2)
2869 'Optimization': '2',
2870 # 1, favorSpeed - Favor fast code (/Ot)
2871 'FavorSizeOrSpeed': '1',
2872 },
2873 },
2874 },
2875 ],
2876 ['optimize=="max"', {
2877 'msvs_settings': {
2878 'VCCLCompilerTool': {
2879 # 2, optimizeMaxSpeed, Maximize Speed (/O2)
2880 'Optimization': '2',
2881 # 1, favorSpeed - Favor fast code (/Ot)
2882 'FavorSizeOrSpeed': '1',
2883 # This implies link time code generation.
2884 'WholeProgramOptimization': 'true',
2885 },
2886 },
2887 },
2888 ],
2889 ],
2890 },
2891 ],
[email protected]8974e042010-06-21 18:06:522892 ['component=="static_library"', {
2893 'defines': [
2894 '_HAS_EXCEPTIONS=0',
2895 ],
2896 }],
[email protected]c7b95392012-03-28 00:25:202897 ['MSVS_VERSION=="2008"', {
2898 'defines': [
2899 '_HAS_TR1=0',
2900 ],
2901 }],
[email protected]3e2648a2011-03-21 20:58:502902 ['secure_atl', {
2903 'defines': [
2904 '_SECURE_ATL',
2905 ],
2906 }],
[email protected]8974e042010-06-21 18:06:522907 ],
[email protected]5b5ca7cb2009-07-20 23:00:202908 'msvs_system_include_dirs': [
[email protected]a78da50e2010-06-09 21:31:372909 '<(DEPTH)/third_party/directxsdk/files/Include',
[email protected]58e56142011-11-24 00:57:542910 '<(DEPTH)/third_party/platformsdk_win7/files/Include',
[email protected]2f80c312009-02-25 21:26:552911 '$(VSInstallDir)/VC/atlmfc/include',
2912 ],
[email protected]a8d99cef2009-08-26 20:47:492913 'msvs_cygwin_dirs': ['<(DEPTH)/third_party/cygwin'],
[email protected]942c3a60f2011-05-03 02:04:112914 'msvs_disabled_warnings': [4351, 4396, 4503, 4819,
2915 # TODO(maruel): These warnings are level 4. They will be slowly
2916 # removed as code is fixed.
2917 4100, 4121, 4125, 4127, 4130, 4131, 4189, 4201, 4238, 4244, 4245,
2918 4310, 4355, 4428, 4481, 4505, 4510, 4512, 4530, 4610, 4611, 4701,
2919 4702, 4706,
2920 ],
[email protected]2f80c312009-02-25 21:26:552921 'msvs_settings': {
2922 'VCCLCompilerTool': {
2923 'MinimalRebuild': 'false',
[email protected]2f80c312009-02-25 21:26:552924 'BufferSecurityCheck': 'true',
2925 'EnableFunctionLevelLinking': 'true',
2926 'RuntimeTypeInfo': 'false',
[email protected]942c3a60f2011-05-03 02:04:112927 'WarningLevel': '4',
[email protected]2f80c312009-02-25 21:26:552928 'WarnAsError': 'true',
2929 'DebugInformationFormat': '3',
[email protected]3fef6e62009-07-31 19:58:582930 'conditions': [
[email protected]3e2648a2011-03-21 20:58:502931 ['msvs_multi_core_compile', {
[email protected]1f9471a2010-01-04 06:40:162932 'AdditionalOptions': ['/MP'],
[email protected]912c55c2009-07-31 23:33:552933 }],
[email protected]3e2648a2011-03-21 20:58:502934 ['MSVS_VERSION=="2005e"', {
2935 'AdditionalOptions': ['/w44068'], # Unknown pragma to 4 (ATL)
2936 }],
[email protected]8974e042010-06-21 18:06:522937 ['component=="shared_library"', {
2938 'ExceptionHandling': '1', # /EHsc
2939 }, {
2940 'ExceptionHandling': '0',
2941 }],
[email protected]3fef6e62009-07-31 19:58:582942 ],
[email protected]2f80c312009-02-25 21:26:552943 },
2944 'VCLibrarianTool': {
[email protected]1f9471a2010-01-04 06:40:162945 'AdditionalOptions': ['/ignore:4221'],
[email protected]a78da50e2010-06-09 21:31:372946 'AdditionalLibraryDirectories': [
[email protected]a78da50e2010-06-09 21:31:372947 '<(DEPTH)/third_party/directxsdk/files/Lib/x86',
[email protected]58e56142011-11-24 00:57:542948 '<(DEPTH)/third_party/platformsdk_win7/files/Lib',
[email protected]a78da50e2010-06-09 21:31:372949 ],
[email protected]2f80c312009-02-25 21:26:552950 },
2951 'VCLinkerTool': {
[email protected]2f80c312009-02-25 21:26:552952 'AdditionalDependencies': [
2953 'wininet.lib',
[email protected]b1d8c252011-01-13 20:27:502954 'dnsapi.lib',
[email protected]2f80c312009-02-25 21:26:552955 'version.lib',
2956 'msimg32.lib',
2957 'ws2_32.lib',
2958 'usp10.lib',
2959 'psapi.lib',
[email protected]96fd0032009-04-24 00:13:082960 'dbghelp.lib',
[email protected]dfdf7ee2011-04-28 18:51:482961 'winmm.lib',
2962 'shlwapi.lib',
[email protected]2f80c312009-02-25 21:26:552963 ],
[email protected]60c219832012-03-21 22:59:322964
[email protected]4de39f82011-03-28 12:01:292965 'conditions': [
[email protected]3e2648a2011-03-21 20:58:502966 ['msvs_express', {
2967 # Explicitly required when using the ATL with express
2968 'AdditionalDependencies': [
2969 'atlthunk.lib',
2970 ],
[email protected]60c219832012-03-21 22:59:322971
2972 # ATL 8.0 included in WDK 7.1 makes the linker to generate
2973 # almost eight hundred LNK4254 and LNK4078 warnings:
2974 # - warning LNK4254: section 'ATL' (50000040) merged into
2975 # '.rdata' (40000040) with different attributes
2976 # - warning LNK4078: multiple 'ATL' sections found with
2977 # different attributes
2978 'AdditionalOptions': ['/ignore:4254', '/ignore:4078'],
[email protected]3e2648a2011-03-21 20:58:502979 }],
2980 ['MSVS_VERSION=="2005e"', {
2981 # Non-express versions link automatically to these
2982 'AdditionalDependencies': [
2983 'advapi32.lib',
2984 'comdlg32.lib',
2985 'ole32.lib',
2986 'shell32.lib',
2987 'user32.lib',
2988 'winspool.lib',
2989 ],
2990 }],
2991 ],
[email protected]a78da50e2010-06-09 21:31:372992 'AdditionalLibraryDirectories': [
[email protected]a78da50e2010-06-09 21:31:372993 '<(DEPTH)/third_party/directxsdk/files/Lib/x86',
[email protected]58e56142011-11-24 00:57:542994 '<(DEPTH)/third_party/platformsdk_win7/files/Lib',
[email protected]a78da50e2010-06-09 21:31:372995 ],
[email protected]2f80c312009-02-25 21:26:552996 'GenerateDebugInformation': 'true',
2997 'MapFileName': '$(OutDir)\\$(TargetName).map',
2998 'ImportLibrary': '$(OutDir)\\lib\\$(TargetName).lib',
[email protected]2f80c312009-02-25 21:26:552999 'FixedBaseAddress': '1',
[email protected]825ff8d2009-05-22 01:40:483000 # SubSystem values:
3001 # 0 == not set
3002 # 1 == /SUBSYSTEM:CONSOLE
3003 # 2 == /SUBSYSTEM:WINDOWS
3004 # Most of the executables we'll ever create are tests
3005 # and utilities with console output.
3006 'SubSystem': '1',
[email protected]2f80c312009-02-25 21:26:553007 },
3008 'VCMIDLTool': {
3009 'GenerateStublessProxies': 'true',
[email protected]279904d2012-03-31 00:03:093010 'TypeLibraryName': '$(InputName).tlb',
3011 'OutputDirectory': '$(IntDir)',
3012 'HeaderFileName': '$(InputName).h',
[email protected]4fdb3cc2012-04-07 01:49:333013 'DLLDataFileName': '$(InputName).dlldata.c',
[email protected]279904d2012-03-31 00:03:093014 'InterfaceIdentifierFileName': '$(InputName)_i.c',
3015 'ProxyFileName': '$(InputName)_p.c',
[email protected]2f80c312009-02-25 21:26:553016 },
3017 'VCResourceCompilerTool': {
3018 'Culture' : '1033',
[email protected]4d91cbc2010-05-07 20:41:383019 'AdditionalIncludeDirectories': [
3020 '<(DEPTH)',
3021 '<(SHARED_INTERMEDIATE_DIR)',
3022 ],
[email protected]2f80c312009-02-25 21:26:553023 },
3024 },
3025 },
3026 }],
[email protected]79e2336c2011-05-12 18:18:343027 ['disable_nacl==1', {
[email protected]d8c7cbcc2009-10-02 19:00:313028 'target_defaults': {
3029 'defines': [
3030 'DISABLE_NACL',
3031 ],
3032 },
3033 }],
[email protected]cfbf9bc2009-12-07 22:07:563034 ['OS=="win" and msvs_use_common_linker_extras', {
[email protected]48c7af72009-07-03 22:00:193035 'target_defaults': {
3036 'msvs_settings': {
3037 'VCLinkerTool': {
[email protected]48c7af72009-07-03 22:00:193038 'DelayLoadDLLs': [
3039 'dbghelp.dll',
3040 'dwmapi.dll',
[email protected]e15a4ce52012-01-04 20:11:013041 'shell32.dll',
[email protected]48c7af72009-07-03 22:00:193042 'uxtheme.dll',
3043 ],
3044 },
3045 },
[email protected]ef4fa4072009-12-04 22:46:503046 'configurations': {
[email protected]5153767c2009-12-22 01:52:503047 'x86_Base': {
[email protected]ef4fa4072009-12-04 22:46:503048 'msvs_settings': {
3049 'VCLinkerTool': {
[email protected]1f9471a2010-01-04 06:40:163050 'AdditionalOptions': [
3051 '/safeseh',
[email protected]7cf23ce62012-01-13 02:43:333052 '/dynamicbase',
[email protected]1f9471a2010-01-04 06:40:163053 '/ignore:4199',
3054 '/ignore:4221',
3055 '/nxcompat',
3056 ],
[email protected]ef4fa4072009-12-04 22:46:503057 },
3058 },
3059 },
[email protected]5153767c2009-12-22 01:52:503060 'x64_Base': {
[email protected]ef4fa4072009-12-04 22:46:503061 'msvs_settings': {
3062 'VCLinkerTool': {
[email protected]1f9471a2010-01-04 06:40:163063 'AdditionalOptions': [
[email protected]ef4fa4072009-12-04 22:46:503064 # safeseh is not compatible with x64
[email protected]7cf23ce62012-01-13 02:43:333065 '/dynamicbase',
[email protected]1f9471a2010-01-04 06:40:163066 '/ignore:4199',
3067 '/ignore:4221',
3068 '/nxcompat',
3069 ],
[email protected]ef4fa4072009-12-04 22:46:503070 },
3071 },
3072 },
3073 },
[email protected]48c7af72009-07-03 22:00:193074 },
3075 }],
[email protected]9821d0d2010-04-16 22:40:373076 ['enable_new_npdevice_api==1', {
3077 'target_defaults': {
3078 'defines': [
3079 'ENABLE_NEW_NPDEVICE_API',
3080 ],
3081 },
3082 }],
[email protected]d10e2cc2012-03-20 10:45:273083 ['clang==1 and OS!="android"', {
[email protected]34f40892011-09-06 21:53:303084 'make_global_settings': [
[email protected]e4ddf332011-10-20 21:52:243085 ['CC', '<(make_clang_dir)/bin/clang'],
3086 ['CXX', '<(make_clang_dir)/bin/clang++'],
[email protected]60550c82011-09-06 23:51:073087 ['LINK', '$(CXX)'],
[email protected]34f40892011-09-06 21:53:303088 ['CC.host', '$(CC)'],
3089 ['CXX.host', '$(CXX)'],
3090 ['LINK.host', '$(LINK)'],
3091 ],
3092 }],
[email protected]d10e2cc2012-03-20 10:45:273093 ['OS=="android" and "<(GENERATOR)"!="ninja"', {
3094 # Hardcode the compiler names in the Makefile so that
3095 # it won't depend on the environment at make time.
3096 'make_global_settings': [
[email protected]2521bed42012-06-05 01:00:063097 ['CC', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} ${ANDROID_TOOLCHAIN}/*-gcc)'],
3098 ['CXX', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} ${ANDROID_TOOLCHAIN}/*-g++)'],
3099 ['LINK', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} ${ANDROID_TOOLCHAIN}/*-gcc)'],
[email protected]d10e2cc2012-03-20 10:45:273100 ['CC.host', '<!(which gcc)'],
3101 ['CXX.host', '<!(which g++)'],
3102 ['LINK.host', '<!(which g++)'],
3103 ],
3104 }],
[email protected]2f80c312009-02-25 21:26:553105 ],
3106 'xcode_settings': {
[email protected]0c8ab452009-11-06 21:57:503107 # DON'T ADD ANYTHING NEW TO THIS BLOCK UNLESS YOU REALLY REALLY NEED IT!
3108 # This block adds *project-wide* configuration settings to each project
3109 # file. It's almost always wrong to put things here. Specify your
3110 # custom xcode_settings in target_defaults to add them to targets instead.
3111
3112 # In an Xcode Project Info window, the "Base SDK for All Configurations"
3113 # setting sets the SDK on a project-wide basis. In order to get the
3114 # configured SDK to show properly in the Xcode UI, SDKROOT must be set
3115 # here at the project level.
3116 'SDKROOT': 'macosx<(mac_sdk)', # -isysroot
3117
[email protected]2f80c312009-02-25 21:26:553118 # The Xcode generator will look for an xcode_settings section at the root
3119 # of each dict and use it to apply settings on a file-wide basis. Most
3120 # settings should not be here, they should be in target-specific
3121 # xcode_settings sections, or better yet, should use non-Xcode-specific
3122 # settings in target dicts. SYMROOT is a special case, because many other
3123 # Xcode variables depend on it, including variables such as
3124 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something
3125 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the
3126 # files to appear (when present) in the UI as actual files and not red
3127 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR,
3128 # and therefore SYMROOT, needs to be set at the project level.
[email protected]bfa24b962009-03-02 00:16:163129 'SYMROOT': '<(DEPTH)/xcodebuild',
[email protected]2f80c312009-02-25 21:26:553130 },
[email protected]ee28c9f2009-09-04 01:53:013131}