blob: 35f41ff6ded37c3532d69acf409905f1ff2d5da4 [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': {
[email protected]8796d922012-08-07 01:23:1120 'variables': {
21 # Whether we're building a ChromeOS build.
22 'chromeos%': 0,
23
24 # Whether or not we are using the Aura windowing framework.
25 'use_aura%': 0,
26
27 # Whether or not we are building the Ash shell.
28 'use_ash%': 0,
29 },
30 # Copy conditionally-set variables out one scope.
31 'chromeos%': '<(chromeos)',
32 'use_aura%': '<(use_aura)',
33 'use_ash%': '<(use_ash)',
[email protected]e72e55b2011-01-06 22:19:3034
[email protected]3fa441d2011-09-18 17:28:5035 # Whether we are using Views Toolkit
36 'toolkit_views%': 0,
37
[email protected]e0b85a52011-10-06 03:30:4238 # Use OpenSSL instead of NSS. Under development: see http://crbug.com/62803
39 'use_openssl%': 0,
[email protected]023d8242011-11-22 01:25:2740
[email protected]da5f1952012-05-22 05:55:1541 'use_ibus%': 0,
[email protected]774e0612011-11-28 18:53:4842
[email protected]7ddea9802012-02-22 23:08:0543 # Disable viewport meta tag by default.
44 'enable_viewport%': 0,
[email protected]1efbaaa2012-04-24 02:43:2445
46 # Enable HiDPI support.
47 'enable_hidpi%': 0,
[email protected]219c7312012-05-10 20:32:4048
[email protected]6155e702012-05-02 17:56:0649 # Enable touch optimized art assets and metrics.
50 'enable_touch_ui%': 0,
[email protected]8973c3a2012-04-25 02:24:1851
[email protected]f1f362b42012-05-15 17:46:5852 # Override buildtype to select the desired build flavor.
53 # Dev - everyday build for development/testing
54 # Official - release build (generally implies additional processing)
55 # TODO(mmoss) Once 'buildtype' is fully supported (e.g. Windows gyp
56 # conversion is done), some of the things which are now controlled by
57 # 'branding', such as symbol generation, will need to be refactored
58 # based on 'buildtype' (i.e. we don't care about saving symbols for
59 # non-Official # builds).
60 'buildtype%': 'Dev',
[email protected]8796d922012-08-07 01:23:1161
62 'conditions': [
63 # ChromeOS implies ash.
64 ['chromeos==1', {
65 'use_ash%': 1,
66 'use_aura%': 1,
67 }],
68
69 # For now, Windows builds that |use_aura| should also imply using
70 # ash. This rule should be removed for the future when Windows is
71 # using the aura windows without the ash interface.
72 ['use_aura==1 and OS=="win"', {
73 'use_ash%': 1,
74 }],
75 ['use_ash==1', {
76 'use_aura%': 1,
77 }],
[email protected]94cdbf42012-12-11 19:49:2278
79 # Compute the architecture that we're building on.
80 ['OS=="win" or OS=="mac" or OS=="ios"', {
81 'host_arch%': 'ia32',
82 }, {
83 # This handles the Unix platforms for which there is some support.
84 # Anything else gets passed through, which probably won't work
85 # very well; such hosts should pass an explicit target_arch to
86 # gyp.
87 'host_arch%':
88 '<!(uname -m | sed -e "s/i.86/ia32/;s/x86_64/x64/;s/amd64/x64/;s/arm.*/arm/;s/i86pc/ia32/")',
89 }],
[email protected]8796d922012-08-07 01:23:1190 ],
[email protected]bb6aba32011-01-07 19:04:4391 },
92 # Copy conditionally-set variables out one scope.
93 'chromeos%': '<(chromeos)',
[email protected]41423092011-08-25 15:39:5894 'use_aura%': '<(use_aura)',
[email protected]ed329be2012-01-03 22:02:1695 'use_ash%': '<(use_ash)',
[email protected]e0b85a52011-10-06 03:30:4296 'use_openssl%': '<(use_openssl)',
[email protected]da5f1952012-05-22 05:55:1597 'use_ibus%': '<(use_ibus)',
[email protected]7ddea9802012-02-22 23:08:0598 'enable_viewport%': '<(enable_viewport)',
[email protected]1efbaaa2012-04-24 02:43:2499 'enable_hidpi%': '<(enable_hidpi)',
[email protected]6155e702012-05-02 17:56:06100 'enable_touch_ui%': '<(enable_touch_ui)',
[email protected]f1f362b42012-05-15 17:46:58101 'buildtype%': '<(buildtype)',
[email protected]94cdbf42012-12-11 19:49:22102 'host_arch%': '<(host_arch)',
103
104 # Default architecture we're building for is the architecture we're
105 # building on.
106 'target_arch%': '<(host_arch)',
[email protected]f1f362b42012-05-15 17:46:58107
[email protected]0115f042012-07-27 20:36:53108 # Sets whether we're building with the Android SDK/NDK (and hence with
109 # Ant, value 0), or as part of the Android system (and hence with the
110 # Android build system, value 1).
111 'android_build_type%': 0,
112
[email protected]e72e55b2011-01-06 22:19:30113 'conditions': [
[email protected]ab2017e2012-02-07 01:54:50114 # Set default value of toolkit_views based on OS.
[email protected]6e00601b72012-03-19 15:40:35115 ['OS=="win" or chromeos==1 or use_aura==1', {
[email protected]bb6aba32011-01-07 19:04:43116 'toolkit_views%': 1,
117 }, {
118 'toolkit_views%': 0,
119 }],
[email protected]1efbaaa2012-04-24 02:43:24120
[email protected]8796d922012-08-07 01:23:11121 # Set toolkit_uses_gtk for the Chromium browser on Linux.
122 ['(OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris") and use_aura==0', {
123 'toolkit_uses_gtk%': 1,
124 }, {
125 'toolkit_uses_gtk%': 0,
126 }],
127
[email protected]3aa8a682012-08-11 00:04:29128 # Enable HiDPI on Mac OS and Chrome OS.
129 ['OS=="mac" or chromeos==1', {
[email protected]1efbaaa2012-04-24 02:43:24130 'enable_hidpi%': 1,
131 }],
[email protected]219c7312012-05-10 20:32:40132
[email protected]c71fe6402012-08-15 15:22:55133 # Enable touch UI on Metro.
134 ['OS=="win"', {
[email protected]6155e702012-05-02 17:56:06135 'enable_touch_ui%': 1,
136 }],
[email protected]dc4e8b82012-11-15 03:58:16137
[email protected]b1a2b542013-01-10 07:33:09138 # Enable App Launcher only on ChromeOS, Windows and OSX.
139 ['use_ash==1 or OS=="win" or OS=="mac"', {
[email protected]dc4e8b82012-11-15 03:58:16140 'enable_app_list%': 1,
141 }, {
142 'enable_app_list%': 0,
[email protected]b1a2b542013-01-10 07:33:09143 }],
144
145 # Enable Message Center only on ChromeOS and Windows for now.
146 ['use_ash==1 or OS=="win"', {
147 'enable_message_center%': 1,
148 }, {
[email protected]9b5dbf72013-01-09 20:29:15149 'enable_message_center%': 0,
[email protected]dc4e8b82012-11-15 03:58:16150 }],
[email protected]cb800562012-11-20 22:36:07151
152 ['use_aura==1 or (OS!="win" and OS!="mac" and OS!="ios" and OS!="android")', {
[email protected]a6f1bdf2012-11-28 15:52:26153 'use_default_render_theme%': 1,
[email protected]cb800562012-11-20 22:36:07154 }, {
155 'use_default_render_theme%': 0,
156 }],
[email protected]e72e55b2011-01-06 22:19:30157 ],
158 },
159
160 # Copy conditionally-set variables out one scope.
161 'chromeos%': '<(chromeos)',
[email protected]e72e55b2011-01-06 22:19:30162 'host_arch%': '<(host_arch)',
[email protected]94cdbf42012-12-11 19:49:22163 'target_arch%': '<(target_arch)',
[email protected]bb6aba32011-01-07 19:04:43164 'toolkit_views%': '<(toolkit_views)',
[email protected]8796d922012-08-07 01:23:11165 'toolkit_uses_gtk%': '<(toolkit_uses_gtk)',
[email protected]41423092011-08-25 15:39:58166 'use_aura%': '<(use_aura)',
[email protected]ed329be2012-01-03 22:02:16167 'use_ash%': '<(use_ash)',
[email protected]e0b85a52011-10-06 03:30:42168 'use_openssl%': '<(use_openssl)',
[email protected]da5f1952012-05-22 05:55:15169 'use_ibus%': '<(use_ibus)',
[email protected]7ddea9802012-02-22 23:08:05170 'enable_viewport%': '<(enable_viewport)',
[email protected]1efbaaa2012-04-24 02:43:24171 'enable_hidpi%': '<(enable_hidpi)',
[email protected]6155e702012-05-02 17:56:06172 'enable_touch_ui%': '<(enable_touch_ui)',
[email protected]0115f042012-07-27 20:36:53173 'android_build_type%': '<(android_build_type)',
[email protected]dc4e8b82012-11-15 03:58:16174 'enable_app_list%': '<(enable_app_list)',
[email protected]9b5dbf72013-01-09 20:29:15175 'enable_message_center%': '<(enable_message_center)',
[email protected]cb800562012-11-20 22:36:07176 'use_default_render_theme%': '<(use_default_render_theme)',
[email protected]94cdbf42012-12-11 19:49:22177 'buildtype%': '<(buildtype)',
[email protected]023d8242011-11-22 01:25:27178
[email protected]8fb0ef02011-05-20 00:53:50179 # We used to provide a variable for changing how libraries were built.
180 # This variable remains until we can clean up all the users.
181 # This needs to be one nested variables dict in so that dependent
182 # gyp files can make use of it in their outer variables. (Yikes!)
183 # http://code.google.com/p/chromium/issues/detail?id=83308
184 'library%': 'static_library',
185
[email protected]e14a9f92009-08-05 19:26:07186 # Override branding to select the desired branding flavor.
187 'branding%': 'Chromium',
188
[email protected]e72e55b2011-01-06 22:19:30189 # This variable tells WebCore.gyp and JavaScriptCore.gyp whether they are
190 # are built under a chromium full build (1) or a webkit.org chromium
191 # build (0).
192 'inside_chromium_build%': 1,
[email protected]8974e042010-06-21 18:06:52193
[email protected]e72e55b2011-01-06 22:19:30194 # Set to 1 to enable fast builds. It disables debug info for fastest
195 # compilation.
196 'fastbuild%': 0,
[email protected]93012ca2010-08-10 20:10:49197
[email protected]20960e072011-09-20 20:59:01198 # Set to 1 to enable dcheck in release without having to use the flag.
199 'dcheck_always_on%': 0,
200
[email protected]464750f2011-10-24 23:16:18201 # Disable file manager component extension by default.
[email protected]3d38d8e2011-04-16 20:48:51202 'file_manager_extension%': 0,
203
[email protected]e72e55b2011-01-06 22:19:30204 # Python version.
[email protected]a43c5a02011-05-27 06:54:51205 'python_ver%': '2.6',
[email protected]b3f23ba2010-04-26 22:58:17206
[email protected]e72e55b2011-01-06 22:19:30207 # Set ARM-v7 compilation flags
208 'armv7%': 0,
209
210 # Set Neon compilation flags (only meaningful if armv7==1).
211 'arm_neon%': 1,
212
213 # The system root for cross-compiles. Default: none.
214 'sysroot%': '',
215
[email protected]945361a2011-09-30 04:38:43216 # The system libdir used for this ABI.
217 'system_libdir%': 'lib',
218
[email protected]e72e55b2011-01-06 22:19:30219 # On Linux, we build with sse2 for Chromium builds.
220 'disable_sse2%': 0,
221
222 # Use libjpeg-turbo as the JPEG codec used by Chromium.
[email protected]32e56e52011-02-28 02:28:03223 'use_libjpeg_turbo%': 1,
[email protected]e72e55b2011-01-06 22:19:30224
[email protected]d9113542012-07-18 17:11:28225 # Use system libjpeg. Note that the system's libjepg will be used even if
226 # use_libjpeg_turbo is set.
227 'use_system_libjpeg%': 0,
228
[email protected]e72e55b2011-01-06 22:19:30229 # Variable 'component' is for cases where we would like to build some
230 # components as dynamic shared libraries but still need variable
231 # 'library' for static libraries.
232 # By default, component is set to whatever library is set to and
233 # it can be overriden by the GYP command line or by ~/.gyp/include.gypi.
[email protected]5a547332011-05-19 23:18:53234 'component%': 'static_library',
[email protected]e72e55b2011-01-06 22:19:30235
[email protected]bb6aba32011-01-07 19:04:43236 # Set to select the Title Case versions of strings in GRD files.
237 'use_titlecase_in_grd_files%': 0,
[email protected]63692212010-09-16 00:22:21238
[email protected]98da0042011-02-02 00:10:27239 # Use translations provided by volunteers at launchpad.net. This
240 # currently only works on Linux.
[email protected]00dc155832011-02-01 18:51:19241 'use_third_party_translations%': 0,
242
[email protected]9a425422011-01-11 00:53:18243 # Remoting compilation is enabled by default. Set to 0 to disable.
244 'remoting%': 1,
245
[email protected]1ec68c42011-06-01 13:56:25246 # Configuration policy is enabled by default. Set to 0 to disable.
247 'configuration_policy%': 1,
248
[email protected]6c521fed2012-11-29 17:00:03249 # Variable safe_browsing is used to control the build time configuration
250 # for safe browsing feature. Safe browsing can be compiled in 3 different
251 # levels: 0 disables it, 1 enables it fully, and 2 enables only UI and
252 # reporting features without enabling phishing and malware detection. This
253 # is useful to integrate a third party phishing/malware detection to
254 # existing safe browsing logic.
[email protected]4b58e7d2011-07-11 10:22:56255 'safe_browsing%': 1,
256
[email protected]9eb100e2011-10-14 05:08:22257 # Speech input is compiled in by default. Set to 0 to disable.
258 'input_speech%': 1,
259
[email protected]7cce3232011-10-28 10:41:57260 # Notifications are compiled in by default. Set to 0 to disable.
261 'notifications%' : 1,
262
[email protected]970fd4e2012-12-19 11:09:37263 # Use dsymutil to generate real .dSYM files on Mac. The default is 0 for
264 # regular builds and 1 for ASan builds.
265 'mac_want_real_dsym%': 'default',
266
[email protected]5d451ad2011-02-11 16:43:46267 # If this is set, the clang plugins used on the buildbot will be used.
268 # Run tools/clang/scripts/update.sh to make sure they are compiled.
269 # This causes 'clang_chrome_plugins_flags' to be set.
270 # Has no effect if 'clang' is not set as well.
[email protected]3bb37e62012-04-19 03:40:08271 'clang_use_chrome_plugins%': 1,
[email protected]5d451ad2011-02-11 16:43:46272
[email protected]2e82fa52012-11-27 23:41:44273 # Enable building with ASAN (Clang's -fsanitize=address option).
274 # -fsanitize=address only works with clang, but asan=1 implies clang=1
[email protected]92799b632011-08-15 14:33:06275 # See https://sites.google.com/a/chromium.org/dev/developers/testing/addresssanitizer
276 'asan%': 0,
277
[email protected]927a9d672012-11-09 11:28:20278 # Enable building with TSAN (Clang's -fsanitize=thread option).
279 # -fsanitize=thread only works with clang, but tsan=1 implies clang=1
[email protected]c9a829272012-07-04 07:51:12280 # See http://clang.llvm.org/docs/ThreadSanitizer.html
281 'tsan%': 0,
[email protected]7bdd7d7c2012-11-01 10:36:16282 'tsan_blacklist%': '<(PRODUCT_DIR)/../../tools/valgrind/tsan_v2/ignores.txt',
[email protected]c9a829272012-07-04 07:51:12283
[email protected]7ce58b22012-09-26 05:17:25284 # Use a modified version of Clang to intercept allocated types and sizes
285 # for allocated objects. clang_type_profiler=1 implies clang=1.
286 # See http://dev.chromium.org/developers/deep-memory-profiler/cpp-object-type-identifier
287 # TODO(dmikurube): Support mac. See http://crbug.com/123758#c11
288 'clang_type_profiler%': 0,
289
[email protected]8a6abd12012-05-16 10:04:44290 # Set to true to instrument the code with function call logger.
291 # See src/third_party/cygprofile/cyg-profile.cc for details.
292 'order_profiling%': 0,
293
[email protected]00b0a7f2012-01-25 15:30:46294 # Use the provided profiled order file to link Chrome image with it.
295 # This makes Chrome faster by better using CPU cache when executing code.
296 # This is known as PGO (profile guided optimization).
297 # See https://sites.google.com/a/google.com/chrome-msk/dev/boot-speed-up-effort
298 'order_text_section%' : "",
299
[email protected]1ad5a7b2011-06-24 03:15:13300 # Set to 1 compile with -fPIC cflag on linux. This is a must for shared
301 # libraries on linux x86-64 and arm, plus ASLR.
302 'linux_fpic%': 1,
303
[email protected]bd7b6fe2012-03-05 21:02:40304 # Whether one-click signin is enabled or not.
305 'enable_one_click_signin%': 0,
306
[email protected]bbf766d2012-05-18 16:30:21307 # Enable Web Intents support in WebKit.
[email protected]5ffb0a42012-01-27 09:36:11308 'enable_web_intents%': 1,
309
[email protected]6a3cd37e2012-04-17 17:13:34310 # Enable Chrome browser extensions
311 'enable_extensions%': 1,
312
[email protected]658677f2012-06-09 06:04:02313 # Enable browser automation.
314 'enable_automation%': 1,
315
[email protected]6ee43a72012-12-07 22:44:40316 # Enable Google Now.
317 'enable_google_now%': 1,
318
[email protected]703369a2012-11-05 20:40:31319 # Enable language detection.
320 'enable_language_detection%': 1,
321
[email protected]658677f2012-06-09 06:04:02322 # Enable printing support and UI.
323 'enable_printing%': 1,
324
[email protected]5ffb0a42012-01-27 09:36:11325 # Enable Web Intents web content registration via HTML element
326 # and WebUI managing such registrations.
327 'enable_web_intents_tag%': 0,
[email protected]62af76e2011-08-01 02:34:01328
[email protected]dda90ae2011-07-19 22:07:48329 # Webrtc compilation is enabled by default. Set to 0 to disable.
330 'enable_webrtc%': 1,
331
[email protected]67c125d2011-10-11 18:58:22332 # PPAPI by default does not support plugins making calls off the main
333 # thread. Set to 1 to turn on experimental support for out-of-process
334 # plugins to make call of the main thread.
[email protected]719b7812012-11-08 00:33:21335 'enable_pepper_threading%': 1,
[email protected]67c125d2011-10-11 18:58:22336
[email protected]cdb756ef2012-04-05 18:34:53337 # Enables use of the session service, which is enabled by default.
338 # Support for disabling depends on the platform.
339 'enable_session_service%': 1,
340
[email protected]6b40bb582012-03-15 20:50:38341 # Enables theme support, which is enabled by default. Support for
342 # disabling depends on the platform.
343 'enable_themes%': 1,
344
[email protected]4ffe78a2012-10-04 20:55:15345 # Uses OEM-specific wallpaper resources on Chrome OS.
346 'use_oem_wallpaper%': 0,
347
[email protected]0acdd772012-04-05 22:53:00348 # Enables support for background apps.
349 'enable_background%': 1,
350
[email protected]44879ed2012-04-06 01:11:02351 # Enable the task manager by default.
352 'enable_task_manager%': 1,
[email protected]e1de87f2012-05-02 17:20:45353
[email protected]9bfe0ab2012-08-30 13:18:11354 # Enable FTP support by default.
355 'disable_ftp_support%': 0,
356
[email protected]22d6dd72012-05-15 07:29:55357 # XInput2 multitouch support is disabled by default (use_xi2_mt=0).
358 # Setting to non-zero value enables XI2 MT. When XI2 MT is enabled,
359 # the input value also defines the required XI2 minor minimum version.
360 # For example, use_xi2_mt=2 means XI2.2 or above version is required.
361 'use_xi2_mt%': 0,
362
[email protected]9061bee82012-01-16 11:45:17363 # Use of precompiled headers on Windows.
364 #
[email protected]9061bee82012-01-16 11:45:17365 # This variable may be explicitly set to 1 (enabled) or 0
366 # (disabled) in ~/.gyp/include.gypi or via the GYP command line.
367 # This setting will override the default.
368 #
[email protected]c3340fb32012-12-20 20:45:39369 # See
[email protected]9061bee82012-01-16 11:45:17370 # http://code.google.com/p/chromium/wiki/WindowsPrecompiledHeaders
371 # for details.
[email protected]d5cf9fb2011-09-27 00:15:16372 'chromium_win_pch%': 0,
373
[email protected]3bb37e62012-04-19 03:40:08374 # Set this to true when building with Clang.
375 # See http://code.google.com/p/chromium/wiki/Clang for details.
376 'clang%': 0,
377
[email protected]18e0f39b2012-01-17 16:47:34378 # Enable plug-in installation by default.
379 'enable_plugin_installation%': 1,
380
[email protected]6d17f6392012-12-05 05:24:54381 # Enable PPAPI and NPAPI by default.
382 # TODO(nileshagrawal): Make this flag enable/disable NPAPI as well
383 # as PPAPI; see crbug.com/162667.
384 'enable_plugins%': 1,
385
[email protected]62424a52012-03-18 03:09:50386 # Specifies whether to use canvas_skia.cc in place of platform
[email protected]4ddae4b2012-03-15 17:32:42387 # specific implementations of gfx::Canvas. Affects text drawing in the
[email protected]d18e50312012-01-25 17:49:35388 # Chrome UI.
389 # TODO(asvitkine): Enable this on all platforms and delete this flag.
390 # http://crbug.com/105550
[email protected]62424a52012-03-18 03:09:50391 'use_canvas_skia%': 0,
[email protected]d18e50312012-01-25 17:49:35392
[email protected]a9318c72012-03-01 01:29:47393 # Set to "tsan", "memcheck", or "drmemory" to configure the build to work
394 # with one of those tools.
395 'build_for_tool%': '',
396
[email protected]01971642012-03-07 14:39:56397 # Whether tests targets should be run, archived or just have the
398 # dependencies verified. All the tests targets have the '_run' suffix,
399 # e.g. base_unittests_run runs the target base_unittests. The test target
[email protected]5dcce7f82012-10-04 00:08:07400 # always calls tools/swarm_client/isolate.py. See the script's --help for
401 # more information and the valid --mode values. Meant to be overriden with
[email protected]01971642012-03-07 14:39:56402 # GYP_DEFINES.
[email protected]5d606072012-04-30 20:14:13403 # TODO(maruel): Converted the default from 'check' to 'noop' so work can
404 # be done while the builders are being reconfigured to check out test data
405 # files.
[email protected]0ef3a522012-05-15 14:56:33406 'test_isolation_mode%': 'noop',
407 # It must not be '<(PRODUCT_DIR)' alone, the '/' is necessary otherwise
408 # gyp will remove duplicate flags, causing isolate.py to be confused.
[email protected]2fb94e92012-05-18 18:49:39409 'test_isolation_outdir%': '<(PRODUCT_DIR)/isolate',
[email protected]01971642012-03-07 14:39:56410
[email protected]740ebed2012-06-27 19:14:06411 'sas_dll_path%': '<(DEPTH)/third_party/platformsdk_win7/files/redist/x86',
[email protected]49ae3e52012-04-12 09:50:12412 'wix_path%': '<(DEPTH)/third_party/wix',
413
[email protected]bb6aba32011-01-07 19:04:43414 'conditions': [
[email protected]33423fa2011-09-23 18:18:14415 # TODO(epoger): Figure out how to set use_skia=1 for Mac outside of
416 # the 'conditions' clause. Initial attempts resulted in chromium and
417 # webkit disagreeing on its setting.
[email protected]7d7564a12011-06-21 19:20:22418 ['OS=="mac"', {
[email protected]53c98db2012-03-14 16:02:21419 'use_skia%': 1,
[email protected]7d7564a12011-06-21 19:20:22420 }, {
421 'use_skia%': 1,
422 }],
423
[email protected]79e2336c2011-05-12 18:18:34424 # A flag for POSIX platforms
[email protected]c49ab0c2011-05-18 17:25:37425 ['OS=="win"', {
[email protected]79e2336c2011-05-12 18:18:34426 'os_posix%': 0,
[email protected]c49ab0c2011-05-18 17:25:37427 }, {
428 'os_posix%': 1,
[email protected]79e2336c2011-05-12 18:18:34429 }],
430
[email protected]df9167b2011-11-14 19:15:25431 # A flag for BSD platforms
432 ['OS=="freebsd" or OS=="openbsd"', {
433 'os_bsd%': 1,
434 }, {
435 'os_bsd%': 0,
436 }],
437
[email protected]c329adf82011-10-05 14:34:57438 # NSS usage.
[email protected]e0b85a52011-10-06 03:30:42439 ['(OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris") and use_openssl==0', {
[email protected]c329adf82011-10-05 14:34:57440 'use_nss%': 1,
441 }, {
442 'use_nss%': 0,
443 }],
[email protected]e0b85a52011-10-06 03:30:42444
[email protected]258dca42011-09-21 00:17:19445 # Flags to use X11 on non-Mac POSIX platforms
[email protected]1e013672012-06-29 22:12:20446 ['OS=="win" or OS=="mac" or OS=="ios" or OS=="android"', {
[email protected]258dca42011-09-21 00:17:19447 'use_glib%': 0,
[email protected]79e2336c2011-05-12 18:18:34448 'use_x11%': 0,
[email protected]c49ab0c2011-05-18 17:25:37449 }, {
[email protected]258dca42011-09-21 00:17:19450 'use_glib%': 1,
[email protected]c49ab0c2011-05-18 17:25:37451 'use_x11%': 1,
[email protected]79e2336c2011-05-12 18:18:34452 }],
[email protected]9a8175892012-03-20 02:11:58453
[email protected]efadeacf2011-10-27 19:01:00454 # We always use skia text rendering in Aura on Windows, since GDI
455 # doesn't agree with our BackingStore.
456 # TODO(beng): remove once skia text rendering is on by default.
457 ['use_aura==1 and OS=="win"', {
458 'enable_skia_text%': 1,
459 }],
[email protected]9edeb712011-09-20 21:20:33460
[email protected]63692212010-09-16 00:22:21461 # A flag to enable or disable our compile-time dependency
462 # on gnome-keyring. If that dependency is disabled, no gnome-keyring
463 # support will be available. This option is useful
[email protected]25bc66a22011-09-24 18:32:49464 # for Linux distributions and for Aura.
[email protected]ab2017e2012-02-07 01:54:50465 ['chromeos==1 or use_aura==1', {
[email protected]63692212010-09-16 00:22:21466 'use_gnome_keyring%': 0,
467 }, {
468 'use_gnome_keyring%': 1,
469 }],
[email protected]0afe5212010-10-01 18:56:11470
[email protected]8796d922012-08-07 01:23:11471 ['toolkit_uses_gtk==1 or OS=="mac" or OS=="ios"', {
[email protected]1e013672012-06-29 22:12:20472 # GTK+, Mac and iOS want Title Case strings
[email protected]bb6aba32011-01-07 19:04:43473 'use_titlecase_in_grd_files%': 1,
474 }],
475
[email protected]5f887612012-03-01 21:34:06476 # Enable file manager extension on Chrome OS.
477 ['chromeos==1', {
[email protected]ab2017e2012-02-07 01:54:50478 'file_manager_extension%': 1,
479 }, {
[email protected]3d38d8e2011-04-16 20:48:51480 'file_manager_extension%': 0,
481 }],
[email protected]7de46352011-09-12 15:39:19482
[email protected]f032fe92012-06-12 19:20:01483 ['OS=="win" or OS=="mac" or (OS=="linux" and use_aura==0)', {
484 'enable_one_click_signin%': 1,
[email protected]e4b66bf2012-05-29 20:39:51485 }],
486
[email protected]da1c8d692011-09-20 20:35:01487 ['OS=="android"', {
[email protected]55e02302012-08-21 00:50:46488 'enable_extensions%': 0,
[email protected]6ee43a72012-12-07 22:44:40489 'enable_google_now%': 0,
[email protected]703369a2012-11-05 20:40:31490 'enable_language_detection%': 0,
[email protected]55e02302012-08-21 00:50:46491 'enable_printing%': 0,
492 'enable_themes%': 0,
[email protected]55e02302012-08-21 00:50:46493 'proprietary_codecs%': 1,
[email protected]48de0fc2012-08-02 11:03:58494 'remoting%': 0,
[email protected]da1c8d692011-09-20 20:35:01495 }],
[email protected]839d5172011-10-13 17:18:11496
[email protected]118347052013-01-12 08:35:43497 ['OS=="android" and android_build_type==0', {
498 'enable_webrtc%': 1,
499 }],
500
501 # Disable WebRTC for building WebView as part of Android system.
502 # TODO(boliu): Decide if we want WebRTC, and if so, also merge
503 # the necessary third_party repositories.
504 ['OS=="android" and android_build_type==1', {
505 'enable_webrtc%': 0,
506 }],
507
[email protected]0d16f292012-07-02 22:10:48508 ['OS=="ios"', {
[email protected]c4ac4d12012-09-12 12:02:24509 'configuration_policy%': 0,
[email protected]9bfe0ab2012-08-30 13:18:11510 'disable_ftp_support%': 1,
[email protected]c4ac4d12012-09-12 12:02:24511 'enable_automation%': 0,
512 'enable_extensions%': 0,
[email protected]6ee43a72012-12-07 22:44:40513 'enable_google_now%': 0,
[email protected]703369a2012-11-05 20:40:31514 'enable_language_detection%': 0,
[email protected]c4ac4d12012-09-12 12:02:24515 'enable_printing%': 0,
[email protected]3c6aa862012-11-05 17:11:44516 'enable_session_service%': 0,
[email protected]c4ac4d12012-09-12 12:02:24517 'enable_themes%': 0,
518 'enable_webrtc%': 0,
519 'notifications%': 0,
[email protected]0d16f292012-07-02 22:10:48520 'remoting%': 0,
[email protected]3c6aa862012-11-05 17:11:44521 'safe_browsing%': 0,
[email protected]0d16f292012-07-02 22:10:48522 }],
523
[email protected]839d5172011-10-13 17:18:11524 # Use GPU accelerated cross process image transport by default
[email protected]023d8242011-11-22 01:25:27525 # on linux builds with the Aura window manager
[email protected]f83c6f7f2012-01-28 03:23:01526 ['use_aura==1 and OS=="linux"', {
[email protected]1ee7c56c2011-10-19 14:51:33527 'ui_compositor_image_transport%': 1,
[email protected]839d5172011-10-13 17:18:11528 }, {
[email protected]1ee7c56c2011-10-19 14:51:33529 'ui_compositor_image_transport%': 0,
[email protected]839d5172011-10-13 17:18:11530 }],
[email protected]9061bee82012-01-16 11:45:17531
[email protected]c3340fb32012-12-20 20:45:39532 # Turn precompiled headers on by default.
533 ['OS=="win" and buildtype!="Official"', {
[email protected]9061bee82012-01-16 11:45:17534 'chromium_win_pch%': 1
535 }],
[email protected]18e0f39b2012-01-17 16:47:34536
[email protected]3d5173ec2012-03-27 04:08:23537 ['use_aura==1 or chromeos==1 or OS=="android"', {
[email protected]18e0f39b2012-01-17 16:47:34538 'enable_plugin_installation%': 0,
539 }, {
540 'enable_plugin_installation%': 1,
541 }],
[email protected]b07806c12012-02-03 22:44:59542
[email protected]1e013672012-06-29 22:12:20543 ['OS=="android" or OS=="ios"', {
[email protected]6d17f6392012-12-05 05:24:54544 'enable_plugins%': 0,
545 }, {
546 'enable_plugins%': 1,
547 }],
548
[email protected]8d726a42012-02-09 03:49:00549 # linux_use_gold_binary: whether to use the binary checked into
550 # third_party/gold.
[email protected]1d4ace782012-03-07 09:20:40551 ['OS=="linux"', {
[email protected]1e033482012-02-09 19:33:51552 'linux_use_gold_binary%': 1,
553 }, {
554 'linux_use_gold_binary%': 0,
555 }],
556
[email protected]be239492012-02-09 19:00:17557 # linux_use_gold_flags: whether to use build flags that rely on gold.
558 # On by default for x64 Linux. Temporarily off for ChromeOS as
559 # it failed on a buildbot.
[email protected]1d4ace782012-03-07 09:20:40560 ['OS=="linux" and chromeos==0', {
[email protected]be239492012-02-09 19:00:17561 'linux_use_gold_flags%': 1,
562 }, {
[email protected]8d726a42012-02-09 03:49:00563 'linux_use_gold_flags%': 0,
[email protected]b07806c12012-02-03 22:44:59564 }],
[email protected]2e22e2f2012-03-15 21:53:10565
[email protected]9394a3a2012-12-19 19:22:39566 ['chromeos==1', {
567 'linux_use_libgps%': 1,
568 }, { # chromeos==0
569 # Do not use libgps on desktop Linux by default,
570 # see http://crbug.com/103751.
571 'linux_use_libgps%': 0,
572 }],
573
[email protected]a95d5302012-11-03 00:02:19574 ['OS=="android" or OS=="ios"', {
[email protected]e6026962012-06-14 21:28:32575 'enable_captive_portal_detection%': 0,
576 }, {
577 'enable_captive_portal_detection%': 1,
578 }],
579
[email protected]3bd47e022012-03-22 04:19:12580 # Enable Skia UI text drawing incrementally on different platforms.
581 # http://crbug.com/105550
582 #
583 # On Aura, this allows per-tile painting to be used in the browser
584 # compositor.
[email protected]9197a9282012-05-30 14:12:32585 ['OS!="mac" and OS!="android"', {
[email protected]3bd47e022012-03-22 04:19:12586 'use_canvas_skia%': 1,
587 }],
[email protected]adb44342012-07-23 13:36:12588
[email protected]0753ea42012-08-30 20:15:44589 ['chromeos==1', {
590 # When building for ChromeOS we dont want Chromium to use libjpeg_turbo.
591 'use_libjpeg_turbo%': 0,
592 }],
593
[email protected]adb44342012-07-23 13:36:12594 ['OS=="android"', {
595 # When building as part of the Android system, use system libraries
596 # where possible to reduce ROM size.
597 'use_system_libjpeg%': '<(android_build_type)',
598 }],
[email protected]8a46f5f2012-12-05 00:47:12599
600 # Enable Settings App only on Windows.
601 ['enable_app_list==1 and OS=="win"', {
602 'enable_settings_app%': 1,
603 }, {
604 'enable_settings_app%': 0,
605 }],
[email protected]94cdbf42012-12-11 19:49:22606
607 ['OS=="linux" and target_arch=="arm" and chromeos==0', {
608 # Set some defaults for arm/linux chrome builds
609 'armv7%': 1,
610 'linux_breakpad%': 0,
611 'linux_use_tcmalloc%': 0,
612 'linux_use_gold_flags%': 0,
[email protected]84b00d12f2012-12-14 01:53:43613 # sysroot needs to be an absolute path otherwise it generates
[email protected]94cdbf42012-12-11 19:49:22614 # incorrect results when passed to pkg-config
[email protected]84b00d12f2012-12-14 01:53:43615 'sysroot%': '<!(cd <(DEPTH) && pwd -P)/arm-sysroot',
[email protected]94cdbf42012-12-11 19:49:22616 }], # OS=="linux" and target_arch=="arm" and chromeos==0
[email protected]b3f23ba2010-04-26 22:58:17617 ],
[email protected]2b113652012-09-17 17:01:39618
619 # Set this to 1 to use the Google-internal file containing
620 # official API keys for Google Chrome even in a developer build.
621 # Setting this variable explicitly to 1 will cause your build to
622 # fail if the internal file is missing.
623 #
624 # Set this to 0 to not use the internal file, even when it
625 # exists in your checkout.
626 #
627 # Leave set to 2 to have this variable implicitly set to 1 if
628 # you have src/google_apis/internal/google_chrome_api_keys.h in
629 # your checkout, and implicitly set to 0 if not.
630 #
631 # Note that official builds always behave as if this variable
632 # was explicitly set to 1, i.e. they always use official keys,
633 # and will fail to build if the internal file is missing.
634 'use_official_google_api_keys%': 2,
635
636 # Set these to bake the specified API keys and OAuth client
637 # IDs/secrets into your build.
638 #
639 # If you create a build without values baked in, you can instead
640 # set environment variables to provide the keys at runtime (see
641 # src/google_apis/google_api_keys.h for details). Features that
642 # require server-side APIs may fail to work if no keys are
643 # provided.
644 #
645 # Note that if you are building an official build or if
646 # use_official_google_api_keys has been set to 1 (explicitly or
647 # implicitly), these values will be ignored and the official
648 # keys will be used instead.
649 'google_api_key%': '',
650 'google_default_client_id%': '',
651 'google_default_client_secret%': '',
[email protected]e14a9f92009-08-05 19:26:07652 },
653
[email protected]e72e55b2011-01-06 22:19:30654 # Copy conditionally-set variables out one scope.
[email protected]e14a9f92009-08-05 19:26:07655 'branding%': '<(branding)',
656 'buildtype%': '<(buildtype)',
[email protected]e0d00142009-09-18 22:10:27657 'target_arch%': '<(target_arch)',
[email protected]cf185b32010-01-12 04:29:59658 'host_arch%': '<(host_arch)',
[email protected]8fb0ef02011-05-20 00:53:50659 'library%': 'static_library',
[email protected]c153e5352009-09-22 12:37:44660 'toolkit_views%': '<(toolkit_views)',
[email protected]1ee7c56c2011-10-19 14:51:33661 'ui_compositor_image_transport%': '<(ui_compositor_image_transport)',
[email protected]41423092011-08-25 15:39:58662 'use_aura%': '<(use_aura)',
[email protected]ed329be2012-01-03 22:02:16663 'use_ash%': '<(use_ash)',
[email protected]e0b85a52011-10-06 03:30:42664 'use_openssl%': '<(use_openssl)',
[email protected]da5f1952012-05-22 05:55:15665 'use_ibus%': '<(use_ibus)',
[email protected]c329adf82011-10-05 14:34:57666 'use_nss%': '<(use_nss)',
[email protected]df9167b2011-11-14 19:15:25667 'os_bsd%': '<(os_bsd)',
[email protected]79e2336c2011-05-12 18:18:34668 'os_posix%': '<(os_posix)',
[email protected]258dca42011-09-21 00:17:19669 'use_glib%': '<(use_glib)',
[email protected]79e2336c2011-05-12 18:18:34670 'toolkit_uses_gtk%': '<(toolkit_uses_gtk)',
[email protected]7d7564a12011-06-21 19:20:22671 'use_skia%': '<(use_skia)',
[email protected]79e2336c2011-05-12 18:18:34672 'use_x11%': '<(use_x11)',
[email protected]63692212010-09-16 00:22:21673 'use_gnome_keyring%': '<(use_gnome_keyring)',
[email protected]0afe5212010-10-01 18:56:11674 'linux_fpic%': '<(linux_fpic)',
[email protected]67c125d2011-10-11 18:58:22675 'enable_pepper_threading%': '<(enable_pepper_threading)',
[email protected]c153e5352009-09-22 12:37:44676 'chromeos%': '<(chromeos)',
[email protected]7ddea9802012-02-22 23:08:05677 'enable_viewport%': '<(enable_viewport)',
[email protected]1efbaaa2012-04-24 02:43:24678 'enable_hidpi%': '<(enable_hidpi)',
[email protected]6155e702012-05-02 17:56:06679 'enable_touch_ui%': '<(enable_touch_ui)',
[email protected]f56797b2011-09-25 00:04:35680 'use_xi2_mt%':'<(use_xi2_mt)',
[email protected]e47c32032011-03-01 19:26:20681 'file_manager_extension%': '<(file_manager_extension)',
[email protected]b2f030c2009-09-24 20:36:21682 'inside_chromium_build%': '<(inside_chromium_build)',
[email protected]9c1949e2009-10-02 19:59:54683 'fastbuild%': '<(fastbuild)',
[email protected]20960e072011-09-20 20:59:01684 'dcheck_always_on%': '<(dcheck_always_on)',
[email protected]a76fe1a2010-03-01 23:39:36685 'python_ver%': '<(python_ver)',
[email protected]eafc0b452010-02-26 21:53:43686 'armv7%': '<(armv7)',
687 'arm_neon%': '<(arm_neon)',
[email protected]4d83eb72010-03-04 16:42:23688 'sysroot%': '<(sysroot)',
[email protected]945361a2011-09-30 04:38:43689 'system_libdir%': '<(system_libdir)',
[email protected]8974e042010-06-21 18:06:52690 'component%': '<(component)',
[email protected]bb6aba32011-01-07 19:04:43691 'use_titlecase_in_grd_files%': '<(use_titlecase_in_grd_files)',
[email protected]9e94cca2011-02-04 17:38:17692 'use_third_party_translations%': '<(use_third_party_translations)',
[email protected]9a425422011-01-11 00:53:18693 'remoting%': '<(remoting)',
[email protected]bd7b6fe2012-03-05 21:02:40694 'enable_one_click_signin%': '<(enable_one_click_signin)',
[email protected]dda90ae2011-07-19 22:07:48695 'enable_webrtc%': '<(enable_webrtc)',
[email protected]d5cf9fb2011-09-27 00:15:16696 'chromium_win_pch%': '<(chromium_win_pch)',
[email protected]1ec68c42011-06-01 13:56:25697 'configuration_policy%': '<(configuration_policy)',
[email protected]4b58e7d2011-07-11 10:22:56698 'safe_browsing%': '<(safe_browsing)',
[email protected]9eb100e2011-10-14 05:08:22699 'input_speech%': '<(input_speech)',
[email protected]7cce3232011-10-28 10:41:57700 'notifications%': '<(notifications)',
[email protected]5d451ad2011-02-11 16:43:46701 'clang_use_chrome_plugins%': '<(clang_use_chrome_plugins)',
[email protected]970fd4e2012-12-19 11:09:37702 'mac_want_real_dsym%': '<(mac_want_real_dsym)',
[email protected]92799b632011-08-15 14:33:06703 'asan%': '<(asan)',
[email protected]c9a829272012-07-04 07:51:12704 'tsan%': '<(tsan)',
[email protected]7bdd7d7c2012-11-01 10:36:16705 'tsan_blacklist%': '<(tsan_blacklist)',
[email protected]7ce58b22012-09-26 05:17:25706 'clang_type_profiler%': '<(clang_type_profiler)',
[email protected]8a6abd12012-05-16 10:04:44707 'order_profiling%': '<(order_profiling)',
[email protected]00b0a7f2012-01-25 15:30:46708 'order_text_section%': '<(order_text_section)',
[email protected]6a3cd37e2012-04-17 17:13:34709 'enable_extensions%': '<(enable_extensions)',
[email protected]41ed4e82011-08-25 23:02:07710 'enable_web_intents%': '<(enable_web_intents)',
[email protected]5ffb0a42012-01-27 09:36:11711 'enable_web_intents_tag%': '<(enable_web_intents_tag)',
[email protected]18e0f39b2012-01-17 16:47:34712 'enable_plugin_installation%': '<(enable_plugin_installation)',
[email protected]6d17f6392012-12-05 05:24:54713 'enable_plugins%': '<(enable_plugins)',
[email protected]cdb756ef2012-04-05 18:34:53714 'enable_session_service%': '<(enable_session_service)',
[email protected]6b40bb582012-03-15 20:50:38715 'enable_themes%': '<(enable_themes)',
[email protected]4ffe78a2012-10-04 20:55:15716 'use_oem_wallpaper%': '<(use_oem_wallpaper)',
[email protected]0acdd772012-04-05 22:53:00717 'enable_background%': '<(enable_background)',
[email protected]b07806c12012-02-03 22:44:59718 'linux_use_gold_binary%': '<(linux_use_gold_binary)',
[email protected]8d726a42012-02-09 03:49:00719 'linux_use_gold_flags%': '<(linux_use_gold_flags)',
[email protected]9394a3a2012-12-19 19:22:39720 'linux_use_libgps%': '<(linux_use_libgps)',
[email protected]62424a52012-03-18 03:09:50721 'use_canvas_skia%': '<(use_canvas_skia)',
[email protected]0ef3a522012-05-15 14:56:33722 'test_isolation_mode%': '<(test_isolation_mode)',
723 'test_isolation_outdir%': '<(test_isolation_outdir)',
[email protected]2e22e2f2012-03-15 21:53:10724 'enable_automation%': '<(enable_automation)',
[email protected]658677f2012-06-09 06:04:02725 'enable_printing%': '<(enable_printing)',
[email protected]6ee43a72012-12-07 22:44:40726 'enable_google_now%': '<(enable_google_now)',
[email protected]703369a2012-11-05 20:40:31727 'enable_language_detection%': '<(enable_language_detection)',
[email protected]e6026962012-06-14 21:28:32728 'enable_captive_portal_detection%': '<(enable_captive_portal_detection)',
[email protected]9bfe0ab2012-08-30 13:18:11729 'disable_ftp_support%': '<(disable_ftp_support)',
[email protected]44879ed2012-04-06 01:11:02730 'enable_task_manager%': '<(enable_task_manager)',
[email protected]740ebed2012-06-27 19:14:06731 'sas_dll_path%': '<(sas_dll_path)',
[email protected]49ae3e52012-04-12 09:50:12732 'wix_path%': '<(wix_path)',
[email protected]e190d272012-08-30 17:36:44733 'use_libjpeg_turbo%': '<(use_libjpeg_turbo)',
[email protected]adb44342012-07-23 13:36:12734 'use_system_libjpeg%': '<(use_system_libjpeg)',
[email protected]0115f042012-07-27 20:36:53735 'android_build_type%': '<(android_build_type)',
[email protected]dc4e8b82012-11-15 03:58:16736 'enable_app_list%': '<(enable_app_list)',
[email protected]9b5dbf72013-01-09 20:29:15737 'enable_message_center%': '<(enable_message_center)',
[email protected]cb800562012-11-20 22:36:07738 'use_default_render_theme%': '<(use_default_render_theme)',
[email protected]dc4e8b82012-11-15 03:58:16739 'enable_settings_app%': '<(enable_settings_app)',
[email protected]2b113652012-09-17 17:01:39740 'use_official_google_api_keys%': '<(use_official_google_api_keys)',
741 'google_api_key%': '<(google_api_key)',
742 'google_default_client_id%': '<(google_default_client_id)',
743 'google_default_client_secret%': '<(google_default_client_secret)',
[email protected]01971642012-03-07 14:39:56744
[email protected]46aa05cc42013-01-15 17:34:31745 # Use system mesa instead of bundled one.
746 'use_system_mesa%': 0,
747
[email protected]c486e4e2013-01-08 16:49:07748 # Use system nspr instead of the bundled one.
749 'use_system_nspr%': 0,
750
[email protected]2f325672012-10-31 23:29:37751 # Use system protobuf instead of bundled one.
752 'use_system_protobuf%': 0,
753
[email protected]371e1092011-10-12 20:37:36754 # Use system yasm instead of bundled one.
755 'use_system_yasm%': 0,
756
[email protected]cd00bd862012-02-29 00:40:36757 # Default to enabled PIE; this is important for ASLR but we may need to be
758 # able to turn it off for various reasons.
759 'linux_disable_pie%': 0,
760
[email protected]caa95c82009-11-23 22:39:32761 # The release channel that this build targets. This is used to restrict
762 # channel-specific build options, like which installer packages to create.
763 # The default is 'all', which does no channel-specific filtering.
764 'channel%': 'all',
765
[email protected]b3fb8092009-03-12 19:09:24766 # Override chromium_mac_pch and set it to 0 to suppress the use of
767 # precompiled headers on the Mac. Prefix header injection may still be
768 # used, but prefix headers will not be precompiled. This is useful when
769 # using distcc to distribute a build to compile slaves that don't
770 # share the same compiler executable as the system driving the compilation,
771 # because precompiled headers rely on pointers into a specific compiler
772 # executable's image. Setting this to 0 is needed to use an experimental
773 # Linux-Mac cross compiler distcc farm.
774 'chromium_mac_pch%': 1,
775
[email protected]27b687ec42012-03-26 22:22:15776 # The default value for mac_strip in target_defaults. This cannot be
777 # set there, per the comment about variable% in a target_defaults.
778 'mac_strip_release%': 1,
779
[email protected]f5ecbba12009-04-03 04:35:18780 # Set to 1 to enable code coverage. In addition to build changes
781 # (e.g. extra CFLAGS), also creates a new target in the src/chrome
782 # project file called "coverage".
783 # Currently ignored on Windows.
784 'coverage%': 0,
[email protected]653bd5f032009-04-08 12:55:49785
[email protected]9619e65d2012-05-23 19:06:52786 # Set to 1 to force Visual C++ to use legacy debug information format /Z7.
787 # This is useful for parallel compilation tools which can't support /Zi.
788 # Only used on Windows.
789 'win_z7%' : 0,
790
[email protected]7477ea6f2009-12-22 23:28:15791 # Although base/allocator lets you select a heap library via an
[email protected]7e0d664a2009-12-03 21:07:47792 # environment variable, the libcmt shim it uses sometimes gets in
793 # the way. To disable it entirely, and switch to normal msvcrt, do e.g.
794 # 'win_use_allocator_shim': 0,
795 # 'win_release_RuntimeLibrary': 2
796 # to ~/.gyp/include.gypi, gclient runhooks --force, and do a release build.
[email protected]8974e042010-06-21 18:06:52797 'win_use_allocator_shim%': 1, # 1 = shim allocator via libcmt; 0 = msvcrt
[email protected]279cd4212009-09-11 22:32:11798
[email protected]95ff8082009-11-13 22:21:01799 # Whether usage of OpenMAX is enabled.
800 'enable_openmax%': 0,
801
[email protected]d01120e62010-05-10 17:04:48802 # Whether proprietary audio/video codecs are assumed to be included with
803 # this build (only meaningful if branding!=Chrome).
804 'proprietary_codecs%': 0,
805
[email protected]e5b2eaa2009-04-14 01:39:12806 # TODO(bradnelson): eliminate this when possible.
807 # To allow local gyp files to prevent release.vsprops from being included.
808 # Yes(1) means include release.vsprops.
809 # Once all vsprops settings are migrated into gyp, this can go away.
810 'msvs_use_common_release%': 1,
[email protected]606116d22009-05-06 22:38:23811
[email protected]cbd5fd52009-08-26 00:14:27812 # TODO(bradnelson): eliminate this when possible.
813 # To allow local gyp files to override additional linker options for msvs.
814 # Yes(1) means set use the common linker options.
[email protected]48c7af72009-07-03 22:00:19815 'msvs_use_common_linker_extras%': 1,
816
[email protected]1ffb6502009-06-02 07:46:24817 # TODO(sgk): eliminate this if possible.
818 # It would be nicer to support this via a setting in 'target_defaults'
819 # in chrome/app/locales/locales.gypi overriding the setting in the
820 # 'Debug' configuration in the 'target_defaults' dict below,
821 # but that doesn't work as we'd like.
822 'msvs_debug_link_incremental%': '2',
823
[email protected]1f790ef2011-01-11 20:45:36824 # Needed for some of the largest modules.
825 'msvs_debug_link_nonincremental%': '1',
826
[email protected]6f390be2012-08-16 18:57:10827 # Turns on Use Library Dependency Inputs for linking chrome.dll on Windows
[email protected]5ab8f482011-08-18 18:30:06828 # to get incremental linking to be faster in debug builds.
[email protected]8f1da83d2012-08-06 21:49:26829 'incremental_chrome_dll%': '0',
[email protected]5ab8f482011-08-18 18:30:06830
[email protected]c54b41cb2012-08-24 20:58:24831 # The default settings for third party code for treating
832 # warnings-as-errors. Ideally, this would not be required, however there
833 # is some third party code that takes a long time to fix/roll. So, this
834 # flag allows us to have warnings as errors in general to prevent
835 # regressions in most modules, while working on the bits that are
836 # remaining.
837 'win_third_party_warn_as_error%': 'true',
838
[email protected]573136142009-07-15 22:48:37839 # This is the location of the sandbox binary. Chrome looks for this before
840 # running the zygote process. If found, and SUID, it will be used to
841 # sandbox the zygote process and, thus, all renderer processes.
842 'linux_sandbox_path%': '',
843
[email protected]ad6d2c42009-09-15 20:13:38844 # Set this to true to enable SELinux support.
845 'selinux%': 0,
[email protected]4c9cc6c2009-10-01 18:54:57846
[email protected]3bb37e62012-04-19 03:40:08847 # Clang stuff.
848 'clang%': '<(clang)',
[email protected]e4ddf332011-10-20 21:52:24849 'make_clang_dir%': 'third_party/llvm-build/Release+Asserts',
[email protected]58680ce2010-09-18 00:09:15850
[email protected]5e781232011-01-28 02:57:59851 # These two variables can be set in GYP_DEFINES while running
852 # |gclient runhooks| to let clang run a plugin in every compilation.
853 # Only has an effect if 'clang=1' is in GYP_DEFINES as well.
854 # Example:
[email protected]93120fe2011-02-03 20:46:42855 # 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:59856
857 'clang_load%': '',
858 'clang_add_plugin%': '',
859
[email protected]da1c8d692011-09-20 20:35:01860 # The default type of gtest.
861 'gtest_target_type%': 'executable',
862
[email protected]7664ab32011-02-01 23:35:25863 # Enable sampling based profiler.
864 # See http://google-perftools.googlecode.com/svn/trunk/doc/cpuprofile.html
865 'profiling%': '0',
866
[email protected]93b373502011-08-16 19:06:22867 # Enable strict glibc debug mode.
868 'glibcxx_debug%': 0,
[email protected]ce4367d2013-01-15 16:13:10869 # Compile in Breakpad support by default so that it can be tested,
870 # even if it not enabled by default at runtime.
871 'linux_breakpad%': 1,
[email protected]36532f332010-08-25 00:22:01872 # And if we want to dump symbols for Breakpad-enabled builds.
873 'linux_dump_symbols%': 0,
874 # And if we want to strip the binary after dumping symbols.
[email protected]05cb6962009-10-01 23:29:03875 'linux_strip_binary%': 0,
[email protected]1d87c282010-09-15 22:24:49876 # Strip the test binaries needed for Linux reliability tests.
877 'linux_strip_reliability_tests%': 0,
[email protected]05cb6962009-10-01 23:29:03878
[email protected]46ce5b562010-06-16 18:39:53879 # Enable TCMalloc.
880 'linux_use_tcmalloc%': 1,
[email protected]01699e22009-11-11 19:24:24881
[email protected]d8b60602010-03-26 09:41:22882 # Disable TCMalloc's heapchecker.
883 'linux_use_heapchecker%': 0,
884
[email protected]64e2d4a42010-08-27 10:13:21885 # Disable shadow stack keeping used by heapcheck to unwind the stacks
886 # better.
887 'linux_keep_shadow_stacks%': 0,
888
[email protected]556c5d72010-06-10 05:45:01889 # Set to 1 to link against libgnome-keyring instead of using dlopen().
890 'linux_link_gnome_keyring%': 0,
[email protected]abcc9ac2011-05-16 20:04:35891 # Set to 1 to link against gsettings APIs instead of using dlopen().
892 'linux_link_gsettings%': 0,
[email protected]556c5d72010-06-10 05:45:01893
[email protected]77c1b29392009-12-04 06:21:29894 # Set Thumb compilation flags.
895 'arm_thumb%': 0,
896
[email protected]53e0f642010-03-05 01:41:56897 # Set ARM fpu compilation flags (only meaningful if armv7==1 and
898 # arm_neon==0).
899 'arm_fpu%': 'vfpv3',
900
[email protected]5252af72012-05-04 19:26:40901 # Set ARM float abi compilation flag.
902 'arm_float_abi%': 'softfp',
903
[email protected]9821d0d2010-04-16 22:40:37904 # Enable new NPDevice API.
905 'enable_new_npdevice_api%': 0,
[email protected]ed154592010-04-29 00:18:50906
907 # Enable EGLImage support in OpenMAX
[email protected]58023be2011-02-04 20:34:14908 'enable_eglimage%': 1,
[email protected]ed154592010-04-29 00:18:50909
[email protected]6f51b27e2010-06-22 20:43:53910 # Enable a variable used elsewhere throughout the GYP files to determine
911 # whether to compile in the sources for the GPU plugin / process.
912 'enable_gpu%': 1,
913
[email protected]e72e55b2011-01-06 22:19:30914 # .gyp files or targets should set chromium_code to 1 if they build
915 # Chromium-specific code, as opposed to external code. This variable is
916 # used to control such things as the set of warnings to enable, and
917 # whether warnings are treated as errors.
918 'chromium_code%': 0,
919
[email protected]8d726a42012-02-09 03:49:00920 'release_valgrind_build%': 0,
921
[email protected]b1eb341c2011-11-09 18:46:07922 # TODO(thakis): Make this a blacklist instead, http://crbug.com/101600
923 'enable_wexit_time_destructors%': 0,
924
[email protected]e72e55b2011-01-06 22:19:30925 # Set to 1 to compile with the built in pdf viewer.
926 'internal_pdf%': 0,
927
[email protected]9e1149d72012-07-24 01:27:17928 # Set to 1 to compile with the OpenGL ES 2.0 conformance tests.
929 'internal_gles2_conform_tests%': 0,
930
[email protected]e72e55b2011-01-06 22:19:30931 # NOTE: When these end up in the Mac bundle, we need to replace '-' for '_'
932 # so Cocoa is happy (http://crbug.com/20441).
933 'locales': [
934 'am', 'ar', 'bg', 'bn', 'ca', 'cs', 'da', 'de', 'el', 'en-GB',
935 'en-US', 'es-419', 'es', 'et', 'fa', 'fi', 'fil', 'fr', 'gu', 'he',
936 'hi', 'hr', 'hu', 'id', 'it', 'ja', 'kn', 'ko', 'lt', 'lv',
[email protected]507066e2012-10-26 10:50:47937 'ml', 'mr', 'ms', 'nb', 'nl', 'pl', 'pt-PT', 'ro', 'ru',
[email protected]e72e55b2011-01-06 22:19:30938 'sk', 'sl', 'sr', 'sv', 'sw', 'ta', 'te', 'th', 'tr', 'uk',
939 'vi', 'zh-CN', 'zh-TW',
940 ],
941
[email protected]cc0322d2011-07-24 09:29:19942 # Pseudo locales are special locales which are used for testing and
943 # debugging. They don't get copied to the final app. For more info,
944 # check out https://sites.google.com/a/chromium.org/dev/Home/fake-bidi
945 'pseudo_locales': [
946 'fake-bidi',
947 ],
948
[email protected]bb6aba32011-01-07 19:04:43949 'grit_defines': [],
950
[email protected]bd3bd442011-03-28 07:58:51951 # If debug_devtools is set to 1, JavaScript files for DevTools are
952 # stored as is and loaded from disk. Otherwise, a concatenated file
953 # is stored in resources.pak. It is still possible to load JS files
954 # from disk by passing --debug-devtools cmdline switch.
955 'debug_devtools%': 0,
956
[email protected]464750f2011-10-24 23:16:18957 # The Java Bridge is not compiled in by default.
958 'java_bridge%': 0,
959
[email protected]1e013672012-06-29 22:12:20960 # Code signing for iOS binaries. The bots need to be able to disable this.
961 'chromium_ios_signing%': 1,
962
[email protected]33e1c372011-12-14 16:32:07963 # This flag is only used when disable_nacl==0 and disables all those
964 # subcomponents which would require the installation of a native_client
965 # untrusted toolchain.
966 'disable_nacl_untrusted%': 0,
967
[email protected]407dfa632011-12-23 11:59:35968 # Disable Dart by default.
969 'enable_dart%': 0,
970
[email protected]ff10b132012-02-29 22:53:30971 # The desired version of Windows SDK can be set in ~/.gyp/include.gypi.
972 'msbuild_toolset%': '',
973
[email protected]836285f22012-04-03 16:19:26974 # Native Client is enabled by default.
975 'disable_nacl%': 0,
976
[email protected]fa9d4e262012-08-21 04:39:00977 # Whether to build full debug version for Debug configuration on Android.
978 # Compared to full debug version, the default Debug configuration on Android
979 # has no full v8 debug, has size optimization and linker gc section, so that
980 # we can build a debug version with acceptable size and performance.
981 'android_full_debug%': 0,
982
[email protected]65885272012-10-05 23:55:50983 # Sets the default version name and code for Android app, by default we
984 # do a developer build.
985 'android_app_version_name%': 'Developer Build',
986 'android_app_version_code%': 0,
987
[email protected]740ebed2012-06-27 19:14:06988 'sas_dll_exists': '<!(python <(DEPTH)/build/dir_exists.py <(sas_dll_path))',
[email protected]49ae3e52012-04-12 09:50:12989 'wix_exists': '<!(python <(DEPTH)/build/dir_exists.py <(wix_path))',
990
[email protected]1f8d9402012-07-06 22:47:56991 'windows_sdk_default_path': '<(DEPTH)/third_party/platformsdk_win8/files',
992 'directx_sdk_default_path': '<(DEPTH)/third_party/directxsdk/files',
[email protected]1ab48032012-07-02 21:48:05993
[email protected]fd6d8822012-12-08 06:56:11994 # Whether we are using the rlz library or not. Platforms like Android send
995 # rlz codes for searches but do not use the library.
[email protected]b6a5ac92012-10-29 18:17:22996 'enable_rlz%': 0,
997
[email protected]912c55c2009-07-31 23:33:55998 'conditions': [
[email protected]1f8d9402012-07-06 22:47:56999 ['OS=="win" and "<!(python <(DEPTH)/build/dir_exists.py <(windows_sdk_default_path))"=="True"', {
1000 'windows_sdk_path%': '<(windows_sdk_default_path)',
1001 }, {
1002 'windows_sdk_path%': 'C:/Program Files (x86)/Windows Kits/8.0',
1003 }],
1004 ['OS=="win" and "<!(python <(DEPTH)/build/dir_exists.py <(directx_sdk_default_path))"=="True"', {
1005 'directx_sdk_path%': '<(directx_sdk_default_path)',
1006 }, {
1007 'directx_sdk_path%': '$(DXSDK_DIR)',
1008 }],
[email protected]54184ce72012-10-18 07:11:261009 ['OS=="win"', {
1010 'windows_driver_kit_path%': '$(WDK_DIR)',
1011 }],
[email protected]2b113652012-09-17 17:01:391012 # If use_official_google_api_keys is already set (to 0 or 1), we
1013 # do none of the implicit checking. If it is set to 1 and the
1014 # internal keys file is missing, the build will fail at compile
1015 # time. If it is set to 0 and keys are not provided by other
1016 # means, a warning will be printed at compile time.
1017 ['use_official_google_api_keys==2', {
1018 'use_official_google_api_keys%':
1019 '<!(python <(DEPTH)/google_apis/build/check_internal.py <(DEPTH)/google_apis/internal/google_chrome_api_keys.h)',
1020 }],
[email protected]1e013672012-06-29 22:12:201021 ['os_posix==1 and OS!="mac" and OS!="ios"', {
[email protected]4d83eb72010-03-04 16:42:231022 # Figure out the python architecture to decide if we build pyauto.
[email protected]945361a2011-09-30 04:38:431023 '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:271024 'conditions': [
[email protected]07c27ab02012-07-17 17:00:201025 # TODO(glider): set clang to 1 earlier for ASan and TSan builds so
1026 # that it takes effect here.
1027 ['clang==0 and asan==0 and tsan==0', {
1028 # This will set gcc_version to XY if you are running gcc X.Y.*.
1029 # This is used to tweak build flags for gcc 4.5.
1030 'gcc_version%': '<!(python <(DEPTH)/build/compiler_version.py)',
1031 }, {
1032 'gcc_version%': 0,
1033 }],
[email protected]4c9cc6c2009-10-01 18:54:571034 # All Chrome builds have breakpad symbols, but only process the
1035 # symbols from official builds.
[email protected]c913cb82010-08-31 19:44:081036 ['(branding=="Chrome" and buildtype=="Official")', {
[email protected]4c9cc6c2009-10-01 18:54:571037 'linux_dump_symbols%': 1,
[email protected]4c9cc6c2009-10-01 18:54:571038 }],
[email protected]cbd5fd52009-08-26 00:14:271039 ],
[email protected]1e013672012-06-29 22:12:201040 }], # os_posix==1 and OS!="mac" and OS!="ios"
[email protected]0d16f292012-07-02 22:10:481041 ['OS=="ios"', {
1042 'disable_nacl%': 1,
[email protected]a95d5302012-11-03 00:02:191043 'enable_background%': 0,
[email protected]aeaaaf02012-09-10 17:46:151044 'enable_gpu%': 0,
[email protected]a35aa362012-10-30 13:55:071045 'enable_task_manager%': 0,
[email protected]abde6732012-08-16 16:10:351046 'icu_use_data_file_flag%': 1,
[email protected]861557e2012-07-24 16:27:151047 'use_system_bzip2%': 1,
[email protected]4e3996f92012-07-17 10:41:131048 'use_system_libxml%': 1,
[email protected]073bef82012-07-24 18:03:471049 'use_system_sqlite%': 1,
[email protected]57871bc2012-08-20 16:28:121050
1051 # The Mac SDK is set for iOS builds and passed through to Mac
1052 # sub-builds. This allows the Mac sub-build SDK in an iOS build to be
1053 # overridden from the command line the same way it is for a Mac build.
1054 'mac_sdk%': '<!(python <(DEPTH)/build/mac/find_sdk.py 10.6)',
[email protected]2c261532012-10-06 00:46:291055
1056 # iOS SDK and deployment target support. The iOS 5.0 SDK is actually
1057 # what is required, but the value is left blank so when it is set in
1058 # the project files it will be the "current" iOS SDK. Forcing 5.0
1059 # even though it is "current" causes Xcode to spit out a warning for
1060 # every single project file for not using the "current" SDK.
1061 'ios_sdk%': '',
1062 'ios_sdk_path%': '',
[email protected]4e4a42652012-12-20 16:56:181063 'ios_deployment_target%': '5.0',
[email protected]fcd634182012-10-09 10:50:321064
1065 'conditions': [
1066 # ios_product_name is set to the name of the .app bundle as it should
1067 # appear on disk.
1068 ['branding=="Chrome"', {
1069 'ios_product_name%': 'Chrome',
1070 }, { # else: branding!="Chrome"
1071 'ios_product_name%': 'Chromium',
1072 }],
1073 ['branding=="Chrome" and buildtype=="Official"', {
1074 'ios_breakpad%': 1,
1075 }, { # else: branding!="Chrome" or buildtype!="Official"
1076 'ios_breakpad%': 0,
1077 }],
1078 ],
1079 }], # OS=="ios"
[email protected]da1c8d692011-09-20 20:35:011080 ['OS=="android"', {
1081 # Location of Android NDK.
1082 'variables': {
1083 'variables': {
[email protected]8157ea92c2012-09-21 02:27:511084 'variables': {
1085 'android_ndk_root%': '<!(/bin/echo -n $ANDROID_NDK_ROOT)',
1086 },
1087 'android_ndk_root%': '<(android_ndk_root)',
[email protected]febd3572012-05-03 09:17:451088 'conditions': [
1089 ['target_arch == "ia32"', {
[email protected]de5b7a42012-05-16 06:18:411090 'android_app_abi%': 'x86',
[email protected]8157ea92c2012-09-21 02:27:511091 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-9/arch-x86',
[email protected]de5b7a42012-05-16 06:18:411092 }],
[email protected]8157ea92c2012-09-21 02:27:511093 ['target_arch=="arm"', {
1094 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-9/arch-arm',
1095 'conditions': [
1096 ['armv7==0', {
1097 'android_app_abi%': 'armeabi',
1098 }, {
1099 'android_app_abi%': 'armeabi-v7a',
1100 }],
1101 ],
[email protected]febd3572012-05-03 09:17:451102 }],
1103 ],
[email protected]da1c8d692011-09-20 20:35:011104 },
1105 'android_ndk_root%': '<(android_ndk_root)',
[email protected]de5b7a42012-05-16 06:18:411106 'android_app_abi%': '<(android_app_abi)',
[email protected]8157ea92c2012-09-21 02:27:511107 'android_ndk_sysroot%': '<(android_ndk_sysroot)',
[email protected]da1c8d692011-09-20 20:35:011108 },
1109 'android_ndk_root%': '<(android_ndk_root)',
1110 'android_ndk_sysroot': '<(android_ndk_sysroot)',
1111 'android_ndk_include': '<(android_ndk_sysroot)/usr/include',
1112 'android_ndk_lib': '<(android_ndk_sysroot)/usr/lib',
[email protected]de5b7a42012-05-16 06:18:411113 'android_app_abi%': '<(android_app_abi)',
[email protected]da1c8d692011-09-20 20:35:011114
[email protected]c0f76312012-08-16 13:52:041115 # Location of the "strip" binary, used by both gyp and scripts.
1116 'android_strip%' : '<!(/bin/echo -n <(android_toolchain)/*-strip)',
1117
[email protected]ef7ed7a2012-05-29 23:19:131118 # Provides an absolute path to PRODUCT_DIR (e.g. out/Release). Used
1119 # to specify the output directory for Ant in the Android build.
1120 'ant_build_out': '`cd <(PRODUCT_DIR) && pwd -P`',
1121
[email protected]da1c8d692011-09-20 20:35:011122 # Always uses openssl.
1123 'use_openssl%': 1,
1124
1125 'proprietary_codecs%': '<(proprietary_codecs)',
[email protected]44879ed2012-04-06 01:11:021126 'enable_task_manager%': 0,
[email protected]23a30e62012-12-01 03:39:071127 'safe_browsing%': 2,
[email protected]da1c8d692011-09-20 20:35:011128 'configuration_policy%': 0,
[email protected]9eb100e2011-10-14 05:08:221129 'input_speech%': 0,
[email protected]7e199322012-03-13 20:04:561130 'enable_web_intents%': 0,
[email protected]658677f2012-06-09 06:04:021131 'enable_automation%': 0,
[email protected]464750f2011-10-24 23:16:181132 'java_bridge%': 1,
[email protected]48de0fc2012-08-02 11:03:581133 'build_ffmpegsumo%': 0,
1134 'linux_use_tcmalloc%': 0,
[email protected]658677f2012-06-09 06:04:021135
[email protected]ad17e342012-07-17 20:45:481136 # Disable Native Client.
1137 'disable_nacl%': 1,
1138
[email protected]58242012012-04-12 16:14:311139 # Android does not support background apps.
[email protected]0acdd772012-04-05 22:53:001140 'enable_background%': 0,
[email protected]5fd2e842012-03-01 00:29:111141
[email protected]cdb756ef2012-04-05 18:34:531142 # Sessions are store separately in the Java side.
1143 'enable_session_service%': 0,
1144
[email protected]5fd2e842012-03-01 00:29:111145 # Set to 1 once we have a notification system for Android.
1146 # http://crbug.com/115320
[email protected]7cce3232011-10-28 10:41:571147 'notifications%': 0,
[email protected]da1c8d692011-09-20 20:35:011148
[email protected]ad17e342012-07-17 20:45:481149 'p2p_apis%' : 0,
1150
[email protected]7b56f1872012-05-23 00:48:501151 # TODO(jrg): when 'gtest_target_type'=='shared_library' and
[email protected]d9f96952012-04-19 21:02:091152 # OS==android, make all gtest_targets depend on
1153 # testing/android/native_test.gyp:native_test_apk.
[email protected]48de0fc2012-08-02 11:03:581154 'gtest_target_type%': 'shared_library',
[email protected]da1c8d692011-09-20 20:35:011155
1156 # Uses system APIs for decoding audio and video.
1157 'use_libffmpeg%': '0',
1158
[email protected]f1dc1e52012-12-12 21:39:001159 # Always use the chromium skia.
[email protected]da1c8d692011-09-20 20:35:011160 'use_system_skia%': '0',
[email protected]da1c8d692011-09-20 20:35:011161
[email protected]f5c7758a2012-07-25 16:17:571162 # Configure crash reporting and build options based on release type.
[email protected]ad17e342012-07-17 20:45:481163 'conditions': [
[email protected]ad17e342012-07-17 20:45:481164 ['buildtype=="Official"', {
[email protected]f5c7758a2012-07-25 16:17:571165 # Only report crash dumps for Official builds.
[email protected]ad17e342012-07-17 20:45:481166 'linux_breakpad%': 1,
1167 }, {
1168 'linux_breakpad%': 0,
1169 }],
1170 ],
1171
[email protected]adb44342012-07-23 13:36:121172 # When building as part of the Android system, use system libraries
1173 # where possible to reduce ROM size.
1174 # TODO(steveblock): Investigate using the system version of sqlite.
[email protected]3a820d12012-06-27 12:56:321175 'use_system_sqlite%': 0, # '<(android_build_type)',
[email protected]03bdcc122012-07-10 09:02:251176 'use_system_expat%': '<(android_build_type)',
[email protected]ad17e342012-07-17 20:45:481177 'use_system_icu%': '<(android_build_type)',
[email protected]f91ba812012-07-11 00:00:511178 'use_system_stlport%': '<(android_build_type)',
[email protected]adb44342012-07-23 13:36:121179
[email protected]da1c8d692011-09-20 20:35:011180 # Copy it out one scope.
1181 'android_build_type%': '<(android_build_type)',
1182 }], # OS=="android"
[email protected]e14a9f92009-08-05 19:26:071183 ['OS=="mac"', {
[email protected]2c261532012-10-06 00:46:291184 'variables': {
1185 # Mac OS X SDK and deployment target support. The SDK identifies
1186 # the version of the system headers that will be used, and
1187 # corresponds to the MAC_OS_X_VERSION_MAX_ALLOWED compile-time
1188 # macro. "Maximum allowed" refers to the operating system version
1189 # whose APIs are available in the headers. The deployment target
1190 # identifies the minimum system version that the built products are
1191 # expected to function on. It corresponds to the
1192 # MAC_OS_X_VERSION_MIN_REQUIRED compile-time macro. To ensure these
1193 # macros are available, #include <AvailabilityMacros.h>. Additional
1194 # documentation on these macros is available at
1195 # http://developer.apple.com/mac/library/technotes/tn2002/tn2064.html#SECTION3
1196 # Chrome normally builds with the Mac OS X 10.6 SDK and sets the
1197 # deployment target to 10.6. Other projects, such as O3D, may
1198 # override these defaults.
1199
1200 # Normally, mac_sdk_min is used to find an SDK that Xcode knows
1201 # about that is at least the specified version. In official builds,
1202 # the SDK must match mac_sdk_min exactly. If the SDK is installed
1203 # someplace that Xcode doesn't know about, set mac_sdk_path to the
1204 # path to the SDK; when set to a non-empty string, SDK detection
1205 # based on mac_sdk_min will be bypassed entirely.
1206 'mac_sdk_min%': '10.6',
1207 'mac_sdk_path%': '',
1208
1209 'mac_deployment_target%': '10.6',
1210 },
1211
1212 'mac_sdk_min': '<(mac_sdk_min)',
1213 'mac_sdk_path': '<(mac_sdk_path)',
1214 'mac_deployment_target': '<(mac_deployment_target)',
1215
[email protected]e1ece302011-09-15 03:58:111216 # Enable clang on mac by default!
1217 'clang%': 1,
[email protected]2c261532012-10-06 00:46:291218
[email protected]794fb4782011-12-14 19:10:561219 # Compile in Breakpad support by default so that it can be
1220 # tested, even if it is not enabled by default at runtime.
1221 'mac_breakpad_compiled_in%': 1,
[email protected]e14a9f92009-08-05 19:26:071222 'conditions': [
1223 # mac_product_name is set to the name of the .app bundle as it should
1224 # appear on disk. This duplicates data from
1225 # chrome/app/theme/chromium/BRANDING and
1226 # chrome/app/theme/google_chrome/BRANDING, but is necessary to get
1227 # these names into the build system.
1228 ['branding=="Chrome"', {
1229 'mac_product_name%': 'Google Chrome',
1230 }, { # else: branding!="Chrome"
1231 'mac_product_name%': 'Chromium',
1232 }],
1233
[email protected]e14a9f92009-08-05 19:26:071234 ['branding=="Chrome" and buildtype=="Official"', {
[email protected]2c261532012-10-06 00:46:291235 'mac_sdk%': '<!(python <(DEPTH)/build/mac/find_sdk.py --verify <(mac_sdk_min) --sdk_path=<(mac_sdk_path))',
[email protected]794fb4782011-12-14 19:10:561236 # Enable uploading crash dumps.
1237 'mac_breakpad_uploads%': 1,
1238 # Enable dumping symbols at build time for use by Mac Breakpad.
[email protected]e14a9f92009-08-05 19:26:071239 'mac_breakpad%': 1,
[email protected]794fb4782011-12-14 19:10:561240 # Enable Keystone auto-update support.
[email protected]e14a9f92009-08-05 19:26:071241 'mac_keystone%': 1,
1242 }, { # else: branding!="Chrome" or buildtype!="Official"
[email protected]2c261532012-10-06 00:46:291243 'mac_sdk%': '<!(python <(DEPTH)/build/mac/find_sdk.py <(mac_sdk_min))',
[email protected]794fb4782011-12-14 19:10:561244 'mac_breakpad_uploads%': 0,
[email protected]e14a9f92009-08-05 19:26:071245 'mac_breakpad%': 0,
1246 'mac_keystone%': 0,
1247 }],
1248 ],
1249 }], # OS=="mac"
[email protected]912c55c2009-07-31 23:33:551250 ['OS=="win"', {
1251 'conditions': [
[email protected]8974e042010-06-21 18:06:521252 ['component=="shared_library"', {
1253 'win_use_allocator_shim%': 0,
1254 }],
[email protected]fa0f16e2012-08-20 22:30:041255 ['component=="shared_library" and "<(GENERATOR)"=="ninja"', {
[email protected]6f390be2012-08-16 18:57:101256 # Only enabled by default for ninja because it's buggy in VS.
[email protected]fa0f16e2012-08-20 22:30:041257 # Not enabled for component=static_library because some targets
1258 # are too large and the toolchain fails due to the size of the
1259 # .obj files.
[email protected]6f390be2012-08-16 18:57:101260 'incremental_chrome_dll%': 1,
1261 }],
[email protected]10bb8c92009-08-07 21:16:031262 # Don't do incremental linking for large modules on 32-bit.
1263 ['MSVS_OS_BITS==32', {
1264 'msvs_large_module_debug_link_mode%': '1', # No
1265 },{
1266 'msvs_large_module_debug_link_mode%': '2', # Yes
1267 }],
[email protected]3e2648a2011-03-21 20:58:501268 ['MSVS_VERSION=="2010e" or MSVS_VERSION=="2008e" or MSVS_VERSION=="2005e"', {
1269 'msvs_express%': 1,
1270 'secure_atl%': 0,
1271 },{
1272 'msvs_express%': 0,
1273 'secure_atl%': 1,
1274 }],
[email protected]912c55c2009-07-31 23:33:551275 ],
[email protected]ef4fa4072009-12-04 22:46:501276 'nacl_win64_defines': [
1277 # This flag is used to minimize dependencies when building
1278 # Native Client loader for 64-bit Windows.
1279 'NACL_WIN64',
1280 ],
[email protected]912c55c2009-07-31 23:33:551281 }],
[email protected]bb6aba32011-01-07 19:04:431282
[email protected]a35aa362012-10-30 13:55:071283 ['os_posix==1 and chromeos==0 and OS!="android" and OS!="ios"', {
[email protected]8e553f42010-10-25 20:05:441284 'use_cups%': 1,
1285 }, {
1286 'use_cups%': 0,
1287 }],
[email protected]bb6aba32011-01-07 19:04:431288
[email protected]2f7da672012-06-21 08:38:321289 # Native Client glibc toolchain is enabled by default except on arm.
1290 ['target_arch=="arm"', {
1291 'disable_glibc%': 1,
1292 }, {
1293 'disable_glibc%': 0,
1294 }],
1295
[email protected]712c3da2012-09-24 21:31:241296 # Disable SSE2 when building for ARM or MIPS.
1297 ['target_arch=="arm" or target_arch=="mipsel"', {
1298 'disable_sse2%': 1,
1299 }, {
1300 'disable_sse2%': '<(disable_sse2)',
1301 }],
1302
[email protected]19fe8f0b2010-12-07 07:27:271303 # Set the relative path from this file to the GYP file of the JPEG
1304 # library used by Chromium.
[email protected]d9113542012-07-18 17:11:281305 ['use_system_libjpeg==1 or use_libjpeg_turbo==0', {
1306 # Configuration for using the system libjeg is here.
[email protected]19fe8f0b2010-12-07 07:27:271307 'libjpeg_gyp_path': '../third_party/libjpeg/libjpeg.gyp',
[email protected]d9113542012-07-18 17:11:281308 }, {
1309 'libjpeg_gyp_path': '../third_party/libjpeg_turbo/libjpeg.gyp',
1310 }],
[email protected]bb6aba32011-01-07 19:04:431311
[email protected]abcc9ac2011-05-16 20:04:351312 # Options controlling the use of GConf (the classic GNOME configuration
1313 # system) and GIO, which contains GSettings (the new GNOME config system).
[email protected]1c6fe29302011-01-20 22:14:311314 ['chromeos==1', {
1315 'use_gconf%': 0,
[email protected]abcc9ac2011-05-16 20:04:351316 'use_gio%': 0,
[email protected]1c6fe29302011-01-20 22:14:311317 }, {
1318 'use_gconf%': 1,
[email protected]abcc9ac2011-05-16 20:04:351319 'use_gio%': 1,
[email protected]1c6fe29302011-01-20 22:14:311320 }],
1321
[email protected]4de39f82011-03-28 12:01:291322 # Set up -D and -E flags passed into grit.
[email protected]1660bffd2011-03-23 16:24:291323 ['branding=="Chrome"', {
1324 # TODO(mmoss) The .grd files look for _google_chrome, but for
1325 # consistency they should look for google_chrome_build like C++.
[email protected]4de39f82011-03-28 12:01:291326 'grit_defines': ['-D', '_google_chrome',
1327 '-E', 'CHROMIUM_BUILD=google_chrome'],
[email protected]1660bffd2011-03-23 16:24:291328 }, {
[email protected]4de39f82011-03-28 12:01:291329 'grit_defines': ['-D', '_chromium',
1330 '-E', 'CHROMIUM_BUILD=chromium'],
[email protected]1660bffd2011-03-23 16:24:291331 }],
[email protected]bb6aba32011-01-07 19:04:431332 ['chromeos==1', {
[email protected]d4d81e92012-06-04 20:10:131333 'grit_defines': ['-D', 'chromeos', '-D', 'scale_factors=2x'],
[email protected]bb6aba32011-01-07 19:04:431334 }],
1335 ['toolkit_views==1', {
1336 'grit_defines': ['-D', 'toolkit_views'],
1337 }],
[email protected]8dd791d2011-09-16 16:37:301338 ['use_aura==1', {
1339 'grit_defines': ['-D', 'use_aura'],
1340 }],
[email protected]ed329be2012-01-03 22:02:161341 ['use_ash==1', {
1342 'grit_defines': ['-D', 'use_ash'],
1343 }],
[email protected]c329adf82011-10-05 14:34:571344 ['use_nss==1', {
1345 'grit_defines': ['-D', 'use_nss'],
1346 }],
[email protected]e47c32032011-03-01 19:26:201347 ['file_manager_extension==1', {
1348 'grit_defines': ['-D', 'file_manager_extension'],
1349 }],
[email protected]9a425422011-01-11 00:53:181350 ['remoting==1', {
1351 'grit_defines': ['-D', 'remoting'],
1352 }],
[email protected]bb6aba32011-01-07 19:04:431353 ['use_titlecase_in_grd_files==1', {
1354 'grit_defines': ['-D', 'use_titlecase'],
1355 }],
[email protected]00dc155832011-02-01 18:51:191356 ['use_third_party_translations==1', {
1357 'grit_defines': ['-D', 'use_third_party_translations'],
[email protected]fb6c1022011-06-27 21:58:121358 'locales': [
[email protected]8581e1ba2011-08-22 23:27:161359 'ast', 'bs', 'ca@valencia', 'en-AU', 'eo', 'eu', 'gl', 'hy', 'ia',
1360 'ka', 'ku', 'kw', 'ms', 'ug'
[email protected]fb6c1022011-06-27 21:58:121361 ],
[email protected]00dc155832011-02-01 18:51:191362 }],
[email protected]da1c8d692011-09-20 20:35:011363 ['OS=="android"', {
1364 'grit_defines': ['-D', 'android'],
1365 }],
[email protected]d39e3862012-06-26 22:38:231366 ['OS=="mac"', {
1367 'grit_defines': ['-D', 'scale_factors=2x'],
1368 }],
[email protected]ad563d02012-10-03 10:37:031369 ['OS == "ios"', {
1370 'grit_defines': [
1371 # define for iOS specific resources.
1372 '-D', 'ios',
1373 # iOS uses a whitelist to filter resources.
1374 '-w', '<(DEPTH)/build/ios/grit_whitelist.txt'
1375 ],
[email protected]507066e2012-10-26 10:50:471376 # iOS uses pt instead of pt-BR.
1377 'locales': ['pt'],
1378 }, { # OS != "ios"
1379 'locales': ['pt-BR'],
[email protected]ad563d02012-10-03 10:37:031380 }],
[email protected]6a3cd37e2012-04-17 17:13:341381 ['enable_extensions==1', {
1382 'grit_defines': ['-D', 'enable_extensions'],
1383 }],
[email protected]658677f2012-06-09 06:04:021384 ['enable_printing==1', {
1385 'grit_defines': ['-D', 'enable_printing'],
1386 }],
[email protected]c2aad542012-07-31 20:40:331387 ['enable_themes==1', {
1388 'grit_defines': ['-D', 'enable_themes'],
1389 }],
[email protected]4ffe78a2012-10-04 20:55:151390 ['use_oem_wallpaper==1', {
1391 'grit_defines': ['-D', 'use_oem_wallpaper'],
1392 }],
[email protected]ef1dd5062012-12-17 06:41:331393 ['enable_app_list==1', {
1394 'grit_defines': ['-D', 'enable_app_list'],
1395 }],
[email protected]dc4e8b82012-11-15 03:58:161396 ['enable_settings_app==1', {
1397 'grit_defines': ['-D', 'enable_settings_app'],
1398 }],
[email protected]3bb37e62012-04-19 03:40:081399 ['clang_use_chrome_plugins==1 and OS!="win"', {
[email protected]890ebb72012-06-27 05:02:201400 'clang_chrome_plugins_flags': [
1401 '<!@(<(DEPTH)/tools/clang/scripts/plugin_flags.sh)'
[email protected]c872dc52012-05-19 06:36:311402 ],
[email protected]5d451ad2011-02-11 16:43:461403 }],
[email protected]cfa2e1102011-04-27 22:30:231404
[email protected]5ffb0a42012-01-27 09:36:111405 ['enable_web_intents_tag==1', {
1406 'grit_defines': ['-D', 'enable_web_intents_tag'],
[email protected]41ed4e82011-08-25 23:02:071407 }],
1408
[email protected]696de4e62012-11-21 21:18:541409 ['asan==1 and OS!="win"', {
[email protected]92799b632011-08-15 14:33:061410 'clang%': 1,
1411 }],
[email protected]f5d8c222012-08-29 17:47:021412 ['asan==1 and OS=="mac"', {
1413 # See http://crbug.com/145503.
1414 'component': "static_library",
1415 }],
[email protected]c9a829272012-07-04 07:51:121416 ['tsan==1', {
1417 'clang%': 1,
1418 }],
1419
[email protected]7ce58b22012-09-26 05:17:251420 ['OS=="linux" and clang_type_profiler==1', {
1421 'clang%': 1,
1422 'clang_use_chrome_plugins%': 0,
1423 'make_clang_dir%': 'third_party/llvm-allocated-type/Linux_x64',
1424 }],
1425
[email protected]a9318c72012-03-01 01:29:471426 # On valgrind bots, override the optimizer settings so we don't inline too
1427 # much and make the stacks harder to figure out.
1428 #
1429 # TODO(rnk): Kill off variables that no one else uses and just implement
1430 # them under a build_for_tool== condition.
1431 ['build_for_tool=="memcheck" or build_for_tool=="tsan"', {
1432 # gcc flags
1433 'mac_debug_optimization': '1',
1434 'mac_release_optimization': '1',
1435 'release_optimize': '1',
1436 'no_gc_sections': 1,
1437 'debug_extra_cflags': '-g -fno-inline -fno-omit-frame-pointer '
1438 '-fno-builtin -fno-optimize-sibling-calls',
1439 'release_extra_cflags': '-g -fno-inline -fno-omit-frame-pointer '
1440 '-fno-builtin -fno-optimize-sibling-calls',
1441
1442 # MSVS flags for TSan on Pin and Windows.
1443 'win_debug_RuntimeChecks': '0',
1444 'win_debug_disable_iterator_debugging': '1',
1445 'win_debug_Optimization': '1',
1446 'win_debug_InlineFunctionExpansion': '0',
1447 'win_release_InlineFunctionExpansion': '0',
1448 'win_release_OmitFramePointers': '0',
1449
1450 'linux_use_tcmalloc': 1,
1451 'release_valgrind_build': 1,
1452 'werror': '',
1453 'component': 'static_library',
1454 'use_system_zlib': 0,
1455 }],
1456
1457 # Build tweaks for DrMemory.
1458 # TODO(rnk): Combine with tsan config to share the builder.
1459 # http://crbug.com/108155
1460 ['build_for_tool=="drmemory"', {
[email protected]a9318c72012-03-01 01:29:471461 # These runtime checks force initialization of stack vars which blocks
1462 # DrMemory's uninit detection.
1463 'win_debug_RuntimeChecks': '0',
1464 # Iterator debugging is slow.
1465 'win_debug_disable_iterator_debugging': '1',
1466 # Try to disable optimizations that mess up stacks in a release build.
[email protected]c13d00302012-10-18 15:45:161467 # DrM-i#1054 (http://code.google.com/p/drmemory/issues/detail?id=1054)
1468 # /O2 and /Ob0 (disable inline) cannot be used together because of a
1469 # compiler bug, so we use /Ob1 instead.
1470 'win_release_InlineFunctionExpansion': '1',
[email protected]a9318c72012-03-01 01:29:471471 'win_release_OmitFramePointers': '0',
[email protected]6bf3373d2012-08-15 22:27:501472 # Ditto for debug, to support bumping win_debug_Optimization.
1473 'win_debug_InlineFunctionExpansion': 0,
1474 'win_debug_OmitFramePointers': 0,
[email protected]a9318c72012-03-01 01:29:471475 # Keep the code under #ifndef NVALGRIND.
1476 'release_valgrind_build': 1,
1477 }],
[email protected]b6a5ac92012-10-29 18:17:221478
[email protected]f40a6912012-12-10 21:52:411479 # Enable RLZ on Win, Mac and ChromeOS.
1480 ['branding=="Chrome" and (OS=="win" or OS=="mac" or chromeos==1)', {
[email protected]b6a5ac92012-10-29 18:17:221481 'enable_rlz%': 1,
1482 }],
[email protected]912c55c2009-07-31 23:33:551483 ],
[email protected]a9318c72012-03-01 01:29:471484
[email protected]35958422011-09-28 02:03:591485 # List of default apps to install in new profiles. The first list contains
1486 # the source files as found in svn. The second list, used only for linux,
[email protected]20cc0bb72011-10-26 00:57:061487 # contains the destination location for each of the files. When a crx
1488 # is added or removed from the list, the chrome/browser/resources/
1489 # default_apps/external_extensions.json file must also be updated.
[email protected]35958422011-09-28 02:03:591490 'default_apps_list': [
1491 'browser/resources/default_apps/external_extensions.json',
1492 'browser/resources/default_apps/gmail.crx',
[email protected]20cc0bb72011-10-26 00:57:061493 'browser/resources/default_apps/search.crx',
[email protected]35958422011-09-28 02:03:591494 'browser/resources/default_apps/youtube.crx',
[email protected]c3875e22012-09-06 01:07:001495 'browser/resources/default_apps/drive.crx',
[email protected]40b38c932012-09-27 20:42:231496 'browser/resources/default_apps/docs.crx',
[email protected]35958422011-09-28 02:03:591497 ],
1498 'default_apps_list_linux_dest': [
1499 '<(PRODUCT_DIR)/default_apps/external_extensions.json',
1500 '<(PRODUCT_DIR)/default_apps/gmail.crx',
[email protected]20cc0bb72011-10-26 00:57:061501 '<(PRODUCT_DIR)/default_apps/search.crx',
[email protected]35958422011-09-28 02:03:591502 '<(PRODUCT_DIR)/default_apps/youtube.crx',
[email protected]c3875e22012-09-06 01:07:001503 '<(PRODUCT_DIR)/default_apps/drive.crx',
[email protected]40b38c932012-09-27 20:42:231504 '<(PRODUCT_DIR)/default_apps/docs.crx',
[email protected]35958422011-09-28 02:03:591505 ],
[email protected]2f80c312009-02-25 21:26:551506 },
1507 'target_defaults': {
[email protected]1c966092009-08-20 21:19:261508 'variables': {
[email protected]a6e22132010-02-10 20:43:181509 # The condition that operates on chromium_code is in a target_conditions
1510 # section, and will not have access to the default fallback value of
1511 # chromium_code at the top of this file, or to the chromium_code
1512 # variable placed at the root variables scope of .gyp files, because
1513 # those variables are not set at target scope. As a workaround,
1514 # if chromium_code is not set at target scope, define it in target scope
1515 # to contain whatever value it has during early variable expansion.
1516 # That's enough to make it available during target conditional
1517 # processing.
1518 'chromium_code%': '<(chromium_code)',
1519
[email protected]7e0d664a2009-12-03 21:07:471520 # See http://msdn.microsoft.com/en-us/library/aa652360(VS.71).aspx
1521 'win_release_Optimization%': '2', # 2 = /Os
1522 'win_debug_Optimization%': '0', # 0 = /Od
[email protected]626d2d22011-10-11 15:47:331523
1524 # See http://msdn.microsoft.com/en-us/library/2kxx5t2c(v=vs.80).aspx
[email protected]ef5c5f1b2011-12-17 02:16:241525 # Tri-state: blank is default, 1 on, 0 off
[email protected]65d61e62012-06-01 21:52:111526 'win_release_OmitFramePointers%': '0',
[email protected]ef5c5f1b2011-12-17 02:16:241527 # Tri-state: blank is default, 1 on, 0 off
1528 'win_debug_OmitFramePointers%': '',
[email protected]626d2d22011-10-11 15:47:331529
[email protected]6b0507b2010-05-07 07:41:211530 # See http://msdn.microsoft.com/en-us/library/8wtf2dfz(VS.71).aspx
1531 'win_debug_RuntimeChecks%': '3', # 3 = all checks enabled, 0 = off
[email protected]626d2d22011-10-11 15:47:331532
[email protected]6b0507b2010-05-07 07:41:211533 # See http://msdn.microsoft.com/en-us/library/47238hez(VS.71).aspx
[email protected]2ae6e022010-05-07 13:19:151534 'win_debug_InlineFunctionExpansion%': '', # empty = default, 0 = off,
1535 'win_release_InlineFunctionExpansion%': '2', # 1 = only __inline, 2 = max
[email protected]626d2d22011-10-11 15:47:331536
[email protected]fac10d12010-11-08 16:00:311537 # VS inserts quite a lot of extra checks to algorithms like
1538 # std::partial_sort in Debug build which make them O(N^2)
1539 # instead of O(N*logN). This is particularly slow under memory
1540 # tools like ThreadSanitizer so we want it to be disablable.
1541 # See http://msdn.microsoft.com/en-us/library/aa985982(v=VS.80).aspx
1542 'win_debug_disable_iterator_debugging%': '0',
[email protected]7e0d664a2009-12-03 21:07:471543
[email protected]ffd984b12009-09-11 19:37:001544 'release_extra_cflags%': '',
1545 'debug_extra_cflags%': '',
[email protected]8d726a42012-02-09 03:49:001546
1547 'release_valgrind_build%': '<(release_valgrind_build)',
[email protected]8974e042010-06-21 18:06:521548
[email protected]ef5c5f1b2011-12-17 02:16:241549 # the non-qualified versions are widely assumed to be *nix-only
1550 'win_release_extra_cflags%': '',
1551 'win_debug_extra_cflags%': '',
1552
[email protected]b1eb341c2011-11-09 18:46:071553 # TODO(thakis): Make this a blacklist instead, http://crbug.com/101600
1554 'enable_wexit_time_destructors%': '<(enable_wexit_time_destructors)',
1555
[email protected]ef3326702011-10-06 18:06:441556 # Only used by Windows build for now. Can be used to build into a
1557 # differet output directory, e.g., a build_dir_prefix of VS2010_ would
1558 # output files in src/build/VS2010_{Debug,Release}.
1559 'build_dir_prefix%': '',
1560
[email protected]9ac2db692012-06-08 01:01:571561 # Targets are by default not nacl untrusted code.
1562 'nacl_untrusted_build%': 0,
1563
[email protected]9c55d9d2012-11-15 23:28:441564 'pnacl_compile_flags': [
1565 # pnacl uses the clang compiler so we need to supress all the
1566 # same warnings as we do for clang.
1567 # TODO(sbc): Remove these if/when they are removed from the clang
1568 # build.
1569 '-Wno-unused-function',
1570 '-Wno-char-subscripts',
1571 '-Wno-c++11-extensions',
1572 '-Wno-unnamed-type-template-args',
1573 ],
1574
[email protected]8974e042010-06-21 18:06:521575 'conditions': [
1576 ['OS=="win" and component=="shared_library"', {
1577 # See http://msdn.microsoft.com/en-us/library/aa652367.aspx
[email protected]49e8e022012-03-16 15:22:161578 'win_release_RuntimeLibrary%': '2', # 2 = /MD (nondebug DLL)
1579 'win_debug_RuntimeLibrary%': '3', # 3 = /MDd (debug DLL)
[email protected]8974e042010-06-21 18:06:521580 }, {
1581 # See http://msdn.microsoft.com/en-us/library/aa652367.aspx
1582 'win_release_RuntimeLibrary%': '0', # 0 = /MT (nondebug static)
1583 'win_debug_RuntimeLibrary%': '1', # 1 = /MTd (debug static)
1584 }],
[email protected]1e013672012-06-29 22:12:201585 ['OS=="ios"', {
1586 # See http://gcc.gnu.org/onlinedocs/gcc-4.4.2/gcc/Optimize-Options.html
1587 'mac_release_optimization%': 's', # Use -Os unless overridden
1588 'mac_debug_optimization%': '0', # Use -O0 unless overridden
1589 }, {
1590 # See http://gcc.gnu.org/onlinedocs/gcc-4.4.2/gcc/Optimize-Options.html
1591 'mac_release_optimization%': '3', # Use -O3 unless overridden
1592 'mac_debug_optimization%': '0', # Use -O0 unless overridden
1593 }],
[email protected]8974e042010-06-21 18:06:521594 ],
[email protected]1c966092009-08-20 21:19:261595 },
[email protected]32aa8cc2009-03-04 21:36:391596 'conditions': [
[email protected]7ce58b22012-09-26 05:17:251597 ['OS=="linux" and linux_use_tcmalloc==1 and clang_type_profiler==1', {
1598 'cflags_cc!': ['-fno-rtti'],
1599 'cflags_cc+': [
1600 '-frtti',
1601 '-gline-tables-only',
1602 '-fintercept-allocation-functions',
1603 ],
1604 'defines': ['TYPE_PROFILING'],
1605 'dependencies': [
1606 '<(DEPTH)/base/allocator/allocator.gyp:type_profiler',
1607 ],
1608 }],
[email protected]ff10b132012-02-29 22:53:301609 ['OS=="win" and "<(msbuild_toolset)"!=""', {
1610 'msbuild_toolset': '<(msbuild_toolset)',
1611 }],
[email protected]32aa8cc2009-03-04 21:36:391612 ['branding=="Chrome"', {
1613 'defines': ['GOOGLE_CHROME_BUILD'],
1614 }, { # else: branding!="Chrome"
1615 'defines': ['CHROMIUM_BUILD'],
1616 }],
[email protected]286d9a12012-05-30 16:20:381617 ['OS=="mac" and component=="shared_library"', {
1618 'xcode_settings': {
1619 'DYLIB_INSTALL_NAME_BASE': '@rpath',
1620 'LD_RUNPATH_SEARCH_PATHS': [
1621 # For unbundled binaries.
1622 '@loader_path/.',
1623 # For bundled binaries, to get back from Binary.app/Contents/MacOS.
1624 '@loader_path/../../..',
1625 ],
1626 },
1627 }],
[email protected]b6a5ac92012-10-29 18:17:221628 ['enable_rlz==1', {
[email protected]81d9b72d2012-03-26 22:29:171629 'defines': ['ENABLE_RLZ'],
1630 }],
[email protected]63e39a282011-07-13 20:41:281631 ['component=="shared_library"', {
1632 'defines': ['COMPONENT_BUILD'],
1633 }],
[email protected]06c756182010-04-27 18:31:311634 ['toolkit_views==1', {
[email protected]e6970232009-05-12 23:51:171635 'defines': ['TOOLKIT_VIEWS=1'],
1636 }],
[email protected]1ee7c56c2011-10-19 14:51:331637 ['ui_compositor_image_transport==1', {
[email protected]839d5172011-10-13 17:18:111638 'defines': ['UI_COMPOSITOR_IMAGE_TRANSPORT'],
1639 }],
[email protected]41423092011-08-25 15:39:581640 ['use_aura==1', {
1641 'defines': ['USE_AURA=1'],
[email protected]e599f0132011-08-24 19:03:351642 }],
[email protected]ed329be2012-01-03 22:02:161643 ['use_ash==1', {
1644 'defines': ['USE_ASH=1'],
1645 }],
[email protected]cb800562012-11-20 22:36:071646 ['use_default_render_theme==1', {
1647 'defines': ['USE_DEFAULT_RENDER_THEME=1'],
1648 }],
[email protected]e190d272012-08-30 17:36:441649 ['use_libjpeg_turbo==1', {
1650 'defines': ['USE_LIBJPEG_TURBO=1'],
1651 }],
[email protected]c329adf82011-10-05 14:34:571652 ['use_nss==1', {
1653 'defines': ['USE_NSS=1'],
1654 }],
[email protected]bd7b6fe2012-03-05 21:02:401655 ['enable_one_click_signin==1', {
1656 'defines': ['ENABLE_ONE_CLICK_SIGNIN'],
1657 }],
[email protected]a47aa892011-11-22 03:12:311658 ['toolkit_uses_gtk==1 and toolkit_views==0', {
1659 # TODO(erg): We are progressively sealing up use of deprecated features
1660 # in gtk in preparation for an eventual porting to gtk3.
1661 'defines': ['GTK_DISABLE_SINGLE_INCLUDES=1'],
1662 }],
[email protected]fdc5bed2010-01-09 01:16:571663 ['chromeos==1', {
[email protected]16779842009-07-08 23:45:291664 'defines': ['OS_CHROMEOS=1'],
[email protected]2b883b92009-06-02 22:57:501665 }],
[email protected]f56797b2011-09-25 00:04:351666 ['use_xi2_mt!=0', {
1667 'defines': ['USE_XI2_MT=<(use_xi2_mt)'],
1668 }],
[email protected]e47c32032011-03-01 19:26:201669 ['file_manager_extension==1', {
1670 'defines': ['FILE_MANAGER_EXTENSION=1'],
1671 }],
[email protected]7664ab32011-02-01 23:35:251672 ['profiling==1', {
1673 'defines': ['ENABLE_PROFILING=1'],
1674 }],
[email protected]93b373502011-08-16 19:06:221675 ['OS=="linux" and glibcxx_debug==1', {
1676 'defines': ['_GLIBCXX_DEBUG=1',],
[email protected]f6a45d92012-10-24 19:26:591677 'cflags_cc+': ['-g'],
[email protected]93b373502011-08-16 19:06:221678 }],
[email protected]542bf24a2010-06-11 23:08:171679 ['remoting==1', {
1680 'defines': ['ENABLE_REMOTING=1'],
[email protected]c0bac532010-06-11 00:39:001681 }],
[email protected]5b87e782012-02-09 18:19:321682 ['enable_webrtc==1', {
1683 'defines': ['ENABLE_WEBRTC=1'],
1684 }],
[email protected]d01120e62010-05-10 17:04:481685 ['proprietary_codecs==1', {
1686 'defines': ['USE_PROPRIETARY_CODECS'],
1687 }],
[email protected]67c125d2011-10-11 18:58:221688 ['enable_pepper_threading==1', {
1689 'defines': ['ENABLE_PEPPER_THREADING'],
1690 }],
[email protected]7ddea9802012-02-22 23:08:051691 ['enable_viewport==1', {
1692 'defines': ['ENABLE_VIEWPORT'],
1693 }],
[email protected]f31e2e52011-07-14 16:01:191694 ['configuration_policy==1', {
1695 'defines': ['ENABLE_CONFIGURATION_POLICY'],
1696 }],
[email protected]9eb100e2011-10-14 05:08:221697 ['input_speech==1', {
1698 'defines': ['ENABLE_INPUT_SPEECH'],
1699 }],
[email protected]7cce3232011-10-28 10:41:571700 ['notifications==1', {
1701 'defines': ['ENABLE_NOTIFICATIONS'],
1702 }],
[email protected]1efbaaa2012-04-24 02:43:241703 ['enable_hidpi==1', {
1704 'defines': ['ENABLE_HIDPI=1'],
1705 }],
[email protected]9c1949e2009-10-02 19:59:541706 ['fastbuild!=0', {
[email protected]7df38122012-11-05 23:54:431707 # Clang creates chubby debug information, which makes linking very
1708 # slow. For now, don't create debug information with clang. See
1709 # http://crbug.com/70000
[email protected]9c1949e2009-10-02 19:59:541710 'conditions': [
[email protected]7df38122012-11-05 23:54:431711 ['clang==1', {
1712 'conditions': [
1713 ['OS=="linux"', {
1714 'variables': {
1715 'debug_extra_cflags': '-g0',
1716 },
1717 }],
1718 # Android builds symbols on release by default, disable them.
1719 ['OS=="android"', {
1720 'variables': {
1721 'debug_extra_cflags': '-g0',
1722 'release_extra_cflags': '-g0',
1723 },
1724 }],
1725 ],
1726 }, { # else clang!=1
1727 'conditions': [
1728 # For Windows and Mac, we don't genererate debug information.
1729 ['OS=="win"', {
1730 'msvs_settings': {
1731 'VCLinkerTool': {
1732 'GenerateDebugInformation': 'false',
1733 },
1734 'VCCLCompilerTool': {
1735 'DebugInformationFormat': '0',
1736 },
1737 },
1738 }],
1739 ['OS=="mac"', {
1740 'xcode_settings': {
1741 'GCC_GENERATE_DEBUGGING_SYMBOLS': 'NO',
1742 },
1743 }],
1744 ['OS=="linux"', {
1745 'variables': {
1746 'debug_extra_cflags': '-g1',
1747 },
1748 }],
1749 ['OS=="android"', {
1750 'variables': {
1751 'debug_extra_cflags': '-g1',
1752 'release_extra_cflags': '-g1',
1753 },
1754 }],
1755 ],
1756 }], # clang!=1
1757 ],
[email protected]9c1949e2009-10-02 19:59:541758 }], # fastbuild!=0
[email protected]20960e072011-09-20 20:59:011759 ['dcheck_always_on!=0', {
1760 'defines': ['DCHECK_ALWAYS_ON=1'],
1761 }], # dcheck_always_on!=0
[email protected]ad6d2c42009-09-15 20:13:381762 ['selinux==1', {
1763 'defines': ['CHROMIUM_SELINUX=1'],
1764 }],
[email protected]7e0d664a2009-12-03 21:07:471765 ['win_use_allocator_shim==0', {
1766 'conditions': [
1767 ['OS=="win"', {
1768 'defines': ['NO_TCMALLOC'],
1769 }],
1770 ],
1771 }],
[email protected]43f28f832010-02-03 02:28:481772 ['enable_gpu==1', {
[email protected]7477ea6f2009-12-22 23:28:151773 'defines': [
1774 'ENABLE_GPU=1',
1775 ],
1776 }],
[email protected]b1c2a5542010-10-08 12:44:401777 ['use_openssl==1', {
1778 'defines': [
1779 'USE_OPENSSL=1',
1780 ],
1781 }],
[email protected]ed154592010-04-29 00:18:501782 ['enable_eglimage==1', {
1783 'defines': [
1784 'ENABLE_EGLIMAGE=1',
1785 ],
1786 }],
[email protected]7d7564a12011-06-21 19:20:221787 ['use_skia==1', {
1788 'defines': [
1789 'USE_SKIA=1',
1790 ],
1791 }],
[email protected]696de4e62012-11-21 21:18:541792 ['asan==1 and OS=="win"', {
1793 # Since asan on windows uses Syzygy, we need /PROFILE turned on to
1794 # produce appropriate pdbs.
1795 'msvs_settings': {
1796 'VCLinkerTool': {
1797 'Profile': 'true',
1798 },
1799 },
[email protected]2ff7ef5f2012-12-14 00:40:251800 'defines': ['ADDRESS_SANITIZER'],
[email protected]696de4e62012-11-21 21:18:541801 }], # asan==1 and OS=="win"
[email protected]f5ecbba12009-04-03 04:35:181802 ['coverage!=0', {
1803 'conditions': [
[email protected]fc642ec2012-10-12 19:07:031804 ['OS=="mac" or OS=="ios"', {
[email protected]f5ecbba12009-04-03 04:35:181805 'xcode_settings': {
[email protected]ab2956372009-08-13 18:11:041806 'GCC_INSTRUMENT_PROGRAM_FLOW_ARCS': 'YES', # -fprofile-arcs
1807 'GCC_GENERATE_TEST_COVERAGE_FILES': 'YES', # -ftest-coverage
[email protected]5ae4f55e2009-04-13 23:19:471808 },
[email protected]fc642ec2012-10-12 19:07:031809 }],
1810 ['OS=="mac"', {
[email protected]e4fb84c2009-12-28 20:45:431811 # Add -lgcov for types executable, shared_library, and
[email protected]dc259ce52010-04-13 04:03:101812 # loadable_module; not for static_library.
[email protected]e4fb84c2009-12-28 20:45:431813 # This is a delayed conditional.
[email protected]f5ecbba12009-04-03 04:35:181814 'target_conditions': [
[email protected]e4fb84c2009-12-28 20:45:431815 ['_type!="static_library"', {
[email protected]f5ecbba12009-04-03 04:35:181816 'xcode_settings': { 'OTHER_LDFLAGS': [ '-lgcov' ] },
[email protected]5ae4f55e2009-04-13 23:19:471817 }],
1818 ],
1819 }],
[email protected]da1c8d692011-09-20 20:35:011820 ['OS=="linux" or OS=="android"', {
[email protected]f5ecbba12009-04-03 04:35:181821 'cflags': [ '-ftest-coverage',
1822 '-fprofile-arcs' ],
[email protected]7122ffd52009-04-30 23:19:001823 'link_settings': { 'libraries': [ '-lgcov' ] },
[email protected]f5ecbba12009-04-03 04:35:181824 }],
[email protected]e8f6ff42009-07-07 18:20:531825 ['OS=="win"', {
[email protected]0915c3b2012-11-22 17:24:071826 'variables': {
1827 # Disable incremental linking for all modules.
1828 # 0: inherit, 1: disabled, 2: enabled.
1829 'msvs_debug_link_incremental': '1',
1830 'msvs_large_module_debug_link_mode': '1',
1831 },
1832 'defines': [
1833 # Disable iterator debugging (huge speed boost without any
1834 # change in coverage results).
1835 '_HAS_ITERATOR_DEBUGGING=0',
1836 ],
[email protected]e8f6ff42009-07-07 18:20:531837 'msvs_settings': {
1838 'VCLinkerTool': {
[email protected]0915c3b2012-11-22 17:24:071839 # Enable profile information (necessary for coverage
1840 # instrumentation). This is incompatible with incremental
1841 # linking.
[email protected]e8f6ff42009-07-07 18:20:531842 'Profile': 'true',
1843 },
[email protected]e8f6ff42009-07-07 18:20:531844 }
1845 }], # OS==win
1846 ], # conditions for coverage
1847 }], # coverage!=0
[email protected]4e4d6042010-08-26 18:34:381848 ['OS=="win"', {
1849 'defines': [
1850 '__STD_C',
1851 '_CRT_SECURE_NO_DEPRECATE',
1852 '_SCL_SECURE_NO_DEPRECATE',
[email protected]2d0aa3242012-10-22 16:23:101853 # This define is required to pull in the new Win8 interfaces from
1854 # system headers like ShObjIdl.h.
1855 'NTDDI_VERSION=0x06020000',
[email protected]4e4d6042010-08-26 18:34:381856 ],
1857 'include_dirs': [
1858 '<(DEPTH)/third_party/wtl/include',
1859 ],
[email protected]9619e65d2012-05-23 19:06:521860 'conditions': [
1861 ['win_z7!=0', {
1862 'msvs_settings': {
[email protected]5146e0b2012-08-23 05:49:091863 # Generates debug info when win_z7=1
1864 # even if fastbuild=1 (that makes GenerateDebugInformation false).
1865 'VCLinkerTool': {
1866 'GenerateDebugInformation': 'true',
1867 },
[email protected]9619e65d2012-05-23 19:06:521868 'VCCLCompilerTool': {
1869 'DebugInformationFormat': '1',
1870 }
1871 }
1872 }],
[email protected]45a77072012-11-17 00:28:421873 ['"<(GENERATOR)"=="msvs"', {
1874 'msvs_settings': {
1875 'VCLinkerTool': {
1876 # Make the pdb name sane. Otherwise foo.exe and foo.dll both
1877 # have foo.pdb. The ninja generator already defaults to this and
1878 # can't handle the $(TargetPath) macro.
1879 'ProgramDatabaseFile': '$(TargetPath).pdb',
1880 }
1881 },
1882 }],
[email protected]9619e65d2012-05-23 19:06:521883 ], # win_z7!=0
[email protected]4e4d6042010-08-26 18:34:381884 }], # OS==win
[email protected]44879ed2012-04-06 01:11:021885 ['enable_task_manager==1', {
1886 'defines': [
1887 'ENABLE_TASK_MANAGER=1',
1888 ],
1889 }],
[email protected]41ed4e82011-08-25 23:02:071890 ['enable_web_intents==1', {
1891 'defines': [
[email protected]1f2d9ed2011-10-04 20:18:471892 'ENABLE_WEB_INTENTS=1',
[email protected]41ed4e82011-08-25 23:02:071893 ],
1894 }],
[email protected]6a3cd37e2012-04-17 17:13:341895 ['enable_extensions==1', {
1896 'defines': [
1897 'ENABLE_EXTENSIONS=1',
1898 ],
1899 }],
[email protected]13eb97d2012-01-05 01:07:121900 ['OS=="win" and branding=="Chrome"', {
1901 'defines': ['ENABLE_SWIFTSHADER'],
1902 }],
[email protected]407dfa632011-12-23 11:59:351903 ['enable_dart==1', {
1904 'defines': ['WEBKIT_USING_DART=1'],
1905 }],
[email protected]18e0f39b2012-01-17 16:47:341906 ['enable_plugin_installation==1', {
1907 'defines': ['ENABLE_PLUGIN_INSTALLATION=1'],
1908 }],
[email protected]6d17f6392012-12-05 05:24:541909 ['enable_plugins==1', {
1910 'defines': ['ENABLE_PLUGINS=1'],
1911 }],
[email protected]cdb756ef2012-04-05 18:34:531912 ['enable_session_service==1', {
1913 'defines': ['ENABLE_SESSION_SERVICE=1'],
1914 }],
[email protected]6b40bb582012-03-15 20:50:381915 ['enable_themes==1', {
1916 'defines': ['ENABLE_THEMES=1'],
1917 }],
[email protected]0acdd772012-04-05 22:53:001918 ['enable_background==1', {
1919 'defines': ['ENABLE_BACKGROUND=1'],
1920 }],
[email protected]2e22e2f2012-03-15 21:53:101921 ['enable_automation==1', {
1922 'defines': ['ENABLE_AUTOMATION=1'],
1923 }],
[email protected]6ee43a72012-12-07 22:44:401924 ['enable_google_now==1', {
1925 'defines': ['ENABLE_GOOGLE_NOW=1'],
1926 }],
[email protected]703369a2012-11-05 20:40:311927 ['enable_language_detection==1', {
1928 'defines': ['ENABLE_LANGUAGE_DETECTION=1'],
1929 }],
[email protected]658677f2012-06-09 06:04:021930 ['enable_printing==1', {
1931 'defines': ['ENABLE_PRINTING=1'],
1932 }],
[email protected]e6026962012-06-14 21:28:321933 ['enable_captive_portal_detection==1', {
1934 'defines': ['ENABLE_CAPTIVE_PORTAL_DETECTION=1'],
1935 }],
[email protected]dc4e8b82012-11-15 03:58:161936 ['enable_app_list==1', {
1937 'defines': ['ENABLE_APP_LIST=1'],
1938 }],
[email protected]9b5dbf72013-01-09 20:29:151939 ['enable_message_center==1', {
1940 'defines': ['ENABLE_MESSAGE_CENTER=1'],
1941 }],
[email protected]dc4e8b82012-11-15 03:58:161942 ['enable_settings_app==1', {
1943 'defines': ['ENABLE_SETTINGS_APP=1'],
1944 }],
[email protected]9bfe0ab2012-08-30 13:18:111945 ['disable_ftp_support==1', {
1946 'defines': ['DISABLE_FTP_SUPPORT=1'],
1947 }],
[email protected]a6e22132010-02-10 20:43:181948 ], # conditions for 'target_defaults'
1949 'target_conditions': [
[email protected]b1eb341c2011-11-09 18:46:071950 ['enable_wexit_time_destructors==1', {
1951 'conditions': [
1952 [ 'clang==1', {
1953 'cflags': [
1954 '-Wexit-time-destructors',
1955 ],
1956 'xcode_settings': {
1957 'WARNING_CFLAGS': [
1958 '-Wexit-time-destructors',
1959 ],
1960 },
1961 }],
1962 ],
1963 }],
[email protected]c14d8e772010-02-09 22:06:151964 ['chromium_code==0', {
[email protected]d8543312010-02-10 17:43:281965 'conditions': [
[email protected]1e013672012-06-29 22:12:201966 [ 'os_posix==1 and OS!="mac" and OS!="ios"', {
[email protected]c0a6b272011-02-09 22:32:331967 # We don't want to get warnings from third-party code,
1968 # so remove any existing warning-enabling flags like -Wall.
[email protected]d8543312010-02-10 17:43:281969 'cflags!': [
1970 '-Wall',
1971 '-Wextra',
[email protected]d8543312010-02-10 17:43:281972 ],
[email protected]167ec822011-10-24 22:05:271973 'cflags_cc': [
[email protected]ec1d155be2011-02-08 22:19:001974 # Don't warn about hash_map in third-party code.
1975 '-Wno-deprecated',
[email protected]167ec822011-10-24 22:05:271976 ],
1977 'cflags': [
[email protected]c0a6b272011-02-09 22:32:331978 # Don't warn about printf format problems.
1979 # This is off by default in gcc but on in Ubuntu's gcc(!).
[email protected]ec392872011-02-10 22:38:221980 '-Wno-format',
[email protected]ec1d155be2011-02-08 22:19:001981 ],
[email protected]d16bd642011-07-25 23:59:181982 'cflags_cc!': [
1983 # TODO(fischman): remove this.
1984 # http://code.google.com/p/chromium/issues/detail?id=90453
1985 '-Wsign-compare',
1986 ]
[email protected]d8543312010-02-10 17:43:281987 }],
[email protected]82dd5eb32012-08-18 04:24:321988 # TODO: Fix all warnings on chromeos too.
1989 [ 'os_posix==1 and OS!="mac" and OS!="ios" and (clang!=1 or chromeos==1)', {
1990 'cflags!': [
1991 '-Werror',
1992 ],
1993 }],
[email protected]bc073c062012-01-13 06:28:031994 [ 'os_posix==1 and os_bsd!=1 and OS!="mac" and OS!="android"', {
[email protected]6e4451892011-07-27 10:32:111995 'cflags': [
1996 # Don't warn about ignoring the return value from e.g. close().
1997 # This is off by default in some gccs but on by default in others.
[email protected]bc073c062012-01-13 06:28:031998 # BSD systems do not support this option, since they are usually
1999 # using gcc 4.2.1, which does not have this flag yet.
[email protected]6e4451892011-07-27 10:32:112000 '-Wno-unused-result',
2001 ],
2002 }],
[email protected]d8543312010-02-10 17:43:282003 [ 'OS=="win"', {
2004 'defines': [
2005 '_CRT_SECURE_NO_DEPRECATE',
2006 '_CRT_NONSTDC_NO_WARNINGS',
2007 '_CRT_NONSTDC_NO_DEPRECATE',
2008 '_SCL_SECURE_NO_DEPRECATE',
2009 ],
2010 'msvs_disabled_warnings': [4800],
2011 'msvs_settings': {
2012 'VCCLCompilerTool': {
[email protected]942c3a60f2011-05-03 02:04:112013 'WarningLevel': '3',
[email protected]c54b41cb2012-08-24 20:58:242014 'WarnAsError': '<(win_third_party_warn_as_error)',
[email protected]d8543312010-02-10 17:43:282015 'Detect64BitPortabilityProblems': 'false',
2016 },
2017 },
[email protected]c54b41cb2012-08-24 20:58:242018 'conditions': [
2019 ['buildtype=="Official"', {
2020 'msvs_settings': {
2021 'VCCLCompilerTool': { 'WarnAsError': 'false' },
2022 }
2023 }],
2024 ],
[email protected]d8543312010-02-10 17:43:282025 }],
[email protected]0915c3b2012-11-22 17:24:072026 # TODO(darin): Unfortunately, some third_party code depends on base.
[email protected]ea47b6a2011-07-17 19:39:422027 [ 'OS=="win" and component=="shared_library"', {
2028 'msvs_disabled_warnings': [
2029 4251, # class 'std::xx' needs to have dll-interface.
2030 ],
2031 }],
[email protected]1e013672012-06-29 22:12:202032 [ 'OS=="mac" or OS=="ios"', {
[email protected]d8543312010-02-10 17:43:282033 'xcode_settings': {
[email protected]4c4c2e5332010-06-15 11:51:062034 'WARNING_CFLAGS!': ['-Wall', '-Wextra'],
[email protected]d8543312010-02-10 17:43:282035 },
[email protected]3a352c362012-05-08 19:45:492036 'conditions': [
2037 ['buildtype=="Official"', {
2038 'xcode_settings': {
2039 'GCC_TREAT_WARNINGS_AS_ERRORS': 'NO', # -Werror
2040 },
2041 }],
2042 ],
[email protected]d8543312010-02-10 17:43:282043 }],
[email protected]1e013672012-06-29 22:12:202044 [ 'OS=="ios"', {
2045 'xcode_settings': {
[email protected]7afca862012-07-11 15:11:222046 # TODO(ios): Fix remaining warnings in third-party code, then
2047 # remove this; the Mac cleanup didn't get everything that's
2048 # flagged in an iOS build.
2049 'GCC_TREAT_WARNINGS_AS_ERRORS': 'NO',
[email protected]1e013672012-06-29 22:12:202050 'RUN_CLANG_STATIC_ANALYZER': 'NO',
2051 },
2052 }],
[email protected]c14d8e772010-02-09 22:06:152053 ],
2054 }, {
[email protected]a5c598152012-01-27 04:55:132055 'includes': [
2056 # Rules for excluding e.g. foo_win.cc from the build on non-Windows.
2057 'filename_rules.gypi',
2058 ],
[email protected]41af4f82012-11-08 00:09:312059 # In Chromium code, we define __STDC_foo_MACROS in order to get the
[email protected]c14d8e772010-02-09 22:06:152060 # C99 macros on Mac and Linux.
2061 'defines': [
[email protected]41af4f82012-11-08 00:09:312062 '__STDC_CONSTANT_MACROS',
[email protected]c14d8e772010-02-09 22:06:152063 '__STDC_FORMAT_MACROS',
2064 ],
2065 'conditions': [
[email protected]c14d8e772010-02-09 22:06:152066 ['OS=="win"', {
[email protected]f55bd4862010-05-27 15:38:072067 # turn on warnings for signed/unsigned mismatch on chromium code.
2068 'msvs_settings': {
2069 'VCCLCompilerTool': {
2070 'AdditionalOptions': ['/we4389'],
2071 },
2072 },
[email protected]c14d8e772010-02-09 22:06:152073 }],
[email protected]63e39a282011-07-13 20:41:282074 ['OS=="win" and component=="shared_library"', {
2075 'msvs_disabled_warnings': [
2076 4251, # class 'std::xx' needs to have dll-interface.
2077 ],
2078 }],
[email protected]c14d8e772010-02-09 22:06:152079 ],
2080 }],
[email protected]a6e22132010-02-10 20:43:182081 ], # target_conditions for 'target_defaults'
[email protected]2f80c312009-02-25 21:26:552082 'default_configuration': 'Debug',
2083 'configurations': {
[email protected]5153767c2009-12-22 01:52:502084 # VCLinkerTool LinkIncremental values below:
2085 # 0 == default
2086 # 1 == /INCREMENTAL:NO
2087 # 2 == /INCREMENTAL
2088 # Debug links incremental, Release does not.
2089 #
[email protected]7b99801e2010-11-03 17:26:232090 # Abstract base configurations to cover common attributes.
[email protected]5153767c2009-12-22 01:52:502091 #
2092 'Common_Base': {
[email protected]bb05e452009-10-29 21:24:562093 'abstract': 1,
2094 'msvs_configuration_attributes': {
[email protected]534303c2011-09-28 00:02:512095 'OutputDirectory': '<(DEPTH)\\build\\<(build_dir_prefix)$(ConfigurationName)',
[email protected]bb05e452009-10-29 21:24:562096 'IntermediateDirectory': '$(OutDir)\\obj\\$(ProjectName)',
2097 'CharacterSet': '1',
2098 },
[email protected]5153767c2009-12-22 01:52:502099 },
2100 'x86_Base': {
2101 'abstract': 1,
[email protected]ef4fa4072009-12-04 22:46:502102 'msvs_settings': {
2103 'VCLinkerTool': {
2104 'TargetMachine': '1',
2105 },
2106 },
[email protected]2fa40782009-11-01 21:17:342107 'msvs_configuration_platform': 'Win32',
[email protected]bb05e452009-10-29 21:24:562108 },
[email protected]5153767c2009-12-22 01:52:502109 'x64_Base': {
2110 'abstract': 1,
2111 'msvs_configuration_platform': 'x64',
2112 'msvs_settings': {
2113 'VCLinkerTool': {
2114 'TargetMachine': '17', # x86 - 64
[email protected]5153767c2009-12-22 01:52:502115 'AdditionalLibraryDirectories!':
[email protected]1ab48032012-07-02 21:48:052116 ['<(windows_sdk_path)/Lib/win8/um/x86'],
[email protected]5153767c2009-12-22 01:52:502117 'AdditionalLibraryDirectories':
[email protected]1ab48032012-07-02 21:48:052118 ['<(windows_sdk_path)/Lib/win8/um/x64'],
[email protected]5153767c2009-12-22 01:52:502119 },
[email protected]d26b4418ab2010-03-24 22:06:352120 'VCLibrarianTool': {
[email protected]5153767c2009-12-22 01:52:502121 'AdditionalLibraryDirectories!':
[email protected]1ab48032012-07-02 21:48:052122 ['<(windows_sdk_path)/Lib/win8/um/x86'],
[email protected]5153767c2009-12-22 01:52:502123 'AdditionalLibraryDirectories':
[email protected]1ab48032012-07-02 21:48:052124 ['<(windows_sdk_path)/Lib/win8/um/x64'],
[email protected]5153767c2009-12-22 01:52:502125 },
2126 },
2127 'defines': [
2128 # Not sure if tcmalloc works on 64-bit Windows.
2129 'NO_TCMALLOC',
2130 ],
2131 },
2132 'Debug_Base': {
2133 'abstract': 1,
[email protected]14339762011-04-05 07:36:582134 'defines': [
2135 'DYNAMIC_ANNOTATIONS_ENABLED=1',
2136 'WTF_USE_DYNAMIC_ANNOTATIONS=1',
2137 ],
[email protected]1c966092009-08-20 21:19:262138 'xcode_settings': {
2139 'COPY_PHASE_STRIP': 'NO',
[email protected]d5d593a2009-08-28 23:23:292140 'GCC_OPTIMIZATION_LEVEL': '<(mac_debug_optimization)',
[email protected]a68c29a2011-07-01 16:23:492141 'OTHER_CFLAGS': [
[email protected]a68c29a2011-07-01 16:23:492142 '<@(debug_extra_cflags)',
2143 ],
[email protected]1c966092009-08-20 21:19:262144 },
[email protected]bb05e452009-10-29 21:24:562145 'msvs_settings': {
2146 'VCCLCompilerTool': {
[email protected]7e0d664a2009-12-03 21:07:472147 'Optimization': '<(win_debug_Optimization)',
[email protected]bb05e452009-10-29 21:24:562148 'PreprocessorDefinitions': ['_DEBUG'],
[email protected]6b0507b2010-05-07 07:41:212149 'BasicRuntimeChecks': '<(win_debug_RuntimeChecks)',
[email protected]7e0d664a2009-12-03 21:07:472150 'RuntimeLibrary': '<(win_debug_RuntimeLibrary)',
[email protected]2ae6e022010-05-07 13:19:152151 'conditions': [
2152 # According to MSVS, InlineFunctionExpansion=0 means
2153 # "default inlining", not "/Ob0".
2154 # Thus, we have to handle InlineFunctionExpansion==0 separately.
2155 ['win_debug_InlineFunctionExpansion==0', {
2156 'AdditionalOptions': ['/Ob0'],
2157 }],
2158 ['win_debug_InlineFunctionExpansion!=""', {
2159 'InlineFunctionExpansion':
2160 '<(win_debug_InlineFunctionExpansion)',
2161 }],
[email protected]fac10d12010-11-08 16:00:312162 ['win_debug_disable_iterator_debugging==1', {
2163 'PreprocessorDefinitions': ['_HAS_ITERATOR_DEBUGGING=0'],
2164 }],
[email protected]ef5c5f1b2011-12-17 02:16:242165
2166 # if win_debug_OmitFramePointers is blank, leave as default
2167 ['win_debug_OmitFramePointers==1', {
2168 'OmitFramePointers': 'true',
2169 }],
2170 ['win_debug_OmitFramePointers==0', {
2171 'OmitFramePointers': 'false',
2172 # The above is not sufficient (http://crbug.com/106711): it
2173 # simply eliminates an explicit "/Oy", but both /O2 and /Ox
2174 # perform FPO regardless, so we must explicitly disable.
2175 # We still want the false setting above to avoid having
2176 # "/Oy /Oy-" and warnings about overriding.
2177 'AdditionalOptions': ['/Oy-'],
2178 }],
[email protected]2ae6e022010-05-07 13:19:152179 ],
[email protected]ef5c5f1b2011-12-17 02:16:242180 'AdditionalOptions': [ '<@(win_debug_extra_cflags)', ],
[email protected]bb05e452009-10-29 21:24:562181 },
2182 'VCLinkerTool': {
2183 'LinkIncremental': '<(msvs_debug_link_incremental)',
[email protected]7cf23ce62012-01-13 02:43:332184 # ASLR makes debugging with windbg difficult because Chrome.exe and
2185 # Chrome.dll share the same base name. As result, windbg will
2186 # name the Chrome.dll module like chrome_<base address>, where
2187 # <base address> typically changes with each launch. This in turn
2188 # means that breakpoints in Chrome.dll don't stick from one launch
2189 # to the next. For this reason, we turn ASLR off in debug builds.
2190 # Note that this is a three-way bool, where 0 means to pick up
2191 # the default setting, 1 is off and 2 is on.
2192 'RandomizedBaseAddress': 1,
[email protected]bb05e452009-10-29 21:24:562193 },
2194 'VCResourceCompilerTool': {
2195 'PreprocessorDefinitions': ['_DEBUG'],
2196 },
2197 },
[email protected]2f80c312009-02-25 21:26:552198 'conditions': [
[email protected]78204c92012-09-14 04:42:552199 ['OS=="linux" or OS=="android"', {
[email protected]d8e3b122012-05-31 23:07:542200 'target_conditions': [
2201 ['_toolset=="target"', {
2202 'cflags': [
2203 '<@(debug_extra_cflags)',
2204 ],
2205 }],
[email protected]bb05e452009-10-29 21:24:562206 ],
[email protected]2f80c312009-02-25 21:26:552207 }],
[email protected]1e013672012-06-29 22:12:202208 # Disabled on iOS because it was causing a crash on startup.
2209 # TODO(michelea): investigate, create a reduced test and possibly
2210 # submit a radar.
2211 ['release_valgrind_build==0 and OS!="ios"', {
[email protected]56cca4e2011-07-01 21:33:352212 'xcode_settings': {
2213 'OTHER_CFLAGS': [
2214 '-fstack-protector-all', # Implies -fstack-protector
2215 ],
2216 },
2217 }],
[email protected]2f80c312009-02-25 21:26:552218 ],
2219 },
[email protected]5153767c2009-12-22 01:52:502220 'Release_Base': {
2221 'abstract': 1,
[email protected]2f80c312009-02-25 21:26:552222 'defines': [
2223 'NDEBUG',
2224 ],
[email protected]1c966092009-08-20 21:19:262225 'xcode_settings': {
2226 'DEAD_CODE_STRIPPING': 'YES', # -Wl,-dead_strip
2227 'GCC_OPTIMIZATION_LEVEL': '<(mac_release_optimization)',
[email protected]ffd984b12009-09-11 19:37:002228 'OTHER_CFLAGS': [ '<@(release_extra_cflags)', ],
[email protected]1c966092009-08-20 21:19:262229 },
[email protected]bb05e452009-10-29 21:24:562230 'msvs_settings': {
[email protected]7e0d664a2009-12-03 21:07:472231 'VCCLCompilerTool': {
[email protected]7e0d664a2009-12-03 21:07:472232 'RuntimeLibrary': '<(win_release_RuntimeLibrary)',
[email protected]2ae6e022010-05-07 13:19:152233 'conditions': [
[email protected]2212d272011-12-20 21:37:372234 # In official builds, each target will self-select
2235 # an optimization level.
2236 ['buildtype!="Official"', {
2237 'Optimization': '<(win_release_Optimization)',
2238 },
2239 ],
[email protected]2ae6e022010-05-07 13:19:152240 # According to MSVS, InlineFunctionExpansion=0 means
2241 # "default inlining", not "/Ob0".
2242 # Thus, we have to handle InlineFunctionExpansion==0 separately.
2243 ['win_release_InlineFunctionExpansion==0', {
2244 'AdditionalOptions': ['/Ob0'],
2245 }],
2246 ['win_release_InlineFunctionExpansion!=""', {
2247 'InlineFunctionExpansion':
2248 '<(win_release_InlineFunctionExpansion)',
2249 }],
[email protected]626d2d22011-10-11 15:47:332250
[email protected]ef5c5f1b2011-12-17 02:16:242251 # if win_release_OmitFramePointers is blank, leave as default
[email protected]626d2d22011-10-11 15:47:332252 ['win_release_OmitFramePointers==1', {
2253 'OmitFramePointers': 'true',
2254 }],
2255 ['win_release_OmitFramePointers==0', {
2256 'OmitFramePointers': 'false',
[email protected]ef5c5f1b2011-12-17 02:16:242257 # The above is not sufficient (http://crbug.com/106711): it
2258 # simply eliminates an explicit "/Oy", but both /O2 and /Ox
2259 # perform FPO regardless, so we must explicitly disable.
2260 # We still want the false setting above to avoid having
2261 # "/Oy /Oy-" and warnings about overriding.
2262 'AdditionalOptions': ['/Oy-'],
[email protected]626d2d22011-10-11 15:47:332263 }],
[email protected]2ae6e022010-05-07 13:19:152264 ],
[email protected]ef5c5f1b2011-12-17 02:16:242265 'AdditionalOptions': [ '<@(win_release_extra_cflags)', ],
[email protected]7e0d664a2009-12-03 21:07:472266 },
[email protected]bb05e452009-10-29 21:24:562267 'VCLinkerTool': {
[email protected]c059c612011-08-08 20:56:342268 # LinkIncremental is a tri-state boolean, where 0 means default
2269 # (i.e., inherit from parent solution), 1 means false, and
2270 # 2 means true.
[email protected]bb05e452009-10-29 21:24:562271 'LinkIncremental': '1',
[email protected]c059c612011-08-08 20:56:342272 # This corresponds to the /PROFILE flag which ensures the PDB
2273 # file contains FIXUP information (growing the PDB file by about
2274 # 5%) but does not otherwise alter the output binary. This
2275 # information is used by the Syzygy optimization tool when
2276 # decomposing the release image.
2277 'Profile': 'true',
[email protected]bb05e452009-10-29 21:24:562278 },
2279 },
[email protected]2f80c312009-02-25 21:26:552280 'conditions': [
[email protected]fd3fb3bf2012-05-23 22:15:162281 ['msvs_use_common_release', {
2282 'includes': ['release.gypi'],
2283 }],
[email protected]7bdd7d7c2012-11-01 10:36:162284 ['release_valgrind_build==0 and tsan==0', {
[email protected]14339762011-04-05 07:36:582285 'defines': [
2286 'NVALGRIND',
2287 'DYNAMIC_ANNOTATIONS_ENABLED=0',
2288 ],
[email protected]ee857512010-05-14 08:24:422289 }, {
[email protected]14339762011-04-05 07:36:582290 'defines': [
2291 'DYNAMIC_ANNOTATIONS_ENABLED=1',
2292 'WTF_USE_DYNAMIC_ANNOTATIONS=1',
2293 ],
[email protected]92822e82009-09-18 14:26:562294 }],
[email protected]7e0d664a2009-12-03 21:07:472295 ['win_use_allocator_shim==0', {
2296 'defines': ['NO_TCMALLOC'],
2297 }],
[email protected]37305ae2012-12-11 01:54:582298 ['os_posix==1 and chromium_code==1', {
2299 # Non-chromium code is not guaranteed to compile cleanly
2300 # with _FORTIFY_SOURCE. Also, fortified build may fail
2301 # when optimizations are disabled, so only do that for Release
2302 # build.
2303 'defines': [
2304 '_FORTIFY_SOURCE=2',
2305 ],
2306 }],
[email protected]7df38122012-11-05 23:54:432307 ['OS=="linux" or OS=="android"', {
[email protected]d8e3b122012-05-31 23:07:542308 'target_conditions': [
2309 ['_toolset=="target"', {
2310 'cflags': [
2311 '<@(release_extra_cflags)',
2312 ],
2313 }],
[email protected]bb05e452009-10-29 21:24:562314 ],
2315 }],
[email protected]2f80c312009-02-25 21:26:552316 ],
2317 },
[email protected]5153767c2009-12-22 01:52:502318 #
2319 # Concrete configurations
2320 #
2321 'Debug': {
2322 'inherit_from': ['Common_Base', 'x86_Base', 'Debug_Base'],
2323 },
2324 'Release': {
2325 'inherit_from': ['Common_Base', 'x86_Base', 'Release_Base'],
[email protected]5153767c2009-12-22 01:52:502326 },
[email protected]f926fa0a2009-08-04 22:50:132327 'conditions': [
2328 [ 'OS=="win"', {
2329 # TODO(bradnelson): add a gyp mechanism to make this more graceful.
[email protected]ef4fa4072009-12-04 22:46:502330 'Debug_x64': {
[email protected]5153767c2009-12-22 01:52:502331 'inherit_from': ['Common_Base', 'x64_Base', 'Debug_Base'],
[email protected]78263c12009-11-01 23:45:302332 },
2333 'Release_x64': {
[email protected]5153767c2009-12-22 01:52:502334 'inherit_from': ['Common_Base', 'x64_Base', 'Release_Base'],
[email protected]78263c12009-11-01 23:45:302335 },
[email protected]f926fa0a2009-08-04 22:50:132336 }],
2337 ],
[email protected]2f80c312009-02-25 21:26:552338 },
2339 },
2340 'conditions': [
[email protected]43539ec2012-11-20 22:35:252341 ['os_posix==1', {
2342 'target_defaults': {
2343 'cflags': [
2344 # TODO(phajdan.jr): Use -fstack-protector-strong when our gcc
2345 # supports it.
2346 '-fstack-protector',
2347 '--param=ssp-buffer-size=4',
2348 ],
2349 'ldflags': [
2350 '-Wl,-z,now',
2351 '-Wl,-z,relro',
2352 ],
[email protected]43539ec2012-11-20 22:35:252353 },
2354 }],
[email protected]1e013672012-06-29 22:12:202355 ['os_posix==1 and OS!="mac" and OS!="ios"', {
[email protected]9d384032009-03-20 23:13:262356 'target_defaults': {
[email protected]5315f2842009-04-28 00:43:272357 # Enable -Werror by default, but put it in a variable so it can
2358 # be disabled in ~/.gyp/include.gypi on the valgrind builders.
2359 'variables': {
[email protected]cbbb3472012-01-25 18:32:312360 'werror%': '-Werror',
[email protected]1e013672012-06-29 22:12:202361 'libraries_for_target%': '',
[email protected]5315f2842009-04-28 00:43:272362 },
[email protected]6863896f2012-01-25 17:51:362363 'defines': [
2364 '_FILE_OFFSET_BITS=64',
2365 ],
[email protected]9d384032009-03-20 23:13:262366 'cflags': [
[email protected]1bba09c2009-08-13 12:53:162367 '<(werror)', # See note above about the werror variable.
2368 '-pthread',
2369 '-fno-exceptions',
[email protected]ef8c3cf2012-01-24 04:37:292370 '-fno-strict-aliasing', # See http://crbug.com/32204
[email protected]1bba09c2009-08-13 12:53:162371 '-Wall',
[email protected]0fa17082010-03-26 00:48:052372 # TODO(evan): turn this back on once all the builds work.
2373 # '-Wextra',
[email protected]225c8f52010-02-05 22:23:202374 # Don't warn about unused function params. We use those everywhere.
2375 '-Wno-unused-parameter',
2376 # Don't warn about the "struct foo f = {0};" initialization pattern.
2377 '-Wno-missing-field-initializers',
[email protected]3df6e3a2010-01-21 20:23:122378 # Don't export any symbols (for example, to plugins we dlopen()).
2379 # Note: this is *required* to make some plugins work.
2380 '-fvisibility=hidden',
[email protected]7ca6ce12010-09-15 23:39:352381 '-pipe',
[email protected]8a2fcba2009-07-29 00:52:242382 ],
2383 'cflags_cc': [
[email protected]832d0212009-10-28 19:12:222384 '-fno-rtti',
[email protected]8a2fcba2009-07-29 00:52:242385 '-fno-threadsafe-statics',
[email protected]f5986c42009-11-17 18:39:362386 # Make inline functions have hidden visiblity by default.
2387 # Surprisingly, not covered by -fvisibility=hidden.
2388 '-fvisibility-inlines-hidden',
[email protected]554abd902011-07-25 04:03:172389 # GCC turns on -Wsign-compare for C++ under -Wall, but clang doesn't,
2390 # so we specify it explicitly.
2391 # TODO(fischman): remove this if http://llvm.org/PR10448 obsoletes it.
[email protected]d16bd642011-07-25 23:59:182392 # http://code.google.com/p/chromium/issues/detail?id=90453
[email protected]554abd902011-07-25 04:03:172393 '-Wsign-compare',
[email protected]9d384032009-03-20 23:13:262394 ],
[email protected]a6cf87e2009-04-03 04:07:382395 'ldflags': [
[email protected]138241f2010-03-30 23:53:102396 '-pthread', '-Wl,-z,noexecstack',
[email protected]9d384032009-03-20 23:13:262397 ],
[email protected]1e013672012-06-29 22:12:202398 'libraries' : [
2399 '<(libraries_for_target)',
2400 ],
[email protected]3aacaf952009-04-02 15:34:092401 'configurations': {
[email protected]5153767c2009-12-22 01:52:502402 'Debug_Base': {
[email protected]c5bdc032009-04-20 19:11:312403 'variables': {
2404 'debug_optimize%': '0',
2405 },
[email protected]3aacaf952009-04-02 15:34:092406 'defines': [
2407 '_DEBUG',
2408 ],
2409 'cflags': [
[email protected]95ad2032012-08-24 00:49:252410 '-O>(debug_optimize)',
[email protected]3aacaf952009-04-02 15:34:092411 '-g',
2412 ],
[email protected]da1c8d692011-09-20 20:35:012413 'conditions' : [
[email protected]fa9d4e262012-08-21 04:39:002414 ['OS=="android" and android_full_debug==0', {
[email protected]8a37e4502012-08-14 22:42:552415 # Some configurations are copied from Release_Base to reduce
2416 # the binary size.
2417 'variables': {
2418 'debug_optimize%': 's',
2419 },
[email protected]da1c8d692011-09-20 20:35:012420 'cflags': [
[email protected]8a37e4502012-08-14 22:42:552421 '-fomit-frame-pointer',
2422 '-fdata-sections',
2423 '-ffunction-sections',
[email protected]da1c8d692011-09-20 20:35:012424 ],
[email protected]8a37e4502012-08-14 22:42:552425 'ldflags': [
2426 '-Wl,-O1',
2427 '-Wl,--as-needed',
2428 '-Wl,--gc-sections',
2429 ],
[email protected]da1c8d692011-09-20 20:35:012430 }],
2431 ],
[email protected]5315f2842009-04-28 00:43:272432 },
[email protected]5153767c2009-12-22 01:52:502433 'Release_Base': {
[email protected]740e2de2009-07-21 11:41:012434 'variables': {
2435 'release_optimize%': '2',
[email protected]1dd529642010-05-15 01:02:512436 # Binaries become big and gold is unable to perform GC
2437 # and remove unused sections for some of test targets
2438 # on 32 bit platform.
2439 # (This is currently observed only in chromeos valgrind bots)
2440 # The following flag is to disable --gc-sections linker
2441 # option for these bots.
2442 'no_gc_sections%': 0,
[email protected]409dceef2011-05-10 19:49:122443
2444 # TODO(bradnelson): reexamine how this is done if we change the
2445 # expansion of configurations
2446 'release_valgrind_build%': 0,
[email protected]740e2de2009-07-21 11:41:012447 },
[email protected]3aacaf952009-04-02 15:34:092448 'cflags': [
[email protected]296ce7ce2012-08-02 19:41:182449 '-O<(release_optimize)',
[email protected]d8cc3a62009-04-08 18:29:532450 # Don't emit the GCC version ident directives, they just end up
2451 # in the .comment section taking up binary size.
2452 '-fno-ident',
2453 # Put data and code in their own sections, so that unused symbols
2454 # can be removed at link time with --gc-sections.
2455 '-fdata-sections',
2456 '-ffunction-sections',
[email protected]3aacaf952009-04-02 15:34:092457 ],
[email protected]c902f2c2010-08-06 20:04:182458 'ldflags': [
2459 # Specifically tell the linker to perform optimizations.
2460 # See http://lwn.net/Articles/192624/ .
2461 '-Wl,-O1',
[email protected]27c2e492010-08-06 22:55:222462 '-Wl,--as-needed',
[email protected]c902f2c2010-08-06 20:04:182463 ],
[email protected]1dd529642010-05-15 01:02:512464 'conditions' : [
2465 ['no_gc_sections==0', {
2466 'ldflags': [
2467 '-Wl,--gc-sections',
2468 ],
2469 }],
[email protected]da1c8d692011-09-20 20:35:012470 ['OS=="android"', {
[email protected]48de0fc2012-08-02 11:03:582471 'variables': {
2472 'release_optimize%': 's',
2473 },
[email protected]da1c8d692011-09-20 20:35:012474 'cflags': [
2475 '-fomit-frame-pointer',
2476 ],
2477 }],
[email protected]ecf7b6482010-10-13 09:15:202478 ['clang==1', {
2479 'cflags!': [
2480 '-fno-ident',
2481 ],
2482 }],
[email protected]7664ab32011-02-01 23:35:252483 ['profiling==1', {
2484 'cflags': [
2485 '-fno-omit-frame-pointer',
2486 '-g',
2487 ],
2488 }],
[email protected]8d726a42012-02-09 03:49:002489 ],
[email protected]3aacaf952009-04-02 15:34:092490 },
2491 },
[email protected]601b540222009-04-03 21:32:042492 'variants': {
2493 'coverage': {
2494 'cflags': ['-fprofile-arcs', '-ftest-coverage'],
2495 'ldflags': ['-fprofile-arcs'],
2496 },
2497 'profile': {
2498 'cflags': ['-pg', '-g'],
2499 'ldflags': ['-pg'],
2500 },
2501 'symbols': {
2502 'cflags': ['-g'],
2503 },
2504 },
[email protected]606116d22009-05-06 22:38:232505 'conditions': [
[email protected]04b482602011-09-14 02:36:212506 ['target_arch=="ia32"', {
2507 'target_conditions': [
2508 ['_toolset=="target"', {
2509 'asflags': [
2510 # Needed so that libs with .s files (e.g. libicudata.a)
2511 # are compatible with the general 32-bit-ness.
2512 '-32',
2513 ],
2514 # All floating-point computations on x87 happens in 80-bit
2515 # precision. Because the C and C++ language standards allow
2516 # the compiler to keep the floating-point values in higher
2517 # precision than what's specified in the source and doing so
2518 # is more efficient than constantly rounding up to 64-bit or
2519 # 32-bit precision as specified in the source, the compiler,
2520 # especially in the optimized mode, tries very hard to keep
2521 # values in x87 floating-point stack (in 80-bit precision)
2522 # as long as possible. This has important side effects, that
2523 # the real value used in computation may change depending on
2524 # how the compiler did the optimization - that is, the value
2525 # kept in 80-bit is different than the value rounded down to
2526 # 64-bit or 32-bit. There are possible compiler options to
2527 # make this behavior consistent (e.g. -ffloat-store would keep
2528 # all floating-values in the memory, thus force them to be
2529 # rounded to its original precision) but they have significant
2530 # runtime performance penalty.
2531 #
2532 # -mfpmath=sse -msse2 makes the compiler use SSE instructions
2533 # which keep floating-point values in SSE registers in its
2534 # native precision (32-bit for single precision, and 64-bit
2535 # for double precision values). This means the floating-point
2536 # value used during computation does not change depending on
2537 # how the compiler optimized the code, since the value is
2538 # always kept in its specified precision.
2539 'conditions': [
2540 ['branding=="Chromium" and disable_sse2==0', {
2541 'cflags': [
2542 '-march=pentium4',
2543 '-msse2',
2544 '-mfpmath=sse',
2545 ],
2546 }],
2547 # ChromeOS targets Pinetrail, which is sse3, but most of the
2548 # benefit comes from sse2 so this setting allows ChromeOS
2549 # to build on other CPUs. In the future -march=atom would
2550 # help but requires a newer compiler.
2551 ['chromeos==1 and disable_sse2==0', {
2552 'cflags': [
2553 '-msse2',
2554 ],
2555 }],
2556 # Install packages have started cropping up with
2557 # different headers between the 32-bit and 64-bit
2558 # versions, so we have to shadow those differences off
2559 # and make sure a 32-bit-on-64-bit build picks up the
2560 # right files.
[email protected]32594022012-05-10 03:22:282561 # For android build, use NDK headers instead of host headers
2562 ['host_arch!="ia32" and OS!="android"', {
[email protected]04b482602011-09-14 02:36:212563 'include_dirs+': [
2564 '/usr/include32',
2565 ],
2566 }],
2567 ],
2568 # -mmmx allows mmintrin.h to be used for mmx intrinsics.
2569 # video playback is mmx and sse2 optimized.
[email protected]ffde7932009-05-29 00:39:062570 'cflags': [
[email protected]04b482602011-09-14 02:36:212571 '-m32',
2572 '-mmmx',
2573 ],
2574 'ldflags': [
2575 '-m32',
[email protected]ffde7932009-05-29 00:39:062576 ],
2577 }],
[email protected]606116d22009-05-06 22:38:232578 ],
2579 }],
[email protected]3dda8a962009-08-10 18:58:072580 ['target_arch=="arm"', {
[email protected]77c1b29392009-12-04 06:21:292581 'target_conditions': [
2582 ['_toolset=="target"', {
2583 'cflags_cc': [
2584 # The codesourcery arm-2009q3 toolchain warns at that the ABI
2585 # has changed whenever it encounters a varargs function. This
2586 # silences those warnings, as they are not helpful and
2587 # clutter legitimate warnings.
2588 '-Wno-abi',
2589 ],
2590 'conditions': [
[email protected]da1c8d692011-09-20 20:35:012591 ['arm_thumb==1', {
[email protected]77c1b29392009-12-04 06:21:292592 'cflags': [
2593 '-mthumb',
[email protected]77c1b29392009-12-04 06:21:292594 ]
2595 }],
2596 ['armv7==1', {
[email protected]dc9711f2009-11-13 19:30:252597 'cflags': [
2598 '-march=armv7-a',
2599 '-mtune=cortex-a8',
[email protected]7fc96c82012-07-24 18:15:112600 '-mfloat-abi=<(arm_float_abi)',
[email protected]dc9711f2009-11-13 19:30:252601 ],
[email protected]eafc0b452010-02-26 21:53:432602 'conditions': [
2603 ['arm_neon==1', {
2604 'cflags': [ '-mfpu=neon', ],
2605 }, {
[email protected]53e0f642010-03-05 01:41:562606 'cflags': [ '-mfpu=<(arm_fpu)', ],
[email protected]220ea5932012-08-09 10:44:072607 }],
[email protected]eafc0b452010-02-26 21:53:432608 ],
[email protected]dc9711f2009-11-13 19:30:252609 }],
[email protected]da1c8d692011-09-20 20:35:012610 ['OS=="android"', {
[email protected]7b1112c2012-03-16 22:03:532611 # Most of the following flags are derived from what Android
2612 # uses by default when building for arm, reference for which
2613 # can be found in the following file in the Android NDK:
2614 # toolchains/arm-linux-androideabi-4.4.3/setup.mk
2615 'cflags': [
2616 # The tree-sra optimization (scalar replacement for
2617 # aggregates enabling subsequent optimizations) leads to
2618 # invalid code generation when using the Android NDK's
2619 # compiler (r5-r7). This can be verified using
2620 # TestWebKitAPI's WTF.Checked_int8_t test.
2621 '-fno-tree-sra',
[email protected]9cc13e42012-08-20 20:09:482622 '-fuse-ld=gold',
[email protected]7b1112c2012-03-16 22:03:532623 '-Wno-psabi',
2624 ],
[email protected]ad17e342012-07-17 20:45:482625 # Android now supports .relro sections properly.
2626 # NOTE: While these flags enable the generation of .relro
2627 # sections, the generated libraries can still be loaded on
2628 # older Android platform versions.
2629 'ldflags': [
2630 '-Wl,-z,relro',
2631 '-Wl,-z,now',
[email protected]9cc13e42012-08-20 20:09:482632 '-fuse-ld=gold',
[email protected]ad17e342012-07-17 20:45:482633 ],
[email protected]da1c8d692011-09-20 20:35:012634 'conditions': [
[email protected]94cdbf42012-12-11 19:49:222635 ['arm_thumb==1', {
[email protected]da1c8d692011-09-20 20:35:012636 # Android toolchain doesn't support -mimplicit-it=thumb
[email protected]94cdbf42012-12-11 19:49:222637 'cflags!': [ '-Wa,-mimplicit-it=thumb' ],
2638 'cflags': [ '-mthumb-interwork' ],
[email protected]da1c8d692011-09-20 20:35:012639 }],
2640 ['armv7==0', {
2641 # Flags suitable for Android emulator
2642 'cflags': [
2643 '-march=armv5te',
2644 '-mtune=xscale',
2645 '-msoft-float',
[email protected]6863896f2012-01-25 17:51:362646 ],
2647 'defines': [
2648 '__ARM_ARCH_5__',
2649 '__ARM_ARCH_5T__',
2650 '__ARM_ARCH_5E__',
2651 '__ARM_ARCH_5TE__',
[email protected]da1c8d692011-09-20 20:35:012652 ],
2653 }],
[email protected]4c48ef102012-11-29 22:00:382654 ['profiling==1', {
2655 'cflags': [
2656 '-marm', # Probably reduntant, but recommend by "perf" docs.
2657 '-mapcs-frame', # Seems required by -fno-omit-frame-pointer.
2658 ],
2659 }],
[email protected]220ea5932012-08-09 10:44:072660 ['clang==1', {
2661 'cflags!': [
2662 # Clang does not support the following options.
2663 '-mthumb-interwork',
2664 '-finline-limit=64',
2665 '-fno-tree-sra',
[email protected]9cc13e42012-08-20 20:09:482666 '-fuse-ld=gold',
[email protected]220ea5932012-08-09 10:44:072667 '-Wno-psabi',
2668 ],
2669 }],
[email protected]da1c8d692011-09-20 20:35:012670 ],
[email protected]3cf73842012-11-24 03:35:252671 'target_conditions': [
2672 # ndk-build copies .a's around the filesystem, breaking
2673 # relative paths in thin archives. Disable using thin
2674 # archives to avoid problems until one of these is fixed:
2675 # http://code.google.com/p/android/issues/detail?id=40302
2676 # http://code.google.com/p/android/issues/detail?id=40303
2677 ['_type=="static_library"', {
2678 'standalone_static_library': 1,
2679 }],
2680 ],
[email protected]da1c8d692011-09-20 20:35:012681 }],
[email protected]3dda8a962009-08-10 18:58:072682 ],
2683 }],
2684 ],
2685 }],
[email protected]2fb843b2010-08-12 02:11:082686 ['linux_fpic==1', {
[email protected]c76723a2010-01-25 23:10:582687 'cflags': [
2688 '-fPIC',
2689 ],
[email protected]d3f692b32011-12-14 19:04:352690 'ldflags': [
2691 '-fPIC',
2692 ],
[email protected]c76723a2010-01-25 23:10:582693 }],
[email protected]ee28c9f2009-09-04 01:53:012694 ['sysroot!=""', {
[email protected]fd36ce822009-10-28 20:13:572695 'target_conditions': [
2696 ['_toolset=="target"', {
2697 'cflags': [
2698 '--sysroot=<(sysroot)',
2699 ],
2700 'ldflags': [
2701 '--sysroot=<(sysroot)',
2702 ],
2703 }]]
[email protected]ee28c9f2009-09-04 01:53:012704 }],
[email protected]58680ce2010-09-18 00:09:152705 ['clang==1', {
[email protected]18ca15a2011-08-10 03:07:122706 'cflags': [
2707 '-Wheader-hygiene',
2708 # Clang spots more unused functions.
2709 '-Wno-unused-function',
2710 # Don't die on dtoa code that uses a char as an array index.
2711 '-Wno-char-subscripts',
[email protected]d6431722011-09-01 00:46:332712 # Especially needed for gtest macros using enum values from Mac
2713 # system headers.
2714 # TODO(pkasting): In C++11 this is legal, so this should be
2715 # removed when we change to that. (This is also why we don't
2716 # bother fixing all these cases today.)
[email protected]18ca15a2011-08-10 03:07:122717 '-Wno-unnamed-type-template-args',
[email protected]aae0e592012-11-15 00:25:532718 # This (rightfully) complains about 'override', which we use
[email protected]241109b52011-10-15 19:00:302719 # heavily.
2720 '-Wno-c++11-extensions',
[email protected]9242c7642012-01-29 09:02:102721
2722 # Warns on switches on enums that cover all enum values but
2723 # also contain a default: branch. Chrome is full of that.
2724 '-Wno-covered-switch-default',
[email protected]18ca15a2011-08-10 03:07:122725 ],
2726 'cflags!': [
2727 # Clang doesn't seem to know know this flag.
2728 '-mfpmath=sse',
2729 ],
[email protected]58680ce2010-09-18 00:09:152730 }],
[email protected]5d451ad2011-02-11 16:43:462731 ['clang==1 and clang_use_chrome_plugins==1', {
[email protected]d23720682011-08-11 00:16:262732 'cflags': [
[email protected]c872dc52012-05-19 06:36:312733 '<@(clang_chrome_plugins_flags)',
[email protected]d23720682011-08-11 00:16:262734 ],
[email protected]5d451ad2011-02-11 16:43:462735 }],
[email protected]4a9ac22e2011-12-02 03:41:532736 ['clang==1 and clang_load!=""', {
[email protected]d23720682011-08-11 00:16:262737 'cflags': [
2738 '-Xclang', '-load', '-Xclang', '<(clang_load)',
[email protected]4a9ac22e2011-12-02 03:41:532739 ],
2740 }],
2741 ['clang==1 and clang_add_plugin!=""', {
2742 'cflags': [
[email protected]d23720682011-08-11 00:16:262743 '-Xclang', '-add-plugin', '-Xclang', '<(clang_add_plugin)',
2744 ],
[email protected]5e781232011-01-28 02:57:592745 }],
[email protected]2616d45d2012-01-19 03:15:482746 ['clang==1 and "<(GENERATOR)"=="ninja"', {
2747 'cflags': [
2748 # See http://crbug.com/110262
2749 '-fcolor-diagnostics',
2750 ],
2751 }],
[email protected]92799b632011-08-15 14:33:062752 ['asan==1', {
[email protected]1ffc3b3962012-05-16 14:08:422753 'target_conditions': [
2754 ['_toolset=="target"', {
[email protected]cb770a4c2012-07-25 20:06:452755 'cflags': [
[email protected]48688df02012-11-27 21:04:562756 '-fsanitize=address',
[email protected]cb770a4c2012-07-25 20:06:452757 '-fno-omit-frame-pointer',
[email protected]48688df02012-11-27 21:04:562758 '-w', # http://crbug.com/162783
[email protected]cb770a4c2012-07-25 20:06:452759 ],
2760 'ldflags': [
[email protected]48688df02012-11-27 21:04:562761 '-fsanitize=address',
[email protected]cb770a4c2012-07-25 20:06:452762 ],
2763 'defines': [
2764 'ADDRESS_SANITIZER',
2765 ],
[email protected]1ffc3b3962012-05-16 14:08:422766 }],
[email protected]921c7b52011-11-25 10:34:352767 ],
[email protected]92799b632011-08-15 14:33:062768 }],
[email protected]c9a829272012-07-04 07:51:122769 ['tsan==1', {
2770 'target_conditions': [
2771 ['_toolset=="target"', {
[email protected]cb770a4c2012-07-25 20:06:452772 'cflags': [
[email protected]927a9d672012-11-09 11:28:202773 '-fsanitize=thread',
[email protected]cb770a4c2012-07-25 20:06:452774 '-fno-omit-frame-pointer',
2775 '-fPIE',
[email protected]927a9d672012-11-09 11:28:202776 '-mllvm', '-tsan-blacklist=<(tsan_blacklist)',
[email protected]cb770a4c2012-07-25 20:06:452777 ],
2778 'ldflags': [
[email protected]927a9d672012-11-09 11:28:202779 '-fsanitize=thread',
[email protected]cb770a4c2012-07-25 20:06:452780 ],
2781 'defines': [
2782 'THREAD_SANITIZER',
2783 'DYNAMIC_ANNOTATIONS_EXTERNAL_IMPL=1',
[email protected]7bdd7d7c2012-11-01 10:36:162784 'WTF_USE_DYNAMIC_ANNOTATIONS_NOIMPL=1',
[email protected]cb770a4c2012-07-25 20:06:452785 ],
2786 'target_conditions': [
2787 ['_type=="executable"', {
2788 'ldflags': [
[email protected]c9a829272012-07-04 07:51:122789 '-pie',
[email protected]cb770a4c2012-07-25 20:06:452790 ],
2791 }],
2792 ],
[email protected]c9a829272012-07-04 07:51:122793 }],
2794 ],
2795 }],
[email protected]8a48f3f2012-12-04 20:14:042796 ['order_profiling!=0 and (chromeos==1 or OS=="linux" or OS=="android")', {
[email protected]8a6abd12012-05-16 10:04:442797 'target_conditions' : [
2798 ['_toolset=="target"', {
2799 'cflags': [
2800 '-finstrument-functions',
[email protected]c2a8d2e2012-10-05 09:31:452801 # Allow mmx intrinsics to inline, so that the
2802 # compiler can expand the intrinsics.
2803 '-finstrument-functions-exclude-file-list=mmintrin.h',
[email protected]8a6abd12012-05-16 10:04:442804 ],
2805 }],
2806 ],
2807 }],
[email protected]cbd5fd52009-08-26 00:14:272808 ['linux_breakpad==1', {
[email protected]cbd5fd52009-08-26 00:14:272809 'defines': ['USE_LINUX_BREAKPAD'],
[email protected]ce4367d2013-01-15 16:13:102810 }],
2811 ['linux_dump_symbols==1', {
2812 'cflags': [ '-g' ],
[email protected]c50c8d72012-11-15 00:29:252813 'conditions': [
2814 ['target_arch=="ia32"', {
2815 'target_conditions': [
2816 ['_toolset=="target"', {
2817 'ldflags': [
2818 # Workaround for linker OOM. http://crbug.com/160253.
2819 '-Wl,--no-keep-files-mapped',
2820 ],
2821 }],
2822 ],
2823 }],
2824 ],
[email protected]cbd5fd52009-08-26 00:14:272825 }],
[email protected]d8b60602010-03-26 09:41:222826 ['linux_use_heapchecker==1', {
2827 'variables': {'linux_use_tcmalloc%': 1},
[email protected]cea4aec2012-01-24 12:26:402828 'defines': ['USE_HEAPCHECKER'],
[email protected]d8b60602010-03-26 09:41:222829 }],
[email protected]61a9b2d82010-02-26 00:31:082830 ['linux_use_tcmalloc==0', {
2831 'defines': ['NO_TCMALLOC'],
[email protected]01699e22009-11-11 19:24:242832 }],
[email protected]64e2d4a42010-08-27 10:13:212833 ['linux_keep_shadow_stacks==1', {
2834 'defines': ['KEEP_SHADOW_STACKS'],
[email protected]987a7422012-02-23 19:10:512835 'cflags': [
2836 '-finstrument-functions',
2837 # Allow mmx intrinsics to inline, so that the compiler can expand
2838 # the intrinsics.
2839 '-finstrument-functions-exclude-file-list=mmintrin.h',
2840 ],
[email protected]64e2d4a42010-08-27 10:13:212841 }],
[email protected]8d726a42012-02-09 03:49:002842 ['linux_use_gold_flags==1', {
[email protected]68d01e82012-12-08 03:36:322843 'ldflags': [
2844 # Experimentation found that using four linking threads
2845 # saved ~20% of link time.
2846 # https://groups.google.com/a/chromium.org/group/chromium-dev/browse_thread/thread/281527606915bb36
2847 '-Wl,--threads',
2848 '-Wl,--thread-count=4',
2849 ],
[email protected]8d726a42012-02-09 03:49:002850 'conditions': [
2851 ['release_valgrind_build==0', {
2852 'target_conditions': [
2853 ['_toolset=="target"', {
2854 'ldflags': [
2855 # There seems to be a conflict of --icf and -pie
2856 # in gold which can generate crashy binaries. As
2857 # a security measure, -pie takes precendence for
2858 # now.
2859 #'-Wl,--icf=safe',
2860 '-Wl,--icf=none',
2861 ],
2862 }],
2863 ],
2864 }],
2865 ],
2866 }],
[email protected]b07806c12012-02-03 22:44:592867 ['linux_use_gold_binary==1', {
2868 'variables': {
[email protected]516312d2012-02-28 05:17:262869 'conditions': [
2870 ['inside_chromium_build==1', {
2871 # We pass the path to gold to the compiler. gyp leaves
2872 # unspecified what the cwd is when running the compiler,
2873 # so the normal gyp path-munging fails us. This hack
2874 # gets the right path.
2875 'gold_path': '<(PRODUCT_DIR)/../../third_party/gold',
2876 }, {
2877 'gold_path': '<(PRODUCT_DIR)/../../Source/WebKit/chromium/third_party/gold',
2878 }]
2879 ]
[email protected]b07806c12012-02-03 22:44:592880 },
2881 'ldflags': [
2882 # Put our gold binary in the search path for the linker.
2883 '-B<(gold_path)',
2884 ],
2885 }],
[email protected]606116d22009-05-06 22:38:232886 ],
[email protected]9d384032009-03-20 23:13:262887 },
2888 }],
[email protected]c51e8d52009-12-11 20:04:062889 # FreeBSD-specific options; note that most FreeBSD options are set above,
2890 # with Linux.
2891 ['OS=="freebsd"', {
2892 'target_defaults': {
2893 'ldflags': [
2894 '-Wl,--no-keep-memory',
2895 ],
2896 },
2897 }],
[email protected]da1c8d692011-09-20 20:35:012898 # Android-specific options; note that most are set above with Linux.
2899 ['OS=="android"', {
2900 'variables': {
[email protected]25036722012-12-11 10:36:172901 # This is a unique identifier for a given build. It's used for
2902 # identifying various build artifacts corresponding to a particular
2903 # build of chrome (e.g. where to find archived symbols).
2904 'chrome_build_id%': '',
[email protected]da1c8d692011-09-20 20:35:012905 'conditions': [
[email protected]da1c8d692011-09-20 20:35:012906 # Use shared stlport library when system one used.
2907 # Figure this out early since it needs symbols from libgcc.a, so it
2908 # has to be before that in the set of libraries.
2909 ['use_system_stlport==1', {
2910 'android_stlport_library': 'stlport',
2911 }, {
[email protected]806b5232012-11-19 21:19:042912 'conditions': [
2913 ['component=="shared_library"', {
2914 'android_stlport_library': 'stlport_shared',
2915 }, {
2916 'android_stlport_library': 'stlport_static',
2917 }],
2918 ],
[email protected]da1c8d692011-09-20 20:35:012919 }],
2920 ],
2921
2922 # Placing this variable here prevents from forking libvpx, used
2923 # by remoting. Remoting is off, so it needn't built,
2924 # so forking it's deps seems like overkill.
2925 # But this variable need defined to properly run gyp.
2926 # A proper solution is to have an OS==android conditional
2927 # in third_party/libvpx/libvpx.gyp to define it.
2928 'libvpx_path': 'lib/linux/arm',
2929 },
2930 'target_defaults': {
[email protected]da1c8d692011-09-20 20:35:012931 'variables': {
2932 'release_extra_cflags%': '',
[email protected]8a37e4502012-08-14 22:42:552933 },
[email protected]da1c8d692011-09-20 20:35:012934
2935 'target_conditions': [
2936 # Settings for building device targets using Android's toolchain.
2937 # These are based on the setup.mk file from the Android NDK.
2938 #
2939 # The NDK Android executable link step looks as follows:
2940 # $LDFLAGS
2941 # $(TARGET_CRTBEGIN_DYNAMIC_O) <-- crtbegin.o
2942 # $(PRIVATE_OBJECTS) <-- The .o that we built
2943 # $(PRIVATE_STATIC_LIBRARIES) <-- The .a that we built
2944 # $(TARGET_LIBGCC) <-- libgcc.a
2945 # $(PRIVATE_SHARED_LIBRARIES) <-- The .so that we built
2946 # $(PRIVATE_LDLIBS) <-- System .so
2947 # $(TARGET_CRTEND_O) <-- crtend.o
2948 #
2949 # For now the above are approximated for executables by adding
2950 # crtbegin.o to the end of the ldflags and 'crtend.o' to the end
2951 # of 'libraries'.
2952 #
2953 # The NDK Android shared library link step looks as follows:
2954 # $LDFLAGS
2955 # $(PRIVATE_OBJECTS) <-- The .o that we built
2956 # -l,--whole-archive
2957 # $(PRIVATE_WHOLE_STATIC_LIBRARIES)
2958 # -l,--no-whole-archive
2959 # $(PRIVATE_STATIC_LIBRARIES) <-- The .a that we built
2960 # $(TARGET_LIBGCC) <-- libgcc.a
2961 # $(PRIVATE_SHARED_LIBRARIES) <-- The .so that we built
2962 # $(PRIVATE_LDLIBS) <-- System .so
2963 #
[email protected]ad17e342012-07-17 20:45:482964 # For now, assume that whole static libraries are not needed.
[email protected]da1c8d692011-09-20 20:35:012965 #
2966 # For both executables and shared libraries, add the proper
2967 # libgcc.a to the start of libraries which puts it in the
2968 # proper spot after .o and .a files get linked in.
2969 #
2970 # TODO: The proper thing to do longer-tem would be proper gyp
2971 # support for a custom link command line.
2972 ['_toolset=="target"', {
2973 'cflags!': [
2974 '-pthread', # Not supported by Android toolchain.
2975 ],
2976 'cflags': [
[email protected]da1c8d692011-09-20 20:35:012977 '-ffunction-sections',
2978 '-funwind-tables',
2979 '-g',
2980 '-fstack-protector',
2981 '-fno-short-enums',
2982 '-finline-limit=64',
2983 '-Wa,--noexecstack',
[email protected]da1c8d692011-09-20 20:35:012984 '<@(release_extra_cflags)',
[email protected]da1c8d692011-09-20 20:35:012985 ],
2986 'defines': [
2987 'ANDROID',
2988 '__GNU_SOURCE=1', # Necessary for clone()
2989 'USE_STLPORT=1',
2990 '_STLP_USE_PTR_SPECIALIZATIONS=1',
[email protected]25036722012-12-11 10:36:172991 'CHROME_BUILD_ID="<(chrome_build_id)"',
[email protected]da1c8d692011-09-20 20:35:012992 ],
2993 'ldflags!': [
2994 '-pthread', # Not supported by Android toolchain.
2995 ],
2996 'ldflags': [
2997 '-nostdlib',
2998 '-Wl,--no-undefined',
[email protected]da1c8d692011-09-20 20:35:012999 # Don't export symbols from statically linked libraries.
3000 '-Wl,--exclude-libs=ALL',
3001 ],
[email protected]a0e48b02011-11-22 07:53:013002 'libraries': [
3003 '-l<(android_stlport_library)',
3004 # Manually link the libgcc.a that the cross compiler uses.
[email protected]c0f76312012-08-16 13:52:043005 '<!(<(android_toolchain)/*-gcc -print-libgcc-file-name)',
[email protected]a0e48b02011-11-22 07:53:013006 '-lc',
3007 '-ldl',
3008 '-lstdc++',
3009 '-lm',
[email protected]da1c8d692011-09-20 20:35:013010 ],
3011 'conditions': [
[email protected]806b5232012-11-19 21:19:043012 ['component=="shared_library"', {
3013 'libraries': [
3014 '-lgnustl_shared',
3015 ],
[email protected]4d6f9d7db2012-11-21 16:27:473016 'ldflags!': [
3017 '-Wl,--exclude-libs=ALL',
3018 ],
[email protected]806b5232012-11-19 21:19:043019 }],
[email protected]220ea5932012-08-09 10:44:073020 ['clang==1', {
3021 'cflags': [
3022 # Work around incompatibilities between bionic and clang
3023 # headers.
3024 '-D__compiler_offsetof=__builtin_offsetof',
3025 '-Dnan=__builtin_nan',
3026 ],
3027 'conditions': [
3028 ['target_arch=="arm"', {
3029 'cflags': [
3030 '-target arm-linux-androideabi',
3031 '-mllvm -arm-enable-ehabi',
3032 ],
3033 'ldflags': [
3034 '-target arm-linux-androideabi',
3035 ],
3036 }],
3037 ['target_arch=="ia32"', {
3038 'cflags': [
3039 '-target x86-linux-androideabi',
3040 ],
3041 'ldflags': [
3042 '-target x86-linux-androideabi',
3043 ],
3044 }],
3045 ],
3046 }],
[email protected]ed70ed1862012-11-07 12:11:253047 ['asan==1', {
3048 'cflags': [
3049 # Android build relies on -Wl,--gc-sections removing
3050 # unreachable code. ASan instrumentation for globals inhibits
3051 # this and results in a library with unresolvable relocations.
3052 # TODO(eugenis): find a way to reenable this.
3053 '-mllvm -asan-globals=0',
3054 ],
3055 }],
[email protected]da1c8d692011-09-20 20:35:013056 ['android_build_type==0', {
[email protected]34baed112012-06-27 16:10:463057 'defines': [
[email protected]f5c7758a2012-07-25 16:17:573058 # The NDK has these things, but doesn't define the constants
3059 # to say that it does. Define them here instead.
3060 'HAVE_SYS_UIO_H',
3061 ],
3062 'cflags': [
3063 '--sysroot=<(android_ndk_sysroot)',
[email protected]34baed112012-06-27 16:10:463064 ],
[email protected]da1c8d692011-09-20 20:35:013065 'ldflags': [
[email protected]5baf7482011-12-13 16:00:523066 '--sysroot=<(android_ndk_sysroot)',
[email protected]da1c8d692011-09-20 20:35:013067 ],
3068 }],
[email protected]0d7291e2012-10-04 19:16:083069 ['android_build_type==1', {
3070 'include_dirs': [
3071 # OpenAL headers from the Android tree.
3072 '<(android_src)/frameworks/wilhelm/include',
3073 ],
3074 'cflags': [
[email protected]04882132012-11-21 12:40:453075 # Android predefines this as 1; undefine it here so Chromium
3076 # can redefine it later to be 2 for chromium code and unset
3077 # for third party code. This works because cflags are added
3078 # before defines.
3079 '-U_FORTIFY_SOURCE',
[email protected]53f93c92013-01-04 00:48:553080 # Disable any additional warnings enabled by the Android build system but which
3081 # chromium does not build cleanly with (when treating warning as errors).
[email protected]0d7291e2012-10-04 19:16:083082 # Things that are part of -Wextra:
[email protected]53f93c92013-01-04 00:48:553083 '-Wno-extra', # Enabled by -Wextra, but no specific flag
3084 '-Wno-ignored-qualifiers',
3085 '-Wno-type-limits',
[email protected]0d7291e2012-10-04 19:16:083086 # Other things unrelated to -Wextra:
[email protected]53f93c92013-01-04 00:48:553087 '-Wno-non-virtual-dtor',
3088 '-Wno-sign-promo',
[email protected]0d7291e2012-10-04 19:16:083089 ],
3090 'cflags_cc': [
3091 # Disabling c++0x-compat should be handled in WebKit, but
3092 # this currently doesn't work because gcc_version is not set
3093 # correctly when building with the Android build system.
3094 # TODO(torne): Fix this in WebKit.
3095 '-Wno-error=c++0x-compat',
3096 ],
3097 }],
3098 ['android_build_type==1 and chromium_code==0', {
3099 'cflags': [
3100 # There is a class of warning which:
3101 # 1) Android always enables and also treats as errors
3102 # 2) Chromium ignores in third party code
3103 # For now, I am leaving these warnings enabled but preventing
3104 # them from being treated as errors here.
[email protected]53f93c92013-01-04 00:48:553105 '-Wno-address',
3106 '-Wno-format-security',
3107 '-Wno-non-virtual-dtor',
3108 '-Wno-return-type',
3109 '-Wno-sequence-point',
[email protected]0d7291e2012-10-04 19:16:083110 ],
3111 }],
[email protected]febd3572012-05-03 09:17:453112 ['target_arch == "arm"', {
3113 'ldflags': [
3114 # Enable identical code folding to reduce size.
3115 '-Wl,--icf=safe',
3116 ],
3117 }],
[email protected]da1c8d692011-09-20 20:35:013118 # NOTE: The stlport header include paths below are specified in
3119 # cflags rather than include_dirs because they need to come
3120 # after include_dirs. Think of them like system headers, but
3121 # don't use '-isystem' because the arm-linux-androideabi-4.4.3
3122 # toolchain (circa Gingerbread) will exhibit strange errors.
3123 # The include ordering here is important; change with caution.
[email protected]f91ba812012-07-11 00:00:513124 ['use_system_stlport==1', {
3125 'cflags': [
3126 # For libstdc++/include, which is used by stlport.
3127 '-I<(android_src)/bionic',
3128 '-I<(android_src)/external/stlport/stlport',
3129 ],
3130 }, { # else: use_system_stlport!=1
[email protected]da1c8d692011-09-20 20:35:013131 'cflags': [
3132 '-I<(android_ndk_root)/sources/cxx-stl/stlport/stlport',
[email protected]7aa96b12012-12-11 04:29:483133 '-I<(android_ndk_root)/sources/cxx-stl/gnu-libstdc++/4.6/include',
[email protected]da1c8d692011-09-20 20:35:013134 ],
3135 'conditions': [
3136 ['target_arch=="arm" and armv7==1', {
3137 'ldflags': [
3138 '-L<(android_ndk_root)/sources/cxx-stl/stlport/libs/armeabi-v7a',
[email protected]806b5232012-11-19 21:19:043139 '-L<(android_ndk_root)/sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi-v7a',
[email protected]da1c8d692011-09-20 20:35:013140 ],
3141 }],
3142 ['target_arch=="arm" and armv7==0', {
3143 'ldflags': [
3144 '-L<(android_ndk_root)/sources/cxx-stl/stlport/libs/armeabi',
[email protected]806b5232012-11-19 21:19:043145 '-L<(android_ndk_root)/sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi',
[email protected]da1c8d692011-09-20 20:35:013146 ],
3147 }],
3148 ['target_arch=="ia32"', {
3149 'ldflags': [
3150 '-L<(android_ndk_root)/sources/cxx-stl/stlport/libs/x86',
[email protected]806b5232012-11-19 21:19:043151 '-L<(android_ndk_root)/sources/cxx-stl/gnu-libstdc++/4.6/libs/x86',
[email protected]da1c8d692011-09-20 20:35:013152 ],
3153 }],
3154 ],
3155 }],
3156 ['target_arch=="ia32"', {
3157 # The x86 toolchain currently has problems with stack-protector.
3158 'cflags!': [
3159 '-fstack-protector',
3160 ],
3161 'cflags': [
3162 '-fno-stack-protector',
3163 ],
3164 }],
3165 ],
3166 'target_conditions': [
3167 ['_type=="executable"', {
3168 'ldflags': [
3169 '-Bdynamic',
3170 '-Wl,-dynamic-linker,/system/bin/linker',
3171 '-Wl,--gc-sections',
3172 '-Wl,-z,nocopyreloc',
3173 # crtbegin_dynamic.o should be the last item in ldflags.
3174 '<(android_ndk_lib)/crtbegin_dynamic.o',
3175 ],
3176 'libraries': [
3177 # crtend_android.o needs to be the last item in libraries.
3178 # Do not add any libraries after this!
3179 '<(android_ndk_lib)/crtend_android.o',
3180 ],
[email protected]63a131fd2012-11-06 16:01:213181 'conditions': [
3182 ['asan==1', {
3183 'cflags': [
3184 '-fPIE',
3185 ],
3186 'ldflags': [
3187 '-pie',
3188 ],
3189 }],
3190 ],
[email protected]da1c8d692011-09-20 20:35:013191 }],
[email protected]f5c7758a2012-07-25 16:17:573192 ['_type=="shared_library" or _type=="loadable_module"', {
[email protected]da1c8d692011-09-20 20:35:013193 'ldflags': [
3194 '-Wl,-shared,-Bsymbolic',
[email protected]a08029b42012-04-25 03:18:463195 # crtbegin_so.o should be the last item in ldflags.
3196 '<(android_ndk_lib)/crtbegin_so.o',
[email protected]da1c8d692011-09-20 20:35:013197 ],
[email protected]a08029b42012-04-25 03:18:463198 'libraries': [
3199 # crtend_so.o needs to be the last item in libraries.
3200 # Do not add any libraries after this!
3201 '<(android_ndk_lib)/crtend_so.o',
3202 ],
[email protected]da1c8d692011-09-20 20:35:013203 }],
3204 ],
3205 }],
3206 # Settings for building host targets using the system toolchain.
3207 ['_toolset=="host"', {
[email protected]3984aaf2012-02-16 11:42:123208 'cflags!': [
3209 # Due to issues in Clang build system, using ASan on 32-bit
3210 # binaries on x86_64 host is problematic.
3211 # TODO(eugenis): re-enable.
[email protected]48688df02012-11-27 21:04:563212 '-fsanitize=address',
3213 '-w', # http://crbug.com/162783
[email protected]3984aaf2012-02-16 11:42:123214 ],
[email protected]da1c8d692011-09-20 20:35:013215 'ldflags!': [
[email protected]2e82fa52012-11-27 23:41:443216 '-fsanitize=address',
[email protected]da1c8d692011-09-20 20:35:013217 '-Wl,-z,noexecstack',
3218 '-Wl,--gc-sections',
3219 '-Wl,-O1',
3220 '-Wl,--as-needed',
3221 ],
[email protected]965b6b22011-09-29 16:07:283222 'sources/': [
3223 ['exclude', '_android(_unittest)?\\.cc$'],
3224 ['exclude', '(^|/)android/']
3225 ],
[email protected]da1c8d692011-09-20 20:35:013226 }],
3227 ],
3228 },
3229 }],
[email protected]93f21e42010-04-01 00:35:153230 ['OS=="solaris"', {
3231 'cflags!': ['-fvisibility=hidden'],
3232 'cflags_cc!': ['-fvisibility-inlines-hidden'],
3233 }],
[email protected]1e013672012-06-29 22:12:203234 ['OS=="mac" or OS=="ios"', {
[email protected]2f80c312009-02-25 21:26:553235 'target_defaults': {
[email protected]d92c7c012009-03-19 19:26:423236 'mac_bundle': 0,
[email protected]2f80c312009-02-25 21:26:553237 'xcode_settings': {
3238 'ALWAYS_SEARCH_USER_PATHS': 'NO',
[email protected]2429bb732012-10-19 00:24:243239 # Don't link in libarclite_macosx.a, see http://crbug.com/156530.
3240 'CLANG_LINK_OBJC_RUNTIME': 'NO', # -fno-objc-link-runtime
[email protected]ab2956372009-08-13 18:11:043241 'GCC_C_LANGUAGE_STANDARD': 'c99', # -std=c99
3242 'GCC_CW_ASM_SYNTAX': 'NO', # No -fasm-blocks
[email protected]ab2956372009-08-13 18:11:043243 'GCC_ENABLE_CPP_EXCEPTIONS': 'NO', # -fno-exceptions
3244 'GCC_ENABLE_CPP_RTTI': 'NO', # -fno-rtti
3245 'GCC_ENABLE_PASCAL_STRINGS': 'NO', # No -mpascal-strings
[email protected]3224dcd2009-09-16 17:31:253246 # GCC_INLINES_ARE_PRIVATE_EXTERN maps to -fvisibility-inlines-hidden
3247 'GCC_INLINES_ARE_PRIVATE_EXTERN': 'YES',
[email protected]ab2956372009-08-13 18:11:043248 'GCC_OBJC_CALL_CXX_CDTORS': 'YES', # -fobjc-call-cxx-cdtors
3249 'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES', # -fvisibility=hidden
3250 'GCC_THREADSAFE_STATICS': 'NO', # -fno-threadsafe-statics
3251 'GCC_TREAT_WARNINGS_AS_ERRORS': 'YES', # -Werror
[email protected]2f80c312009-02-25 21:26:553252 'GCC_VERSION': '4.2',
[email protected]ab2956372009-08-13 18:11:043253 'GCC_WARN_ABOUT_MISSING_NEWLINE': 'YES', # -Wnewline-eof
[email protected]2f80c312009-02-25 21:26:553254 'USE_HEADERMAP': 'NO',
[email protected]080e86f2010-06-21 15:19:043255 'WARNING_CFLAGS': [
3256 '-Wall',
3257 '-Wendif-labels',
3258 '-Wextra',
3259 # Don't warn about unused function parameters.
3260 '-Wno-unused-parameter',
3261 # Don't warn about the "struct foo f = {0};" initialization
3262 # pattern.
3263 '-Wno-missing-field-initializers',
3264 ],
[email protected]b3fb8092009-03-12 19:09:243265 'conditions': [
3266 ['chromium_mac_pch', {'GCC_PRECOMPILE_PREFIX_HEADER': 'YES'},
[email protected]9543af052009-09-15 22:42:593267 {'GCC_PRECOMPILE_PREFIX_HEADER': 'NO'}
3268 ],
[email protected]2936b8c2012-10-29 10:57:313269 # Note that the prebuilt Clang binaries should not be used for iOS
3270 # development except for ASan builds.
[email protected]66733172010-09-22 00:09:283271 ['clang==1', {
[email protected]34f40892011-09-06 21:53:303272 'CC': '$(SOURCE_ROOT)/<(clang_dir)/clang',
3273 'LDPLUSPLUS': '$(SOURCE_ROOT)/<(clang_dir)/clang++',
[email protected]a79fd882011-10-03 18:22:383274
[email protected]6c648f12011-12-24 07:50:433275 # Don't use -Wc++0x-extensions, which Xcode 4 enables by default
[email protected]aae0e592012-11-15 00:25:533276 # when building with clang. This warning is triggered when the
[email protected]6c648f12011-12-24 07:50:433277 # override keyword is used via the OVERRIDE macro from
3278 # base/compiler_specific.h.
3279 'CLANG_WARN_CXX0X_EXTENSIONS': 'NO',
[email protected]3e893e0c2012-11-16 16:58:443280 # Warn if automatic synthesis is triggered with
3281 # the -Wobjc-missing-property-synthesis flag.
[email protected]aae0e592012-11-15 00:25:533282 'CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS': 'YES',
[email protected]34f40892011-09-06 21:53:303283 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0',
[email protected]66733172010-09-22 00:09:283284 'WARNING_CFLAGS': [
[email protected]7f8d486f2011-04-05 19:49:073285 '-Wheader-hygiene',
[email protected]c67e8ca2012-12-04 16:01:523286
3287 # This warns on using ints as initializers for floats in
3288 # initializer lists (e.g. |int a = f(); CGSize s = { a, a };|),
3289 # which happens in several places in chrome code. Not sure if
3290 # this is worth fixing.
3291 '-Wno-c++11-narrowing',
3292
3293 # This warns about code like |"0x%08"NACL_PRIxPTR| -- with C++11
3294 # user-defined literals, this is now a string literal with a UD
3295 # suffix. However, this is used heavily in NaCl code, so disable
3296 # the warning for now.
3297 '-Wno-reserved-user-defined-literal',
3298
[email protected]66733172010-09-22 00:09:283299 # Don't die on dtoa code that uses a char as an array index.
3300 # This is required solely for base/third_party/dmg_fp/dtoa.cc.
3301 '-Wno-char-subscripts',
[email protected]25d3bb722010-11-22 14:31:453302 # Clang spots more unused functions.
3303 '-Wno-unused-function',
[email protected]9242c7642012-01-29 09:02:103304
3305 # Warns on switches on enums that cover all enum values but
3306 # also contain a default: branch. Chrome is full of that.
3307 '-Wno-covered-switch-default',
[email protected]66733172010-09-22 00:09:283308 ],
[email protected]c67e8ca2012-12-04 16:01:523309 'OTHER_CPLUSPLUSFLAGS': [
3310 # gnu++11 instead of c++11 so that __ANSI_C__ doesn't get
3311 # defined. (Else e.g. finite() in base/float_util.h needs to
3312 # be isfinite() which doesn't exist on the android bots.)
3313 # typeof() is also disabled in c++11 (but we could use
3314 # decltype() instead).
3315 # TODO(thakis): Use CLANG_CXX_LANGUAGE_STANDARD instead once all
3316 # bots use xcode 4 -- http://crbug.com/147515).
3317 # TODO(thakis): Eventually switch this to c++11 instead of
3318 # gnu++11 (once typeof can be removed, which is blocked on c++11
3319 # being available everywhere).
3320 '$(inherited)', '-std=gnu++11',
3321 ],
[email protected]66733172010-09-22 00:09:283322 }],
[email protected]5d451ad2011-02-11 16:43:463323 ['clang==1 and clang_use_chrome_plugins==1', {
3324 'OTHER_CFLAGS': [
[email protected]c872dc52012-05-19 06:36:313325 '<@(clang_chrome_plugins_flags)',
[email protected]5d451ad2011-02-11 16:43:463326 ],
3327 }],
[email protected]4a9ac22e2011-12-02 03:41:533328 ['clang==1 and clang_load!=""', {
[email protected]5e781232011-01-28 02:57:593329 'OTHER_CFLAGS': [
3330 '-Xclang', '-load', '-Xclang', '<(clang_load)',
[email protected]4a9ac22e2011-12-02 03:41:533331 ],
3332 }],
3333 ['clang==1 and clang_add_plugin!=""', {
3334 'OTHER_CFLAGS': [
[email protected]5e781232011-01-28 02:57:593335 '-Xclang', '-add-plugin', '-Xclang', '<(clang_add_plugin)',
3336 ],
3337 }],
[email protected]2616d45d2012-01-19 03:15:483338 ['clang==1 and "<(GENERATOR)"=="ninja"', {
3339 'OTHER_CFLAGS': [
3340 # See http://crbug.com/110262
3341 '-fcolor-diagnostics',
3342 ],
3343 }],
[email protected]b3fb8092009-03-12 19:09:243344 ],
[email protected]2f80c312009-02-25 21:26:553345 },
[email protected]34f40892011-09-06 21:53:303346 'conditions': [
3347 ['clang==1', {
3348 'variables': {
3349 'clang_dir': '../third_party/llvm-build/Release+Asserts/bin',
3350 },
3351 }],
[email protected]921c7b52011-11-25 10:34:353352 ['asan==1', {
3353 'xcode_settings': {
3354 'OTHER_CFLAGS': [
[email protected]48688df02012-11-27 21:04:563355 '-fsanitize=address',
3356 '-w', # http://crbug.com/162783
[email protected]921c7b52011-11-25 10:34:353357 ],
[email protected]921c7b52011-11-25 10:34:353358 },
3359 'defines': [
3360 'ADDRESS_SANITIZER',
3361 ],
3362 }],
[email protected]34f40892011-09-06 21:53:303363 ],
[email protected]2f80c312009-02-25 21:26:553364 'target_conditions': [
[email protected]2f80c312009-02-25 21:26:553365 ['_type!="static_library"', {
[email protected]5d7dc972009-04-16 15:30:463366 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-search_paths_first']},
[email protected]4281a4e2012-08-24 19:05:083367 'conditions': [
3368 ['asan==1', {
3369 'xcode_settings': {
3370 'OTHER_LDFLAGS': [
[email protected]2e82fa52012-11-27 23:41:443371 '-fsanitize=address',
[email protected]4281a4e2012-08-24 19:05:083372 ],
3373 },
3374 }],
3375 ],
[email protected]5d7dc972009-04-16 15:30:463376 }],
3377 ['_mac_bundle', {
3378 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-ObjC']},
[email protected]87fde4a2009-02-28 00:50:083379 }],
[email protected]2936b8c2012-10-29 10:57:313380 ], # target_conditions
3381 }, # target_defaults
3382 }], # OS=="mac" or OS=="ios"
3383 ['OS=="mac"', {
3384 'target_defaults': {
3385 'variables': {
3386 # These should end with %, but there seems to be a bug with % in
3387 # variables that are intended to be set to different values in
3388 # different targets, like these.
3389 'mac_pie': 1, # Most executables can be position-independent.
[email protected]2936b8c2012-10-29 10:57:313390 # Strip debugging symbols from the target.
3391 'mac_strip': '<(mac_strip_release)',
[email protected]970fd4e2012-12-19 11:09:373392 'conditions': [
3393 ['asan==1', {
3394 'conditions': [
3395 ['mac_want_real_dsym=="default"', {
[email protected]97ab1fa2012-12-24 10:50:353396 'mac_real_dsym': 1,
[email protected]970fd4e2012-12-19 11:09:373397 }, {
3398 'mac_real_dsym': '<(mac_want_real_dsym)'
3399 }],
3400 ],
3401 }, {
3402 'conditions': [
3403 ['mac_want_real_dsym=="default"', {
3404 'mac_real_dsym': 0, # Fake .dSYMs are fine in most cases.
3405 }, {
3406 'mac_real_dsym': '<(mac_want_real_dsym)'
3407 }],
3408 ],
3409 }],
3410 ],
[email protected]2936b8c2012-10-29 10:57:313411 },
3412 'xcode_settings': {
3413 'GCC_DYNAMIC_NO_PIC': 'NO', # No -mdynamic-no-pic
3414 # (Equivalent to -fPIC)
3415 # MACOSX_DEPLOYMENT_TARGET maps to -mmacosx-version-min
3416 'MACOSX_DEPLOYMENT_TARGET': '<(mac_deployment_target)',
3417 # Keep pch files below xcodebuild/.
3418 'SHARED_PRECOMPS_DIR': '$(CONFIGURATION_BUILD_DIR)/SharedPrecompiledHeaders',
3419 'OTHER_CFLAGS': [
3420 '-fno-strict-aliasing', # See http://crbug.com/32204
3421 ],
3422 },
3423 'target_conditions': [
[email protected]6303fed2011-08-11 01:12:103424 ['_type=="executable"', {
3425 'postbuilds': [
3426 {
3427 # Arranges for data (heap) pages to be protected against
[email protected]8c40f322011-08-24 03:33:363428 # code execution when running on Mac OS X 10.7 ("Lion"), and
3429 # ensures that the position-independent executable (PIE) bit
3430 # is set for ASLR when running on Mac OS X 10.5 ("Leopard").
[email protected]6303fed2011-08-11 01:12:103431 'variables': {
[email protected]8c40f322011-08-24 03:33:363432 # Define change_mach_o_flags in a variable ending in _path
3433 # so that GYP understands it's a path and performs proper
3434 # relativization during dict merging.
3435 'change_mach_o_flags_path':
3436 'mac/change_mach_o_flags_from_xcode.sh',
[email protected]162407f2011-09-08 15:33:173437 'change_mach_o_flags_options%': [
[email protected]081c0342011-08-24 14:59:133438 ],
3439 'target_conditions': [
[email protected]162407f2011-09-08 15:33:173440 ['mac_pie==0 or release_valgrind_build==1', {
3441 # Don't enable PIE if it's unwanted. It's unwanted if
3442 # the target specifies mac_pie=0 or if building for
3443 # Valgrind, because Valgrind doesn't understand slide.
3444 # See the similar mac_pie/release_valgrind_build check
3445 # below.
[email protected]081c0342011-08-24 14:59:133446 'change_mach_o_flags_options': [
[email protected]081c0342011-08-24 14:59:133447 '--no-pie',
3448 ],
3449 }],
3450 ],
[email protected]6303fed2011-08-11 01:12:103451 },
[email protected]8c40f322011-08-24 03:33:363452 'postbuild_name': 'Change Mach-O Flags',
3453 'action': [
3454 '<(change_mach_o_flags_path)',
[email protected]081c0342011-08-24 14:59:133455 '>@(change_mach_o_flags_options)',
[email protected]8c40f322011-08-24 03:33:363456 ],
[email protected]6303fed2011-08-11 01:12:103457 },
3458 ],
[email protected]5a5d97aa2011-09-02 15:34:003459 'conditions': [
3460 ['asan==1', {
3461 'variables': {
3462 'asan_saves_file': 'asan.saves',
3463 },
3464 'xcode_settings': {
[email protected]6a4cad02011-11-25 07:26:563465 'CHROMIUM_STRIP_SAVE_FILE': '<(asan_saves_file)',
[email protected]5a5d97aa2011-09-02 15:34:003466 },
3467 }],
3468 ],
[email protected]162407f2011-09-08 15:33:173469 'target_conditions': [
3470 ['mac_pie==1 and release_valgrind_build==0', {
3471 # Turn on position-independence (ASLR) for executables. When
3472 # PIE is on for the Chrome executables, the framework will
3473 # also be subject to ASLR.
3474 # Don't do this when building for Valgrind, because Valgrind
3475 # doesn't understand slide. TODO: Make Valgrind on Mac OS X
3476 # understand slide, and get rid of the Valgrind check.
3477 'xcode_settings': {
3478 'OTHER_LDFLAGS': [
3479 '-Wl,-pie', # Position-independent executable (MH_PIE)
3480 ],
3481 },
3482 }],
3483 ],
[email protected]6a0242bc2011-07-01 00:34:463484 }],
[email protected]9a5e72862010-09-02 16:16:583485 ['(_type=="executable" or _type=="shared_library" or \
3486 _type=="loadable_module") and mac_strip!=0', {
[email protected]24700642009-06-01 16:01:203487 'target_conditions': [
3488 ['mac_real_dsym == 1', {
3489 # To get a real .dSYM bundle produced by dsymutil, set the
3490 # debug information format to dwarf-with-dsym. Since
3491 # strip_from_xcode will not be used, set Xcode to do the
3492 # stripping as well.
3493 'configurations': {
[email protected]5153767c2009-12-22 01:52:503494 'Release_Base': {
[email protected]24700642009-06-01 16:01:203495 'xcode_settings': {
3496 'DEBUG_INFORMATION_FORMAT': 'dwarf-with-dsym',
3497 'DEPLOYMENT_POSTPROCESSING': 'YES',
3498 'STRIP_INSTALLED_PRODUCT': 'YES',
[email protected]e14a9f92009-08-05 19:26:073499 'target_conditions': [
[email protected]c2111422010-06-01 18:30:253500 ['_type=="shared_library" or _type=="loadable_module"', {
[email protected]e14a9f92009-08-05 19:26:073501 # The Xcode default is to strip debugging symbols
3502 # only (-S). Local symbols should be stripped as
3503 # well, which will be handled by -x. Xcode will
3504 # continue to insert -S when stripping even when
3505 # additional flags are added with STRIPFLAGS.
3506 'STRIPFLAGS': '-x',
[email protected]ed7e83692012-12-24 10:13:403507 }], # _type=="shared_library" or _type=="loadable_module"
3508 ['_type=="executable"', {
3509 'conditions': [
3510 ['asan==1', {
3511 'STRIPFLAGS': '-s $(CHROMIUM_STRIP_SAVE_FILE)',
3512 }]
3513 ],
3514 }], # _type=="executable" and asan==1
[email protected]e14a9f92009-08-05 19:26:073515 ], # target_conditions
3516 }, # xcode_settings
3517 }, # configuration "Release"
3518 }, # configurations
[email protected]24700642009-06-01 16:01:203519 }, { # mac_real_dsym != 1
3520 # To get a fast fake .dSYM bundle, use a post-build step to
3521 # produce the .dSYM and strip the executable. strip_from_xcode
3522 # only operates in the Release configuration.
3523 'postbuilds': [
3524 {
3525 'variables': {
3526 # Define strip_from_xcode in a variable ending in _path
3527 # so that gyp understands it's a path and performs proper
3528 # relativization during dict merging.
3529 'strip_from_xcode_path': 'mac/strip_from_xcode',
3530 },
3531 'postbuild_name': 'Strip If Needed',
3532 'action': ['<(strip_from_xcode_path)'],
3533 },
[email protected]e14a9f92009-08-05 19:26:073534 ], # postbuilds
3535 }], # mac_real_dsym
3536 ], # target_conditions
[email protected]9a5e72862010-09-02 16:16:583537 }], # (_type=="executable" or _type=="shared_library" or
3538 # _type=="loadable_module") and mac_strip!=0
[email protected]e14a9f92009-08-05 19:26:073539 ], # target_conditions
3540 }, # target_defaults
3541 }], # OS=="mac"
[email protected]1e013672012-06-29 22:12:203542 ['OS=="ios"', {
3543 'target_defaults': {
3544 'xcode_settings' : {
3545 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0',
3546
3547 # This next block is mostly common with the 'mac' section above,
3548 # but keying off (or setting) 'clang' isn't valid for iOS as it
3549 # also seems to mean using the custom build of clang.
3550
3551 # Don't use -Wc++0x-extensions, which Xcode 4 enables by default
[email protected]aae0e592012-11-15 00:25:533552 # when building with clang. This warning is triggered when the
[email protected]1e013672012-06-29 22:12:203553 # override keyword is used via the OVERRIDE macro from
3554 # base/compiler_specific.h.
3555 'CLANG_WARN_CXX0X_EXTENSIONS': 'NO',
[email protected]3e893e0c2012-11-16 16:58:443556 # Warn if automatic synthesis is triggered with
3557 # the -Wobjc-missing-property-synthesis flag.
[email protected]aae0e592012-11-15 00:25:533558 'CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS': 'YES',
[email protected]1e013672012-06-29 22:12:203559 'WARNING_CFLAGS': [
3560 '-Wheader-hygiene',
3561 # Don't die on dtoa code that uses a char as an array index.
3562 # This is required solely for base/third_party/dmg_fp/dtoa.cc.
3563 '-Wno-char-subscripts',
3564 # Clang spots more unused functions.
3565 '-Wno-unused-function',
3566 # See comments on this flag higher up in this file.
3567 '-Wno-unnamed-type-template-args',
[email protected]aae0e592012-11-15 00:25:533568 # This (rightfully) complains about 'override', which we use
[email protected]1e013672012-06-29 22:12:203569 # heavily.
3570 '-Wno-c++11-extensions',
3571 ],
3572 },
3573 'target_conditions': [
3574 ['_type=="executable"', {
3575 'configurations': {
3576 'Release_Base': {
3577 'xcode_settings': {
3578 'DEPLOYMENT_POSTPROCESSING': 'YES',
3579 'STRIP_INSTALLED_PRODUCT': 'YES',
3580 },
3581 },
[email protected]3c6aa862012-11-05 17:11:443582 'Debug_Base': {
3583 'xcode_settings': {
3584 # Remove dSYM to reduce build time.
3585 'DEBUG_INFORMATION_FORMAT': 'dwarf',
3586 },
3587 },
[email protected]1e013672012-06-29 22:12:203588 },
3589 'xcode_settings': {
3590 'conditions': [
3591 ['chromium_ios_signing', {
3592 # iOS SDK wants everything for device signed.
3593 'CODE_SIGN_IDENTITY[sdk=iphoneos*]': 'iPhone Developer',
3594 }, {
3595 'CODE_SIGNING_REQUIRED': 'NO',
3596 'CODE_SIGN_IDENTITY[sdk=iphoneos*]': '',
3597 }],
3598 ],
3599 },
3600 }],
3601 ], # target_conditions
3602 }, # target_defaults
3603 }], # OS=="ios"
[email protected]2f80c312009-02-25 21:26:553604 ['OS=="win"', {
3605 'target_defaults': {
3606 'defines': [
[email protected]8e345da2012-07-01 22:10:303607 '_WIN32_WINNT=0x0602',
3608 'WINVER=0x0602',
[email protected]2f80c312009-02-25 21:26:553609 'WIN32',
3610 '_WINDOWS',
[email protected]2f80c312009-02-25 21:26:553611 'NOMINMAX',
[email protected]e3116282011-08-13 00:52:283612 'PSAPI_VERSION=1',
[email protected]2f80c312009-02-25 21:26:553613 '_CRT_RAND_S',
3614 'CERT_CHAIN_PARA_HAS_EXTRA_FIELDS',
3615 'WIN32_LEAN_AND_MEAN',
[email protected]7a812dd62010-06-30 18:52:273616 '_ATL_NO_OPENGL',
[email protected]2f80c312009-02-25 21:26:553617 ],
[email protected]8974e042010-06-21 18:06:523618 'conditions': [
[email protected]2212d272011-12-20 21:37:373619 ['buildtype=="Official"', {
3620 # In official builds, targets can self-select an optimization
3621 # level by defining a variable named 'optimize', and setting it
3622 # to one of
3623 # - "size", optimizes for minimal code size - the default.
3624 # - "speed", optimizes for speed over code size.
3625 # - "max", whole program optimization and link-time code
3626 # generation. This is very expensive and should be used
3627 # sparingly.
3628 'variables': {
3629 'optimize%': 'size',
3630 },
3631 'target_conditions': [
3632 ['optimize=="size"', {
3633 'msvs_settings': {
3634 'VCCLCompilerTool': {
3635 # 1, optimizeMinSpace, Minimize Size (/O1)
3636 'Optimization': '1',
3637 # 2, favorSize - Favor small code (/Os)
3638 'FavorSizeOrSpeed': '2',
3639 },
3640 },
3641 },
3642 ],
3643 ['optimize=="speed"', {
3644 'msvs_settings': {
3645 'VCCLCompilerTool': {
3646 # 2, optimizeMaxSpeed, Maximize Speed (/O2)
3647 'Optimization': '2',
3648 # 1, favorSpeed - Favor fast code (/Ot)
3649 'FavorSizeOrSpeed': '1',
3650 },
3651 },
3652 },
3653 ],
3654 ['optimize=="max"', {
3655 'msvs_settings': {
3656 'VCCLCompilerTool': {
3657 # 2, optimizeMaxSpeed, Maximize Speed (/O2)
3658 'Optimization': '2',
3659 # 1, favorSpeed - Favor fast code (/Ot)
3660 'FavorSizeOrSpeed': '1',
3661 # This implies link time code generation.
3662 'WholeProgramOptimization': 'true',
3663 },
3664 },
3665 },
3666 ],
3667 ],
3668 },
3669 ],
[email protected]8974e042010-06-21 18:06:523670 ['component=="static_library"', {
3671 'defines': [
3672 '_HAS_EXCEPTIONS=0',
3673 ],
3674 }],
[email protected]c7b95392012-03-28 00:25:203675 ['MSVS_VERSION=="2008"', {
3676 'defines': [
3677 '_HAS_TR1=0',
3678 ],
3679 }],
[email protected]3e2648a2011-03-21 20:58:503680 ['secure_atl', {
3681 'defines': [
3682 '_SECURE_ATL',
3683 ],
3684 }],
[email protected]54184ce72012-10-18 07:11:263685 ['msvs_express', {
3686 'configurations': {
3687 'x86_Base': {
3688 'msvs_settings': {
3689 'VCLinkerTool': {
3690 'AdditionalLibraryDirectories':
3691 ['<(windows_driver_kit_path)/lib/ATL/i386'],
3692 },
3693 'VCLibrarianTool': {
3694 'AdditionalLibraryDirectories':
3695 ['<(windows_driver_kit_path)/lib/ATL/i386'],
3696 },
3697 },
3698 },
3699 'x64_Base': {
3700 'msvs_settings': {
3701 'VCLibrarianTool': {
3702 'AdditionalLibraryDirectories':
3703 ['<(windows_driver_kit_path)/lib/ATL/amd64'],
3704 },
3705 'VCLinkerTool': {
3706 'AdditionalLibraryDirectories':
3707 ['<(windows_driver_kit_path)/lib/ATL/amd64'],
3708 },
3709 },
3710 },
3711 },
3712 'msvs_settings': {
3713 'VCLinkerTool': {
3714 # Explicitly required when using the ATL with express
3715 'AdditionalDependencies': ['atlthunk.lib'],
3716
3717 # ATL 8.0 included in WDK 7.1 makes the linker to generate
3718 # almost eight hundred LNK4254 and LNK4078 warnings:
3719 # - warning LNK4254: section 'ATL' (50000040) merged into
3720 # '.rdata' (40000040) with different attributes
3721 # - warning LNK4078: multiple 'ATL' sections found with
3722 # different attributes
3723 'AdditionalOptions': ['/ignore:4254', '/ignore:4078'],
3724 },
3725 },
3726 'msvs_system_include_dirs': [
3727 '<(windows_driver_kit_path)/inc/atl71',
3728 '<(windows_driver_kit_path)/inc/mfc42',
3729 ],
3730 }],
[email protected]8974e042010-06-21 18:06:523731 ],
[email protected]5b5ca7cb2009-07-20 23:00:203732 'msvs_system_include_dirs': [
[email protected]1ab48032012-07-02 21:48:053733 '<(windows_sdk_path)/Include/shared',
3734 '<(windows_sdk_path)/Include/um',
3735 '<(windows_sdk_path)/Include/winrt',
[email protected]2f80c312009-02-25 21:26:553736 '$(VSInstallDir)/VC/atlmfc/include',
3737 ],
[email protected]a8d99cef2009-08-26 20:47:493738 'msvs_cygwin_dirs': ['<(DEPTH)/third_party/cygwin'],
[email protected]942c3a60f2011-05-03 02:04:113739 'msvs_disabled_warnings': [4351, 4396, 4503, 4819,
3740 # TODO(maruel): These warnings are level 4. They will be slowly
3741 # removed as code is fixed.
3742 4100, 4121, 4125, 4127, 4130, 4131, 4189, 4201, 4238, 4244, 4245,
3743 4310, 4355, 4428, 4481, 4505, 4510, 4512, 4530, 4610, 4611, 4701,
3744 4702, 4706,
3745 ],
[email protected]2f80c312009-02-25 21:26:553746 'msvs_settings': {
3747 'VCCLCompilerTool': {
[email protected]e9b96bb2012-09-07 01:10:443748 'AdditionalOptions': ['/MP'],
[email protected]2f80c312009-02-25 21:26:553749 'MinimalRebuild': 'false',
[email protected]2f80c312009-02-25 21:26:553750 'BufferSecurityCheck': 'true',
3751 'EnableFunctionLevelLinking': 'true',
3752 'RuntimeTypeInfo': 'false',
[email protected]942c3a60f2011-05-03 02:04:113753 'WarningLevel': '4',
[email protected]2f80c312009-02-25 21:26:553754 'WarnAsError': 'true',
3755 'DebugInformationFormat': '3',
[email protected]3fef6e62009-07-31 19:58:583756 'conditions': [
[email protected]8974e042010-06-21 18:06:523757 ['component=="shared_library"', {
3758 'ExceptionHandling': '1', # /EHsc
3759 }, {
3760 'ExceptionHandling': '0',
3761 }],
[email protected]3fef6e62009-07-31 19:58:583762 ],
[email protected]2f80c312009-02-25 21:26:553763 },
3764 'VCLibrarianTool': {
[email protected]1f9471a2010-01-04 06:40:163765 'AdditionalOptions': ['/ignore:4221'],
[email protected]a78da50e2010-06-09 21:31:373766 'AdditionalLibraryDirectories': [
[email protected]1ab48032012-07-02 21:48:053767 '<(windows_sdk_path)/Lib/win8/um/x86',
[email protected]a78da50e2010-06-09 21:31:373768 ],
[email protected]2f80c312009-02-25 21:26:553769 },
3770 'VCLinkerTool': {
[email protected]2f80c312009-02-25 21:26:553771 'AdditionalDependencies': [
3772 'wininet.lib',
[email protected]b1d8c252011-01-13 20:27:503773 'dnsapi.lib',
[email protected]2f80c312009-02-25 21:26:553774 'version.lib',
3775 'msimg32.lib',
3776 'ws2_32.lib',
3777 'usp10.lib',
3778 'psapi.lib',
[email protected]96fd0032009-04-24 00:13:083779 'dbghelp.lib',
[email protected]dfdf7ee2011-04-28 18:51:483780 'winmm.lib',
3781 'shlwapi.lib',
[email protected]2f80c312009-02-25 21:26:553782 ],
[email protected]60c219832012-03-21 22:59:323783
[email protected]4de39f82011-03-28 12:01:293784 'conditions': [
[email protected]3e2648a2011-03-21 20:58:503785 ['MSVS_VERSION=="2005e"', {
3786 # Non-express versions link automatically to these
3787 'AdditionalDependencies': [
3788 'advapi32.lib',
3789 'comdlg32.lib',
3790 'ole32.lib',
3791 'shell32.lib',
3792 'user32.lib',
3793 'winspool.lib',
3794 ],
3795 }],
3796 ],
[email protected]a78da50e2010-06-09 21:31:373797 'AdditionalLibraryDirectories': [
[email protected]1ab48032012-07-02 21:48:053798 '<(windows_sdk_path)/Lib/win8/um/x86',
[email protected]a78da50e2010-06-09 21:31:373799 ],
[email protected]2f80c312009-02-25 21:26:553800 'GenerateDebugInformation': 'true',
3801 'MapFileName': '$(OutDir)\\$(TargetName).map',
3802 'ImportLibrary': '$(OutDir)\\lib\\$(TargetName).lib',
[email protected]2f80c312009-02-25 21:26:553803 'FixedBaseAddress': '1',
[email protected]825ff8d2009-05-22 01:40:483804 # SubSystem values:
3805 # 0 == not set
3806 # 1 == /SUBSYSTEM:CONSOLE
3807 # 2 == /SUBSYSTEM:WINDOWS
3808 # Most of the executables we'll ever create are tests
3809 # and utilities with console output.
3810 'SubSystem': '1',
[email protected]2f80c312009-02-25 21:26:553811 },
3812 'VCMIDLTool': {
3813 'GenerateStublessProxies': 'true',
[email protected]279904d2012-03-31 00:03:093814 'TypeLibraryName': '$(InputName).tlb',
3815 'OutputDirectory': '$(IntDir)',
3816 'HeaderFileName': '$(InputName).h',
[email protected]4fdb3cc2012-04-07 01:49:333817 'DLLDataFileName': '$(InputName).dlldata.c',
[email protected]279904d2012-03-31 00:03:093818 'InterfaceIdentifierFileName': '$(InputName)_i.c',
3819 'ProxyFileName': '$(InputName)_p.c',
[email protected]2f80c312009-02-25 21:26:553820 },
3821 'VCResourceCompilerTool': {
3822 'Culture' : '1033',
[email protected]4d91cbc2010-05-07 20:41:383823 'AdditionalIncludeDirectories': [
3824 '<(DEPTH)',
3825 '<(SHARED_INTERMEDIATE_DIR)',
3826 ],
[email protected]2f80c312009-02-25 21:26:553827 },
3828 },
3829 },
3830 }],
[email protected]79e2336c2011-05-12 18:18:343831 ['disable_nacl==1', {
[email protected]d8c7cbcc2009-10-02 19:00:313832 'target_defaults': {
3833 'defines': [
3834 'DISABLE_NACL',
3835 ],
3836 },
3837 }],
[email protected]cfbf9bc2009-12-07 22:07:563838 ['OS=="win" and msvs_use_common_linker_extras', {
[email protected]48c7af72009-07-03 22:00:193839 'target_defaults': {
3840 'msvs_settings': {
3841 'VCLinkerTool': {
[email protected]48c7af72009-07-03 22:00:193842 'DelayLoadDLLs': [
3843 'dbghelp.dll',
3844 'dwmapi.dll',
[email protected]e15a4ce52012-01-04 20:11:013845 'shell32.dll',
[email protected]48c7af72009-07-03 22:00:193846 'uxtheme.dll',
3847 ],
3848 },
3849 },
[email protected]ef4fa4072009-12-04 22:46:503850 'configurations': {
[email protected]5153767c2009-12-22 01:52:503851 'x86_Base': {
[email protected]ef4fa4072009-12-04 22:46:503852 'msvs_settings': {
3853 'VCLinkerTool': {
[email protected]1f9471a2010-01-04 06:40:163854 'AdditionalOptions': [
3855 '/safeseh',
[email protected]7cf23ce62012-01-13 02:43:333856 '/dynamicbase',
[email protected]1f9471a2010-01-04 06:40:163857 '/ignore:4199',
3858 '/ignore:4221',
3859 '/nxcompat',
3860 ],
[email protected]ef4fa4072009-12-04 22:46:503861 },
3862 },
3863 },
[email protected]5153767c2009-12-22 01:52:503864 'x64_Base': {
[email protected]ef4fa4072009-12-04 22:46:503865 'msvs_settings': {
3866 'VCLinkerTool': {
[email protected]1f9471a2010-01-04 06:40:163867 'AdditionalOptions': [
[email protected]ef4fa4072009-12-04 22:46:503868 # safeseh is not compatible with x64
[email protected]7cf23ce62012-01-13 02:43:333869 '/dynamicbase',
[email protected]1f9471a2010-01-04 06:40:163870 '/ignore:4199',
3871 '/ignore:4221',
3872 '/nxcompat',
3873 ],
[email protected]ef4fa4072009-12-04 22:46:503874 },
3875 },
3876 },
3877 },
[email protected]48c7af72009-07-03 22:00:193878 },
3879 }],
[email protected]9821d0d2010-04-16 22:40:373880 ['enable_new_npdevice_api==1', {
3881 'target_defaults': {
3882 'defines': [
3883 'ENABLE_NEW_NPDEVICE_API',
3884 ],
3885 },
3886 }],
[email protected]220ea5932012-08-09 10:44:073887 ['clang==1', {
[email protected]f1faf212012-10-05 21:04:233888 'conditions': [
3889 ['OS=="android"', {
3890 # Android could use the goma with clang.
3891 'make_global_settings': [
3892 ['CC', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} ${CHROME_SRC}/<(make_clang_dir)/bin/clang)'],
3893 ['CXX', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} ${CHROME_SRC}/<(make_clang_dir)/bin/clang++)'],
3894 ['LINK', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} ${CHROME_SRC}/<(make_clang_dir)/bin/clang++)'],
3895 ['CC.host', '$(CC)'],
3896 ['CXX.host', '$(CXX)'],
3897 ['LINK.host', '$(LINK)'],
3898 ],
3899 }, {
3900 'make_global_settings': [
3901 ['CC', '<(make_clang_dir)/bin/clang'],
3902 ['CXX', '<(make_clang_dir)/bin/clang++'],
3903 ['LINK', '$(CXX)'],
3904 ['CC.host', '$(CC)'],
3905 ['CXX.host', '$(CXX)'],
3906 ['LINK.host', '$(LINK)'],
3907 ],
3908 }],
[email protected]34f40892011-09-06 21:53:303909 ],
3910 }],
[email protected]615fa6642012-08-14 19:17:073911 ['OS=="android" and clang==0', {
[email protected]d10e2cc2012-03-20 10:45:273912 # Hardcode the compiler names in the Makefile so that
3913 # it won't depend on the environment at make time.
[email protected]7fc96c82012-07-24 18:15:113914 'make_global_settings': [
[email protected]c0f76312012-08-16 13:52:043915 ['CC', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} <(android_toolchain)/*-gcc)'],
3916 ['CXX', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} <(android_toolchain)/*-g++)'],
3917 ['LINK', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} <(android_toolchain)/*-gcc)'],
[email protected]615fa6642012-08-14 19:17:073918 ['CC.host', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} <!(which gcc))'],
3919 ['CXX.host', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} <!(which g++))'],
3920 ['LINK.host', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} <!(which g++))'],
[email protected]d10e2cc2012-03-20 10:45:273921 ],
3922 }],
[email protected]2f80c312009-02-25 21:26:553923 ],
3924 'xcode_settings': {
[email protected]0c8ab452009-11-06 21:57:503925 # DON'T ADD ANYTHING NEW TO THIS BLOCK UNLESS YOU REALLY REALLY NEED IT!
3926 # This block adds *project-wide* configuration settings to each project
3927 # file. It's almost always wrong to put things here. Specify your
3928 # custom xcode_settings in target_defaults to add them to targets instead.
3929
[email protected]1e013672012-06-29 22:12:203930 'conditions': [
[email protected]fca3d812012-07-27 00:55:363931 # In an Xcode Project Info window, the "Base SDK for All Configurations"
3932 # setting sets the SDK on a project-wide basis. In order to get the
3933 # configured SDK to show properly in the Xcode UI, SDKROOT must be set
3934 # here at the project level.
[email protected]2c261532012-10-06 00:46:293935 ['OS=="mac"', {
[email protected]fca3d812012-07-27 00:55:363936 'conditions': [
[email protected]2c261532012-10-06 00:46:293937 ['mac_sdk_path==""', {
[email protected]fca3d812012-07-27 00:55:363938 'SDKROOT': 'macosx<(mac_sdk)', # -isysroot
[email protected]2c261532012-10-06 00:46:293939 }, {
3940 'SDKROOT': '<(mac_sdk_path)', # -isysroot
[email protected]fca3d812012-07-27 00:55:363941 }],
3942 ],
[email protected]2c261532012-10-06 00:46:293943 }],
3944 ['OS=="ios"', {
3945 'conditions': [
3946 ['ios_sdk_path==""', {
3947 'SDKROOT': 'iphoneos<(ios_sdk)', # -isysroot
3948 }, {
3949 'SDKROOT': '<(ios_sdk_path)', # -isysroot
3950 }],
3951 ],
[email protected]1e013672012-06-29 22:12:203952 }],
3953 ['OS=="ios"', {
[email protected]1e013672012-06-29 22:12:203954 'ARCHS': '$(ARCHS_UNIVERSAL_IPHONE_OS)',
[email protected]3c6aa862012-11-05 17:11:443955 # Just build armv7, until armv7s is correctly tested.
3956 'VALID_ARCHS': 'armv7 i386',
[email protected]1e013672012-06-29 22:12:203957 'IPHONEOS_DEPLOYMENT_TARGET': '<(ios_deployment_target)',
[email protected]1e013672012-06-29 22:12:203958 # Target both iPhone and iPad.
3959 'TARGETED_DEVICE_FAMILY': '1,2',
3960 }],
3961 ],
[email protected]0c8ab452009-11-06 21:57:503962
[email protected]2f80c312009-02-25 21:26:553963 # The Xcode generator will look for an xcode_settings section at the root
3964 # of each dict and use it to apply settings on a file-wide basis. Most
3965 # settings should not be here, they should be in target-specific
3966 # xcode_settings sections, or better yet, should use non-Xcode-specific
3967 # settings in target dicts. SYMROOT is a special case, because many other
3968 # Xcode variables depend on it, including variables such as
3969 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something
3970 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the
3971 # files to appear (when present) in the UI as actual files and not red
3972 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR,
3973 # and therefore SYMROOT, needs to be set at the project level.
[email protected]bfa24b962009-03-02 00:16:163974 'SYMROOT': '<(DEPTH)/xcodebuild',
[email protected]2f80c312009-02-25 21:26:553975 },
[email protected]ee28c9f2009-09-04 01:53:013976}