blob: 97b5879320464bf33670952c11ddf56c60deab44 [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
138 # Enable App Launcher only on ChromeOS and Windows for now.
139 ['use_ash==1 or OS=="win"', {
140 'enable_app_list%': 1,
141 }, {
142 'enable_app_list%': 0,
143 }],
[email protected]cb800562012-11-20 22:36:07144
145 ['use_aura==1 or (OS!="win" and OS!="mac" and OS!="ios" and OS!="android")', {
[email protected]a6f1bdf2012-11-28 15:52:26146 'use_default_render_theme%': 1,
[email protected]cb800562012-11-20 22:36:07147 }, {
148 'use_default_render_theme%': 0,
149 }],
[email protected]e72e55b2011-01-06 22:19:30150 ],
151 },
152
153 # Copy conditionally-set variables out one scope.
154 'chromeos%': '<(chromeos)',
[email protected]e72e55b2011-01-06 22:19:30155 'host_arch%': '<(host_arch)',
[email protected]94cdbf42012-12-11 19:49:22156 'target_arch%': '<(target_arch)',
[email protected]bb6aba32011-01-07 19:04:43157 'toolkit_views%': '<(toolkit_views)',
[email protected]8796d922012-08-07 01:23:11158 'toolkit_uses_gtk%': '<(toolkit_uses_gtk)',
[email protected]41423092011-08-25 15:39:58159 'use_aura%': '<(use_aura)',
[email protected]ed329be2012-01-03 22:02:16160 'use_ash%': '<(use_ash)',
[email protected]e0b85a52011-10-06 03:30:42161 'use_openssl%': '<(use_openssl)',
[email protected]da5f1952012-05-22 05:55:15162 'use_ibus%': '<(use_ibus)',
[email protected]7ddea9802012-02-22 23:08:05163 'enable_viewport%': '<(enable_viewport)',
[email protected]1efbaaa2012-04-24 02:43:24164 'enable_hidpi%': '<(enable_hidpi)',
[email protected]6155e702012-05-02 17:56:06165 'enable_touch_ui%': '<(enable_touch_ui)',
[email protected]0115f042012-07-27 20:36:53166 'android_build_type%': '<(android_build_type)',
[email protected]dc4e8b82012-11-15 03:58:16167 'enable_app_list%': '<(enable_app_list)',
[email protected]cb800562012-11-20 22:36:07168 'use_default_render_theme%': '<(use_default_render_theme)',
[email protected]94cdbf42012-12-11 19:49:22169 'buildtype%': '<(buildtype)',
[email protected]023d8242011-11-22 01:25:27170
[email protected]8fb0ef02011-05-20 00:53:50171 # We used to provide a variable for changing how libraries were built.
172 # This variable remains until we can clean up all the users.
173 # This needs to be one nested variables dict in so that dependent
174 # gyp files can make use of it in their outer variables. (Yikes!)
175 # http://code.google.com/p/chromium/issues/detail?id=83308
176 'library%': 'static_library',
177
[email protected]e14a9f92009-08-05 19:26:07178 # Override branding to select the desired branding flavor.
179 'branding%': 'Chromium',
180
[email protected]e72e55b2011-01-06 22:19:30181 # This variable tells WebCore.gyp and JavaScriptCore.gyp whether they are
182 # are built under a chromium full build (1) or a webkit.org chromium
183 # build (0).
184 'inside_chromium_build%': 1,
[email protected]8974e042010-06-21 18:06:52185
[email protected]e72e55b2011-01-06 22:19:30186 # Set to 1 to enable fast builds. It disables debug info for fastest
187 # compilation.
188 'fastbuild%': 0,
[email protected]93012ca2010-08-10 20:10:49189
[email protected]20960e072011-09-20 20:59:01190 # Set to 1 to enable dcheck in release without having to use the flag.
191 'dcheck_always_on%': 0,
192
[email protected]464750f2011-10-24 23:16:18193 # Disable file manager component extension by default.
[email protected]3d38d8e2011-04-16 20:48:51194 'file_manager_extension%': 0,
195
[email protected]e72e55b2011-01-06 22:19:30196 # Python version.
[email protected]a43c5a02011-05-27 06:54:51197 'python_ver%': '2.6',
[email protected]b3f23ba2010-04-26 22:58:17198
[email protected]e72e55b2011-01-06 22:19:30199 # Set ARM-v7 compilation flags
200 'armv7%': 0,
201
202 # Set Neon compilation flags (only meaningful if armv7==1).
203 'arm_neon%': 1,
204
205 # The system root for cross-compiles. Default: none.
206 'sysroot%': '',
207
[email protected]945361a2011-09-30 04:38:43208 # The system libdir used for this ABI.
209 'system_libdir%': 'lib',
210
[email protected]e72e55b2011-01-06 22:19:30211 # On Linux, we build with sse2 for Chromium builds.
212 'disable_sse2%': 0,
213
214 # Use libjpeg-turbo as the JPEG codec used by Chromium.
[email protected]32e56e52011-02-28 02:28:03215 'use_libjpeg_turbo%': 1,
[email protected]e72e55b2011-01-06 22:19:30216
[email protected]d9113542012-07-18 17:11:28217 # Use system libjpeg. Note that the system's libjepg will be used even if
218 # use_libjpeg_turbo is set.
219 'use_system_libjpeg%': 0,
220
[email protected]e72e55b2011-01-06 22:19:30221 # Variable 'component' is for cases where we would like to build some
222 # components as dynamic shared libraries but still need variable
223 # 'library' for static libraries.
224 # By default, component is set to whatever library is set to and
225 # it can be overriden by the GYP command line or by ~/.gyp/include.gypi.
[email protected]5a547332011-05-19 23:18:53226 'component%': 'static_library',
[email protected]e72e55b2011-01-06 22:19:30227
[email protected]bb6aba32011-01-07 19:04:43228 # Set to select the Title Case versions of strings in GRD files.
229 'use_titlecase_in_grd_files%': 0,
[email protected]63692212010-09-16 00:22:21230
[email protected]98da0042011-02-02 00:10:27231 # Use translations provided by volunteers at launchpad.net. This
232 # currently only works on Linux.
[email protected]00dc155832011-02-01 18:51:19233 'use_third_party_translations%': 0,
234
[email protected]9a425422011-01-11 00:53:18235 # Remoting compilation is enabled by default. Set to 0 to disable.
236 'remoting%': 1,
237
[email protected]1ec68c42011-06-01 13:56:25238 # Configuration policy is enabled by default. Set to 0 to disable.
239 'configuration_policy%': 1,
240
[email protected]6c521fed2012-11-29 17:00:03241 # Variable safe_browsing is used to control the build time configuration
242 # for safe browsing feature. Safe browsing can be compiled in 3 different
243 # levels: 0 disables it, 1 enables it fully, and 2 enables only UI and
244 # reporting features without enabling phishing and malware detection. This
245 # is useful to integrate a third party phishing/malware detection to
246 # existing safe browsing logic.
[email protected]4b58e7d2011-07-11 10:22:56247 'safe_browsing%': 1,
248
[email protected]9eb100e2011-10-14 05:08:22249 # Speech input is compiled in by default. Set to 0 to disable.
250 'input_speech%': 1,
251
[email protected]7cce3232011-10-28 10:41:57252 # Notifications are compiled in by default. Set to 0 to disable.
253 'notifications%' : 1,
254
[email protected]970fd4e2012-12-19 11:09:37255 # Use dsymutil to generate real .dSYM files on Mac. The default is 0 for
256 # regular builds and 1 for ASan builds.
257 'mac_want_real_dsym%': 'default',
258
[email protected]5d451ad2011-02-11 16:43:46259 # If this is set, the clang plugins used on the buildbot will be used.
260 # Run tools/clang/scripts/update.sh to make sure they are compiled.
261 # This causes 'clang_chrome_plugins_flags' to be set.
262 # Has no effect if 'clang' is not set as well.
[email protected]3bb37e62012-04-19 03:40:08263 'clang_use_chrome_plugins%': 1,
[email protected]5d451ad2011-02-11 16:43:46264
[email protected]2e82fa52012-11-27 23:41:44265 # Enable building with ASAN (Clang's -fsanitize=address option).
266 # -fsanitize=address only works with clang, but asan=1 implies clang=1
[email protected]92799b632011-08-15 14:33:06267 # See https://sites.google.com/a/chromium.org/dev/developers/testing/addresssanitizer
268 'asan%': 0,
269
[email protected]927a9d672012-11-09 11:28:20270 # Enable building with TSAN (Clang's -fsanitize=thread option).
271 # -fsanitize=thread only works with clang, but tsan=1 implies clang=1
[email protected]c9a829272012-07-04 07:51:12272 # See http://clang.llvm.org/docs/ThreadSanitizer.html
273 'tsan%': 0,
[email protected]7bdd7d7c2012-11-01 10:36:16274 'tsan_blacklist%': '<(PRODUCT_DIR)/../../tools/valgrind/tsan_v2/ignores.txt',
[email protected]c9a829272012-07-04 07:51:12275
[email protected]7ce58b22012-09-26 05:17:25276 # Use a modified version of Clang to intercept allocated types and sizes
277 # for allocated objects. clang_type_profiler=1 implies clang=1.
278 # See http://dev.chromium.org/developers/deep-memory-profiler/cpp-object-type-identifier
279 # TODO(dmikurube): Support mac. See http://crbug.com/123758#c11
280 'clang_type_profiler%': 0,
281
[email protected]8a6abd12012-05-16 10:04:44282 # Set to true to instrument the code with function call logger.
283 # See src/third_party/cygprofile/cyg-profile.cc for details.
284 'order_profiling%': 0,
285
[email protected]00b0a7f2012-01-25 15:30:46286 # Use the provided profiled order file to link Chrome image with it.
287 # This makes Chrome faster by better using CPU cache when executing code.
288 # This is known as PGO (profile guided optimization).
289 # See https://sites.google.com/a/google.com/chrome-msk/dev/boot-speed-up-effort
290 'order_text_section%' : "",
291
[email protected]1ad5a7b2011-06-24 03:15:13292 # Set to 1 compile with -fPIC cflag on linux. This is a must for shared
293 # libraries on linux x86-64 and arm, plus ASLR.
294 'linux_fpic%': 1,
295
[email protected]bd7b6fe2012-03-05 21:02:40296 # Whether one-click signin is enabled or not.
297 'enable_one_click_signin%': 0,
298
[email protected]bbf766d2012-05-18 16:30:21299 # Enable Web Intents support in WebKit.
[email protected]5ffb0a42012-01-27 09:36:11300 'enable_web_intents%': 1,
301
[email protected]6a3cd37e2012-04-17 17:13:34302 # Enable Chrome browser extensions
303 'enable_extensions%': 1,
304
[email protected]658677f2012-06-09 06:04:02305 # Enable browser automation.
306 'enable_automation%': 1,
307
[email protected]6ee43a72012-12-07 22:44:40308 # Enable Google Now.
309 'enable_google_now%': 1,
310
[email protected]703369a2012-11-05 20:40:31311 # Enable language detection.
312 'enable_language_detection%': 1,
313
[email protected]658677f2012-06-09 06:04:02314 # Enable printing support and UI.
315 'enable_printing%': 1,
316
[email protected]5ffb0a42012-01-27 09:36:11317 # Enable Web Intents web content registration via HTML element
318 # and WebUI managing such registrations.
319 'enable_web_intents_tag%': 0,
[email protected]62af76e2011-08-01 02:34:01320
[email protected]dda90ae2011-07-19 22:07:48321 # Webrtc compilation is enabled by default. Set to 0 to disable.
322 'enable_webrtc%': 1,
323
[email protected]67c125d2011-10-11 18:58:22324 # PPAPI by default does not support plugins making calls off the main
325 # thread. Set to 1 to turn on experimental support for out-of-process
326 # plugins to make call of the main thread.
[email protected]719b7812012-11-08 00:33:21327 'enable_pepper_threading%': 1,
[email protected]67c125d2011-10-11 18:58:22328
[email protected]cdb756ef2012-04-05 18:34:53329 # Enables use of the session service, which is enabled by default.
330 # Support for disabling depends on the platform.
331 'enable_session_service%': 1,
332
[email protected]6b40bb582012-03-15 20:50:38333 # Enables theme support, which is enabled by default. Support for
334 # disabling depends on the platform.
335 'enable_themes%': 1,
336
[email protected]4ffe78a2012-10-04 20:55:15337 # Uses OEM-specific wallpaper resources on Chrome OS.
338 'use_oem_wallpaper%': 0,
339
[email protected]0acdd772012-04-05 22:53:00340 # Enables support for background apps.
341 'enable_background%': 1,
342
[email protected]44879ed2012-04-06 01:11:02343 # Enable the task manager by default.
344 'enable_task_manager%': 1,
[email protected]e1de87f2012-05-02 17:20:45345
[email protected]9bfe0ab2012-08-30 13:18:11346 # Enable FTP support by default.
347 'disable_ftp_support%': 0,
348
[email protected]22d6dd72012-05-15 07:29:55349 # XInput2 multitouch support is disabled by default (use_xi2_mt=0).
350 # Setting to non-zero value enables XI2 MT. When XI2 MT is enabled,
351 # the input value also defines the required XI2 minor minimum version.
352 # For example, use_xi2_mt=2 means XI2.2 or above version is required.
353 'use_xi2_mt%': 0,
354
[email protected]9061bee82012-01-16 11:45:17355 # Use of precompiled headers on Windows.
356 #
357 # This is on by default in VS 2010, but off by default for VS
358 # 2008 because of complications that it can cause with our
359 # trybots etc.
360 #
361 # This variable may be explicitly set to 1 (enabled) or 0
362 # (disabled) in ~/.gyp/include.gypi or via the GYP command line.
363 # This setting will override the default.
364 #
365 # Note that a setting of 1 is probably suitable for most or all
366 # Windows developers using VS 2008, since precompiled headers
367 # provide a build speedup of 20-25%. There are a couple of
368 # small workarounds you may need to use when using VS 2008 (but
369 # not 2010), see
370 # 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]da1c8d692011-09-20 20:35:01493 'enable_webrtc%': 0,
[email protected]55e02302012-08-21 00:50:46494 'proprietary_codecs%': 1,
[email protected]48de0fc2012-08-02 11:03:58495 'remoting%': 0,
[email protected]da1c8d692011-09-20 20:35:01496 }],
[email protected]839d5172011-10-13 17:18:11497
[email protected]0d16f292012-07-02 22:10:48498 ['OS=="ios"', {
[email protected]c4ac4d12012-09-12 12:02:24499 'configuration_policy%': 0,
[email protected]9bfe0ab2012-08-30 13:18:11500 'disable_ftp_support%': 1,
[email protected]c4ac4d12012-09-12 12:02:24501 'enable_automation%': 0,
502 'enable_extensions%': 0,
[email protected]6ee43a72012-12-07 22:44:40503 'enable_google_now%': 0,
[email protected]703369a2012-11-05 20:40:31504 'enable_language_detection%': 0,
[email protected]c4ac4d12012-09-12 12:02:24505 'enable_printing%': 0,
[email protected]3c6aa862012-11-05 17:11:44506 'enable_session_service%': 0,
[email protected]c4ac4d12012-09-12 12:02:24507 'enable_themes%': 0,
508 'enable_webrtc%': 0,
509 'notifications%': 0,
[email protected]0d16f292012-07-02 22:10:48510 'remoting%': 0,
[email protected]3c6aa862012-11-05 17:11:44511 'safe_browsing%': 0,
[email protected]0d16f292012-07-02 22:10:48512 }],
513
[email protected]839d5172011-10-13 17:18:11514 # Use GPU accelerated cross process image transport by default
[email protected]023d8242011-11-22 01:25:27515 # on linux builds with the Aura window manager
[email protected]f83c6f7f2012-01-28 03:23:01516 ['use_aura==1 and OS=="linux"', {
[email protected]1ee7c56c2011-10-19 14:51:33517 'ui_compositor_image_transport%': 1,
[email protected]839d5172011-10-13 17:18:11518 }, {
[email protected]1ee7c56c2011-10-19 14:51:33519 'ui_compositor_image_transport%': 0,
[email protected]839d5172011-10-13 17:18:11520 }],
[email protected]9061bee82012-01-16 11:45:17521
[email protected]75de7212012-05-12 01:14:46522 # Turn precompiled headers on by default for VS 2010.
[email protected]f1f362b42012-05-15 17:46:58523 ['OS=="win" and MSVS_VERSION=="2010" and buildtype!="Official"', {
[email protected]9061bee82012-01-16 11:45:17524 'chromium_win_pch%': 1
525 }],
[email protected]18e0f39b2012-01-17 16:47:34526
[email protected]3d5173ec2012-03-27 04:08:23527 ['use_aura==1 or chromeos==1 or OS=="android"', {
[email protected]18e0f39b2012-01-17 16:47:34528 'enable_plugin_installation%': 0,
529 }, {
530 'enable_plugin_installation%': 1,
531 }],
[email protected]b07806c12012-02-03 22:44:59532
[email protected]1e013672012-06-29 22:12:20533 ['OS=="android" or OS=="ios"', {
[email protected]6d17f6392012-12-05 05:24:54534 'enable_plugins%': 0,
535 }, {
536 'enable_plugins%': 1,
537 }],
538
[email protected]8d726a42012-02-09 03:49:00539 # linux_use_gold_binary: whether to use the binary checked into
540 # third_party/gold.
[email protected]1d4ace782012-03-07 09:20:40541 ['OS=="linux"', {
[email protected]1e033482012-02-09 19:33:51542 'linux_use_gold_binary%': 1,
543 }, {
544 'linux_use_gold_binary%': 0,
545 }],
546
[email protected]be239492012-02-09 19:00:17547 # linux_use_gold_flags: whether to use build flags that rely on gold.
548 # On by default for x64 Linux. Temporarily off for ChromeOS as
549 # it failed on a buildbot.
[email protected]1d4ace782012-03-07 09:20:40550 ['OS=="linux" and chromeos==0', {
[email protected]be239492012-02-09 19:00:17551 'linux_use_gold_flags%': 1,
552 }, {
[email protected]8d726a42012-02-09 03:49:00553 'linux_use_gold_flags%': 0,
[email protected]b07806c12012-02-03 22:44:59554 }],
[email protected]2e22e2f2012-03-15 21:53:10555
[email protected]a95d5302012-11-03 00:02:19556 ['OS=="android" or OS=="ios"', {
[email protected]e6026962012-06-14 21:28:32557 'enable_captive_portal_detection%': 0,
558 }, {
559 'enable_captive_portal_detection%': 1,
560 }],
561
[email protected]3bd47e022012-03-22 04:19:12562 # Enable Skia UI text drawing incrementally on different platforms.
563 # http://crbug.com/105550
564 #
565 # On Aura, this allows per-tile painting to be used in the browser
566 # compositor.
[email protected]9197a9282012-05-30 14:12:32567 ['OS!="mac" and OS!="android"', {
[email protected]3bd47e022012-03-22 04:19:12568 'use_canvas_skia%': 1,
569 }],
[email protected]adb44342012-07-23 13:36:12570
[email protected]0753ea42012-08-30 20:15:44571 ['chromeos==1', {
572 # When building for ChromeOS we dont want Chromium to use libjpeg_turbo.
573 'use_libjpeg_turbo%': 0,
574 }],
575
[email protected]adb44342012-07-23 13:36:12576 ['OS=="android"', {
577 # When building as part of the Android system, use system libraries
578 # where possible to reduce ROM size.
579 'use_system_libjpeg%': '<(android_build_type)',
580 }],
[email protected]8a46f5f2012-12-05 00:47:12581
582 # Enable Settings App only on Windows.
583 ['enable_app_list==1 and OS=="win"', {
584 'enable_settings_app%': 1,
585 }, {
586 'enable_settings_app%': 0,
587 }],
[email protected]94cdbf42012-12-11 19:49:22588
589 ['OS=="linux" and target_arch=="arm" and chromeos==0', {
590 # Set some defaults for arm/linux chrome builds
591 'armv7%': 1,
592 'linux_breakpad%': 0,
593 'linux_use_tcmalloc%': 0,
594 'linux_use_gold_flags%': 0,
[email protected]84b00d12f2012-12-14 01:53:43595 # sysroot needs to be an absolute path otherwise it generates
[email protected]94cdbf42012-12-11 19:49:22596 # incorrect results when passed to pkg-config
[email protected]84b00d12f2012-12-14 01:53:43597 'sysroot%': '<!(cd <(DEPTH) && pwd -P)/arm-sysroot',
[email protected]94cdbf42012-12-11 19:49:22598 }], # OS=="linux" and target_arch=="arm" and chromeos==0
[email protected]b3f23ba2010-04-26 22:58:17599 ],
[email protected]2b113652012-09-17 17:01:39600
601 # Set this to 1 to use the Google-internal file containing
602 # official API keys for Google Chrome even in a developer build.
603 # Setting this variable explicitly to 1 will cause your build to
604 # fail if the internal file is missing.
605 #
606 # Set this to 0 to not use the internal file, even when it
607 # exists in your checkout.
608 #
609 # Leave set to 2 to have this variable implicitly set to 1 if
610 # you have src/google_apis/internal/google_chrome_api_keys.h in
611 # your checkout, and implicitly set to 0 if not.
612 #
613 # Note that official builds always behave as if this variable
614 # was explicitly set to 1, i.e. they always use official keys,
615 # and will fail to build if the internal file is missing.
616 'use_official_google_api_keys%': 2,
617
618 # Set these to bake the specified API keys and OAuth client
619 # IDs/secrets into your build.
620 #
621 # If you create a build without values baked in, you can instead
622 # set environment variables to provide the keys at runtime (see
623 # src/google_apis/google_api_keys.h for details). Features that
624 # require server-side APIs may fail to work if no keys are
625 # provided.
626 #
627 # Note that if you are building an official build or if
628 # use_official_google_api_keys has been set to 1 (explicitly or
629 # implicitly), these values will be ignored and the official
630 # keys will be used instead.
631 'google_api_key%': '',
632 'google_default_client_id%': '',
633 'google_default_client_secret%': '',
[email protected]e14a9f92009-08-05 19:26:07634 },
635
[email protected]e72e55b2011-01-06 22:19:30636 # Copy conditionally-set variables out one scope.
[email protected]e14a9f92009-08-05 19:26:07637 'branding%': '<(branding)',
638 'buildtype%': '<(buildtype)',
[email protected]e0d00142009-09-18 22:10:27639 'target_arch%': '<(target_arch)',
[email protected]cf185b32010-01-12 04:29:59640 'host_arch%': '<(host_arch)',
[email protected]8fb0ef02011-05-20 00:53:50641 'library%': 'static_library',
[email protected]c153e5352009-09-22 12:37:44642 'toolkit_views%': '<(toolkit_views)',
[email protected]1ee7c56c2011-10-19 14:51:33643 'ui_compositor_image_transport%': '<(ui_compositor_image_transport)',
[email protected]41423092011-08-25 15:39:58644 'use_aura%': '<(use_aura)',
[email protected]ed329be2012-01-03 22:02:16645 'use_ash%': '<(use_ash)',
[email protected]e0b85a52011-10-06 03:30:42646 'use_openssl%': '<(use_openssl)',
[email protected]da5f1952012-05-22 05:55:15647 'use_ibus%': '<(use_ibus)',
[email protected]c329adf82011-10-05 14:34:57648 'use_nss%': '<(use_nss)',
[email protected]df9167b2011-11-14 19:15:25649 'os_bsd%': '<(os_bsd)',
[email protected]79e2336c2011-05-12 18:18:34650 'os_posix%': '<(os_posix)',
[email protected]258dca42011-09-21 00:17:19651 'use_glib%': '<(use_glib)',
[email protected]79e2336c2011-05-12 18:18:34652 'toolkit_uses_gtk%': '<(toolkit_uses_gtk)',
[email protected]7d7564a12011-06-21 19:20:22653 'use_skia%': '<(use_skia)',
[email protected]79e2336c2011-05-12 18:18:34654 'use_x11%': '<(use_x11)',
[email protected]63692212010-09-16 00:22:21655 'use_gnome_keyring%': '<(use_gnome_keyring)',
[email protected]0afe5212010-10-01 18:56:11656 'linux_fpic%': '<(linux_fpic)',
[email protected]67c125d2011-10-11 18:58:22657 'enable_pepper_threading%': '<(enable_pepper_threading)',
[email protected]c153e5352009-09-22 12:37:44658 'chromeos%': '<(chromeos)',
[email protected]7ddea9802012-02-22 23:08:05659 'enable_viewport%': '<(enable_viewport)',
[email protected]1efbaaa2012-04-24 02:43:24660 'enable_hidpi%': '<(enable_hidpi)',
[email protected]6155e702012-05-02 17:56:06661 'enable_touch_ui%': '<(enable_touch_ui)',
[email protected]f56797b2011-09-25 00:04:35662 'use_xi2_mt%':'<(use_xi2_mt)',
[email protected]e47c32032011-03-01 19:26:20663 'file_manager_extension%': '<(file_manager_extension)',
[email protected]b2f030c2009-09-24 20:36:21664 'inside_chromium_build%': '<(inside_chromium_build)',
[email protected]9c1949e2009-10-02 19:59:54665 'fastbuild%': '<(fastbuild)',
[email protected]20960e072011-09-20 20:59:01666 'dcheck_always_on%': '<(dcheck_always_on)',
[email protected]a76fe1a2010-03-01 23:39:36667 'python_ver%': '<(python_ver)',
[email protected]eafc0b452010-02-26 21:53:43668 'armv7%': '<(armv7)',
669 'arm_neon%': '<(arm_neon)',
[email protected]4d83eb72010-03-04 16:42:23670 'sysroot%': '<(sysroot)',
[email protected]945361a2011-09-30 04:38:43671 'system_libdir%': '<(system_libdir)',
[email protected]8974e042010-06-21 18:06:52672 'component%': '<(component)',
[email protected]bb6aba32011-01-07 19:04:43673 'use_titlecase_in_grd_files%': '<(use_titlecase_in_grd_files)',
[email protected]9e94cca2011-02-04 17:38:17674 'use_third_party_translations%': '<(use_third_party_translations)',
[email protected]9a425422011-01-11 00:53:18675 'remoting%': '<(remoting)',
[email protected]bd7b6fe2012-03-05 21:02:40676 'enable_one_click_signin%': '<(enable_one_click_signin)',
[email protected]dda90ae2011-07-19 22:07:48677 'enable_webrtc%': '<(enable_webrtc)',
[email protected]d5cf9fb2011-09-27 00:15:16678 'chromium_win_pch%': '<(chromium_win_pch)',
[email protected]1ec68c42011-06-01 13:56:25679 'configuration_policy%': '<(configuration_policy)',
[email protected]4b58e7d2011-07-11 10:22:56680 'safe_browsing%': '<(safe_browsing)',
[email protected]9eb100e2011-10-14 05:08:22681 'input_speech%': '<(input_speech)',
[email protected]7cce3232011-10-28 10:41:57682 'notifications%': '<(notifications)',
[email protected]5d451ad2011-02-11 16:43:46683 'clang_use_chrome_plugins%': '<(clang_use_chrome_plugins)',
[email protected]970fd4e2012-12-19 11:09:37684 'mac_want_real_dsym%': '<(mac_want_real_dsym)',
[email protected]92799b632011-08-15 14:33:06685 'asan%': '<(asan)',
[email protected]c9a829272012-07-04 07:51:12686 'tsan%': '<(tsan)',
[email protected]7bdd7d7c2012-11-01 10:36:16687 'tsan_blacklist%': '<(tsan_blacklist)',
[email protected]7ce58b22012-09-26 05:17:25688 'clang_type_profiler%': '<(clang_type_profiler)',
[email protected]8a6abd12012-05-16 10:04:44689 'order_profiling%': '<(order_profiling)',
[email protected]00b0a7f2012-01-25 15:30:46690 'order_text_section%': '<(order_text_section)',
[email protected]6a3cd37e2012-04-17 17:13:34691 'enable_extensions%': '<(enable_extensions)',
[email protected]41ed4e82011-08-25 23:02:07692 'enable_web_intents%': '<(enable_web_intents)',
[email protected]5ffb0a42012-01-27 09:36:11693 'enable_web_intents_tag%': '<(enable_web_intents_tag)',
[email protected]18e0f39b2012-01-17 16:47:34694 'enable_plugin_installation%': '<(enable_plugin_installation)',
[email protected]6d17f6392012-12-05 05:24:54695 'enable_plugins%': '<(enable_plugins)',
[email protected]cdb756ef2012-04-05 18:34:53696 'enable_session_service%': '<(enable_session_service)',
[email protected]6b40bb582012-03-15 20:50:38697 'enable_themes%': '<(enable_themes)',
[email protected]4ffe78a2012-10-04 20:55:15698 'use_oem_wallpaper%': '<(use_oem_wallpaper)',
[email protected]0acdd772012-04-05 22:53:00699 'enable_background%': '<(enable_background)',
[email protected]b07806c12012-02-03 22:44:59700 'linux_use_gold_binary%': '<(linux_use_gold_binary)',
[email protected]8d726a42012-02-09 03:49:00701 'linux_use_gold_flags%': '<(linux_use_gold_flags)',
[email protected]62424a52012-03-18 03:09:50702 'use_canvas_skia%': '<(use_canvas_skia)',
[email protected]0ef3a522012-05-15 14:56:33703 'test_isolation_mode%': '<(test_isolation_mode)',
704 'test_isolation_outdir%': '<(test_isolation_outdir)',
[email protected]2e22e2f2012-03-15 21:53:10705 'enable_automation%': '<(enable_automation)',
[email protected]658677f2012-06-09 06:04:02706 'enable_printing%': '<(enable_printing)',
[email protected]6ee43a72012-12-07 22:44:40707 'enable_google_now%': '<(enable_google_now)',
[email protected]703369a2012-11-05 20:40:31708 'enable_language_detection%': '<(enable_language_detection)',
[email protected]e6026962012-06-14 21:28:32709 'enable_captive_portal_detection%': '<(enable_captive_portal_detection)',
[email protected]9bfe0ab2012-08-30 13:18:11710 'disable_ftp_support%': '<(disable_ftp_support)',
[email protected]44879ed2012-04-06 01:11:02711 'enable_task_manager%': '<(enable_task_manager)',
[email protected]740ebed2012-06-27 19:14:06712 'sas_dll_path%': '<(sas_dll_path)',
[email protected]49ae3e52012-04-12 09:50:12713 'wix_path%': '<(wix_path)',
[email protected]e190d272012-08-30 17:36:44714 'use_libjpeg_turbo%': '<(use_libjpeg_turbo)',
[email protected]adb44342012-07-23 13:36:12715 'use_system_libjpeg%': '<(use_system_libjpeg)',
[email protected]0115f042012-07-27 20:36:53716 'android_build_type%': '<(android_build_type)',
[email protected]dc4e8b82012-11-15 03:58:16717 'enable_app_list%': '<(enable_app_list)',
[email protected]cb800562012-11-20 22:36:07718 'use_default_render_theme%': '<(use_default_render_theme)',
[email protected]dc4e8b82012-11-15 03:58:16719 'enable_settings_app%': '<(enable_settings_app)',
[email protected]2b113652012-09-17 17:01:39720 'use_official_google_api_keys%': '<(use_official_google_api_keys)',
721 'google_api_key%': '<(google_api_key)',
722 'google_default_client_id%': '<(google_default_client_id)',
723 'google_default_client_secret%': '<(google_default_client_secret)',
[email protected]01971642012-03-07 14:39:56724
[email protected]2f325672012-10-31 23:29:37725 # Use system protobuf instead of bundled one.
726 'use_system_protobuf%': 0,
727
[email protected]371e1092011-10-12 20:37:36728 # Use system yasm instead of bundled one.
729 'use_system_yasm%': 0,
730
[email protected]cd00bd862012-02-29 00:40:36731 # Default to enabled PIE; this is important for ASLR but we may need to be
732 # able to turn it off for various reasons.
733 'linux_disable_pie%': 0,
734
[email protected]caa95c82009-11-23 22:39:32735 # The release channel that this build targets. This is used to restrict
736 # channel-specific build options, like which installer packages to create.
737 # The default is 'all', which does no channel-specific filtering.
738 'channel%': 'all',
739
[email protected]b3fb8092009-03-12 19:09:24740 # Override chromium_mac_pch and set it to 0 to suppress the use of
741 # precompiled headers on the Mac. Prefix header injection may still be
742 # used, but prefix headers will not be precompiled. This is useful when
743 # using distcc to distribute a build to compile slaves that don't
744 # share the same compiler executable as the system driving the compilation,
745 # because precompiled headers rely on pointers into a specific compiler
746 # executable's image. Setting this to 0 is needed to use an experimental
747 # Linux-Mac cross compiler distcc farm.
748 'chromium_mac_pch%': 1,
749
[email protected]27b687ec42012-03-26 22:22:15750 # The default value for mac_strip in target_defaults. This cannot be
751 # set there, per the comment about variable% in a target_defaults.
752 'mac_strip_release%': 1,
753
[email protected]f5ecbba12009-04-03 04:35:18754 # Set to 1 to enable code coverage. In addition to build changes
755 # (e.g. extra CFLAGS), also creates a new target in the src/chrome
756 # project file called "coverage".
757 # Currently ignored on Windows.
758 'coverage%': 0,
[email protected]653bd5f032009-04-08 12:55:49759
[email protected]9619e65d2012-05-23 19:06:52760 # Set to 1 to force Visual C++ to use legacy debug information format /Z7.
761 # This is useful for parallel compilation tools which can't support /Zi.
762 # Only used on Windows.
763 'win_z7%' : 0,
764
[email protected]7477ea6f2009-12-22 23:28:15765 # Although base/allocator lets you select a heap library via an
[email protected]7e0d664a2009-12-03 21:07:47766 # environment variable, the libcmt shim it uses sometimes gets in
767 # the way. To disable it entirely, and switch to normal msvcrt, do e.g.
768 # 'win_use_allocator_shim': 0,
769 # 'win_release_RuntimeLibrary': 2
770 # to ~/.gyp/include.gypi, gclient runhooks --force, and do a release build.
[email protected]8974e042010-06-21 18:06:52771 'win_use_allocator_shim%': 1, # 1 = shim allocator via libcmt; 0 = msvcrt
[email protected]279cd4212009-09-11 22:32:11772
[email protected]95ff8082009-11-13 22:21:01773 # Whether usage of OpenMAX is enabled.
774 'enable_openmax%': 0,
775
[email protected]d01120e62010-05-10 17:04:48776 # Whether proprietary audio/video codecs are assumed to be included with
777 # this build (only meaningful if branding!=Chrome).
778 'proprietary_codecs%': 0,
779
[email protected]e5b2eaa2009-04-14 01:39:12780 # TODO(bradnelson): eliminate this when possible.
781 # To allow local gyp files to prevent release.vsprops from being included.
782 # Yes(1) means include release.vsprops.
783 # Once all vsprops settings are migrated into gyp, this can go away.
784 'msvs_use_common_release%': 1,
[email protected]606116d22009-05-06 22:38:23785
[email protected]cbd5fd52009-08-26 00:14:27786 # TODO(bradnelson): eliminate this when possible.
787 # To allow local gyp files to override additional linker options for msvs.
788 # Yes(1) means set use the common linker options.
[email protected]48c7af72009-07-03 22:00:19789 'msvs_use_common_linker_extras%': 1,
790
[email protected]1ffb6502009-06-02 07:46:24791 # TODO(sgk): eliminate this if possible.
792 # It would be nicer to support this via a setting in 'target_defaults'
793 # in chrome/app/locales/locales.gypi overriding the setting in the
794 # 'Debug' configuration in the 'target_defaults' dict below,
795 # but that doesn't work as we'd like.
796 'msvs_debug_link_incremental%': '2',
797
[email protected]1f790ef2011-01-11 20:45:36798 # Needed for some of the largest modules.
799 'msvs_debug_link_nonincremental%': '1',
800
[email protected]6f390be2012-08-16 18:57:10801 # Turns on Use Library Dependency Inputs for linking chrome.dll on Windows
[email protected]5ab8f482011-08-18 18:30:06802 # to get incremental linking to be faster in debug builds.
[email protected]8f1da83d2012-08-06 21:49:26803 'incremental_chrome_dll%': '0',
[email protected]5ab8f482011-08-18 18:30:06804
[email protected]c54b41cb2012-08-24 20:58:24805 # The default settings for third party code for treating
806 # warnings-as-errors. Ideally, this would not be required, however there
807 # is some third party code that takes a long time to fix/roll. So, this
808 # flag allows us to have warnings as errors in general to prevent
809 # regressions in most modules, while working on the bits that are
810 # remaining.
811 'win_third_party_warn_as_error%': 'true',
812
[email protected]573136142009-07-15 22:48:37813 # This is the location of the sandbox binary. Chrome looks for this before
814 # running the zygote process. If found, and SUID, it will be used to
815 # sandbox the zygote process and, thus, all renderer processes.
816 'linux_sandbox_path%': '',
817
[email protected]ad6d2c42009-09-15 20:13:38818 # Set this to true to enable SELinux support.
819 'selinux%': 0,
[email protected]4c9cc6c2009-10-01 18:54:57820
[email protected]3bb37e62012-04-19 03:40:08821 # Clang stuff.
822 'clang%': '<(clang)',
[email protected]e4ddf332011-10-20 21:52:24823 'make_clang_dir%': 'third_party/llvm-build/Release+Asserts',
[email protected]58680ce2010-09-18 00:09:15824
[email protected]5e781232011-01-28 02:57:59825 # These two variables can be set in GYP_DEFINES while running
826 # |gclient runhooks| to let clang run a plugin in every compilation.
827 # Only has an effect if 'clang=1' is in GYP_DEFINES as well.
828 # Example:
[email protected]93120fe2011-02-03 20:46:42829 # 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:59830
831 'clang_load%': '',
832 'clang_add_plugin%': '',
833
[email protected]da1c8d692011-09-20 20:35:01834 # The default type of gtest.
835 'gtest_target_type%': 'executable',
836
[email protected]7664ab32011-02-01 23:35:25837 # Enable sampling based profiler.
838 # See http://google-perftools.googlecode.com/svn/trunk/doc/cpuprofile.html
839 'profiling%': '0',
840
[email protected]93b373502011-08-16 19:06:22841 # Enable strict glibc debug mode.
842 'glibcxx_debug%': 0,
843
[email protected]36532f332010-08-25 00:22:01844 # Override whether we should use Breakpad on Linux. I.e. for Chrome bot.
845 'linux_breakpad%': 0,
846 # And if we want to dump symbols for Breakpad-enabled builds.
847 'linux_dump_symbols%': 0,
848 # And if we want to strip the binary after dumping symbols.
[email protected]05cb6962009-10-01 23:29:03849 'linux_strip_binary%': 0,
[email protected]1d87c282010-09-15 22:24:49850 # Strip the test binaries needed for Linux reliability tests.
851 'linux_strip_reliability_tests%': 0,
[email protected]05cb6962009-10-01 23:29:03852
[email protected]46ce5b562010-06-16 18:39:53853 # Enable TCMalloc.
854 'linux_use_tcmalloc%': 1,
[email protected]01699e22009-11-11 19:24:24855
[email protected]d8b60602010-03-26 09:41:22856 # Disable TCMalloc's heapchecker.
857 'linux_use_heapchecker%': 0,
858
[email protected]64e2d4a42010-08-27 10:13:21859 # Disable shadow stack keeping used by heapcheck to unwind the stacks
860 # better.
861 'linux_keep_shadow_stacks%': 0,
862
[email protected]556c5d72010-06-10 05:45:01863 # Set to 1 to link against libgnome-keyring instead of using dlopen().
864 'linux_link_gnome_keyring%': 0,
[email protected]abcc9ac2011-05-16 20:04:35865 # Set to 1 to link against gsettings APIs instead of using dlopen().
866 'linux_link_gsettings%': 0,
[email protected]556c5d72010-06-10 05:45:01867
[email protected]77c1b29392009-12-04 06:21:29868 # Set Thumb compilation flags.
869 'arm_thumb%': 0,
870
[email protected]53e0f642010-03-05 01:41:56871 # Set ARM fpu compilation flags (only meaningful if armv7==1 and
872 # arm_neon==0).
873 'arm_fpu%': 'vfpv3',
874
[email protected]5252af72012-05-04 19:26:40875 # Set ARM float abi compilation flag.
876 'arm_float_abi%': 'softfp',
877
[email protected]9821d0d2010-04-16 22:40:37878 # Enable new NPDevice API.
879 'enable_new_npdevice_api%': 0,
[email protected]ed154592010-04-29 00:18:50880
881 # Enable EGLImage support in OpenMAX
[email protected]58023be2011-02-04 20:34:14882 'enable_eglimage%': 1,
[email protected]ed154592010-04-29 00:18:50883
[email protected]6f51b27e2010-06-22 20:43:53884 # Enable a variable used elsewhere throughout the GYP files to determine
885 # whether to compile in the sources for the GPU plugin / process.
886 'enable_gpu%': 1,
887
[email protected]e72e55b2011-01-06 22:19:30888 # .gyp files or targets should set chromium_code to 1 if they build
889 # Chromium-specific code, as opposed to external code. This variable is
890 # used to control such things as the set of warnings to enable, and
891 # whether warnings are treated as errors.
892 'chromium_code%': 0,
893
[email protected]8d726a42012-02-09 03:49:00894 'release_valgrind_build%': 0,
895
[email protected]b1eb341c2011-11-09 18:46:07896 # TODO(thakis): Make this a blacklist instead, http://crbug.com/101600
897 'enable_wexit_time_destructors%': 0,
898
[email protected]e72e55b2011-01-06 22:19:30899 # Set to 1 to compile with the built in pdf viewer.
900 'internal_pdf%': 0,
901
[email protected]9e1149d72012-07-24 01:27:17902 # Set to 1 to compile with the OpenGL ES 2.0 conformance tests.
903 'internal_gles2_conform_tests%': 0,
904
[email protected]e72e55b2011-01-06 22:19:30905 # NOTE: When these end up in the Mac bundle, we need to replace '-' for '_'
906 # so Cocoa is happy (http://crbug.com/20441).
907 'locales': [
908 'am', 'ar', 'bg', 'bn', 'ca', 'cs', 'da', 'de', 'el', 'en-GB',
909 'en-US', 'es-419', 'es', 'et', 'fa', 'fi', 'fil', 'fr', 'gu', 'he',
910 'hi', 'hr', 'hu', 'id', 'it', 'ja', 'kn', 'ko', 'lt', 'lv',
[email protected]507066e2012-10-26 10:50:47911 'ml', 'mr', 'ms', 'nb', 'nl', 'pl', 'pt-PT', 'ro', 'ru',
[email protected]e72e55b2011-01-06 22:19:30912 'sk', 'sl', 'sr', 'sv', 'sw', 'ta', 'te', 'th', 'tr', 'uk',
913 'vi', 'zh-CN', 'zh-TW',
914 ],
915
[email protected]cc0322d2011-07-24 09:29:19916 # Pseudo locales are special locales which are used for testing and
917 # debugging. They don't get copied to the final app. For more info,
918 # check out https://sites.google.com/a/chromium.org/dev/Home/fake-bidi
919 'pseudo_locales': [
920 'fake-bidi',
921 ],
922
[email protected]bb6aba32011-01-07 19:04:43923 'grit_defines': [],
924
[email protected]bd3bd442011-03-28 07:58:51925 # If debug_devtools is set to 1, JavaScript files for DevTools are
926 # stored as is and loaded from disk. Otherwise, a concatenated file
927 # is stored in resources.pak. It is still possible to load JS files
928 # from disk by passing --debug-devtools cmdline switch.
929 'debug_devtools%': 0,
930
[email protected]464750f2011-10-24 23:16:18931 # The Java Bridge is not compiled in by default.
932 'java_bridge%': 0,
933
[email protected]1e013672012-06-29 22:12:20934 # Code signing for iOS binaries. The bots need to be able to disable this.
935 'chromium_ios_signing%': 1,
936
[email protected]33e1c372011-12-14 16:32:07937 # This flag is only used when disable_nacl==0 and disables all those
938 # subcomponents which would require the installation of a native_client
939 # untrusted toolchain.
940 'disable_nacl_untrusted%': 0,
941
[email protected]407dfa632011-12-23 11:59:35942 # Disable Dart by default.
943 'enable_dart%': 0,
944
[email protected]ff10b132012-02-29 22:53:30945 # The desired version of Windows SDK can be set in ~/.gyp/include.gypi.
946 'msbuild_toolset%': '',
947
[email protected]836285f22012-04-03 16:19:26948 # Native Client is enabled by default.
949 'disable_nacl%': 0,
950
[email protected]fa9d4e262012-08-21 04:39:00951 # Whether to build full debug version for Debug configuration on Android.
952 # Compared to full debug version, the default Debug configuration on Android
953 # has no full v8 debug, has size optimization and linker gc section, so that
954 # we can build a debug version with acceptable size and performance.
955 'android_full_debug%': 0,
956
[email protected]65885272012-10-05 23:55:50957 # Sets the default version name and code for Android app, by default we
958 # do a developer build.
959 'android_app_version_name%': 'Developer Build',
960 'android_app_version_code%': 0,
961
[email protected]740ebed2012-06-27 19:14:06962 'sas_dll_exists': '<!(python <(DEPTH)/build/dir_exists.py <(sas_dll_path))',
[email protected]49ae3e52012-04-12 09:50:12963 'wix_exists': '<!(python <(DEPTH)/build/dir_exists.py <(wix_path))',
964
[email protected]1f8d9402012-07-06 22:47:56965 'windows_sdk_default_path': '<(DEPTH)/third_party/platformsdk_win8/files',
966 'directx_sdk_default_path': '<(DEPTH)/third_party/directxsdk/files',
[email protected]1ab48032012-07-02 21:48:05967
[email protected]fd6d8822012-12-08 06:56:11968 # Whether we are using the rlz library or not. Platforms like Android send
969 # rlz codes for searches but do not use the library.
[email protected]b6a5ac92012-10-29 18:17:22970 'enable_rlz%': 0,
971
[email protected]912c55c2009-07-31 23:33:55972 'conditions': [
[email protected]1f8d9402012-07-06 22:47:56973 ['OS=="win" and "<!(python <(DEPTH)/build/dir_exists.py <(windows_sdk_default_path))"=="True"', {
974 'windows_sdk_path%': '<(windows_sdk_default_path)',
975 }, {
976 'windows_sdk_path%': 'C:/Program Files (x86)/Windows Kits/8.0',
977 }],
978 ['OS=="win" and "<!(python <(DEPTH)/build/dir_exists.py <(directx_sdk_default_path))"=="True"', {
979 'directx_sdk_path%': '<(directx_sdk_default_path)',
980 }, {
981 'directx_sdk_path%': '$(DXSDK_DIR)',
982 }],
[email protected]54184ce72012-10-18 07:11:26983 ['OS=="win"', {
984 'windows_driver_kit_path%': '$(WDK_DIR)',
985 }],
[email protected]2b113652012-09-17 17:01:39986 # If use_official_google_api_keys is already set (to 0 or 1), we
987 # do none of the implicit checking. If it is set to 1 and the
988 # internal keys file is missing, the build will fail at compile
989 # time. If it is set to 0 and keys are not provided by other
990 # means, a warning will be printed at compile time.
991 ['use_official_google_api_keys==2', {
992 'use_official_google_api_keys%':
993 '<!(python <(DEPTH)/google_apis/build/check_internal.py <(DEPTH)/google_apis/internal/google_chrome_api_keys.h)',
994 }],
[email protected]1e013672012-06-29 22:12:20995 ['os_posix==1 and OS!="mac" and OS!="ios"', {
[email protected]4d83eb72010-03-04 16:42:23996 # Figure out the python architecture to decide if we build pyauto.
[email protected]945361a2011-09-30 04:38:43997 '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:27998 'conditions': [
[email protected]07c27ab02012-07-17 17:00:20999 # TODO(glider): set clang to 1 earlier for ASan and TSan builds so
1000 # that it takes effect here.
1001 ['clang==0 and asan==0 and tsan==0', {
1002 # This will set gcc_version to XY if you are running gcc X.Y.*.
1003 # This is used to tweak build flags for gcc 4.5.
1004 'gcc_version%': '<!(python <(DEPTH)/build/compiler_version.py)',
1005 }, {
1006 'gcc_version%': 0,
1007 }],
[email protected]2a77a9d2010-08-26 19:58:101008 ['branding=="Chrome"', {
[email protected]cbd5fd52009-08-26 00:14:271009 'linux_breakpad%': 1,
[email protected]cbd5fd52009-08-26 00:14:271010 }],
[email protected]4c9cc6c2009-10-01 18:54:571011 # All Chrome builds have breakpad symbols, but only process the
1012 # symbols from official builds.
[email protected]c913cb82010-08-31 19:44:081013 ['(branding=="Chrome" and buildtype=="Official")', {
[email protected]4c9cc6c2009-10-01 18:54:571014 'linux_dump_symbols%': 1,
[email protected]4c9cc6c2009-10-01 18:54:571015 }],
[email protected]cbd5fd52009-08-26 00:14:271016 ],
[email protected]1e013672012-06-29 22:12:201017 }], # os_posix==1 and OS!="mac" and OS!="ios"
[email protected]0d16f292012-07-02 22:10:481018 ['OS=="ios"', {
1019 'disable_nacl%': 1,
[email protected]a95d5302012-11-03 00:02:191020 'enable_background%': 0,
[email protected]aeaaaf02012-09-10 17:46:151021 'enable_gpu%': 0,
[email protected]a35aa362012-10-30 13:55:071022 'enable_task_manager%': 0,
[email protected]abde6732012-08-16 16:10:351023 'icu_use_data_file_flag%': 1,
[email protected]861557e2012-07-24 16:27:151024 'use_system_bzip2%': 1,
[email protected]4e3996f92012-07-17 10:41:131025 'use_system_libxml%': 1,
[email protected]073bef82012-07-24 18:03:471026 'use_system_sqlite%': 1,
[email protected]57871bc2012-08-20 16:28:121027
1028 # The Mac SDK is set for iOS builds and passed through to Mac
1029 # sub-builds. This allows the Mac sub-build SDK in an iOS build to be
1030 # overridden from the command line the same way it is for a Mac build.
1031 'mac_sdk%': '<!(python <(DEPTH)/build/mac/find_sdk.py 10.6)',
[email protected]2c261532012-10-06 00:46:291032
1033 # iOS SDK and deployment target support. The iOS 5.0 SDK is actually
1034 # what is required, but the value is left blank so when it is set in
1035 # the project files it will be the "current" iOS SDK. Forcing 5.0
1036 # even though it is "current" causes Xcode to spit out a warning for
1037 # every single project file for not using the "current" SDK.
1038 'ios_sdk%': '',
1039 'ios_sdk_path%': '',
1040 'ios_deployment_target%': '4.3',
[email protected]fcd634182012-10-09 10:50:321041
1042 'conditions': [
1043 # ios_product_name is set to the name of the .app bundle as it should
1044 # appear on disk.
1045 ['branding=="Chrome"', {
1046 'ios_product_name%': 'Chrome',
1047 }, { # else: branding!="Chrome"
1048 'ios_product_name%': 'Chromium',
1049 }],
1050 ['branding=="Chrome" and buildtype=="Official"', {
1051 'ios_breakpad%': 1,
1052 }, { # else: branding!="Chrome" or buildtype!="Official"
1053 'ios_breakpad%': 0,
1054 }],
1055 ],
1056 }], # OS=="ios"
[email protected]da1c8d692011-09-20 20:35:011057 ['OS=="android"', {
1058 # Location of Android NDK.
1059 'variables': {
1060 'variables': {
[email protected]8157ea92c2012-09-21 02:27:511061 'variables': {
1062 'android_ndk_root%': '<!(/bin/echo -n $ANDROID_NDK_ROOT)',
1063 },
1064 'android_ndk_root%': '<(android_ndk_root)',
[email protected]febd3572012-05-03 09:17:451065 'conditions': [
1066 ['target_arch == "ia32"', {
[email protected]de5b7a42012-05-16 06:18:411067 'android_app_abi%': 'x86',
[email protected]8157ea92c2012-09-21 02:27:511068 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-9/arch-x86',
[email protected]de5b7a42012-05-16 06:18:411069 }],
[email protected]8157ea92c2012-09-21 02:27:511070 ['target_arch=="arm"', {
1071 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-9/arch-arm',
1072 'conditions': [
1073 ['armv7==0', {
1074 'android_app_abi%': 'armeabi',
1075 }, {
1076 'android_app_abi%': 'armeabi-v7a',
1077 }],
1078 ],
[email protected]febd3572012-05-03 09:17:451079 }],
1080 ],
[email protected]da1c8d692011-09-20 20:35:011081 },
1082 'android_ndk_root%': '<(android_ndk_root)',
[email protected]de5b7a42012-05-16 06:18:411083 'android_app_abi%': '<(android_app_abi)',
[email protected]8157ea92c2012-09-21 02:27:511084 'android_ndk_sysroot%': '<(android_ndk_sysroot)',
[email protected]da1c8d692011-09-20 20:35:011085 },
1086 'android_ndk_root%': '<(android_ndk_root)',
1087 'android_ndk_sysroot': '<(android_ndk_sysroot)',
1088 'android_ndk_include': '<(android_ndk_sysroot)/usr/include',
1089 'android_ndk_lib': '<(android_ndk_sysroot)/usr/lib',
[email protected]de5b7a42012-05-16 06:18:411090 'android_app_abi%': '<(android_app_abi)',
[email protected]da1c8d692011-09-20 20:35:011091
[email protected]c0f76312012-08-16 13:52:041092 # Location of the "strip" binary, used by both gyp and scripts.
1093 'android_strip%' : '<!(/bin/echo -n <(android_toolchain)/*-strip)',
1094
[email protected]ef7ed7a2012-05-29 23:19:131095 # Provides an absolute path to PRODUCT_DIR (e.g. out/Release). Used
1096 # to specify the output directory for Ant in the Android build.
1097 'ant_build_out': '`cd <(PRODUCT_DIR) && pwd -P`',
1098
[email protected]da1c8d692011-09-20 20:35:011099 # Uses Android's crash report system
1100 'linux_breakpad%': 0,
1101
1102 # Always uses openssl.
1103 'use_openssl%': 1,
1104
1105 'proprietary_codecs%': '<(proprietary_codecs)',
[email protected]44879ed2012-04-06 01:11:021106 'enable_task_manager%': 0,
[email protected]23a30e62012-12-01 03:39:071107 'safe_browsing%': 2,
[email protected]da1c8d692011-09-20 20:35:011108 'configuration_policy%': 0,
[email protected]9eb100e2011-10-14 05:08:221109 'input_speech%': 0,
[email protected]7e199322012-03-13 20:04:561110 'enable_web_intents%': 0,
[email protected]658677f2012-06-09 06:04:021111 'enable_automation%': 0,
[email protected]464750f2011-10-24 23:16:181112 'java_bridge%': 1,
[email protected]48de0fc2012-08-02 11:03:581113 'build_ffmpegsumo%': 0,
1114 'linux_use_tcmalloc%': 0,
[email protected]658677f2012-06-09 06:04:021115
[email protected]ad17e342012-07-17 20:45:481116 # Disable Native Client.
1117 'disable_nacl%': 1,
1118
[email protected]58242012012-04-12 16:14:311119 # Android does not support background apps.
[email protected]0acdd772012-04-05 22:53:001120 'enable_background%': 0,
[email protected]5fd2e842012-03-01 00:29:111121
[email protected]cdb756ef2012-04-05 18:34:531122 # Sessions are store separately in the Java side.
1123 'enable_session_service%': 0,
1124
[email protected]5fd2e842012-03-01 00:29:111125 # Set to 1 once we have a notification system for Android.
1126 # http://crbug.com/115320
[email protected]7cce3232011-10-28 10:41:571127 'notifications%': 0,
[email protected]da1c8d692011-09-20 20:35:011128
[email protected]ad17e342012-07-17 20:45:481129 'p2p_apis%' : 0,
1130
[email protected]7b56f1872012-05-23 00:48:501131 # TODO(jrg): when 'gtest_target_type'=='shared_library' and
[email protected]d9f96952012-04-19 21:02:091132 # OS==android, make all gtest_targets depend on
1133 # testing/android/native_test.gyp:native_test_apk.
[email protected]48de0fc2012-08-02 11:03:581134 'gtest_target_type%': 'shared_library',
[email protected]da1c8d692011-09-20 20:35:011135
1136 # Uses system APIs for decoding audio and video.
1137 'use_libffmpeg%': '0',
1138
[email protected]f1dc1e52012-12-12 21:39:001139 # Always use the chromium skia.
[email protected]da1c8d692011-09-20 20:35:011140 'use_system_skia%': '0',
[email protected]da1c8d692011-09-20 20:35:011141
[email protected]f5c7758a2012-07-25 16:17:571142 # Configure crash reporting and build options based on release type.
[email protected]ad17e342012-07-17 20:45:481143 'conditions': [
[email protected]ad17e342012-07-17 20:45:481144 ['buildtype=="Official"', {
[email protected]f5c7758a2012-07-25 16:17:571145 # Only report crash dumps for Official builds.
[email protected]ad17e342012-07-17 20:45:481146 'linux_breakpad%': 1,
1147 }, {
1148 'linux_breakpad%': 0,
1149 }],
1150 ],
1151
[email protected]adb44342012-07-23 13:36:121152 # When building as part of the Android system, use system libraries
1153 # where possible to reduce ROM size.
1154 # TODO(steveblock): Investigate using the system version of sqlite.
[email protected]3a820d12012-06-27 12:56:321155 'use_system_sqlite%': 0, # '<(android_build_type)',
[email protected]03bdcc122012-07-10 09:02:251156 'use_system_expat%': '<(android_build_type)',
[email protected]ad17e342012-07-17 20:45:481157 'use_system_icu%': '<(android_build_type)',
[email protected]f91ba812012-07-11 00:00:511158 'use_system_stlport%': '<(android_build_type)',
[email protected]adb44342012-07-23 13:36:121159
[email protected]da1c8d692011-09-20 20:35:011160 # Copy it out one scope.
1161 'android_build_type%': '<(android_build_type)',
1162 }], # OS=="android"
[email protected]e14a9f92009-08-05 19:26:071163 ['OS=="mac"', {
[email protected]2c261532012-10-06 00:46:291164 'variables': {
1165 # Mac OS X SDK and deployment target support. The SDK identifies
1166 # the version of the system headers that will be used, and
1167 # corresponds to the MAC_OS_X_VERSION_MAX_ALLOWED compile-time
1168 # macro. "Maximum allowed" refers to the operating system version
1169 # whose APIs are available in the headers. The deployment target
1170 # identifies the minimum system version that the built products are
1171 # expected to function on. It corresponds to the
1172 # MAC_OS_X_VERSION_MIN_REQUIRED compile-time macro. To ensure these
1173 # macros are available, #include <AvailabilityMacros.h>. Additional
1174 # documentation on these macros is available at
1175 # http://developer.apple.com/mac/library/technotes/tn2002/tn2064.html#SECTION3
1176 # Chrome normally builds with the Mac OS X 10.6 SDK and sets the
1177 # deployment target to 10.6. Other projects, such as O3D, may
1178 # override these defaults.
1179
1180 # Normally, mac_sdk_min is used to find an SDK that Xcode knows
1181 # about that is at least the specified version. In official builds,
1182 # the SDK must match mac_sdk_min exactly. If the SDK is installed
1183 # someplace that Xcode doesn't know about, set mac_sdk_path to the
1184 # path to the SDK; when set to a non-empty string, SDK detection
1185 # based on mac_sdk_min will be bypassed entirely.
1186 'mac_sdk_min%': '10.6',
1187 'mac_sdk_path%': '',
1188
1189 'mac_deployment_target%': '10.6',
1190 },
1191
1192 'mac_sdk_min': '<(mac_sdk_min)',
1193 'mac_sdk_path': '<(mac_sdk_path)',
1194 'mac_deployment_target': '<(mac_deployment_target)',
1195
[email protected]e1ece302011-09-15 03:58:111196 # Enable clang on mac by default!
1197 'clang%': 1,
[email protected]2c261532012-10-06 00:46:291198
[email protected]794fb4782011-12-14 19:10:561199 # Compile in Breakpad support by default so that it can be
1200 # tested, even if it is not enabled by default at runtime.
1201 'mac_breakpad_compiled_in%': 1,
[email protected]e14a9f92009-08-05 19:26:071202 'conditions': [
1203 # mac_product_name is set to the name of the .app bundle as it should
1204 # appear on disk. This duplicates data from
1205 # chrome/app/theme/chromium/BRANDING and
1206 # chrome/app/theme/google_chrome/BRANDING, but is necessary to get
1207 # these names into the build system.
1208 ['branding=="Chrome"', {
1209 'mac_product_name%': 'Google Chrome',
1210 }, { # else: branding!="Chrome"
1211 'mac_product_name%': 'Chromium',
1212 }],
1213
[email protected]e14a9f92009-08-05 19:26:071214 ['branding=="Chrome" and buildtype=="Official"', {
[email protected]2c261532012-10-06 00:46:291215 '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:561216 # Enable uploading crash dumps.
1217 'mac_breakpad_uploads%': 1,
1218 # Enable dumping symbols at build time for use by Mac Breakpad.
[email protected]e14a9f92009-08-05 19:26:071219 'mac_breakpad%': 1,
[email protected]794fb4782011-12-14 19:10:561220 # Enable Keystone auto-update support.
[email protected]e14a9f92009-08-05 19:26:071221 'mac_keystone%': 1,
1222 }, { # else: branding!="Chrome" or buildtype!="Official"
[email protected]2c261532012-10-06 00:46:291223 'mac_sdk%': '<!(python <(DEPTH)/build/mac/find_sdk.py <(mac_sdk_min))',
[email protected]794fb4782011-12-14 19:10:561224 'mac_breakpad_uploads%': 0,
[email protected]e14a9f92009-08-05 19:26:071225 'mac_breakpad%': 0,
1226 'mac_keystone%': 0,
1227 }],
1228 ],
1229 }], # OS=="mac"
[email protected]912c55c2009-07-31 23:33:551230 ['OS=="win"', {
1231 'conditions': [
[email protected]8974e042010-06-21 18:06:521232 ['component=="shared_library"', {
1233 'win_use_allocator_shim%': 0,
1234 }],
[email protected]fa0f16e2012-08-20 22:30:041235 ['component=="shared_library" and "<(GENERATOR)"=="ninja"', {
[email protected]6f390be2012-08-16 18:57:101236 # Only enabled by default for ninja because it's buggy in VS.
[email protected]fa0f16e2012-08-20 22:30:041237 # Not enabled for component=static_library because some targets
1238 # are too large and the toolchain fails due to the size of the
1239 # .obj files.
[email protected]6f390be2012-08-16 18:57:101240 'incremental_chrome_dll%': 1,
1241 }],
[email protected]10bb8c92009-08-07 21:16:031242 # Don't do incremental linking for large modules on 32-bit.
1243 ['MSVS_OS_BITS==32', {
1244 'msvs_large_module_debug_link_mode%': '1', # No
1245 },{
1246 'msvs_large_module_debug_link_mode%': '2', # Yes
1247 }],
[email protected]3e2648a2011-03-21 20:58:501248 ['MSVS_VERSION=="2010e" or MSVS_VERSION=="2008e" or MSVS_VERSION=="2005e"', {
1249 'msvs_express%': 1,
1250 'secure_atl%': 0,
1251 },{
1252 'msvs_express%': 0,
1253 'secure_atl%': 1,
1254 }],
[email protected]912c55c2009-07-31 23:33:551255 ],
[email protected]ef4fa4072009-12-04 22:46:501256 'nacl_win64_defines': [
1257 # This flag is used to minimize dependencies when building
1258 # Native Client loader for 64-bit Windows.
1259 'NACL_WIN64',
1260 ],
[email protected]912c55c2009-07-31 23:33:551261 }],
[email protected]bb6aba32011-01-07 19:04:431262
[email protected]a35aa362012-10-30 13:55:071263 ['os_posix==1 and chromeos==0 and OS!="android" and OS!="ios"', {
[email protected]8e553f42010-10-25 20:05:441264 'use_cups%': 1,
1265 }, {
1266 'use_cups%': 0,
1267 }],
[email protected]bb6aba32011-01-07 19:04:431268
[email protected]2f7da672012-06-21 08:38:321269 # Native Client glibc toolchain is enabled by default except on arm.
1270 ['target_arch=="arm"', {
1271 'disable_glibc%': 1,
1272 }, {
1273 'disable_glibc%': 0,
1274 }],
1275
[email protected]712c3da2012-09-24 21:31:241276 # Disable SSE2 when building for ARM or MIPS.
1277 ['target_arch=="arm" or target_arch=="mipsel"', {
1278 'disable_sse2%': 1,
1279 }, {
1280 'disable_sse2%': '<(disable_sse2)',
1281 }],
1282
[email protected]19fe8f0b2010-12-07 07:27:271283 # Set the relative path from this file to the GYP file of the JPEG
1284 # library used by Chromium.
[email protected]d9113542012-07-18 17:11:281285 ['use_system_libjpeg==1 or use_libjpeg_turbo==0', {
1286 # Configuration for using the system libjeg is here.
[email protected]19fe8f0b2010-12-07 07:27:271287 'libjpeg_gyp_path': '../third_party/libjpeg/libjpeg.gyp',
[email protected]d9113542012-07-18 17:11:281288 }, {
1289 'libjpeg_gyp_path': '../third_party/libjpeg_turbo/libjpeg.gyp',
1290 }],
[email protected]bb6aba32011-01-07 19:04:431291
[email protected]abcc9ac2011-05-16 20:04:351292 # Options controlling the use of GConf (the classic GNOME configuration
1293 # system) and GIO, which contains GSettings (the new GNOME config system).
[email protected]1c6fe29302011-01-20 22:14:311294 ['chromeos==1', {
1295 'use_gconf%': 0,
[email protected]abcc9ac2011-05-16 20:04:351296 'use_gio%': 0,
[email protected]1c6fe29302011-01-20 22:14:311297 }, {
1298 'use_gconf%': 1,
[email protected]abcc9ac2011-05-16 20:04:351299 'use_gio%': 1,
[email protected]1c6fe29302011-01-20 22:14:311300 }],
1301
[email protected]4de39f82011-03-28 12:01:291302 # Set up -D and -E flags passed into grit.
[email protected]1660bffd2011-03-23 16:24:291303 ['branding=="Chrome"', {
1304 # TODO(mmoss) The .grd files look for _google_chrome, but for
1305 # consistency they should look for google_chrome_build like C++.
[email protected]4de39f82011-03-28 12:01:291306 'grit_defines': ['-D', '_google_chrome',
1307 '-E', 'CHROMIUM_BUILD=google_chrome'],
[email protected]1660bffd2011-03-23 16:24:291308 }, {
[email protected]4de39f82011-03-28 12:01:291309 'grit_defines': ['-D', '_chromium',
1310 '-E', 'CHROMIUM_BUILD=chromium'],
[email protected]1660bffd2011-03-23 16:24:291311 }],
[email protected]bb6aba32011-01-07 19:04:431312 ['chromeos==1', {
[email protected]d4d81e92012-06-04 20:10:131313 'grit_defines': ['-D', 'chromeos', '-D', 'scale_factors=2x'],
[email protected]bb6aba32011-01-07 19:04:431314 }],
1315 ['toolkit_views==1', {
1316 'grit_defines': ['-D', 'toolkit_views'],
1317 }],
[email protected]8dd791d2011-09-16 16:37:301318 ['use_aura==1', {
1319 'grit_defines': ['-D', 'use_aura'],
1320 }],
[email protected]ed329be2012-01-03 22:02:161321 ['use_ash==1', {
1322 'grit_defines': ['-D', 'use_ash'],
1323 }],
[email protected]c329adf82011-10-05 14:34:571324 ['use_nss==1', {
1325 'grit_defines': ['-D', 'use_nss'],
1326 }],
[email protected]e47c32032011-03-01 19:26:201327 ['file_manager_extension==1', {
1328 'grit_defines': ['-D', 'file_manager_extension'],
1329 }],
[email protected]9a425422011-01-11 00:53:181330 ['remoting==1', {
1331 'grit_defines': ['-D', 'remoting'],
1332 }],
[email protected]bb6aba32011-01-07 19:04:431333 ['use_titlecase_in_grd_files==1', {
1334 'grit_defines': ['-D', 'use_titlecase'],
1335 }],
[email protected]00dc155832011-02-01 18:51:191336 ['use_third_party_translations==1', {
1337 'grit_defines': ['-D', 'use_third_party_translations'],
[email protected]fb6c1022011-06-27 21:58:121338 'locales': [
[email protected]8581e1ba2011-08-22 23:27:161339 'ast', 'bs', 'ca@valencia', 'en-AU', 'eo', 'eu', 'gl', 'hy', 'ia',
1340 'ka', 'ku', 'kw', 'ms', 'ug'
[email protected]fb6c1022011-06-27 21:58:121341 ],
[email protected]00dc155832011-02-01 18:51:191342 }],
[email protected]da1c8d692011-09-20 20:35:011343 ['OS=="android"', {
1344 'grit_defines': ['-D', 'android'],
1345 }],
[email protected]d39e3862012-06-26 22:38:231346 ['OS=="mac"', {
1347 'grit_defines': ['-D', 'scale_factors=2x'],
1348 }],
[email protected]ad563d02012-10-03 10:37:031349 ['OS == "ios"', {
1350 'grit_defines': [
1351 # define for iOS specific resources.
1352 '-D', 'ios',
1353 # iOS uses a whitelist to filter resources.
1354 '-w', '<(DEPTH)/build/ios/grit_whitelist.txt'
1355 ],
[email protected]507066e2012-10-26 10:50:471356 # iOS uses pt instead of pt-BR.
1357 'locales': ['pt'],
1358 }, { # OS != "ios"
1359 'locales': ['pt-BR'],
[email protected]ad563d02012-10-03 10:37:031360 }],
[email protected]6a3cd37e2012-04-17 17:13:341361 ['enable_extensions==1', {
1362 'grit_defines': ['-D', 'enable_extensions'],
1363 }],
[email protected]658677f2012-06-09 06:04:021364 ['enable_printing==1', {
1365 'grit_defines': ['-D', 'enable_printing'],
1366 }],
[email protected]c2aad542012-07-31 20:40:331367 ['enable_themes==1', {
1368 'grit_defines': ['-D', 'enable_themes'],
1369 }],
[email protected]4ffe78a2012-10-04 20:55:151370 ['use_oem_wallpaper==1', {
1371 'grit_defines': ['-D', 'use_oem_wallpaper'],
1372 }],
[email protected]ef1dd5062012-12-17 06:41:331373 ['enable_app_list==1', {
1374 'grit_defines': ['-D', 'enable_app_list'],
1375 }],
[email protected]dc4e8b82012-11-15 03:58:161376 ['enable_settings_app==1', {
1377 'grit_defines': ['-D', 'enable_settings_app'],
1378 }],
[email protected]3bb37e62012-04-19 03:40:081379 ['clang_use_chrome_plugins==1 and OS!="win"', {
[email protected]890ebb72012-06-27 05:02:201380 'clang_chrome_plugins_flags': [
1381 '<!@(<(DEPTH)/tools/clang/scripts/plugin_flags.sh)'
[email protected]c872dc52012-05-19 06:36:311382 ],
[email protected]5d451ad2011-02-11 16:43:461383 }],
[email protected]cfa2e1102011-04-27 22:30:231384
[email protected]5ffb0a42012-01-27 09:36:111385 ['enable_web_intents_tag==1', {
1386 'grit_defines': ['-D', 'enable_web_intents_tag'],
[email protected]41ed4e82011-08-25 23:02:071387 }],
1388
[email protected]696de4e62012-11-21 21:18:541389 ['asan==1 and OS!="win"', {
[email protected]92799b632011-08-15 14:33:061390 'clang%': 1,
1391 }],
[email protected]f5d8c222012-08-29 17:47:021392 ['asan==1 and OS=="mac"', {
1393 # See http://crbug.com/145503.
1394 'component': "static_library",
1395 }],
[email protected]c9a829272012-07-04 07:51:121396 ['tsan==1', {
1397 'clang%': 1,
1398 }],
1399
[email protected]7ce58b22012-09-26 05:17:251400 ['OS=="linux" and clang_type_profiler==1', {
1401 'clang%': 1,
1402 'clang_use_chrome_plugins%': 0,
1403 'make_clang_dir%': 'third_party/llvm-allocated-type/Linux_x64',
1404 }],
1405
[email protected]a9318c72012-03-01 01:29:471406 # On valgrind bots, override the optimizer settings so we don't inline too
1407 # much and make the stacks harder to figure out.
1408 #
1409 # TODO(rnk): Kill off variables that no one else uses and just implement
1410 # them under a build_for_tool== condition.
1411 ['build_for_tool=="memcheck" or build_for_tool=="tsan"', {
1412 # gcc flags
1413 'mac_debug_optimization': '1',
1414 'mac_release_optimization': '1',
1415 'release_optimize': '1',
1416 'no_gc_sections': 1,
1417 'debug_extra_cflags': '-g -fno-inline -fno-omit-frame-pointer '
1418 '-fno-builtin -fno-optimize-sibling-calls',
1419 'release_extra_cflags': '-g -fno-inline -fno-omit-frame-pointer '
1420 '-fno-builtin -fno-optimize-sibling-calls',
1421
1422 # MSVS flags for TSan on Pin and Windows.
1423 'win_debug_RuntimeChecks': '0',
1424 'win_debug_disable_iterator_debugging': '1',
1425 'win_debug_Optimization': '1',
1426 'win_debug_InlineFunctionExpansion': '0',
1427 'win_release_InlineFunctionExpansion': '0',
1428 'win_release_OmitFramePointers': '0',
1429
1430 'linux_use_tcmalloc': 1,
1431 'release_valgrind_build': 1,
1432 'werror': '',
1433 'component': 'static_library',
1434 'use_system_zlib': 0,
1435 }],
1436
1437 # Build tweaks for DrMemory.
1438 # TODO(rnk): Combine with tsan config to share the builder.
1439 # http://crbug.com/108155
1440 ['build_for_tool=="drmemory"', {
[email protected]a9318c72012-03-01 01:29:471441 # These runtime checks force initialization of stack vars which blocks
1442 # DrMemory's uninit detection.
1443 'win_debug_RuntimeChecks': '0',
1444 # Iterator debugging is slow.
1445 'win_debug_disable_iterator_debugging': '1',
1446 # Try to disable optimizations that mess up stacks in a release build.
[email protected]c13d00302012-10-18 15:45:161447 # DrM-i#1054 (http://code.google.com/p/drmemory/issues/detail?id=1054)
1448 # /O2 and /Ob0 (disable inline) cannot be used together because of a
1449 # compiler bug, so we use /Ob1 instead.
1450 'win_release_InlineFunctionExpansion': '1',
[email protected]a9318c72012-03-01 01:29:471451 'win_release_OmitFramePointers': '0',
[email protected]6bf3373d2012-08-15 22:27:501452 # Ditto for debug, to support bumping win_debug_Optimization.
1453 'win_debug_InlineFunctionExpansion': 0,
1454 'win_debug_OmitFramePointers': 0,
[email protected]a9318c72012-03-01 01:29:471455 # Keep the code under #ifndef NVALGRIND.
1456 'release_valgrind_build': 1,
1457 }],
[email protected]b6a5ac92012-10-29 18:17:221458
[email protected]f40a6912012-12-10 21:52:411459 # Enable RLZ on Win, Mac and ChromeOS.
1460 ['branding=="Chrome" and (OS=="win" or OS=="mac" or chromeos==1)', {
[email protected]b6a5ac92012-10-29 18:17:221461 'enable_rlz%': 1,
1462 }],
[email protected]912c55c2009-07-31 23:33:551463 ],
[email protected]a9318c72012-03-01 01:29:471464
[email protected]35958422011-09-28 02:03:591465 # List of default apps to install in new profiles. The first list contains
1466 # the source files as found in svn. The second list, used only for linux,
[email protected]20cc0bb72011-10-26 00:57:061467 # contains the destination location for each of the files. When a crx
1468 # is added or removed from the list, the chrome/browser/resources/
1469 # default_apps/external_extensions.json file must also be updated.
[email protected]35958422011-09-28 02:03:591470 'default_apps_list': [
1471 'browser/resources/default_apps/external_extensions.json',
1472 'browser/resources/default_apps/gmail.crx',
[email protected]20cc0bb72011-10-26 00:57:061473 'browser/resources/default_apps/search.crx',
[email protected]35958422011-09-28 02:03:591474 'browser/resources/default_apps/youtube.crx',
[email protected]c3875e22012-09-06 01:07:001475 'browser/resources/default_apps/drive.crx',
[email protected]40b38c932012-09-27 20:42:231476 'browser/resources/default_apps/docs.crx',
[email protected]35958422011-09-28 02:03:591477 ],
1478 'default_apps_list_linux_dest': [
1479 '<(PRODUCT_DIR)/default_apps/external_extensions.json',
1480 '<(PRODUCT_DIR)/default_apps/gmail.crx',
[email protected]20cc0bb72011-10-26 00:57:061481 '<(PRODUCT_DIR)/default_apps/search.crx',
[email protected]35958422011-09-28 02:03:591482 '<(PRODUCT_DIR)/default_apps/youtube.crx',
[email protected]c3875e22012-09-06 01:07:001483 '<(PRODUCT_DIR)/default_apps/drive.crx',
[email protected]40b38c932012-09-27 20:42:231484 '<(PRODUCT_DIR)/default_apps/docs.crx',
[email protected]35958422011-09-28 02:03:591485 ],
[email protected]2f80c312009-02-25 21:26:551486 },
1487 'target_defaults': {
[email protected]1c966092009-08-20 21:19:261488 'variables': {
[email protected]a6e22132010-02-10 20:43:181489 # The condition that operates on chromium_code is in a target_conditions
1490 # section, and will not have access to the default fallback value of
1491 # chromium_code at the top of this file, or to the chromium_code
1492 # variable placed at the root variables scope of .gyp files, because
1493 # those variables are not set at target scope. As a workaround,
1494 # if chromium_code is not set at target scope, define it in target scope
1495 # to contain whatever value it has during early variable expansion.
1496 # That's enough to make it available during target conditional
1497 # processing.
1498 'chromium_code%': '<(chromium_code)',
1499
[email protected]7e0d664a2009-12-03 21:07:471500 # See http://msdn.microsoft.com/en-us/library/aa652360(VS.71).aspx
1501 'win_release_Optimization%': '2', # 2 = /Os
1502 'win_debug_Optimization%': '0', # 0 = /Od
[email protected]626d2d22011-10-11 15:47:331503
1504 # See http://msdn.microsoft.com/en-us/library/2kxx5t2c(v=vs.80).aspx
[email protected]ef5c5f1b2011-12-17 02:16:241505 # Tri-state: blank is default, 1 on, 0 off
[email protected]65d61e62012-06-01 21:52:111506 'win_release_OmitFramePointers%': '0',
[email protected]ef5c5f1b2011-12-17 02:16:241507 # Tri-state: blank is default, 1 on, 0 off
1508 'win_debug_OmitFramePointers%': '',
[email protected]626d2d22011-10-11 15:47:331509
[email protected]6b0507b2010-05-07 07:41:211510 # See http://msdn.microsoft.com/en-us/library/8wtf2dfz(VS.71).aspx
1511 'win_debug_RuntimeChecks%': '3', # 3 = all checks enabled, 0 = off
[email protected]626d2d22011-10-11 15:47:331512
[email protected]6b0507b2010-05-07 07:41:211513 # See http://msdn.microsoft.com/en-us/library/47238hez(VS.71).aspx
[email protected]2ae6e022010-05-07 13:19:151514 'win_debug_InlineFunctionExpansion%': '', # empty = default, 0 = off,
1515 'win_release_InlineFunctionExpansion%': '2', # 1 = only __inline, 2 = max
[email protected]626d2d22011-10-11 15:47:331516
[email protected]fac10d12010-11-08 16:00:311517 # VS inserts quite a lot of extra checks to algorithms like
1518 # std::partial_sort in Debug build which make them O(N^2)
1519 # instead of O(N*logN). This is particularly slow under memory
1520 # tools like ThreadSanitizer so we want it to be disablable.
1521 # See http://msdn.microsoft.com/en-us/library/aa985982(v=VS.80).aspx
1522 'win_debug_disable_iterator_debugging%': '0',
[email protected]7e0d664a2009-12-03 21:07:471523
[email protected]ffd984b12009-09-11 19:37:001524 'release_extra_cflags%': '',
1525 'debug_extra_cflags%': '',
[email protected]8d726a42012-02-09 03:49:001526
1527 'release_valgrind_build%': '<(release_valgrind_build)',
[email protected]8974e042010-06-21 18:06:521528
[email protected]ef5c5f1b2011-12-17 02:16:241529 # the non-qualified versions are widely assumed to be *nix-only
1530 'win_release_extra_cflags%': '',
1531 'win_debug_extra_cflags%': '',
1532
[email protected]b1eb341c2011-11-09 18:46:071533 # TODO(thakis): Make this a blacklist instead, http://crbug.com/101600
1534 'enable_wexit_time_destructors%': '<(enable_wexit_time_destructors)',
1535
[email protected]ef3326702011-10-06 18:06:441536 # Only used by Windows build for now. Can be used to build into a
1537 # differet output directory, e.g., a build_dir_prefix of VS2010_ would
1538 # output files in src/build/VS2010_{Debug,Release}.
1539 'build_dir_prefix%': '',
1540
[email protected]9ac2db692012-06-08 01:01:571541 # Targets are by default not nacl untrusted code.
1542 'nacl_untrusted_build%': 0,
1543
[email protected]9c55d9d2012-11-15 23:28:441544 'pnacl_compile_flags': [
1545 # pnacl uses the clang compiler so we need to supress all the
1546 # same warnings as we do for clang.
1547 # TODO(sbc): Remove these if/when they are removed from the clang
1548 # build.
1549 '-Wno-unused-function',
1550 '-Wno-char-subscripts',
1551 '-Wno-c++11-extensions',
1552 '-Wno-unnamed-type-template-args',
1553 ],
1554
[email protected]8974e042010-06-21 18:06:521555 'conditions': [
1556 ['OS=="win" and component=="shared_library"', {
1557 # See http://msdn.microsoft.com/en-us/library/aa652367.aspx
[email protected]49e8e022012-03-16 15:22:161558 'win_release_RuntimeLibrary%': '2', # 2 = /MD (nondebug DLL)
1559 'win_debug_RuntimeLibrary%': '3', # 3 = /MDd (debug DLL)
[email protected]8974e042010-06-21 18:06:521560 }, {
1561 # See http://msdn.microsoft.com/en-us/library/aa652367.aspx
1562 'win_release_RuntimeLibrary%': '0', # 0 = /MT (nondebug static)
1563 'win_debug_RuntimeLibrary%': '1', # 1 = /MTd (debug static)
1564 }],
[email protected]1e013672012-06-29 22:12:201565 ['OS=="ios"', {
1566 # See http://gcc.gnu.org/onlinedocs/gcc-4.4.2/gcc/Optimize-Options.html
1567 'mac_release_optimization%': 's', # Use -Os unless overridden
1568 'mac_debug_optimization%': '0', # Use -O0 unless overridden
1569 }, {
1570 # See http://gcc.gnu.org/onlinedocs/gcc-4.4.2/gcc/Optimize-Options.html
1571 'mac_release_optimization%': '3', # Use -O3 unless overridden
1572 'mac_debug_optimization%': '0', # Use -O0 unless overridden
1573 }],
[email protected]8974e042010-06-21 18:06:521574 ],
[email protected]1c966092009-08-20 21:19:261575 },
[email protected]32aa8cc2009-03-04 21:36:391576 'conditions': [
[email protected]7ce58b22012-09-26 05:17:251577 ['OS=="linux" and linux_use_tcmalloc==1 and clang_type_profiler==1', {
1578 'cflags_cc!': ['-fno-rtti'],
1579 'cflags_cc+': [
1580 '-frtti',
1581 '-gline-tables-only',
1582 '-fintercept-allocation-functions',
1583 ],
1584 'defines': ['TYPE_PROFILING'],
1585 'dependencies': [
1586 '<(DEPTH)/base/allocator/allocator.gyp:type_profiler',
1587 ],
1588 }],
[email protected]ff10b132012-02-29 22:53:301589 ['OS=="win" and "<(msbuild_toolset)"!=""', {
1590 'msbuild_toolset': '<(msbuild_toolset)',
1591 }],
[email protected]32aa8cc2009-03-04 21:36:391592 ['branding=="Chrome"', {
1593 'defines': ['GOOGLE_CHROME_BUILD'],
1594 }, { # else: branding!="Chrome"
1595 'defines': ['CHROMIUM_BUILD'],
1596 }],
[email protected]286d9a12012-05-30 16:20:381597 ['OS=="mac" and component=="shared_library"', {
1598 'xcode_settings': {
1599 'DYLIB_INSTALL_NAME_BASE': '@rpath',
1600 'LD_RUNPATH_SEARCH_PATHS': [
1601 # For unbundled binaries.
1602 '@loader_path/.',
1603 # For bundled binaries, to get back from Binary.app/Contents/MacOS.
1604 '@loader_path/../../..',
1605 ],
1606 },
1607 }],
[email protected]b6a5ac92012-10-29 18:17:221608 ['enable_rlz==1', {
[email protected]81d9b72d2012-03-26 22:29:171609 'defines': ['ENABLE_RLZ'],
1610 }],
[email protected]63e39a282011-07-13 20:41:281611 ['component=="shared_library"', {
1612 'defines': ['COMPONENT_BUILD'],
1613 }],
[email protected]06c756182010-04-27 18:31:311614 ['toolkit_views==1', {
[email protected]e6970232009-05-12 23:51:171615 'defines': ['TOOLKIT_VIEWS=1'],
1616 }],
[email protected]1ee7c56c2011-10-19 14:51:331617 ['ui_compositor_image_transport==1', {
[email protected]839d5172011-10-13 17:18:111618 'defines': ['UI_COMPOSITOR_IMAGE_TRANSPORT'],
1619 }],
[email protected]41423092011-08-25 15:39:581620 ['use_aura==1', {
1621 'defines': ['USE_AURA=1'],
[email protected]e599f0132011-08-24 19:03:351622 }],
[email protected]ed329be2012-01-03 22:02:161623 ['use_ash==1', {
1624 'defines': ['USE_ASH=1'],
1625 }],
[email protected]cb800562012-11-20 22:36:071626 ['use_default_render_theme==1', {
1627 'defines': ['USE_DEFAULT_RENDER_THEME=1'],
1628 }],
[email protected]e190d272012-08-30 17:36:441629 ['use_libjpeg_turbo==1', {
1630 'defines': ['USE_LIBJPEG_TURBO=1'],
1631 }],
[email protected]c329adf82011-10-05 14:34:571632 ['use_nss==1', {
1633 'defines': ['USE_NSS=1'],
1634 }],
[email protected]bd7b6fe2012-03-05 21:02:401635 ['enable_one_click_signin==1', {
1636 'defines': ['ENABLE_ONE_CLICK_SIGNIN'],
1637 }],
[email protected]a47aa892011-11-22 03:12:311638 ['toolkit_uses_gtk==1 and toolkit_views==0', {
1639 # TODO(erg): We are progressively sealing up use of deprecated features
1640 # in gtk in preparation for an eventual porting to gtk3.
1641 'defines': ['GTK_DISABLE_SINGLE_INCLUDES=1'],
1642 }],
[email protected]fdc5bed2010-01-09 01:16:571643 ['chromeos==1', {
[email protected]16779842009-07-08 23:45:291644 'defines': ['OS_CHROMEOS=1'],
[email protected]2b883b92009-06-02 22:57:501645 }],
[email protected]f56797b2011-09-25 00:04:351646 ['use_xi2_mt!=0', {
1647 'defines': ['USE_XI2_MT=<(use_xi2_mt)'],
1648 }],
[email protected]e47c32032011-03-01 19:26:201649 ['file_manager_extension==1', {
1650 'defines': ['FILE_MANAGER_EXTENSION=1'],
1651 }],
[email protected]7664ab32011-02-01 23:35:251652 ['profiling==1', {
1653 'defines': ['ENABLE_PROFILING=1'],
1654 }],
[email protected]93b373502011-08-16 19:06:221655 ['OS=="linux" and glibcxx_debug==1', {
1656 'defines': ['_GLIBCXX_DEBUG=1',],
[email protected]f6a45d92012-10-24 19:26:591657 'cflags_cc+': ['-g'],
[email protected]93b373502011-08-16 19:06:221658 }],
[email protected]542bf24a2010-06-11 23:08:171659 ['remoting==1', {
1660 'defines': ['ENABLE_REMOTING=1'],
[email protected]c0bac532010-06-11 00:39:001661 }],
[email protected]5b87e782012-02-09 18:19:321662 ['enable_webrtc==1', {
1663 'defines': ['ENABLE_WEBRTC=1'],
1664 }],
[email protected]d01120e62010-05-10 17:04:481665 ['proprietary_codecs==1', {
1666 'defines': ['USE_PROPRIETARY_CODECS'],
1667 }],
[email protected]67c125d2011-10-11 18:58:221668 ['enable_pepper_threading==1', {
1669 'defines': ['ENABLE_PEPPER_THREADING'],
1670 }],
[email protected]7ddea9802012-02-22 23:08:051671 ['enable_viewport==1', {
1672 'defines': ['ENABLE_VIEWPORT'],
1673 }],
[email protected]f31e2e52011-07-14 16:01:191674 ['configuration_policy==1', {
1675 'defines': ['ENABLE_CONFIGURATION_POLICY'],
1676 }],
[email protected]9eb100e2011-10-14 05:08:221677 ['input_speech==1', {
1678 'defines': ['ENABLE_INPUT_SPEECH'],
1679 }],
[email protected]7cce3232011-10-28 10:41:571680 ['notifications==1', {
1681 'defines': ['ENABLE_NOTIFICATIONS'],
1682 }],
[email protected]1efbaaa2012-04-24 02:43:241683 ['enable_hidpi==1', {
1684 'defines': ['ENABLE_HIDPI=1'],
1685 }],
[email protected]9c1949e2009-10-02 19:59:541686 ['fastbuild!=0', {
[email protected]7df38122012-11-05 23:54:431687 # Clang creates chubby debug information, which makes linking very
1688 # slow. For now, don't create debug information with clang. See
1689 # http://crbug.com/70000
[email protected]9c1949e2009-10-02 19:59:541690 'conditions': [
[email protected]7df38122012-11-05 23:54:431691 ['clang==1', {
1692 'conditions': [
1693 ['OS=="linux"', {
1694 'variables': {
1695 'debug_extra_cflags': '-g0',
1696 },
1697 }],
1698 # Android builds symbols on release by default, disable them.
1699 ['OS=="android"', {
1700 'variables': {
1701 'debug_extra_cflags': '-g0',
1702 'release_extra_cflags': '-g0',
1703 },
1704 }],
1705 ],
1706 }, { # else clang!=1
1707 'conditions': [
1708 # For Windows and Mac, we don't genererate debug information.
1709 ['OS=="win"', {
1710 'msvs_settings': {
1711 'VCLinkerTool': {
1712 'GenerateDebugInformation': 'false',
1713 },
1714 'VCCLCompilerTool': {
1715 'DebugInformationFormat': '0',
1716 },
1717 },
1718 }],
1719 ['OS=="mac"', {
1720 'xcode_settings': {
1721 'GCC_GENERATE_DEBUGGING_SYMBOLS': 'NO',
1722 },
1723 }],
1724 ['OS=="linux"', {
1725 'variables': {
1726 'debug_extra_cflags': '-g1',
1727 },
1728 }],
1729 ['OS=="android"', {
1730 'variables': {
1731 'debug_extra_cflags': '-g1',
1732 'release_extra_cflags': '-g1',
1733 },
1734 }],
1735 ],
1736 }], # clang!=1
1737 ],
[email protected]9c1949e2009-10-02 19:59:541738 }], # fastbuild!=0
[email protected]20960e072011-09-20 20:59:011739 ['dcheck_always_on!=0', {
1740 'defines': ['DCHECK_ALWAYS_ON=1'],
1741 }], # dcheck_always_on!=0
[email protected]ad6d2c42009-09-15 20:13:381742 ['selinux==1', {
1743 'defines': ['CHROMIUM_SELINUX=1'],
1744 }],
[email protected]7e0d664a2009-12-03 21:07:471745 ['win_use_allocator_shim==0', {
1746 'conditions': [
1747 ['OS=="win"', {
1748 'defines': ['NO_TCMALLOC'],
1749 }],
1750 ],
1751 }],
[email protected]43f28f832010-02-03 02:28:481752 ['enable_gpu==1', {
[email protected]7477ea6f2009-12-22 23:28:151753 'defines': [
1754 'ENABLE_GPU=1',
1755 ],
1756 }],
[email protected]b1c2a5542010-10-08 12:44:401757 ['use_openssl==1', {
1758 'defines': [
1759 'USE_OPENSSL=1',
1760 ],
1761 }],
[email protected]ed154592010-04-29 00:18:501762 ['enable_eglimage==1', {
1763 'defines': [
1764 'ENABLE_EGLIMAGE=1',
1765 ],
1766 }],
[email protected]7d7564a12011-06-21 19:20:221767 ['use_skia==1', {
1768 'defines': [
1769 'USE_SKIA=1',
1770 ],
1771 }],
[email protected]696de4e62012-11-21 21:18:541772 ['asan==1 and OS=="win"', {
1773 # Since asan on windows uses Syzygy, we need /PROFILE turned on to
1774 # produce appropriate pdbs.
1775 'msvs_settings': {
1776 'VCLinkerTool': {
1777 'Profile': 'true',
1778 },
1779 },
[email protected]2ff7ef5f2012-12-14 00:40:251780 'defines': ['ADDRESS_SANITIZER'],
[email protected]696de4e62012-11-21 21:18:541781 }], # asan==1 and OS=="win"
[email protected]f5ecbba12009-04-03 04:35:181782 ['coverage!=0', {
1783 'conditions': [
[email protected]fc642ec2012-10-12 19:07:031784 ['OS=="mac" or OS=="ios"', {
[email protected]f5ecbba12009-04-03 04:35:181785 'xcode_settings': {
[email protected]ab2956372009-08-13 18:11:041786 'GCC_INSTRUMENT_PROGRAM_FLOW_ARCS': 'YES', # -fprofile-arcs
1787 'GCC_GENERATE_TEST_COVERAGE_FILES': 'YES', # -ftest-coverage
[email protected]5ae4f55e2009-04-13 23:19:471788 },
[email protected]fc642ec2012-10-12 19:07:031789 }],
1790 ['OS=="mac"', {
[email protected]e4fb84c2009-12-28 20:45:431791 # Add -lgcov for types executable, shared_library, and
[email protected]dc259ce52010-04-13 04:03:101792 # loadable_module; not for static_library.
[email protected]e4fb84c2009-12-28 20:45:431793 # This is a delayed conditional.
[email protected]f5ecbba12009-04-03 04:35:181794 'target_conditions': [
[email protected]e4fb84c2009-12-28 20:45:431795 ['_type!="static_library"', {
[email protected]f5ecbba12009-04-03 04:35:181796 'xcode_settings': { 'OTHER_LDFLAGS': [ '-lgcov' ] },
[email protected]5ae4f55e2009-04-13 23:19:471797 }],
1798 ],
1799 }],
[email protected]da1c8d692011-09-20 20:35:011800 ['OS=="linux" or OS=="android"', {
[email protected]f5ecbba12009-04-03 04:35:181801 'cflags': [ '-ftest-coverage',
1802 '-fprofile-arcs' ],
[email protected]7122ffd52009-04-30 23:19:001803 'link_settings': { 'libraries': [ '-lgcov' ] },
[email protected]f5ecbba12009-04-03 04:35:181804 }],
[email protected]e8f6ff42009-07-07 18:20:531805 ['OS=="win"', {
[email protected]0915c3b2012-11-22 17:24:071806 'variables': {
1807 # Disable incremental linking for all modules.
1808 # 0: inherit, 1: disabled, 2: enabled.
1809 'msvs_debug_link_incremental': '1',
1810 'msvs_large_module_debug_link_mode': '1',
1811 },
1812 'defines': [
1813 # Disable iterator debugging (huge speed boost without any
1814 # change in coverage results).
1815 '_HAS_ITERATOR_DEBUGGING=0',
1816 ],
[email protected]e8f6ff42009-07-07 18:20:531817 'msvs_settings': {
1818 'VCLinkerTool': {
[email protected]0915c3b2012-11-22 17:24:071819 # Enable profile information (necessary for coverage
1820 # instrumentation). This is incompatible with incremental
1821 # linking.
[email protected]e8f6ff42009-07-07 18:20:531822 'Profile': 'true',
1823 },
[email protected]e8f6ff42009-07-07 18:20:531824 }
1825 }], # OS==win
1826 ], # conditions for coverage
1827 }], # coverage!=0
[email protected]4e4d6042010-08-26 18:34:381828 ['OS=="win"', {
1829 'defines': [
1830 '__STD_C',
1831 '_CRT_SECURE_NO_DEPRECATE',
1832 '_SCL_SECURE_NO_DEPRECATE',
[email protected]2d0aa3242012-10-22 16:23:101833 # This define is required to pull in the new Win8 interfaces from
1834 # system headers like ShObjIdl.h.
1835 'NTDDI_VERSION=0x06020000',
[email protected]4e4d6042010-08-26 18:34:381836 ],
1837 'include_dirs': [
1838 '<(DEPTH)/third_party/wtl/include',
1839 ],
[email protected]9619e65d2012-05-23 19:06:521840 'conditions': [
1841 ['win_z7!=0', {
1842 'msvs_settings': {
[email protected]5146e0b2012-08-23 05:49:091843 # Generates debug info when win_z7=1
1844 # even if fastbuild=1 (that makes GenerateDebugInformation false).
1845 'VCLinkerTool': {
1846 'GenerateDebugInformation': 'true',
1847 },
[email protected]9619e65d2012-05-23 19:06:521848 'VCCLCompilerTool': {
1849 'DebugInformationFormat': '1',
1850 }
1851 }
1852 }],
[email protected]45a77072012-11-17 00:28:421853 ['"<(GENERATOR)"=="msvs"', {
1854 'msvs_settings': {
1855 'VCLinkerTool': {
1856 # Make the pdb name sane. Otherwise foo.exe and foo.dll both
1857 # have foo.pdb. The ninja generator already defaults to this and
1858 # can't handle the $(TargetPath) macro.
1859 'ProgramDatabaseFile': '$(TargetPath).pdb',
1860 }
1861 },
1862 }],
[email protected]9619e65d2012-05-23 19:06:521863 ], # win_z7!=0
[email protected]4e4d6042010-08-26 18:34:381864 }], # OS==win
[email protected]44879ed2012-04-06 01:11:021865 ['enable_task_manager==1', {
1866 'defines': [
1867 'ENABLE_TASK_MANAGER=1',
1868 ],
1869 }],
[email protected]41ed4e82011-08-25 23:02:071870 ['enable_web_intents==1', {
1871 'defines': [
[email protected]1f2d9ed2011-10-04 20:18:471872 'ENABLE_WEB_INTENTS=1',
[email protected]41ed4e82011-08-25 23:02:071873 ],
1874 }],
[email protected]6a3cd37e2012-04-17 17:13:341875 ['enable_extensions==1', {
1876 'defines': [
1877 'ENABLE_EXTENSIONS=1',
1878 ],
1879 }],
[email protected]13eb97d2012-01-05 01:07:121880 ['OS=="win" and branding=="Chrome"', {
1881 'defines': ['ENABLE_SWIFTSHADER'],
1882 }],
[email protected]407dfa632011-12-23 11:59:351883 ['enable_dart==1', {
1884 'defines': ['WEBKIT_USING_DART=1'],
1885 }],
[email protected]18e0f39b2012-01-17 16:47:341886 ['enable_plugin_installation==1', {
1887 'defines': ['ENABLE_PLUGIN_INSTALLATION=1'],
1888 }],
[email protected]6d17f6392012-12-05 05:24:541889 ['enable_plugins==1', {
1890 'defines': ['ENABLE_PLUGINS=1'],
1891 }],
[email protected]cdb756ef2012-04-05 18:34:531892 ['enable_session_service==1', {
1893 'defines': ['ENABLE_SESSION_SERVICE=1'],
1894 }],
[email protected]6b40bb582012-03-15 20:50:381895 ['enable_themes==1', {
1896 'defines': ['ENABLE_THEMES=1'],
1897 }],
[email protected]0acdd772012-04-05 22:53:001898 ['enable_background==1', {
1899 'defines': ['ENABLE_BACKGROUND=1'],
1900 }],
[email protected]2e22e2f2012-03-15 21:53:101901 ['enable_automation==1', {
1902 'defines': ['ENABLE_AUTOMATION=1'],
1903 }],
[email protected]6ee43a72012-12-07 22:44:401904 ['enable_google_now==1', {
1905 'defines': ['ENABLE_GOOGLE_NOW=1'],
1906 }],
[email protected]703369a2012-11-05 20:40:311907 ['enable_language_detection==1', {
1908 'defines': ['ENABLE_LANGUAGE_DETECTION=1'],
1909 }],
[email protected]658677f2012-06-09 06:04:021910 ['enable_printing==1', {
1911 'defines': ['ENABLE_PRINTING=1'],
1912 }],
[email protected]e6026962012-06-14 21:28:321913 ['enable_captive_portal_detection==1', {
1914 'defines': ['ENABLE_CAPTIVE_PORTAL_DETECTION=1'],
1915 }],
[email protected]dc4e8b82012-11-15 03:58:161916 ['enable_app_list==1', {
1917 'defines': ['ENABLE_APP_LIST=1'],
1918 }],
1919 ['enable_settings_app==1', {
1920 'defines': ['ENABLE_SETTINGS_APP=1'],
1921 }],
[email protected]9bfe0ab2012-08-30 13:18:111922 ['disable_ftp_support==1', {
1923 'defines': ['DISABLE_FTP_SUPPORT=1'],
1924 }],
[email protected]a6e22132010-02-10 20:43:181925 ], # conditions for 'target_defaults'
1926 'target_conditions': [
[email protected]b1eb341c2011-11-09 18:46:071927 ['enable_wexit_time_destructors==1', {
1928 'conditions': [
1929 [ 'clang==1', {
1930 'cflags': [
1931 '-Wexit-time-destructors',
1932 ],
1933 'xcode_settings': {
1934 'WARNING_CFLAGS': [
1935 '-Wexit-time-destructors',
1936 ],
1937 },
1938 }],
1939 ],
1940 }],
[email protected]c14d8e772010-02-09 22:06:151941 ['chromium_code==0', {
[email protected]d8543312010-02-10 17:43:281942 'conditions': [
[email protected]1e013672012-06-29 22:12:201943 [ 'os_posix==1 and OS!="mac" and OS!="ios"', {
[email protected]c0a6b272011-02-09 22:32:331944 # We don't want to get warnings from third-party code,
1945 # so remove any existing warning-enabling flags like -Wall.
[email protected]d8543312010-02-10 17:43:281946 'cflags!': [
1947 '-Wall',
1948 '-Wextra',
[email protected]d8543312010-02-10 17:43:281949 ],
[email protected]167ec822011-10-24 22:05:271950 'cflags_cc': [
[email protected]ec1d155be2011-02-08 22:19:001951 # Don't warn about hash_map in third-party code.
1952 '-Wno-deprecated',
[email protected]167ec822011-10-24 22:05:271953 ],
1954 'cflags': [
[email protected]c0a6b272011-02-09 22:32:331955 # Don't warn about printf format problems.
1956 # This is off by default in gcc but on in Ubuntu's gcc(!).
[email protected]ec392872011-02-10 22:38:221957 '-Wno-format',
[email protected]ec1d155be2011-02-08 22:19:001958 ],
[email protected]d16bd642011-07-25 23:59:181959 'cflags_cc!': [
1960 # TODO(fischman): remove this.
1961 # http://code.google.com/p/chromium/issues/detail?id=90453
1962 '-Wsign-compare',
1963 ]
[email protected]d8543312010-02-10 17:43:281964 }],
[email protected]82dd5eb32012-08-18 04:24:321965 # TODO: Fix all warnings on chromeos too.
1966 [ 'os_posix==1 and OS!="mac" and OS!="ios" and (clang!=1 or chromeos==1)', {
1967 'cflags!': [
1968 '-Werror',
1969 ],
1970 }],
[email protected]bc073c062012-01-13 06:28:031971 [ 'os_posix==1 and os_bsd!=1 and OS!="mac" and OS!="android"', {
[email protected]6e4451892011-07-27 10:32:111972 'cflags': [
1973 # Don't warn about ignoring the return value from e.g. close().
1974 # This is off by default in some gccs but on by default in others.
[email protected]bc073c062012-01-13 06:28:031975 # BSD systems do not support this option, since they are usually
1976 # using gcc 4.2.1, which does not have this flag yet.
[email protected]6e4451892011-07-27 10:32:111977 '-Wno-unused-result',
1978 ],
1979 }],
[email protected]d8543312010-02-10 17:43:281980 [ 'OS=="win"', {
1981 'defines': [
1982 '_CRT_SECURE_NO_DEPRECATE',
1983 '_CRT_NONSTDC_NO_WARNINGS',
1984 '_CRT_NONSTDC_NO_DEPRECATE',
1985 '_SCL_SECURE_NO_DEPRECATE',
1986 ],
1987 'msvs_disabled_warnings': [4800],
1988 'msvs_settings': {
1989 'VCCLCompilerTool': {
[email protected]942c3a60f2011-05-03 02:04:111990 'WarningLevel': '3',
[email protected]c54b41cb2012-08-24 20:58:241991 'WarnAsError': '<(win_third_party_warn_as_error)',
[email protected]d8543312010-02-10 17:43:281992 'Detect64BitPortabilityProblems': 'false',
1993 },
1994 },
[email protected]c54b41cb2012-08-24 20:58:241995 'conditions': [
1996 ['buildtype=="Official"', {
1997 'msvs_settings': {
1998 'VCCLCompilerTool': { 'WarnAsError': 'false' },
1999 }
2000 }],
2001 ],
[email protected]d8543312010-02-10 17:43:282002 }],
[email protected]0915c3b2012-11-22 17:24:072003 # TODO(darin): Unfortunately, some third_party code depends on base.
[email protected]ea47b6a2011-07-17 19:39:422004 [ 'OS=="win" and component=="shared_library"', {
2005 'msvs_disabled_warnings': [
2006 4251, # class 'std::xx' needs to have dll-interface.
2007 ],
2008 }],
[email protected]1e013672012-06-29 22:12:202009 [ 'OS=="mac" or OS=="ios"', {
[email protected]d8543312010-02-10 17:43:282010 'xcode_settings': {
[email protected]4c4c2e5332010-06-15 11:51:062011 'WARNING_CFLAGS!': ['-Wall', '-Wextra'],
[email protected]d8543312010-02-10 17:43:282012 },
[email protected]3a352c362012-05-08 19:45:492013 'conditions': [
2014 ['buildtype=="Official"', {
2015 'xcode_settings': {
2016 'GCC_TREAT_WARNINGS_AS_ERRORS': 'NO', # -Werror
2017 },
2018 }],
2019 ],
[email protected]d8543312010-02-10 17:43:282020 }],
[email protected]1e013672012-06-29 22:12:202021 [ 'OS=="ios"', {
2022 'xcode_settings': {
[email protected]7afca862012-07-11 15:11:222023 # TODO(ios): Fix remaining warnings in third-party code, then
2024 # remove this; the Mac cleanup didn't get everything that's
2025 # flagged in an iOS build.
2026 'GCC_TREAT_WARNINGS_AS_ERRORS': 'NO',
[email protected]1e013672012-06-29 22:12:202027 'RUN_CLANG_STATIC_ANALYZER': 'NO',
2028 },
2029 }],
[email protected]c14d8e772010-02-09 22:06:152030 ],
2031 }, {
[email protected]a5c598152012-01-27 04:55:132032 'includes': [
2033 # Rules for excluding e.g. foo_win.cc from the build on non-Windows.
2034 'filename_rules.gypi',
2035 ],
[email protected]41af4f82012-11-08 00:09:312036 # In Chromium code, we define __STDC_foo_MACROS in order to get the
[email protected]c14d8e772010-02-09 22:06:152037 # C99 macros on Mac and Linux.
2038 'defines': [
[email protected]41af4f82012-11-08 00:09:312039 '__STDC_CONSTANT_MACROS',
[email protected]c14d8e772010-02-09 22:06:152040 '__STDC_FORMAT_MACROS',
2041 ],
2042 'conditions': [
[email protected]c14d8e772010-02-09 22:06:152043 ['OS=="win"', {
[email protected]f55bd4862010-05-27 15:38:072044 # turn on warnings for signed/unsigned mismatch on chromium code.
2045 'msvs_settings': {
2046 'VCCLCompilerTool': {
2047 'AdditionalOptions': ['/we4389'],
2048 },
2049 },
[email protected]c14d8e772010-02-09 22:06:152050 }],
[email protected]63e39a282011-07-13 20:41:282051 ['OS=="win" and component=="shared_library"', {
2052 'msvs_disabled_warnings': [
2053 4251, # class 'std::xx' needs to have dll-interface.
2054 ],
2055 }],
[email protected]c14d8e772010-02-09 22:06:152056 ],
2057 }],
[email protected]a6e22132010-02-10 20:43:182058 ], # target_conditions for 'target_defaults'
[email protected]2f80c312009-02-25 21:26:552059 'default_configuration': 'Debug',
2060 'configurations': {
[email protected]5153767c2009-12-22 01:52:502061 # VCLinkerTool LinkIncremental values below:
2062 # 0 == default
2063 # 1 == /INCREMENTAL:NO
2064 # 2 == /INCREMENTAL
2065 # Debug links incremental, Release does not.
2066 #
[email protected]7b99801e2010-11-03 17:26:232067 # Abstract base configurations to cover common attributes.
[email protected]5153767c2009-12-22 01:52:502068 #
2069 'Common_Base': {
[email protected]bb05e452009-10-29 21:24:562070 'abstract': 1,
2071 'msvs_configuration_attributes': {
[email protected]534303c2011-09-28 00:02:512072 'OutputDirectory': '<(DEPTH)\\build\\<(build_dir_prefix)$(ConfigurationName)',
[email protected]bb05e452009-10-29 21:24:562073 'IntermediateDirectory': '$(OutDir)\\obj\\$(ProjectName)',
2074 'CharacterSet': '1',
2075 },
[email protected]5153767c2009-12-22 01:52:502076 },
2077 'x86_Base': {
2078 'abstract': 1,
[email protected]ef4fa4072009-12-04 22:46:502079 'msvs_settings': {
2080 'VCLinkerTool': {
2081 'TargetMachine': '1',
2082 },
2083 },
[email protected]2fa40782009-11-01 21:17:342084 'msvs_configuration_platform': 'Win32',
[email protected]bb05e452009-10-29 21:24:562085 },
[email protected]5153767c2009-12-22 01:52:502086 'x64_Base': {
2087 'abstract': 1,
2088 'msvs_configuration_platform': 'x64',
2089 'msvs_settings': {
2090 'VCLinkerTool': {
2091 'TargetMachine': '17', # x86 - 64
[email protected]5153767c2009-12-22 01:52:502092 'AdditionalLibraryDirectories!':
[email protected]1ab48032012-07-02 21:48:052093 ['<(windows_sdk_path)/Lib/win8/um/x86'],
[email protected]5153767c2009-12-22 01:52:502094 'AdditionalLibraryDirectories':
[email protected]1ab48032012-07-02 21:48:052095 ['<(windows_sdk_path)/Lib/win8/um/x64'],
[email protected]5153767c2009-12-22 01:52:502096 },
[email protected]d26b4418ab2010-03-24 22:06:352097 'VCLibrarianTool': {
[email protected]5153767c2009-12-22 01:52:502098 'AdditionalLibraryDirectories!':
[email protected]1ab48032012-07-02 21:48:052099 ['<(windows_sdk_path)/Lib/win8/um/x86'],
[email protected]5153767c2009-12-22 01:52:502100 'AdditionalLibraryDirectories':
[email protected]1ab48032012-07-02 21:48:052101 ['<(windows_sdk_path)/Lib/win8/um/x64'],
[email protected]5153767c2009-12-22 01:52:502102 },
2103 },
2104 'defines': [
2105 # Not sure if tcmalloc works on 64-bit Windows.
2106 'NO_TCMALLOC',
2107 ],
2108 },
2109 'Debug_Base': {
2110 'abstract': 1,
[email protected]14339762011-04-05 07:36:582111 'defines': [
2112 'DYNAMIC_ANNOTATIONS_ENABLED=1',
2113 'WTF_USE_DYNAMIC_ANNOTATIONS=1',
2114 ],
[email protected]1c966092009-08-20 21:19:262115 'xcode_settings': {
2116 'COPY_PHASE_STRIP': 'NO',
[email protected]d5d593a2009-08-28 23:23:292117 'GCC_OPTIMIZATION_LEVEL': '<(mac_debug_optimization)',
[email protected]a68c29a2011-07-01 16:23:492118 'OTHER_CFLAGS': [
[email protected]a68c29a2011-07-01 16:23:492119 '<@(debug_extra_cflags)',
2120 ],
[email protected]1c966092009-08-20 21:19:262121 },
[email protected]bb05e452009-10-29 21:24:562122 'msvs_settings': {
2123 'VCCLCompilerTool': {
[email protected]7e0d664a2009-12-03 21:07:472124 'Optimization': '<(win_debug_Optimization)',
[email protected]bb05e452009-10-29 21:24:562125 'PreprocessorDefinitions': ['_DEBUG'],
[email protected]6b0507b2010-05-07 07:41:212126 'BasicRuntimeChecks': '<(win_debug_RuntimeChecks)',
[email protected]7e0d664a2009-12-03 21:07:472127 'RuntimeLibrary': '<(win_debug_RuntimeLibrary)',
[email protected]2ae6e022010-05-07 13:19:152128 'conditions': [
2129 # According to MSVS, InlineFunctionExpansion=0 means
2130 # "default inlining", not "/Ob0".
2131 # Thus, we have to handle InlineFunctionExpansion==0 separately.
2132 ['win_debug_InlineFunctionExpansion==0', {
2133 'AdditionalOptions': ['/Ob0'],
2134 }],
2135 ['win_debug_InlineFunctionExpansion!=""', {
2136 'InlineFunctionExpansion':
2137 '<(win_debug_InlineFunctionExpansion)',
2138 }],
[email protected]fac10d12010-11-08 16:00:312139 ['win_debug_disable_iterator_debugging==1', {
2140 'PreprocessorDefinitions': ['_HAS_ITERATOR_DEBUGGING=0'],
2141 }],
[email protected]ef5c5f1b2011-12-17 02:16:242142
2143 # if win_debug_OmitFramePointers is blank, leave as default
2144 ['win_debug_OmitFramePointers==1', {
2145 'OmitFramePointers': 'true',
2146 }],
2147 ['win_debug_OmitFramePointers==0', {
2148 'OmitFramePointers': 'false',
2149 # The above is not sufficient (http://crbug.com/106711): it
2150 # simply eliminates an explicit "/Oy", but both /O2 and /Ox
2151 # perform FPO regardless, so we must explicitly disable.
2152 # We still want the false setting above to avoid having
2153 # "/Oy /Oy-" and warnings about overriding.
2154 'AdditionalOptions': ['/Oy-'],
2155 }],
[email protected]2ae6e022010-05-07 13:19:152156 ],
[email protected]ef5c5f1b2011-12-17 02:16:242157 'AdditionalOptions': [ '<@(win_debug_extra_cflags)', ],
[email protected]bb05e452009-10-29 21:24:562158 },
2159 'VCLinkerTool': {
2160 'LinkIncremental': '<(msvs_debug_link_incremental)',
[email protected]7cf23ce62012-01-13 02:43:332161 # ASLR makes debugging with windbg difficult because Chrome.exe and
2162 # Chrome.dll share the same base name. As result, windbg will
2163 # name the Chrome.dll module like chrome_<base address>, where
2164 # <base address> typically changes with each launch. This in turn
2165 # means that breakpoints in Chrome.dll don't stick from one launch
2166 # to the next. For this reason, we turn ASLR off in debug builds.
2167 # Note that this is a three-way bool, where 0 means to pick up
2168 # the default setting, 1 is off and 2 is on.
2169 'RandomizedBaseAddress': 1,
[email protected]bb05e452009-10-29 21:24:562170 },
2171 'VCResourceCompilerTool': {
2172 'PreprocessorDefinitions': ['_DEBUG'],
2173 },
2174 },
[email protected]2f80c312009-02-25 21:26:552175 'conditions': [
[email protected]78204c92012-09-14 04:42:552176 ['OS=="linux" or OS=="android"', {
[email protected]d8e3b122012-05-31 23:07:542177 'target_conditions': [
2178 ['_toolset=="target"', {
2179 'cflags': [
2180 '<@(debug_extra_cflags)',
2181 ],
2182 }],
[email protected]bb05e452009-10-29 21:24:562183 ],
[email protected]2f80c312009-02-25 21:26:552184 }],
[email protected]1e013672012-06-29 22:12:202185 # Disabled on iOS because it was causing a crash on startup.
2186 # TODO(michelea): investigate, create a reduced test and possibly
2187 # submit a radar.
2188 ['release_valgrind_build==0 and OS!="ios"', {
[email protected]56cca4e2011-07-01 21:33:352189 'xcode_settings': {
2190 'OTHER_CFLAGS': [
2191 '-fstack-protector-all', # Implies -fstack-protector
2192 ],
2193 },
2194 }],
[email protected]2f80c312009-02-25 21:26:552195 ],
2196 },
[email protected]5153767c2009-12-22 01:52:502197 'Release_Base': {
2198 'abstract': 1,
[email protected]2f80c312009-02-25 21:26:552199 'defines': [
2200 'NDEBUG',
2201 ],
[email protected]1c966092009-08-20 21:19:262202 'xcode_settings': {
2203 'DEAD_CODE_STRIPPING': 'YES', # -Wl,-dead_strip
2204 'GCC_OPTIMIZATION_LEVEL': '<(mac_release_optimization)',
[email protected]ffd984b12009-09-11 19:37:002205 'OTHER_CFLAGS': [ '<@(release_extra_cflags)', ],
[email protected]1c966092009-08-20 21:19:262206 },
[email protected]bb05e452009-10-29 21:24:562207 'msvs_settings': {
[email protected]7e0d664a2009-12-03 21:07:472208 'VCCLCompilerTool': {
[email protected]7e0d664a2009-12-03 21:07:472209 'RuntimeLibrary': '<(win_release_RuntimeLibrary)',
[email protected]2ae6e022010-05-07 13:19:152210 'conditions': [
[email protected]2212d272011-12-20 21:37:372211 # In official builds, each target will self-select
2212 # an optimization level.
2213 ['buildtype!="Official"', {
2214 'Optimization': '<(win_release_Optimization)',
2215 },
2216 ],
[email protected]2ae6e022010-05-07 13:19:152217 # According to MSVS, InlineFunctionExpansion=0 means
2218 # "default inlining", not "/Ob0".
2219 # Thus, we have to handle InlineFunctionExpansion==0 separately.
2220 ['win_release_InlineFunctionExpansion==0', {
2221 'AdditionalOptions': ['/Ob0'],
2222 }],
2223 ['win_release_InlineFunctionExpansion!=""', {
2224 'InlineFunctionExpansion':
2225 '<(win_release_InlineFunctionExpansion)',
2226 }],
[email protected]626d2d22011-10-11 15:47:332227
[email protected]ef5c5f1b2011-12-17 02:16:242228 # if win_release_OmitFramePointers is blank, leave as default
[email protected]626d2d22011-10-11 15:47:332229 ['win_release_OmitFramePointers==1', {
2230 'OmitFramePointers': 'true',
2231 }],
2232 ['win_release_OmitFramePointers==0', {
2233 'OmitFramePointers': 'false',
[email protected]ef5c5f1b2011-12-17 02:16:242234 # The above is not sufficient (http://crbug.com/106711): it
2235 # simply eliminates an explicit "/Oy", but both /O2 and /Ox
2236 # perform FPO regardless, so we must explicitly disable.
2237 # We still want the false setting above to avoid having
2238 # "/Oy /Oy-" and warnings about overriding.
2239 'AdditionalOptions': ['/Oy-'],
[email protected]626d2d22011-10-11 15:47:332240 }],
[email protected]2ae6e022010-05-07 13:19:152241 ],
[email protected]ef5c5f1b2011-12-17 02:16:242242 'AdditionalOptions': [ '<@(win_release_extra_cflags)', ],
[email protected]7e0d664a2009-12-03 21:07:472243 },
[email protected]bb05e452009-10-29 21:24:562244 'VCLinkerTool': {
[email protected]c059c612011-08-08 20:56:342245 # LinkIncremental is a tri-state boolean, where 0 means default
2246 # (i.e., inherit from parent solution), 1 means false, and
2247 # 2 means true.
[email protected]bb05e452009-10-29 21:24:562248 'LinkIncremental': '1',
[email protected]c059c612011-08-08 20:56:342249 # This corresponds to the /PROFILE flag which ensures the PDB
2250 # file contains FIXUP information (growing the PDB file by about
2251 # 5%) but does not otherwise alter the output binary. This
2252 # information is used by the Syzygy optimization tool when
2253 # decomposing the release image.
2254 'Profile': 'true',
[email protected]bb05e452009-10-29 21:24:562255 },
2256 },
[email protected]2f80c312009-02-25 21:26:552257 'conditions': [
[email protected]fd3fb3bf2012-05-23 22:15:162258 ['msvs_use_common_release', {
2259 'includes': ['release.gypi'],
2260 }],
[email protected]7bdd7d7c2012-11-01 10:36:162261 ['release_valgrind_build==0 and tsan==0', {
[email protected]14339762011-04-05 07:36:582262 'defines': [
2263 'NVALGRIND',
2264 'DYNAMIC_ANNOTATIONS_ENABLED=0',
2265 ],
[email protected]ee857512010-05-14 08:24:422266 }, {
[email protected]14339762011-04-05 07:36:582267 'defines': [
2268 'DYNAMIC_ANNOTATIONS_ENABLED=1',
2269 'WTF_USE_DYNAMIC_ANNOTATIONS=1',
2270 ],
[email protected]92822e82009-09-18 14:26:562271 }],
[email protected]7e0d664a2009-12-03 21:07:472272 ['win_use_allocator_shim==0', {
2273 'defines': ['NO_TCMALLOC'],
2274 }],
[email protected]37305ae2012-12-11 01:54:582275 ['os_posix==1 and chromium_code==1', {
2276 # Non-chromium code is not guaranteed to compile cleanly
2277 # with _FORTIFY_SOURCE. Also, fortified build may fail
2278 # when optimizations are disabled, so only do that for Release
2279 # build.
2280 'defines': [
2281 '_FORTIFY_SOURCE=2',
2282 ],
2283 }],
[email protected]7df38122012-11-05 23:54:432284 ['OS=="linux" or OS=="android"', {
[email protected]d8e3b122012-05-31 23:07:542285 'target_conditions': [
2286 ['_toolset=="target"', {
2287 'cflags': [
2288 '<@(release_extra_cflags)',
2289 ],
2290 }],
[email protected]bb05e452009-10-29 21:24:562291 ],
2292 }],
[email protected]2f80c312009-02-25 21:26:552293 ],
2294 },
[email protected]5153767c2009-12-22 01:52:502295 #
2296 # Concrete configurations
2297 #
2298 'Debug': {
2299 'inherit_from': ['Common_Base', 'x86_Base', 'Debug_Base'],
2300 },
2301 'Release': {
2302 'inherit_from': ['Common_Base', 'x86_Base', 'Release_Base'],
[email protected]5153767c2009-12-22 01:52:502303 },
[email protected]f926fa0a2009-08-04 22:50:132304 'conditions': [
2305 [ 'OS=="win"', {
2306 # TODO(bradnelson): add a gyp mechanism to make this more graceful.
[email protected]ef4fa4072009-12-04 22:46:502307 'Debug_x64': {
[email protected]5153767c2009-12-22 01:52:502308 'inherit_from': ['Common_Base', 'x64_Base', 'Debug_Base'],
[email protected]78263c12009-11-01 23:45:302309 },
2310 'Release_x64': {
[email protected]5153767c2009-12-22 01:52:502311 'inherit_from': ['Common_Base', 'x64_Base', 'Release_Base'],
[email protected]78263c12009-11-01 23:45:302312 },
[email protected]f926fa0a2009-08-04 22:50:132313 }],
2314 ],
[email protected]2f80c312009-02-25 21:26:552315 },
2316 },
2317 'conditions': [
[email protected]43539ec2012-11-20 22:35:252318 ['os_posix==1', {
2319 'target_defaults': {
2320 'cflags': [
2321 # TODO(phajdan.jr): Use -fstack-protector-strong when our gcc
2322 # supports it.
2323 '-fstack-protector',
2324 '--param=ssp-buffer-size=4',
2325 ],
2326 'ldflags': [
2327 '-Wl,-z,now',
2328 '-Wl,-z,relro',
2329 ],
[email protected]43539ec2012-11-20 22:35:252330 },
2331 }],
[email protected]1e013672012-06-29 22:12:202332 ['os_posix==1 and OS!="mac" and OS!="ios"', {
[email protected]9d384032009-03-20 23:13:262333 'target_defaults': {
[email protected]5315f2842009-04-28 00:43:272334 # Enable -Werror by default, but put it in a variable so it can
2335 # be disabled in ~/.gyp/include.gypi on the valgrind builders.
2336 'variables': {
[email protected]cbbb3472012-01-25 18:32:312337 'werror%': '-Werror',
[email protected]1e013672012-06-29 22:12:202338 'libraries_for_target%': '',
[email protected]5315f2842009-04-28 00:43:272339 },
[email protected]6863896f2012-01-25 17:51:362340 'defines': [
2341 '_FILE_OFFSET_BITS=64',
2342 ],
[email protected]9d384032009-03-20 23:13:262343 'cflags': [
[email protected]1bba09c2009-08-13 12:53:162344 '<(werror)', # See note above about the werror variable.
2345 '-pthread',
2346 '-fno-exceptions',
[email protected]ef8c3cf2012-01-24 04:37:292347 '-fno-strict-aliasing', # See http://crbug.com/32204
[email protected]1bba09c2009-08-13 12:53:162348 '-Wall',
[email protected]0fa17082010-03-26 00:48:052349 # TODO(evan): turn this back on once all the builds work.
2350 # '-Wextra',
[email protected]225c8f52010-02-05 22:23:202351 # Don't warn about unused function params. We use those everywhere.
2352 '-Wno-unused-parameter',
2353 # Don't warn about the "struct foo f = {0};" initialization pattern.
2354 '-Wno-missing-field-initializers',
[email protected]3df6e3a2010-01-21 20:23:122355 # Don't export any symbols (for example, to plugins we dlopen()).
2356 # Note: this is *required* to make some plugins work.
2357 '-fvisibility=hidden',
[email protected]7ca6ce12010-09-15 23:39:352358 '-pipe',
[email protected]8a2fcba2009-07-29 00:52:242359 ],
2360 'cflags_cc': [
[email protected]832d0212009-10-28 19:12:222361 '-fno-rtti',
[email protected]8a2fcba2009-07-29 00:52:242362 '-fno-threadsafe-statics',
[email protected]f5986c42009-11-17 18:39:362363 # Make inline functions have hidden visiblity by default.
2364 # Surprisingly, not covered by -fvisibility=hidden.
2365 '-fvisibility-inlines-hidden',
[email protected]554abd902011-07-25 04:03:172366 # GCC turns on -Wsign-compare for C++ under -Wall, but clang doesn't,
2367 # so we specify it explicitly.
2368 # TODO(fischman): remove this if http://llvm.org/PR10448 obsoletes it.
[email protected]d16bd642011-07-25 23:59:182369 # http://code.google.com/p/chromium/issues/detail?id=90453
[email protected]554abd902011-07-25 04:03:172370 '-Wsign-compare',
[email protected]9d384032009-03-20 23:13:262371 ],
[email protected]a6cf87e2009-04-03 04:07:382372 'ldflags': [
[email protected]138241f2010-03-30 23:53:102373 '-pthread', '-Wl,-z,noexecstack',
[email protected]9d384032009-03-20 23:13:262374 ],
[email protected]1e013672012-06-29 22:12:202375 'libraries' : [
2376 '<(libraries_for_target)',
2377 ],
[email protected]3aacaf952009-04-02 15:34:092378 'configurations': {
[email protected]5153767c2009-12-22 01:52:502379 'Debug_Base': {
[email protected]c5bdc032009-04-20 19:11:312380 'variables': {
2381 'debug_optimize%': '0',
2382 },
[email protected]3aacaf952009-04-02 15:34:092383 'defines': [
2384 '_DEBUG',
2385 ],
2386 'cflags': [
[email protected]95ad2032012-08-24 00:49:252387 '-O>(debug_optimize)',
[email protected]3aacaf952009-04-02 15:34:092388 '-g',
2389 ],
[email protected]da1c8d692011-09-20 20:35:012390 'conditions' : [
[email protected]fa9d4e262012-08-21 04:39:002391 ['OS=="android" and android_full_debug==0', {
[email protected]8a37e4502012-08-14 22:42:552392 # Some configurations are copied from Release_Base to reduce
2393 # the binary size.
2394 'variables': {
2395 'debug_optimize%': 's',
2396 },
[email protected]da1c8d692011-09-20 20:35:012397 'cflags': [
[email protected]8a37e4502012-08-14 22:42:552398 '-fomit-frame-pointer',
2399 '-fdata-sections',
2400 '-ffunction-sections',
[email protected]da1c8d692011-09-20 20:35:012401 ],
[email protected]8a37e4502012-08-14 22:42:552402 'ldflags': [
2403 '-Wl,-O1',
2404 '-Wl,--as-needed',
2405 '-Wl,--gc-sections',
2406 ],
[email protected]da1c8d692011-09-20 20:35:012407 }],
2408 ],
[email protected]5315f2842009-04-28 00:43:272409 },
[email protected]5153767c2009-12-22 01:52:502410 'Release_Base': {
[email protected]740e2de2009-07-21 11:41:012411 'variables': {
2412 'release_optimize%': '2',
[email protected]1dd529642010-05-15 01:02:512413 # Binaries become big and gold is unable to perform GC
2414 # and remove unused sections for some of test targets
2415 # on 32 bit platform.
2416 # (This is currently observed only in chromeos valgrind bots)
2417 # The following flag is to disable --gc-sections linker
2418 # option for these bots.
2419 'no_gc_sections%': 0,
[email protected]409dceef2011-05-10 19:49:122420
2421 # TODO(bradnelson): reexamine how this is done if we change the
2422 # expansion of configurations
2423 'release_valgrind_build%': 0,
[email protected]740e2de2009-07-21 11:41:012424 },
[email protected]3aacaf952009-04-02 15:34:092425 'cflags': [
[email protected]296ce7ce2012-08-02 19:41:182426 '-O<(release_optimize)',
[email protected]d8cc3a62009-04-08 18:29:532427 # Don't emit the GCC version ident directives, they just end up
2428 # in the .comment section taking up binary size.
2429 '-fno-ident',
2430 # Put data and code in their own sections, so that unused symbols
2431 # can be removed at link time with --gc-sections.
2432 '-fdata-sections',
2433 '-ffunction-sections',
[email protected]3aacaf952009-04-02 15:34:092434 ],
[email protected]c902f2c2010-08-06 20:04:182435 'ldflags': [
2436 # Specifically tell the linker to perform optimizations.
2437 # See http://lwn.net/Articles/192624/ .
2438 '-Wl,-O1',
[email protected]27c2e492010-08-06 22:55:222439 '-Wl,--as-needed',
[email protected]c902f2c2010-08-06 20:04:182440 ],
[email protected]1dd529642010-05-15 01:02:512441 'conditions' : [
2442 ['no_gc_sections==0', {
2443 'ldflags': [
2444 '-Wl,--gc-sections',
2445 ],
2446 }],
[email protected]da1c8d692011-09-20 20:35:012447 ['OS=="android"', {
[email protected]48de0fc2012-08-02 11:03:582448 'variables': {
2449 'release_optimize%': 's',
2450 },
[email protected]da1c8d692011-09-20 20:35:012451 'cflags': [
2452 '-fomit-frame-pointer',
2453 ],
2454 }],
[email protected]ecf7b6482010-10-13 09:15:202455 ['clang==1', {
2456 'cflags!': [
2457 '-fno-ident',
2458 ],
2459 }],
[email protected]7664ab32011-02-01 23:35:252460 ['profiling==1', {
2461 'cflags': [
2462 '-fno-omit-frame-pointer',
2463 '-g',
2464 ],
2465 }],
[email protected]8d726a42012-02-09 03:49:002466 ],
[email protected]3aacaf952009-04-02 15:34:092467 },
2468 },
[email protected]601b540222009-04-03 21:32:042469 'variants': {
2470 'coverage': {
2471 'cflags': ['-fprofile-arcs', '-ftest-coverage'],
2472 'ldflags': ['-fprofile-arcs'],
2473 },
2474 'profile': {
2475 'cflags': ['-pg', '-g'],
2476 'ldflags': ['-pg'],
2477 },
2478 'symbols': {
2479 'cflags': ['-g'],
2480 },
2481 },
[email protected]606116d22009-05-06 22:38:232482 'conditions': [
[email protected]04b482602011-09-14 02:36:212483 ['target_arch=="ia32"', {
2484 'target_conditions': [
2485 ['_toolset=="target"', {
2486 'asflags': [
2487 # Needed so that libs with .s files (e.g. libicudata.a)
2488 # are compatible with the general 32-bit-ness.
2489 '-32',
2490 ],
2491 # All floating-point computations on x87 happens in 80-bit
2492 # precision. Because the C and C++ language standards allow
2493 # the compiler to keep the floating-point values in higher
2494 # precision than what's specified in the source and doing so
2495 # is more efficient than constantly rounding up to 64-bit or
2496 # 32-bit precision as specified in the source, the compiler,
2497 # especially in the optimized mode, tries very hard to keep
2498 # values in x87 floating-point stack (in 80-bit precision)
2499 # as long as possible. This has important side effects, that
2500 # the real value used in computation may change depending on
2501 # how the compiler did the optimization - that is, the value
2502 # kept in 80-bit is different than the value rounded down to
2503 # 64-bit or 32-bit. There are possible compiler options to
2504 # make this behavior consistent (e.g. -ffloat-store would keep
2505 # all floating-values in the memory, thus force them to be
2506 # rounded to its original precision) but they have significant
2507 # runtime performance penalty.
2508 #
2509 # -mfpmath=sse -msse2 makes the compiler use SSE instructions
2510 # which keep floating-point values in SSE registers in its
2511 # native precision (32-bit for single precision, and 64-bit
2512 # for double precision values). This means the floating-point
2513 # value used during computation does not change depending on
2514 # how the compiler optimized the code, since the value is
2515 # always kept in its specified precision.
2516 'conditions': [
2517 ['branding=="Chromium" and disable_sse2==0', {
2518 'cflags': [
2519 '-march=pentium4',
2520 '-msse2',
2521 '-mfpmath=sse',
2522 ],
2523 }],
2524 # ChromeOS targets Pinetrail, which is sse3, but most of the
2525 # benefit comes from sse2 so this setting allows ChromeOS
2526 # to build on other CPUs. In the future -march=atom would
2527 # help but requires a newer compiler.
2528 ['chromeos==1 and disable_sse2==0', {
2529 'cflags': [
2530 '-msse2',
2531 ],
2532 }],
2533 # Install packages have started cropping up with
2534 # different headers between the 32-bit and 64-bit
2535 # versions, so we have to shadow those differences off
2536 # and make sure a 32-bit-on-64-bit build picks up the
2537 # right files.
[email protected]32594022012-05-10 03:22:282538 # For android build, use NDK headers instead of host headers
2539 ['host_arch!="ia32" and OS!="android"', {
[email protected]04b482602011-09-14 02:36:212540 'include_dirs+': [
2541 '/usr/include32',
2542 ],
2543 }],
2544 ],
2545 # -mmmx allows mmintrin.h to be used for mmx intrinsics.
2546 # video playback is mmx and sse2 optimized.
[email protected]ffde7932009-05-29 00:39:062547 'cflags': [
[email protected]04b482602011-09-14 02:36:212548 '-m32',
2549 '-mmmx',
2550 ],
2551 'ldflags': [
2552 '-m32',
[email protected]ffde7932009-05-29 00:39:062553 ],
2554 }],
[email protected]606116d22009-05-06 22:38:232555 ],
2556 }],
[email protected]3dda8a962009-08-10 18:58:072557 ['target_arch=="arm"', {
[email protected]77c1b29392009-12-04 06:21:292558 'target_conditions': [
2559 ['_toolset=="target"', {
2560 'cflags_cc': [
2561 # The codesourcery arm-2009q3 toolchain warns at that the ABI
2562 # has changed whenever it encounters a varargs function. This
2563 # silences those warnings, as they are not helpful and
2564 # clutter legitimate warnings.
2565 '-Wno-abi',
2566 ],
2567 'conditions': [
[email protected]da1c8d692011-09-20 20:35:012568 ['arm_thumb==1', {
[email protected]77c1b29392009-12-04 06:21:292569 'cflags': [
2570 '-mthumb',
[email protected]77c1b29392009-12-04 06:21:292571 ]
2572 }],
2573 ['armv7==1', {
[email protected]dc9711f2009-11-13 19:30:252574 'cflags': [
2575 '-march=armv7-a',
2576 '-mtune=cortex-a8',
[email protected]7fc96c82012-07-24 18:15:112577 '-mfloat-abi=<(arm_float_abi)',
[email protected]dc9711f2009-11-13 19:30:252578 ],
[email protected]eafc0b452010-02-26 21:53:432579 'conditions': [
2580 ['arm_neon==1', {
2581 'cflags': [ '-mfpu=neon', ],
2582 }, {
[email protected]53e0f642010-03-05 01:41:562583 'cflags': [ '-mfpu=<(arm_fpu)', ],
[email protected]220ea5932012-08-09 10:44:072584 }],
[email protected]eafc0b452010-02-26 21:53:432585 ],
[email protected]dc9711f2009-11-13 19:30:252586 }],
[email protected]da1c8d692011-09-20 20:35:012587 ['OS=="android"', {
[email protected]7b1112c2012-03-16 22:03:532588 # Most of the following flags are derived from what Android
2589 # uses by default when building for arm, reference for which
2590 # can be found in the following file in the Android NDK:
2591 # toolchains/arm-linux-androideabi-4.4.3/setup.mk
2592 'cflags': [
2593 # The tree-sra optimization (scalar replacement for
2594 # aggregates enabling subsequent optimizations) leads to
2595 # invalid code generation when using the Android NDK's
2596 # compiler (r5-r7). This can be verified using
2597 # TestWebKitAPI's WTF.Checked_int8_t test.
2598 '-fno-tree-sra',
[email protected]9cc13e42012-08-20 20:09:482599 '-fuse-ld=gold',
[email protected]7b1112c2012-03-16 22:03:532600 '-Wno-psabi',
2601 ],
[email protected]ad17e342012-07-17 20:45:482602 # Android now supports .relro sections properly.
2603 # NOTE: While these flags enable the generation of .relro
2604 # sections, the generated libraries can still be loaded on
2605 # older Android platform versions.
2606 'ldflags': [
2607 '-Wl,-z,relro',
2608 '-Wl,-z,now',
[email protected]9cc13e42012-08-20 20:09:482609 '-fuse-ld=gold',
[email protected]ad17e342012-07-17 20:45:482610 ],
[email protected]da1c8d692011-09-20 20:35:012611 'conditions': [
[email protected]94cdbf42012-12-11 19:49:222612 ['arm_thumb==1', {
[email protected]da1c8d692011-09-20 20:35:012613 # Android toolchain doesn't support -mimplicit-it=thumb
[email protected]94cdbf42012-12-11 19:49:222614 'cflags!': [ '-Wa,-mimplicit-it=thumb' ],
2615 'cflags': [ '-mthumb-interwork' ],
[email protected]da1c8d692011-09-20 20:35:012616 }],
2617 ['armv7==0', {
2618 # Flags suitable for Android emulator
2619 'cflags': [
2620 '-march=armv5te',
2621 '-mtune=xscale',
2622 '-msoft-float',
[email protected]6863896f2012-01-25 17:51:362623 ],
2624 'defines': [
2625 '__ARM_ARCH_5__',
2626 '__ARM_ARCH_5T__',
2627 '__ARM_ARCH_5E__',
2628 '__ARM_ARCH_5TE__',
[email protected]da1c8d692011-09-20 20:35:012629 ],
2630 }],
[email protected]4c48ef102012-11-29 22:00:382631 ['profiling==1', {
2632 'cflags': [
2633 '-marm', # Probably reduntant, but recommend by "perf" docs.
2634 '-mapcs-frame', # Seems required by -fno-omit-frame-pointer.
2635 ],
2636 }],
[email protected]220ea5932012-08-09 10:44:072637 ['clang==1', {
2638 'cflags!': [
2639 # Clang does not support the following options.
2640 '-mthumb-interwork',
2641 '-finline-limit=64',
2642 '-fno-tree-sra',
[email protected]9cc13e42012-08-20 20:09:482643 '-fuse-ld=gold',
[email protected]220ea5932012-08-09 10:44:072644 '-Wno-psabi',
2645 ],
2646 }],
[email protected]da1c8d692011-09-20 20:35:012647 ],
[email protected]3cf73842012-11-24 03:35:252648 'target_conditions': [
2649 # ndk-build copies .a's around the filesystem, breaking
2650 # relative paths in thin archives. Disable using thin
2651 # archives to avoid problems until one of these is fixed:
2652 # http://code.google.com/p/android/issues/detail?id=40302
2653 # http://code.google.com/p/android/issues/detail?id=40303
2654 ['_type=="static_library"', {
2655 'standalone_static_library': 1,
2656 }],
2657 ],
[email protected]da1c8d692011-09-20 20:35:012658 }],
[email protected]3dda8a962009-08-10 18:58:072659 ],
2660 }],
2661 ],
2662 }],
[email protected]2fb843b2010-08-12 02:11:082663 ['linux_fpic==1', {
[email protected]c76723a2010-01-25 23:10:582664 'cflags': [
2665 '-fPIC',
2666 ],
[email protected]d3f692b32011-12-14 19:04:352667 'ldflags': [
2668 '-fPIC',
2669 ],
[email protected]c76723a2010-01-25 23:10:582670 }],
[email protected]ee28c9f2009-09-04 01:53:012671 ['sysroot!=""', {
[email protected]fd36ce822009-10-28 20:13:572672 'target_conditions': [
2673 ['_toolset=="target"', {
2674 'cflags': [
2675 '--sysroot=<(sysroot)',
2676 ],
2677 'ldflags': [
2678 '--sysroot=<(sysroot)',
2679 ],
2680 }]]
[email protected]ee28c9f2009-09-04 01:53:012681 }],
[email protected]58680ce2010-09-18 00:09:152682 ['clang==1', {
[email protected]18ca15a2011-08-10 03:07:122683 'cflags': [
2684 '-Wheader-hygiene',
2685 # Clang spots more unused functions.
2686 '-Wno-unused-function',
2687 # Don't die on dtoa code that uses a char as an array index.
2688 '-Wno-char-subscripts',
[email protected]d6431722011-09-01 00:46:332689 # Especially needed for gtest macros using enum values from Mac
2690 # system headers.
2691 # TODO(pkasting): In C++11 this is legal, so this should be
2692 # removed when we change to that. (This is also why we don't
2693 # bother fixing all these cases today.)
[email protected]18ca15a2011-08-10 03:07:122694 '-Wno-unnamed-type-template-args',
[email protected]aae0e592012-11-15 00:25:532695 # This (rightfully) complains about 'override', which we use
[email protected]241109b52011-10-15 19:00:302696 # heavily.
2697 '-Wno-c++11-extensions',
[email protected]9242c7642012-01-29 09:02:102698
2699 # Warns on switches on enums that cover all enum values but
2700 # also contain a default: branch. Chrome is full of that.
2701 '-Wno-covered-switch-default',
[email protected]18ca15a2011-08-10 03:07:122702 ],
2703 'cflags!': [
2704 # Clang doesn't seem to know know this flag.
2705 '-mfpmath=sse',
2706 ],
[email protected]58680ce2010-09-18 00:09:152707 }],
[email protected]5d451ad2011-02-11 16:43:462708 ['clang==1 and clang_use_chrome_plugins==1', {
[email protected]d23720682011-08-11 00:16:262709 'cflags': [
[email protected]c872dc52012-05-19 06:36:312710 '<@(clang_chrome_plugins_flags)',
[email protected]d23720682011-08-11 00:16:262711 ],
[email protected]5d451ad2011-02-11 16:43:462712 }],
[email protected]4a9ac22e2011-12-02 03:41:532713 ['clang==1 and clang_load!=""', {
[email protected]d23720682011-08-11 00:16:262714 'cflags': [
2715 '-Xclang', '-load', '-Xclang', '<(clang_load)',
[email protected]4a9ac22e2011-12-02 03:41:532716 ],
2717 }],
2718 ['clang==1 and clang_add_plugin!=""', {
2719 'cflags': [
[email protected]d23720682011-08-11 00:16:262720 '-Xclang', '-add-plugin', '-Xclang', '<(clang_add_plugin)',
2721 ],
[email protected]5e781232011-01-28 02:57:592722 }],
[email protected]2616d45d2012-01-19 03:15:482723 ['clang==1 and "<(GENERATOR)"=="ninja"', {
2724 'cflags': [
2725 # See http://crbug.com/110262
2726 '-fcolor-diagnostics',
2727 ],
2728 }],
[email protected]92799b632011-08-15 14:33:062729 ['asan==1', {
[email protected]1ffc3b3962012-05-16 14:08:422730 'target_conditions': [
2731 ['_toolset=="target"', {
[email protected]cb770a4c2012-07-25 20:06:452732 'cflags': [
[email protected]48688df02012-11-27 21:04:562733 '-fsanitize=address',
[email protected]cb770a4c2012-07-25 20:06:452734 '-fno-omit-frame-pointer',
[email protected]48688df02012-11-27 21:04:562735 '-w', # http://crbug.com/162783
[email protected]cb770a4c2012-07-25 20:06:452736 ],
2737 'ldflags': [
[email protected]48688df02012-11-27 21:04:562738 '-fsanitize=address',
[email protected]cb770a4c2012-07-25 20:06:452739 ],
2740 'defines': [
2741 'ADDRESS_SANITIZER',
2742 ],
[email protected]1ffc3b3962012-05-16 14:08:422743 }],
[email protected]921c7b52011-11-25 10:34:352744 ],
[email protected]92799b632011-08-15 14:33:062745 }],
[email protected]c9a829272012-07-04 07:51:122746 ['tsan==1', {
2747 'target_conditions': [
2748 ['_toolset=="target"', {
[email protected]cb770a4c2012-07-25 20:06:452749 'cflags': [
[email protected]927a9d672012-11-09 11:28:202750 '-fsanitize=thread',
[email protected]cb770a4c2012-07-25 20:06:452751 '-fno-omit-frame-pointer',
2752 '-fPIE',
[email protected]927a9d672012-11-09 11:28:202753 '-mllvm', '-tsan-blacklist=<(tsan_blacklist)',
[email protected]cb770a4c2012-07-25 20:06:452754 ],
2755 'ldflags': [
[email protected]927a9d672012-11-09 11:28:202756 '-fsanitize=thread',
[email protected]cb770a4c2012-07-25 20:06:452757 ],
2758 'defines': [
2759 'THREAD_SANITIZER',
2760 'DYNAMIC_ANNOTATIONS_EXTERNAL_IMPL=1',
[email protected]7bdd7d7c2012-11-01 10:36:162761 'WTF_USE_DYNAMIC_ANNOTATIONS_NOIMPL=1',
[email protected]cb770a4c2012-07-25 20:06:452762 ],
2763 'target_conditions': [
2764 ['_type=="executable"', {
2765 'ldflags': [
[email protected]c9a829272012-07-04 07:51:122766 '-pie',
[email protected]cb770a4c2012-07-25 20:06:452767 ],
2768 }],
2769 ],
[email protected]c9a829272012-07-04 07:51:122770 }],
2771 ],
2772 }],
[email protected]8a48f3f2012-12-04 20:14:042773 ['order_profiling!=0 and (chromeos==1 or OS=="linux" or OS=="android")', {
[email protected]8a6abd12012-05-16 10:04:442774 'target_conditions' : [
2775 ['_toolset=="target"', {
2776 'cflags': [
2777 '-finstrument-functions',
[email protected]c2a8d2e2012-10-05 09:31:452778 # Allow mmx intrinsics to inline, so that the
2779 # compiler can expand the intrinsics.
2780 '-finstrument-functions-exclude-file-list=mmintrin.h',
[email protected]8a6abd12012-05-16 10:04:442781 ],
2782 }],
2783 ],
2784 }],
[email protected]cbd5fd52009-08-26 00:14:272785 ['linux_breakpad==1', {
[email protected]c87efd42010-08-26 18:28:172786 'cflags': [ '-g' ],
[email protected]cbd5fd52009-08-26 00:14:272787 'defines': ['USE_LINUX_BREAKPAD'],
[email protected]c50c8d72012-11-15 00:29:252788 'conditions': [
2789 ['target_arch=="ia32"', {
2790 'target_conditions': [
2791 ['_toolset=="target"', {
2792 'ldflags': [
2793 # Workaround for linker OOM. http://crbug.com/160253.
2794 '-Wl,--no-keep-files-mapped',
2795 ],
2796 }],
2797 ],
2798 }],
2799 ],
[email protected]cbd5fd52009-08-26 00:14:272800 }],
[email protected]d8b60602010-03-26 09:41:222801 ['linux_use_heapchecker==1', {
2802 'variables': {'linux_use_tcmalloc%': 1},
[email protected]cea4aec2012-01-24 12:26:402803 'defines': ['USE_HEAPCHECKER'],
[email protected]d8b60602010-03-26 09:41:222804 }],
[email protected]61a9b2d82010-02-26 00:31:082805 ['linux_use_tcmalloc==0', {
2806 'defines': ['NO_TCMALLOC'],
[email protected]01699e22009-11-11 19:24:242807 }],
[email protected]64e2d4a42010-08-27 10:13:212808 ['linux_keep_shadow_stacks==1', {
2809 'defines': ['KEEP_SHADOW_STACKS'],
[email protected]987a7422012-02-23 19:10:512810 'cflags': [
2811 '-finstrument-functions',
2812 # Allow mmx intrinsics to inline, so that the compiler can expand
2813 # the intrinsics.
2814 '-finstrument-functions-exclude-file-list=mmintrin.h',
2815 ],
[email protected]64e2d4a42010-08-27 10:13:212816 }],
[email protected]8d726a42012-02-09 03:49:002817 ['linux_use_gold_flags==1', {
[email protected]68d01e82012-12-08 03:36:322818 'ldflags': [
2819 # Experimentation found that using four linking threads
2820 # saved ~20% of link time.
2821 # https://groups.google.com/a/chromium.org/group/chromium-dev/browse_thread/thread/281527606915bb36
2822 '-Wl,--threads',
2823 '-Wl,--thread-count=4',
2824 ],
[email protected]8d726a42012-02-09 03:49:002825 'conditions': [
2826 ['release_valgrind_build==0', {
2827 'target_conditions': [
2828 ['_toolset=="target"', {
2829 'ldflags': [
2830 # There seems to be a conflict of --icf and -pie
2831 # in gold which can generate crashy binaries. As
2832 # a security measure, -pie takes precendence for
2833 # now.
2834 #'-Wl,--icf=safe',
2835 '-Wl,--icf=none',
2836 ],
2837 }],
2838 ],
2839 }],
2840 ],
2841 }],
[email protected]b07806c12012-02-03 22:44:592842 ['linux_use_gold_binary==1', {
2843 'variables': {
[email protected]516312d2012-02-28 05:17:262844 'conditions': [
2845 ['inside_chromium_build==1', {
2846 # We pass the path to gold to the compiler. gyp leaves
2847 # unspecified what the cwd is when running the compiler,
2848 # so the normal gyp path-munging fails us. This hack
2849 # gets the right path.
2850 'gold_path': '<(PRODUCT_DIR)/../../third_party/gold',
2851 }, {
2852 'gold_path': '<(PRODUCT_DIR)/../../Source/WebKit/chromium/third_party/gold',
2853 }]
2854 ]
[email protected]b07806c12012-02-03 22:44:592855 },
2856 'ldflags': [
2857 # Put our gold binary in the search path for the linker.
2858 '-B<(gold_path)',
2859 ],
2860 }],
[email protected]606116d22009-05-06 22:38:232861 ],
[email protected]9d384032009-03-20 23:13:262862 },
2863 }],
[email protected]c51e8d52009-12-11 20:04:062864 # FreeBSD-specific options; note that most FreeBSD options are set above,
2865 # with Linux.
2866 ['OS=="freebsd"', {
2867 'target_defaults': {
2868 'ldflags': [
2869 '-Wl,--no-keep-memory',
2870 ],
2871 },
2872 }],
[email protected]da1c8d692011-09-20 20:35:012873 # Android-specific options; note that most are set above with Linux.
2874 ['OS=="android"', {
2875 'variables': {
[email protected]25036722012-12-11 10:36:172876 # This is a unique identifier for a given build. It's used for
2877 # identifying various build artifacts corresponding to a particular
2878 # build of chrome (e.g. where to find archived symbols).
2879 'chrome_build_id%': '',
[email protected]da1c8d692011-09-20 20:35:012880 'conditions': [
[email protected]da1c8d692011-09-20 20:35:012881 # Use shared stlport library when system one used.
2882 # Figure this out early since it needs symbols from libgcc.a, so it
2883 # has to be before that in the set of libraries.
2884 ['use_system_stlport==1', {
2885 'android_stlport_library': 'stlport',
2886 }, {
[email protected]806b5232012-11-19 21:19:042887 'conditions': [
2888 ['component=="shared_library"', {
2889 'android_stlport_library': 'stlport_shared',
2890 }, {
2891 'android_stlport_library': 'stlport_static',
2892 }],
2893 ],
[email protected]da1c8d692011-09-20 20:35:012894 }],
2895 ],
2896
2897 # Placing this variable here prevents from forking libvpx, used
2898 # by remoting. Remoting is off, so it needn't built,
2899 # so forking it's deps seems like overkill.
2900 # But this variable need defined to properly run gyp.
2901 # A proper solution is to have an OS==android conditional
2902 # in third_party/libvpx/libvpx.gyp to define it.
2903 'libvpx_path': 'lib/linux/arm',
2904 },
2905 'target_defaults': {
[email protected]da1c8d692011-09-20 20:35:012906 'variables': {
2907 'release_extra_cflags%': '',
[email protected]8a37e4502012-08-14 22:42:552908 },
[email protected]da1c8d692011-09-20 20:35:012909
2910 'target_conditions': [
2911 # Settings for building device targets using Android's toolchain.
2912 # These are based on the setup.mk file from the Android NDK.
2913 #
2914 # The NDK Android executable link step looks as follows:
2915 # $LDFLAGS
2916 # $(TARGET_CRTBEGIN_DYNAMIC_O) <-- crtbegin.o
2917 # $(PRIVATE_OBJECTS) <-- The .o that we built
2918 # $(PRIVATE_STATIC_LIBRARIES) <-- The .a that we built
2919 # $(TARGET_LIBGCC) <-- libgcc.a
2920 # $(PRIVATE_SHARED_LIBRARIES) <-- The .so that we built
2921 # $(PRIVATE_LDLIBS) <-- System .so
2922 # $(TARGET_CRTEND_O) <-- crtend.o
2923 #
2924 # For now the above are approximated for executables by adding
2925 # crtbegin.o to the end of the ldflags and 'crtend.o' to the end
2926 # of 'libraries'.
2927 #
2928 # The NDK Android shared library link step looks as follows:
2929 # $LDFLAGS
2930 # $(PRIVATE_OBJECTS) <-- The .o that we built
2931 # -l,--whole-archive
2932 # $(PRIVATE_WHOLE_STATIC_LIBRARIES)
2933 # -l,--no-whole-archive
2934 # $(PRIVATE_STATIC_LIBRARIES) <-- The .a that we built
2935 # $(TARGET_LIBGCC) <-- libgcc.a
2936 # $(PRIVATE_SHARED_LIBRARIES) <-- The .so that we built
2937 # $(PRIVATE_LDLIBS) <-- System .so
2938 #
[email protected]ad17e342012-07-17 20:45:482939 # For now, assume that whole static libraries are not needed.
[email protected]da1c8d692011-09-20 20:35:012940 #
2941 # For both executables and shared libraries, add the proper
2942 # libgcc.a to the start of libraries which puts it in the
2943 # proper spot after .o and .a files get linked in.
2944 #
2945 # TODO: The proper thing to do longer-tem would be proper gyp
2946 # support for a custom link command line.
2947 ['_toolset=="target"', {
2948 'cflags!': [
2949 '-pthread', # Not supported by Android toolchain.
2950 ],
2951 'cflags': [
[email protected]da1c8d692011-09-20 20:35:012952 '-ffunction-sections',
2953 '-funwind-tables',
2954 '-g',
2955 '-fstack-protector',
2956 '-fno-short-enums',
2957 '-finline-limit=64',
2958 '-Wa,--noexecstack',
[email protected]da1c8d692011-09-20 20:35:012959 '<@(release_extra_cflags)',
[email protected]da1c8d692011-09-20 20:35:012960 ],
2961 'defines': [
2962 'ANDROID',
2963 '__GNU_SOURCE=1', # Necessary for clone()
2964 'USE_STLPORT=1',
2965 '_STLP_USE_PTR_SPECIALIZATIONS=1',
[email protected]25036722012-12-11 10:36:172966 'CHROME_BUILD_ID="<(chrome_build_id)"',
[email protected]da1c8d692011-09-20 20:35:012967 ],
2968 'ldflags!': [
2969 '-pthread', # Not supported by Android toolchain.
2970 ],
2971 'ldflags': [
2972 '-nostdlib',
2973 '-Wl,--no-undefined',
[email protected]da1c8d692011-09-20 20:35:012974 # Don't export symbols from statically linked libraries.
2975 '-Wl,--exclude-libs=ALL',
2976 ],
[email protected]a0e48b02011-11-22 07:53:012977 'libraries': [
2978 '-l<(android_stlport_library)',
2979 # Manually link the libgcc.a that the cross compiler uses.
[email protected]c0f76312012-08-16 13:52:042980 '<!(<(android_toolchain)/*-gcc -print-libgcc-file-name)',
[email protected]a0e48b02011-11-22 07:53:012981 '-lc',
2982 '-ldl',
2983 '-lstdc++',
2984 '-lm',
[email protected]da1c8d692011-09-20 20:35:012985 ],
2986 'conditions': [
[email protected]806b5232012-11-19 21:19:042987 ['component=="shared_library"', {
2988 'libraries': [
2989 '-lgnustl_shared',
2990 ],
[email protected]4d6f9d7db2012-11-21 16:27:472991 'ldflags!': [
2992 '-Wl,--exclude-libs=ALL',
2993 ],
[email protected]806b5232012-11-19 21:19:042994 }],
[email protected]220ea5932012-08-09 10:44:072995 ['clang==1', {
2996 'cflags': [
2997 # Work around incompatibilities between bionic and clang
2998 # headers.
2999 '-D__compiler_offsetof=__builtin_offsetof',
3000 '-Dnan=__builtin_nan',
3001 ],
3002 'conditions': [
3003 ['target_arch=="arm"', {
3004 'cflags': [
3005 '-target arm-linux-androideabi',
3006 '-mllvm -arm-enable-ehabi',
3007 ],
3008 'ldflags': [
3009 '-target arm-linux-androideabi',
3010 ],
3011 }],
3012 ['target_arch=="ia32"', {
3013 'cflags': [
3014 '-target x86-linux-androideabi',
3015 ],
3016 'ldflags': [
3017 '-target x86-linux-androideabi',
3018 ],
3019 }],
3020 ],
3021 }],
[email protected]ed70ed1862012-11-07 12:11:253022 ['asan==1', {
3023 'cflags': [
3024 # Android build relies on -Wl,--gc-sections removing
3025 # unreachable code. ASan instrumentation for globals inhibits
3026 # this and results in a library with unresolvable relocations.
3027 # TODO(eugenis): find a way to reenable this.
3028 '-mllvm -asan-globals=0',
3029 ],
3030 }],
[email protected]da1c8d692011-09-20 20:35:013031 ['android_build_type==0', {
[email protected]34baed112012-06-27 16:10:463032 'defines': [
[email protected]f5c7758a2012-07-25 16:17:573033 # The NDK has these things, but doesn't define the constants
3034 # to say that it does. Define them here instead.
3035 'HAVE_SYS_UIO_H',
3036 ],
3037 'cflags': [
3038 '--sysroot=<(android_ndk_sysroot)',
[email protected]34baed112012-06-27 16:10:463039 ],
[email protected]da1c8d692011-09-20 20:35:013040 'ldflags': [
[email protected]5baf7482011-12-13 16:00:523041 '--sysroot=<(android_ndk_sysroot)',
[email protected]da1c8d692011-09-20 20:35:013042 ],
3043 }],
[email protected]0d7291e2012-10-04 19:16:083044 ['android_build_type==1', {
3045 'include_dirs': [
3046 # OpenAL headers from the Android tree.
3047 '<(android_src)/frameworks/wilhelm/include',
3048 ],
3049 'cflags': [
[email protected]04882132012-11-21 12:40:453050 # Android predefines this as 1; undefine it here so Chromium
3051 # can redefine it later to be 2 for chromium code and unset
3052 # for third party code. This works because cflags are added
3053 # before defines.
3054 '-U_FORTIFY_SOURCE',
[email protected]0d7291e2012-10-04 19:16:083055 # Chromium builds its own (non-third-party) code with
3056 # -Werror to make all warnings into errors. However, Android
3057 # enables warnings that Chromium doesn't, so some of these
3058 # extra warnings trip and break things.
3059 # For now, we leave these warnings enabled but prevent them
3060 # from being treated as errors.
3061 #
3062 # Things that are part of -Wextra:
3063 '-Wno-error=extra', # Enabled by -Wextra, but no specific flag
3064 '-Wno-error=ignored-qualifiers',
3065 '-Wno-error=type-limits',
3066 # Other things unrelated to -Wextra:
3067 '-Wno-error=non-virtual-dtor',
3068 '-Wno-error=sign-promo',
3069 ],
3070 'cflags_cc': [
3071 # Disabling c++0x-compat should be handled in WebKit, but
3072 # this currently doesn't work because gcc_version is not set
3073 # correctly when building with the Android build system.
3074 # TODO(torne): Fix this in WebKit.
3075 '-Wno-error=c++0x-compat',
3076 ],
3077 }],
3078 ['android_build_type==1 and chromium_code==0', {
3079 'cflags': [
3080 # There is a class of warning which:
3081 # 1) Android always enables and also treats as errors
3082 # 2) Chromium ignores in third party code
3083 # For now, I am leaving these warnings enabled but preventing
3084 # them from being treated as errors here.
3085 '-Wno-error=address',
3086 '-Wno-error=format-security',
3087 '-Wno-error=non-virtual-dtor',
3088 '-Wno-error=return-type',
3089 '-Wno-error=sequence-point',
3090 ],
3091 }],
[email protected]febd3572012-05-03 09:17:453092 ['target_arch == "arm"', {
3093 'ldflags': [
3094 # Enable identical code folding to reduce size.
3095 '-Wl,--icf=safe',
3096 ],
3097 }],
[email protected]da1c8d692011-09-20 20:35:013098 # NOTE: The stlport header include paths below are specified in
3099 # cflags rather than include_dirs because they need to come
3100 # after include_dirs. Think of them like system headers, but
3101 # don't use '-isystem' because the arm-linux-androideabi-4.4.3
3102 # toolchain (circa Gingerbread) will exhibit strange errors.
3103 # The include ordering here is important; change with caution.
[email protected]f91ba812012-07-11 00:00:513104 ['use_system_stlport==1', {
3105 'cflags': [
3106 # For libstdc++/include, which is used by stlport.
3107 '-I<(android_src)/bionic',
3108 '-I<(android_src)/external/stlport/stlport',
3109 ],
3110 }, { # else: use_system_stlport!=1
[email protected]da1c8d692011-09-20 20:35:013111 'cflags': [
3112 '-I<(android_ndk_root)/sources/cxx-stl/stlport/stlport',
[email protected]7aa96b12012-12-11 04:29:483113 '-I<(android_ndk_root)/sources/cxx-stl/gnu-libstdc++/4.6/include',
[email protected]da1c8d692011-09-20 20:35:013114 ],
3115 'conditions': [
3116 ['target_arch=="arm" and armv7==1', {
3117 'ldflags': [
3118 '-L<(android_ndk_root)/sources/cxx-stl/stlport/libs/armeabi-v7a',
[email protected]806b5232012-11-19 21:19:043119 '-L<(android_ndk_root)/sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi-v7a',
[email protected]da1c8d692011-09-20 20:35:013120 ],
3121 }],
3122 ['target_arch=="arm" and armv7==0', {
3123 'ldflags': [
3124 '-L<(android_ndk_root)/sources/cxx-stl/stlport/libs/armeabi',
[email protected]806b5232012-11-19 21:19:043125 '-L<(android_ndk_root)/sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi',
[email protected]da1c8d692011-09-20 20:35:013126 ],
3127 }],
3128 ['target_arch=="ia32"', {
3129 'ldflags': [
3130 '-L<(android_ndk_root)/sources/cxx-stl/stlport/libs/x86',
[email protected]806b5232012-11-19 21:19:043131 '-L<(android_ndk_root)/sources/cxx-stl/gnu-libstdc++/4.6/libs/x86',
[email protected]da1c8d692011-09-20 20:35:013132 ],
3133 }],
3134 ],
3135 }],
3136 ['target_arch=="ia32"', {
3137 # The x86 toolchain currently has problems with stack-protector.
3138 'cflags!': [
3139 '-fstack-protector',
3140 ],
3141 'cflags': [
3142 '-fno-stack-protector',
3143 ],
3144 }],
3145 ],
3146 'target_conditions': [
3147 ['_type=="executable"', {
3148 'ldflags': [
3149 '-Bdynamic',
3150 '-Wl,-dynamic-linker,/system/bin/linker',
3151 '-Wl,--gc-sections',
3152 '-Wl,-z,nocopyreloc',
3153 # crtbegin_dynamic.o should be the last item in ldflags.
3154 '<(android_ndk_lib)/crtbegin_dynamic.o',
3155 ],
3156 'libraries': [
3157 # crtend_android.o needs to be the last item in libraries.
3158 # Do not add any libraries after this!
3159 '<(android_ndk_lib)/crtend_android.o',
3160 ],
[email protected]63a131fd2012-11-06 16:01:213161 'conditions': [
3162 ['asan==1', {
3163 'cflags': [
3164 '-fPIE',
3165 ],
3166 'ldflags': [
3167 '-pie',
3168 ],
3169 }],
3170 ],
[email protected]da1c8d692011-09-20 20:35:013171 }],
[email protected]f5c7758a2012-07-25 16:17:573172 ['_type=="shared_library" or _type=="loadable_module"', {
[email protected]da1c8d692011-09-20 20:35:013173 'ldflags': [
3174 '-Wl,-shared,-Bsymbolic',
[email protected]a08029b42012-04-25 03:18:463175 # crtbegin_so.o should be the last item in ldflags.
3176 '<(android_ndk_lib)/crtbegin_so.o',
[email protected]da1c8d692011-09-20 20:35:013177 ],
[email protected]a08029b42012-04-25 03:18:463178 'libraries': [
3179 # crtend_so.o needs to be the last item in libraries.
3180 # Do not add any libraries after this!
3181 '<(android_ndk_lib)/crtend_so.o',
3182 ],
[email protected]da1c8d692011-09-20 20:35:013183 }],
3184 ],
3185 }],
3186 # Settings for building host targets using the system toolchain.
3187 ['_toolset=="host"', {
[email protected]3984aaf2012-02-16 11:42:123188 'cflags!': [
3189 # Due to issues in Clang build system, using ASan on 32-bit
3190 # binaries on x86_64 host is problematic.
3191 # TODO(eugenis): re-enable.
[email protected]48688df02012-11-27 21:04:563192 '-fsanitize=address',
3193 '-w', # http://crbug.com/162783
[email protected]3984aaf2012-02-16 11:42:123194 ],
[email protected]da1c8d692011-09-20 20:35:013195 'ldflags!': [
[email protected]2e82fa52012-11-27 23:41:443196 '-fsanitize=address',
[email protected]da1c8d692011-09-20 20:35:013197 '-Wl,-z,noexecstack',
3198 '-Wl,--gc-sections',
3199 '-Wl,-O1',
3200 '-Wl,--as-needed',
3201 ],
[email protected]965b6b22011-09-29 16:07:283202 'sources/': [
3203 ['exclude', '_android(_unittest)?\\.cc$'],
3204 ['exclude', '(^|/)android/']
3205 ],
[email protected]da1c8d692011-09-20 20:35:013206 }],
3207 ],
3208 },
3209 }],
[email protected]93f21e42010-04-01 00:35:153210 ['OS=="solaris"', {
3211 'cflags!': ['-fvisibility=hidden'],
3212 'cflags_cc!': ['-fvisibility-inlines-hidden'],
3213 }],
[email protected]1e013672012-06-29 22:12:203214 ['OS=="mac" or OS=="ios"', {
[email protected]2f80c312009-02-25 21:26:553215 'target_defaults': {
[email protected]d92c7c012009-03-19 19:26:423216 'mac_bundle': 0,
[email protected]2f80c312009-02-25 21:26:553217 'xcode_settings': {
3218 'ALWAYS_SEARCH_USER_PATHS': 'NO',
[email protected]2429bb732012-10-19 00:24:243219 # Don't link in libarclite_macosx.a, see http://crbug.com/156530.
3220 'CLANG_LINK_OBJC_RUNTIME': 'NO', # -fno-objc-link-runtime
[email protected]ab2956372009-08-13 18:11:043221 'GCC_C_LANGUAGE_STANDARD': 'c99', # -std=c99
3222 'GCC_CW_ASM_SYNTAX': 'NO', # No -fasm-blocks
[email protected]ab2956372009-08-13 18:11:043223 'GCC_ENABLE_CPP_EXCEPTIONS': 'NO', # -fno-exceptions
3224 'GCC_ENABLE_CPP_RTTI': 'NO', # -fno-rtti
3225 'GCC_ENABLE_PASCAL_STRINGS': 'NO', # No -mpascal-strings
[email protected]3224dcd2009-09-16 17:31:253226 # GCC_INLINES_ARE_PRIVATE_EXTERN maps to -fvisibility-inlines-hidden
3227 'GCC_INLINES_ARE_PRIVATE_EXTERN': 'YES',
[email protected]ab2956372009-08-13 18:11:043228 'GCC_OBJC_CALL_CXX_CDTORS': 'YES', # -fobjc-call-cxx-cdtors
3229 'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES', # -fvisibility=hidden
3230 'GCC_THREADSAFE_STATICS': 'NO', # -fno-threadsafe-statics
3231 'GCC_TREAT_WARNINGS_AS_ERRORS': 'YES', # -Werror
[email protected]2f80c312009-02-25 21:26:553232 'GCC_VERSION': '4.2',
[email protected]ab2956372009-08-13 18:11:043233 'GCC_WARN_ABOUT_MISSING_NEWLINE': 'YES', # -Wnewline-eof
[email protected]2f80c312009-02-25 21:26:553234 'USE_HEADERMAP': 'NO',
[email protected]080e86f2010-06-21 15:19:043235 'WARNING_CFLAGS': [
3236 '-Wall',
3237 '-Wendif-labels',
3238 '-Wextra',
3239 # Don't warn about unused function parameters.
3240 '-Wno-unused-parameter',
3241 # Don't warn about the "struct foo f = {0};" initialization
3242 # pattern.
3243 '-Wno-missing-field-initializers',
3244 ],
[email protected]b3fb8092009-03-12 19:09:243245 'conditions': [
3246 ['chromium_mac_pch', {'GCC_PRECOMPILE_PREFIX_HEADER': 'YES'},
[email protected]9543af052009-09-15 22:42:593247 {'GCC_PRECOMPILE_PREFIX_HEADER': 'NO'}
3248 ],
[email protected]2936b8c2012-10-29 10:57:313249 # Note that the prebuilt Clang binaries should not be used for iOS
3250 # development except for ASan builds.
[email protected]66733172010-09-22 00:09:283251 ['clang==1', {
[email protected]34f40892011-09-06 21:53:303252 'CC': '$(SOURCE_ROOT)/<(clang_dir)/clang',
3253 'LDPLUSPLUS': '$(SOURCE_ROOT)/<(clang_dir)/clang++',
[email protected]a79fd882011-10-03 18:22:383254
[email protected]6c648f12011-12-24 07:50:433255 # Don't use -Wc++0x-extensions, which Xcode 4 enables by default
[email protected]aae0e592012-11-15 00:25:533256 # when building with clang. This warning is triggered when the
[email protected]6c648f12011-12-24 07:50:433257 # override keyword is used via the OVERRIDE macro from
3258 # base/compiler_specific.h.
3259 'CLANG_WARN_CXX0X_EXTENSIONS': 'NO',
[email protected]3e893e0c2012-11-16 16:58:443260 # Warn if automatic synthesis is triggered with
3261 # the -Wobjc-missing-property-synthesis flag.
[email protected]aae0e592012-11-15 00:25:533262 'CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS': 'YES',
[email protected]34f40892011-09-06 21:53:303263 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0',
[email protected]66733172010-09-22 00:09:283264 'WARNING_CFLAGS': [
[email protected]7f8d486f2011-04-05 19:49:073265 '-Wheader-hygiene',
[email protected]c67e8ca2012-12-04 16:01:523266
3267 # This warns on using ints as initializers for floats in
3268 # initializer lists (e.g. |int a = f(); CGSize s = { a, a };|),
3269 # which happens in several places in chrome code. Not sure if
3270 # this is worth fixing.
3271 '-Wno-c++11-narrowing',
3272
3273 # This warns about code like |"0x%08"NACL_PRIxPTR| -- with C++11
3274 # user-defined literals, this is now a string literal with a UD
3275 # suffix. However, this is used heavily in NaCl code, so disable
3276 # the warning for now.
3277 '-Wno-reserved-user-defined-literal',
3278
[email protected]66733172010-09-22 00:09:283279 # Don't die on dtoa code that uses a char as an array index.
3280 # This is required solely for base/third_party/dmg_fp/dtoa.cc.
3281 '-Wno-char-subscripts',
[email protected]25d3bb722010-11-22 14:31:453282 # Clang spots more unused functions.
3283 '-Wno-unused-function',
[email protected]9242c7642012-01-29 09:02:103284
3285 # Warns on switches on enums that cover all enum values but
3286 # also contain a default: branch. Chrome is full of that.
3287 '-Wno-covered-switch-default',
[email protected]66733172010-09-22 00:09:283288 ],
[email protected]c67e8ca2012-12-04 16:01:523289 'OTHER_CPLUSPLUSFLAGS': [
3290 # gnu++11 instead of c++11 so that __ANSI_C__ doesn't get
3291 # defined. (Else e.g. finite() in base/float_util.h needs to
3292 # be isfinite() which doesn't exist on the android bots.)
3293 # typeof() is also disabled in c++11 (but we could use
3294 # decltype() instead).
3295 # TODO(thakis): Use CLANG_CXX_LANGUAGE_STANDARD instead once all
3296 # bots use xcode 4 -- http://crbug.com/147515).
3297 # TODO(thakis): Eventually switch this to c++11 instead of
3298 # gnu++11 (once typeof can be removed, which is blocked on c++11
3299 # being available everywhere).
3300 '$(inherited)', '-std=gnu++11',
3301 ],
[email protected]66733172010-09-22 00:09:283302 }],
[email protected]5d451ad2011-02-11 16:43:463303 ['clang==1 and clang_use_chrome_plugins==1', {
3304 'OTHER_CFLAGS': [
[email protected]c872dc52012-05-19 06:36:313305 '<@(clang_chrome_plugins_flags)',
[email protected]5d451ad2011-02-11 16:43:463306 ],
3307 }],
[email protected]4a9ac22e2011-12-02 03:41:533308 ['clang==1 and clang_load!=""', {
[email protected]5e781232011-01-28 02:57:593309 'OTHER_CFLAGS': [
3310 '-Xclang', '-load', '-Xclang', '<(clang_load)',
[email protected]4a9ac22e2011-12-02 03:41:533311 ],
3312 }],
3313 ['clang==1 and clang_add_plugin!=""', {
3314 'OTHER_CFLAGS': [
[email protected]5e781232011-01-28 02:57:593315 '-Xclang', '-add-plugin', '-Xclang', '<(clang_add_plugin)',
3316 ],
3317 }],
[email protected]2616d45d2012-01-19 03:15:483318 ['clang==1 and "<(GENERATOR)"=="ninja"', {
3319 'OTHER_CFLAGS': [
3320 # See http://crbug.com/110262
3321 '-fcolor-diagnostics',
3322 ],
3323 }],
[email protected]b3fb8092009-03-12 19:09:243324 ],
[email protected]2f80c312009-02-25 21:26:553325 },
[email protected]34f40892011-09-06 21:53:303326 'conditions': [
3327 ['clang==1', {
3328 'variables': {
3329 'clang_dir': '../third_party/llvm-build/Release+Asserts/bin',
3330 },
3331 }],
[email protected]921c7b52011-11-25 10:34:353332 ['asan==1', {
3333 'xcode_settings': {
3334 'OTHER_CFLAGS': [
[email protected]48688df02012-11-27 21:04:563335 '-fsanitize=address',
3336 '-w', # http://crbug.com/162783
[email protected]921c7b52011-11-25 10:34:353337 ],
[email protected]921c7b52011-11-25 10:34:353338 },
3339 'defines': [
3340 'ADDRESS_SANITIZER',
3341 ],
3342 }],
[email protected]34f40892011-09-06 21:53:303343 ],
[email protected]2f80c312009-02-25 21:26:553344 'target_conditions': [
[email protected]2f80c312009-02-25 21:26:553345 ['_type!="static_library"', {
[email protected]5d7dc972009-04-16 15:30:463346 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-search_paths_first']},
[email protected]4281a4e2012-08-24 19:05:083347 'conditions': [
3348 ['asan==1', {
3349 'xcode_settings': {
3350 'OTHER_LDFLAGS': [
[email protected]2e82fa52012-11-27 23:41:443351 '-fsanitize=address',
[email protected]4281a4e2012-08-24 19:05:083352 ],
3353 },
3354 }],
3355 ],
[email protected]5d7dc972009-04-16 15:30:463356 }],
3357 ['_mac_bundle', {
3358 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-ObjC']},
[email protected]87fde4a2009-02-28 00:50:083359 }],
[email protected]2936b8c2012-10-29 10:57:313360 ], # target_conditions
3361 }, # target_defaults
3362 }], # OS=="mac" or OS=="ios"
3363 ['OS=="mac"', {
3364 'target_defaults': {
3365 'variables': {
3366 # These should end with %, but there seems to be a bug with % in
3367 # variables that are intended to be set to different values in
3368 # different targets, like these.
3369 'mac_pie': 1, # Most executables can be position-independent.
[email protected]2936b8c2012-10-29 10:57:313370 # Strip debugging symbols from the target.
3371 'mac_strip': '<(mac_strip_release)',
[email protected]970fd4e2012-12-19 11:09:373372 'conditions': [
3373 ['asan==1', {
3374 'conditions': [
3375 ['mac_want_real_dsym=="default"', {
3376 'mac_real_dsym': 1,
3377 }, {
3378 'mac_real_dsym': '<(mac_want_real_dsym)'
3379 }],
3380 ],
3381 }, {
3382 'conditions': [
3383 ['mac_want_real_dsym=="default"', {
3384 'mac_real_dsym': 0, # Fake .dSYMs are fine in most cases.
3385 }, {
3386 'mac_real_dsym': '<(mac_want_real_dsym)'
3387 }],
3388 ],
3389 }],
3390 ],
[email protected]2936b8c2012-10-29 10:57:313391 },
3392 'xcode_settings': {
3393 'GCC_DYNAMIC_NO_PIC': 'NO', # No -mdynamic-no-pic
3394 # (Equivalent to -fPIC)
3395 # MACOSX_DEPLOYMENT_TARGET maps to -mmacosx-version-min
3396 'MACOSX_DEPLOYMENT_TARGET': '<(mac_deployment_target)',
3397 # Keep pch files below xcodebuild/.
3398 'SHARED_PRECOMPS_DIR': '$(CONFIGURATION_BUILD_DIR)/SharedPrecompiledHeaders',
3399 'OTHER_CFLAGS': [
3400 '-fno-strict-aliasing', # See http://crbug.com/32204
3401 ],
3402 },
3403 'target_conditions': [
[email protected]6303fed2011-08-11 01:12:103404 ['_type=="executable"', {
3405 'postbuilds': [
3406 {
3407 # Arranges for data (heap) pages to be protected against
[email protected]8c40f322011-08-24 03:33:363408 # code execution when running on Mac OS X 10.7 ("Lion"), and
3409 # ensures that the position-independent executable (PIE) bit
3410 # is set for ASLR when running on Mac OS X 10.5 ("Leopard").
[email protected]6303fed2011-08-11 01:12:103411 'variables': {
[email protected]8c40f322011-08-24 03:33:363412 # Define change_mach_o_flags in a variable ending in _path
3413 # so that GYP understands it's a path and performs proper
3414 # relativization during dict merging.
3415 'change_mach_o_flags_path':
3416 'mac/change_mach_o_flags_from_xcode.sh',
[email protected]162407f2011-09-08 15:33:173417 'change_mach_o_flags_options%': [
[email protected]081c0342011-08-24 14:59:133418 ],
3419 'target_conditions': [
[email protected]162407f2011-09-08 15:33:173420 ['mac_pie==0 or release_valgrind_build==1', {
3421 # Don't enable PIE if it's unwanted. It's unwanted if
3422 # the target specifies mac_pie=0 or if building for
3423 # Valgrind, because Valgrind doesn't understand slide.
3424 # See the similar mac_pie/release_valgrind_build check
3425 # below.
[email protected]081c0342011-08-24 14:59:133426 'change_mach_o_flags_options': [
[email protected]081c0342011-08-24 14:59:133427 '--no-pie',
3428 ],
3429 }],
3430 ],
[email protected]6303fed2011-08-11 01:12:103431 },
[email protected]8c40f322011-08-24 03:33:363432 'postbuild_name': 'Change Mach-O Flags',
3433 'action': [
3434 '<(change_mach_o_flags_path)',
[email protected]081c0342011-08-24 14:59:133435 '>@(change_mach_o_flags_options)',
[email protected]8c40f322011-08-24 03:33:363436 ],
[email protected]6303fed2011-08-11 01:12:103437 },
3438 ],
[email protected]5a5d97aa2011-09-02 15:34:003439 'conditions': [
3440 ['asan==1', {
3441 'variables': {
3442 'asan_saves_file': 'asan.saves',
3443 },
3444 'xcode_settings': {
[email protected]6a4cad02011-11-25 07:26:563445 'CHROMIUM_STRIP_SAVE_FILE': '<(asan_saves_file)',
[email protected]5a5d97aa2011-09-02 15:34:003446 },
3447 }],
3448 ],
[email protected]162407f2011-09-08 15:33:173449 'target_conditions': [
3450 ['mac_pie==1 and release_valgrind_build==0', {
3451 # Turn on position-independence (ASLR) for executables. When
3452 # PIE is on for the Chrome executables, the framework will
3453 # also be subject to ASLR.
3454 # Don't do this when building for Valgrind, because Valgrind
3455 # doesn't understand slide. TODO: Make Valgrind on Mac OS X
3456 # understand slide, and get rid of the Valgrind check.
3457 'xcode_settings': {
3458 'OTHER_LDFLAGS': [
3459 '-Wl,-pie', # Position-independent executable (MH_PIE)
3460 ],
3461 },
3462 }],
3463 ],
[email protected]6a0242bc2011-07-01 00:34:463464 }],
[email protected]9a5e72862010-09-02 16:16:583465 ['(_type=="executable" or _type=="shared_library" or \
3466 _type=="loadable_module") and mac_strip!=0', {
[email protected]24700642009-06-01 16:01:203467 'target_conditions': [
3468 ['mac_real_dsym == 1', {
3469 # To get a real .dSYM bundle produced by dsymutil, set the
3470 # debug information format to dwarf-with-dsym. Since
3471 # strip_from_xcode will not be used, set Xcode to do the
3472 # stripping as well.
3473 'configurations': {
[email protected]5153767c2009-12-22 01:52:503474 'Release_Base': {
[email protected]24700642009-06-01 16:01:203475 'xcode_settings': {
3476 'DEBUG_INFORMATION_FORMAT': 'dwarf-with-dsym',
3477 'DEPLOYMENT_POSTPROCESSING': 'YES',
3478 'STRIP_INSTALLED_PRODUCT': 'YES',
[email protected]e14a9f92009-08-05 19:26:073479 'target_conditions': [
[email protected]c2111422010-06-01 18:30:253480 ['_type=="shared_library" or _type=="loadable_module"', {
[email protected]e14a9f92009-08-05 19:26:073481 # The Xcode default is to strip debugging symbols
3482 # only (-S). Local symbols should be stripped as
3483 # well, which will be handled by -x. Xcode will
3484 # continue to insert -S when stripping even when
3485 # additional flags are added with STRIPFLAGS.
3486 'STRIPFLAGS': '-x',
[email protected]c2111422010-06-01 18:30:253487 }], # _type=="shared_library" or _type=="loadable_module"'
[email protected]e14a9f92009-08-05 19:26:073488 ], # target_conditions
3489 }, # xcode_settings
3490 }, # configuration "Release"
3491 }, # configurations
[email protected]24700642009-06-01 16:01:203492 }, { # mac_real_dsym != 1
3493 # To get a fast fake .dSYM bundle, use a post-build step to
3494 # produce the .dSYM and strip the executable. strip_from_xcode
3495 # only operates in the Release configuration.
3496 'postbuilds': [
3497 {
3498 'variables': {
3499 # Define strip_from_xcode in a variable ending in _path
3500 # so that gyp understands it's a path and performs proper
3501 # relativization during dict merging.
3502 'strip_from_xcode_path': 'mac/strip_from_xcode',
3503 },
3504 'postbuild_name': 'Strip If Needed',
3505 'action': ['<(strip_from_xcode_path)'],
3506 },
[email protected]e14a9f92009-08-05 19:26:073507 ], # postbuilds
3508 }], # mac_real_dsym
3509 ], # target_conditions
[email protected]9a5e72862010-09-02 16:16:583510 }], # (_type=="executable" or _type=="shared_library" or
3511 # _type=="loadable_module") and mac_strip!=0
[email protected]e14a9f92009-08-05 19:26:073512 ], # target_conditions
3513 }, # target_defaults
3514 }], # OS=="mac"
[email protected]1e013672012-06-29 22:12:203515 ['OS=="ios"', {
3516 'target_defaults': {
3517 'xcode_settings' : {
3518 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0',
3519
3520 # This next block is mostly common with the 'mac' section above,
3521 # but keying off (or setting) 'clang' isn't valid for iOS as it
3522 # also seems to mean using the custom build of clang.
3523
3524 # Don't use -Wc++0x-extensions, which Xcode 4 enables by default
[email protected]aae0e592012-11-15 00:25:533525 # when building with clang. This warning is triggered when the
[email protected]1e013672012-06-29 22:12:203526 # override keyword is used via the OVERRIDE macro from
3527 # base/compiler_specific.h.
3528 'CLANG_WARN_CXX0X_EXTENSIONS': 'NO',
[email protected]3e893e0c2012-11-16 16:58:443529 # Warn if automatic synthesis is triggered with
3530 # the -Wobjc-missing-property-synthesis flag.
[email protected]aae0e592012-11-15 00:25:533531 'CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS': 'YES',
[email protected]1e013672012-06-29 22:12:203532 'WARNING_CFLAGS': [
3533 '-Wheader-hygiene',
3534 # Don't die on dtoa code that uses a char as an array index.
3535 # This is required solely for base/third_party/dmg_fp/dtoa.cc.
3536 '-Wno-char-subscripts',
3537 # Clang spots more unused functions.
3538 '-Wno-unused-function',
3539 # See comments on this flag higher up in this file.
3540 '-Wno-unnamed-type-template-args',
[email protected]aae0e592012-11-15 00:25:533541 # This (rightfully) complains about 'override', which we use
[email protected]1e013672012-06-29 22:12:203542 # heavily.
3543 '-Wno-c++11-extensions',
3544 ],
3545 },
3546 'target_conditions': [
3547 ['_type=="executable"', {
3548 'configurations': {
3549 'Release_Base': {
3550 'xcode_settings': {
3551 'DEPLOYMENT_POSTPROCESSING': 'YES',
3552 'STRIP_INSTALLED_PRODUCT': 'YES',
3553 },
3554 },
[email protected]3c6aa862012-11-05 17:11:443555 'Debug_Base': {
3556 'xcode_settings': {
3557 # Remove dSYM to reduce build time.
3558 'DEBUG_INFORMATION_FORMAT': 'dwarf',
3559 },
3560 },
[email protected]1e013672012-06-29 22:12:203561 },
3562 'xcode_settings': {
3563 'conditions': [
3564 ['chromium_ios_signing', {
3565 # iOS SDK wants everything for device signed.
3566 'CODE_SIGN_IDENTITY[sdk=iphoneos*]': 'iPhone Developer',
3567 }, {
3568 'CODE_SIGNING_REQUIRED': 'NO',
3569 'CODE_SIGN_IDENTITY[sdk=iphoneos*]': '',
3570 }],
3571 ],
3572 },
3573 }],
3574 ], # target_conditions
3575 }, # target_defaults
3576 }], # OS=="ios"
[email protected]2f80c312009-02-25 21:26:553577 ['OS=="win"', {
3578 'target_defaults': {
3579 'defines': [
[email protected]8e345da2012-07-01 22:10:303580 '_WIN32_WINNT=0x0602',
3581 'WINVER=0x0602',
[email protected]2f80c312009-02-25 21:26:553582 'WIN32',
3583 '_WINDOWS',
[email protected]2f80c312009-02-25 21:26:553584 'NOMINMAX',
[email protected]e3116282011-08-13 00:52:283585 'PSAPI_VERSION=1',
[email protected]2f80c312009-02-25 21:26:553586 '_CRT_RAND_S',
3587 'CERT_CHAIN_PARA_HAS_EXTRA_FIELDS',
3588 'WIN32_LEAN_AND_MEAN',
[email protected]7a812dd62010-06-30 18:52:273589 '_ATL_NO_OPENGL',
[email protected]2f80c312009-02-25 21:26:553590 ],
[email protected]8974e042010-06-21 18:06:523591 'conditions': [
[email protected]2212d272011-12-20 21:37:373592 ['buildtype=="Official"', {
3593 # In official builds, targets can self-select an optimization
3594 # level by defining a variable named 'optimize', and setting it
3595 # to one of
3596 # - "size", optimizes for minimal code size - the default.
3597 # - "speed", optimizes for speed over code size.
3598 # - "max", whole program optimization and link-time code
3599 # generation. This is very expensive and should be used
3600 # sparingly.
3601 'variables': {
3602 'optimize%': 'size',
3603 },
3604 'target_conditions': [
3605 ['optimize=="size"', {
3606 'msvs_settings': {
3607 'VCCLCompilerTool': {
3608 # 1, optimizeMinSpace, Minimize Size (/O1)
3609 'Optimization': '1',
3610 # 2, favorSize - Favor small code (/Os)
3611 'FavorSizeOrSpeed': '2',
3612 },
3613 },
3614 },
3615 ],
3616 ['optimize=="speed"', {
3617 'msvs_settings': {
3618 'VCCLCompilerTool': {
3619 # 2, optimizeMaxSpeed, Maximize Speed (/O2)
3620 'Optimization': '2',
3621 # 1, favorSpeed - Favor fast code (/Ot)
3622 'FavorSizeOrSpeed': '1',
3623 },
3624 },
3625 },
3626 ],
3627 ['optimize=="max"', {
3628 'msvs_settings': {
3629 'VCCLCompilerTool': {
3630 # 2, optimizeMaxSpeed, Maximize Speed (/O2)
3631 'Optimization': '2',
3632 # 1, favorSpeed - Favor fast code (/Ot)
3633 'FavorSizeOrSpeed': '1',
3634 # This implies link time code generation.
3635 'WholeProgramOptimization': 'true',
3636 },
3637 },
3638 },
3639 ],
3640 ],
3641 },
3642 ],
[email protected]8974e042010-06-21 18:06:523643 ['component=="static_library"', {
3644 'defines': [
3645 '_HAS_EXCEPTIONS=0',
3646 ],
3647 }],
[email protected]c7b95392012-03-28 00:25:203648 ['MSVS_VERSION=="2008"', {
3649 'defines': [
3650 '_HAS_TR1=0',
3651 ],
3652 }],
[email protected]3e2648a2011-03-21 20:58:503653 ['secure_atl', {
3654 'defines': [
3655 '_SECURE_ATL',
3656 ],
3657 }],
[email protected]54184ce72012-10-18 07:11:263658 ['msvs_express', {
3659 'configurations': {
3660 'x86_Base': {
3661 'msvs_settings': {
3662 'VCLinkerTool': {
3663 'AdditionalLibraryDirectories':
3664 ['<(windows_driver_kit_path)/lib/ATL/i386'],
3665 },
3666 'VCLibrarianTool': {
3667 'AdditionalLibraryDirectories':
3668 ['<(windows_driver_kit_path)/lib/ATL/i386'],
3669 },
3670 },
3671 },
3672 'x64_Base': {
3673 'msvs_settings': {
3674 'VCLibrarianTool': {
3675 'AdditionalLibraryDirectories':
3676 ['<(windows_driver_kit_path)/lib/ATL/amd64'],
3677 },
3678 'VCLinkerTool': {
3679 'AdditionalLibraryDirectories':
3680 ['<(windows_driver_kit_path)/lib/ATL/amd64'],
3681 },
3682 },
3683 },
3684 },
3685 'msvs_settings': {
3686 'VCLinkerTool': {
3687 # Explicitly required when using the ATL with express
3688 'AdditionalDependencies': ['atlthunk.lib'],
3689
3690 # ATL 8.0 included in WDK 7.1 makes the linker to generate
3691 # almost eight hundred LNK4254 and LNK4078 warnings:
3692 # - warning LNK4254: section 'ATL' (50000040) merged into
3693 # '.rdata' (40000040) with different attributes
3694 # - warning LNK4078: multiple 'ATL' sections found with
3695 # different attributes
3696 'AdditionalOptions': ['/ignore:4254', '/ignore:4078'],
3697 },
3698 },
3699 'msvs_system_include_dirs': [
3700 '<(windows_driver_kit_path)/inc/atl71',
3701 '<(windows_driver_kit_path)/inc/mfc42',
3702 ],
3703 }],
[email protected]8974e042010-06-21 18:06:523704 ],
[email protected]5b5ca7cb2009-07-20 23:00:203705 'msvs_system_include_dirs': [
[email protected]1ab48032012-07-02 21:48:053706 '<(windows_sdk_path)/Include/shared',
3707 '<(windows_sdk_path)/Include/um',
3708 '<(windows_sdk_path)/Include/winrt',
[email protected]1f8d9402012-07-06 22:47:563709 '<(directx_sdk_path)/Include',
[email protected]2f80c312009-02-25 21:26:553710 '$(VSInstallDir)/VC/atlmfc/include',
3711 ],
[email protected]a8d99cef2009-08-26 20:47:493712 'msvs_cygwin_dirs': ['<(DEPTH)/third_party/cygwin'],
[email protected]942c3a60f2011-05-03 02:04:113713 'msvs_disabled_warnings': [4351, 4396, 4503, 4819,
3714 # TODO(maruel): These warnings are level 4. They will be slowly
3715 # removed as code is fixed.
3716 4100, 4121, 4125, 4127, 4130, 4131, 4189, 4201, 4238, 4244, 4245,
3717 4310, 4355, 4428, 4481, 4505, 4510, 4512, 4530, 4610, 4611, 4701,
3718 4702, 4706,
3719 ],
[email protected]2f80c312009-02-25 21:26:553720 'msvs_settings': {
3721 'VCCLCompilerTool': {
[email protected]e9b96bb2012-09-07 01:10:443722 'AdditionalOptions': ['/MP'],
[email protected]2f80c312009-02-25 21:26:553723 'MinimalRebuild': 'false',
[email protected]2f80c312009-02-25 21:26:553724 'BufferSecurityCheck': 'true',
3725 'EnableFunctionLevelLinking': 'true',
3726 'RuntimeTypeInfo': 'false',
[email protected]942c3a60f2011-05-03 02:04:113727 'WarningLevel': '4',
[email protected]2f80c312009-02-25 21:26:553728 'WarnAsError': 'true',
3729 'DebugInformationFormat': '3',
[email protected]3fef6e62009-07-31 19:58:583730 'conditions': [
[email protected]8974e042010-06-21 18:06:523731 ['component=="shared_library"', {
3732 'ExceptionHandling': '1', # /EHsc
3733 }, {
3734 'ExceptionHandling': '0',
3735 }],
[email protected]3fef6e62009-07-31 19:58:583736 ],
[email protected]2f80c312009-02-25 21:26:553737 },
3738 'VCLibrarianTool': {
[email protected]1f9471a2010-01-04 06:40:163739 'AdditionalOptions': ['/ignore:4221'],
[email protected]a78da50e2010-06-09 21:31:373740 'AdditionalLibraryDirectories': [
[email protected]1f8d9402012-07-06 22:47:563741 '<(directx_sdk_path)/Lib/x86',
[email protected]1ab48032012-07-02 21:48:053742 '<(windows_sdk_path)/Lib/win8/um/x86',
[email protected]a78da50e2010-06-09 21:31:373743 ],
[email protected]2f80c312009-02-25 21:26:553744 },
3745 'VCLinkerTool': {
[email protected]2f80c312009-02-25 21:26:553746 'AdditionalDependencies': [
3747 'wininet.lib',
[email protected]b1d8c252011-01-13 20:27:503748 'dnsapi.lib',
[email protected]2f80c312009-02-25 21:26:553749 'version.lib',
3750 'msimg32.lib',
3751 'ws2_32.lib',
3752 'usp10.lib',
3753 'psapi.lib',
[email protected]96fd0032009-04-24 00:13:083754 'dbghelp.lib',
[email protected]dfdf7ee2011-04-28 18:51:483755 'winmm.lib',
3756 'shlwapi.lib',
[email protected]2f80c312009-02-25 21:26:553757 ],
[email protected]60c219832012-03-21 22:59:323758
[email protected]4de39f82011-03-28 12:01:293759 'conditions': [
[email protected]3e2648a2011-03-21 20:58:503760 ['MSVS_VERSION=="2005e"', {
3761 # Non-express versions link automatically to these
3762 'AdditionalDependencies': [
3763 'advapi32.lib',
3764 'comdlg32.lib',
3765 'ole32.lib',
3766 'shell32.lib',
3767 'user32.lib',
3768 'winspool.lib',
3769 ],
3770 }],
3771 ],
[email protected]a78da50e2010-06-09 21:31:373772 'AdditionalLibraryDirectories': [
[email protected]1f8d9402012-07-06 22:47:563773 '<(directx_sdk_path)/Lib/x86',
[email protected]1ab48032012-07-02 21:48:053774 '<(windows_sdk_path)/Lib/win8/um/x86',
[email protected]a78da50e2010-06-09 21:31:373775 ],
[email protected]2f80c312009-02-25 21:26:553776 'GenerateDebugInformation': 'true',
3777 'MapFileName': '$(OutDir)\\$(TargetName).map',
3778 'ImportLibrary': '$(OutDir)\\lib\\$(TargetName).lib',
[email protected]2f80c312009-02-25 21:26:553779 'FixedBaseAddress': '1',
[email protected]825ff8d2009-05-22 01:40:483780 # SubSystem values:
3781 # 0 == not set
3782 # 1 == /SUBSYSTEM:CONSOLE
3783 # 2 == /SUBSYSTEM:WINDOWS
3784 # Most of the executables we'll ever create are tests
3785 # and utilities with console output.
3786 'SubSystem': '1',
[email protected]2f80c312009-02-25 21:26:553787 },
3788 'VCMIDLTool': {
3789 'GenerateStublessProxies': 'true',
[email protected]279904d2012-03-31 00:03:093790 'TypeLibraryName': '$(InputName).tlb',
3791 'OutputDirectory': '$(IntDir)',
3792 'HeaderFileName': '$(InputName).h',
[email protected]4fdb3cc2012-04-07 01:49:333793 'DLLDataFileName': '$(InputName).dlldata.c',
[email protected]279904d2012-03-31 00:03:093794 'InterfaceIdentifierFileName': '$(InputName)_i.c',
3795 'ProxyFileName': '$(InputName)_p.c',
[email protected]2f80c312009-02-25 21:26:553796 },
3797 'VCResourceCompilerTool': {
3798 'Culture' : '1033',
[email protected]4d91cbc2010-05-07 20:41:383799 'AdditionalIncludeDirectories': [
3800 '<(DEPTH)',
3801 '<(SHARED_INTERMEDIATE_DIR)',
3802 ],
[email protected]2f80c312009-02-25 21:26:553803 },
3804 },
3805 },
3806 }],
[email protected]79e2336c2011-05-12 18:18:343807 ['disable_nacl==1', {
[email protected]d8c7cbcc2009-10-02 19:00:313808 'target_defaults': {
3809 'defines': [
3810 'DISABLE_NACL',
3811 ],
3812 },
3813 }],
[email protected]cfbf9bc2009-12-07 22:07:563814 ['OS=="win" and msvs_use_common_linker_extras', {
[email protected]48c7af72009-07-03 22:00:193815 'target_defaults': {
3816 'msvs_settings': {
3817 'VCLinkerTool': {
[email protected]48c7af72009-07-03 22:00:193818 'DelayLoadDLLs': [
3819 'dbghelp.dll',
3820 'dwmapi.dll',
[email protected]e15a4ce52012-01-04 20:11:013821 'shell32.dll',
[email protected]48c7af72009-07-03 22:00:193822 'uxtheme.dll',
3823 ],
3824 },
3825 },
[email protected]ef4fa4072009-12-04 22:46:503826 'configurations': {
[email protected]5153767c2009-12-22 01:52:503827 'x86_Base': {
[email protected]ef4fa4072009-12-04 22:46:503828 'msvs_settings': {
3829 'VCLinkerTool': {
[email protected]1f9471a2010-01-04 06:40:163830 'AdditionalOptions': [
3831 '/safeseh',
[email protected]7cf23ce62012-01-13 02:43:333832 '/dynamicbase',
[email protected]1f9471a2010-01-04 06:40:163833 '/ignore:4199',
3834 '/ignore:4221',
3835 '/nxcompat',
3836 ],
[email protected]ef4fa4072009-12-04 22:46:503837 },
3838 },
3839 },
[email protected]5153767c2009-12-22 01:52:503840 'x64_Base': {
[email protected]ef4fa4072009-12-04 22:46:503841 'msvs_settings': {
3842 'VCLinkerTool': {
[email protected]1f9471a2010-01-04 06:40:163843 'AdditionalOptions': [
[email protected]ef4fa4072009-12-04 22:46:503844 # safeseh is not compatible with x64
[email protected]7cf23ce62012-01-13 02:43:333845 '/dynamicbase',
[email protected]1f9471a2010-01-04 06:40:163846 '/ignore:4199',
3847 '/ignore:4221',
3848 '/nxcompat',
3849 ],
[email protected]ef4fa4072009-12-04 22:46:503850 },
3851 },
3852 },
3853 },
[email protected]48c7af72009-07-03 22:00:193854 },
3855 }],
[email protected]9821d0d2010-04-16 22:40:373856 ['enable_new_npdevice_api==1', {
3857 'target_defaults': {
3858 'defines': [
3859 'ENABLE_NEW_NPDEVICE_API',
3860 ],
3861 },
3862 }],
[email protected]220ea5932012-08-09 10:44:073863 ['clang==1', {
[email protected]f1faf212012-10-05 21:04:233864 'conditions': [
3865 ['OS=="android"', {
3866 # Android could use the goma with clang.
3867 'make_global_settings': [
3868 ['CC', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} ${CHROME_SRC}/<(make_clang_dir)/bin/clang)'],
3869 ['CXX', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} ${CHROME_SRC}/<(make_clang_dir)/bin/clang++)'],
3870 ['LINK', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} ${CHROME_SRC}/<(make_clang_dir)/bin/clang++)'],
3871 ['CC.host', '$(CC)'],
3872 ['CXX.host', '$(CXX)'],
3873 ['LINK.host', '$(LINK)'],
3874 ],
3875 }, {
3876 'make_global_settings': [
3877 ['CC', '<(make_clang_dir)/bin/clang'],
3878 ['CXX', '<(make_clang_dir)/bin/clang++'],
3879 ['LINK', '$(CXX)'],
3880 ['CC.host', '$(CC)'],
3881 ['CXX.host', '$(CXX)'],
3882 ['LINK.host', '$(LINK)'],
3883 ],
3884 }],
[email protected]34f40892011-09-06 21:53:303885 ],
3886 }],
[email protected]615fa6642012-08-14 19:17:073887 ['OS=="android" and clang==0', {
[email protected]d10e2cc2012-03-20 10:45:273888 # Hardcode the compiler names in the Makefile so that
3889 # it won't depend on the environment at make time.
[email protected]7fc96c82012-07-24 18:15:113890 'make_global_settings': [
[email protected]c0f76312012-08-16 13:52:043891 ['CC', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} <(android_toolchain)/*-gcc)'],
3892 ['CXX', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} <(android_toolchain)/*-g++)'],
3893 ['LINK', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} <(android_toolchain)/*-gcc)'],
[email protected]615fa6642012-08-14 19:17:073894 ['CC.host', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} <!(which gcc))'],
3895 ['CXX.host', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} <!(which g++))'],
3896 ['LINK.host', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} <!(which g++))'],
[email protected]d10e2cc2012-03-20 10:45:273897 ],
3898 }],
[email protected]2f80c312009-02-25 21:26:553899 ],
3900 'xcode_settings': {
[email protected]0c8ab452009-11-06 21:57:503901 # DON'T ADD ANYTHING NEW TO THIS BLOCK UNLESS YOU REALLY REALLY NEED IT!
3902 # This block adds *project-wide* configuration settings to each project
3903 # file. It's almost always wrong to put things here. Specify your
3904 # custom xcode_settings in target_defaults to add them to targets instead.
3905
[email protected]1e013672012-06-29 22:12:203906 'conditions': [
[email protected]fca3d812012-07-27 00:55:363907 # In an Xcode Project Info window, the "Base SDK for All Configurations"
3908 # setting sets the SDK on a project-wide basis. In order to get the
3909 # configured SDK to show properly in the Xcode UI, SDKROOT must be set
3910 # here at the project level.
[email protected]2c261532012-10-06 00:46:293911 ['OS=="mac"', {
[email protected]fca3d812012-07-27 00:55:363912 'conditions': [
[email protected]2c261532012-10-06 00:46:293913 ['mac_sdk_path==""', {
[email protected]fca3d812012-07-27 00:55:363914 'SDKROOT': 'macosx<(mac_sdk)', # -isysroot
[email protected]2c261532012-10-06 00:46:293915 }, {
3916 'SDKROOT': '<(mac_sdk_path)', # -isysroot
[email protected]fca3d812012-07-27 00:55:363917 }],
3918 ],
[email protected]2c261532012-10-06 00:46:293919 }],
3920 ['OS=="ios"', {
3921 'conditions': [
3922 ['ios_sdk_path==""', {
3923 'SDKROOT': 'iphoneos<(ios_sdk)', # -isysroot
3924 }, {
3925 'SDKROOT': '<(ios_sdk_path)', # -isysroot
3926 }],
3927 ],
[email protected]1e013672012-06-29 22:12:203928 }],
3929 ['OS=="ios"', {
[email protected]1e013672012-06-29 22:12:203930 'ARCHS': '$(ARCHS_UNIVERSAL_IPHONE_OS)',
[email protected]3c6aa862012-11-05 17:11:443931 # Just build armv7, until armv7s is correctly tested.
3932 'VALID_ARCHS': 'armv7 i386',
[email protected]1e013672012-06-29 22:12:203933 'IPHONEOS_DEPLOYMENT_TARGET': '<(ios_deployment_target)',
[email protected]1e013672012-06-29 22:12:203934 # Target both iPhone and iPad.
3935 'TARGETED_DEVICE_FAMILY': '1,2',
3936 }],
3937 ],
[email protected]0c8ab452009-11-06 21:57:503938
[email protected]2f80c312009-02-25 21:26:553939 # The Xcode generator will look for an xcode_settings section at the root
3940 # of each dict and use it to apply settings on a file-wide basis. Most
3941 # settings should not be here, they should be in target-specific
3942 # xcode_settings sections, or better yet, should use non-Xcode-specific
3943 # settings in target dicts. SYMROOT is a special case, because many other
3944 # Xcode variables depend on it, including variables such as
3945 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something
3946 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the
3947 # files to appear (when present) in the UI as actual files and not red
3948 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR,
3949 # and therefore SYMROOT, needs to be set at the project level.
[email protected]bfa24b962009-03-02 00:16:163950 'SYMROOT': '<(DEPTH)/xcodebuild',
[email protected]2f80c312009-02-25 21:26:553951 },
[email protected]ee28c9f2009-09-04 01:53:013952}