1 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
6 # Please don't directly include this file if you are building via gyp_chromium,
7 # since gyp_chromium is automatically forcing its inclusion.
9 # Variables expected to be overriden on the GYP command line (-D) or by
10 # ~/.gyp/include.gypi.
12 # Putting a variables dict inside another variables dict looks kind of
13 # weird. This is done so that 'host_arch', 'chromeos', etc are defined as
14 # variables within the outer variables dict here. This is necessary
15 # to get these variables defined for the conditions within this variables
16 # dict that operate on these variables.
21 # Whether we're building a ChromeOS build.
24 # Whether or not we are using the Aura windowing framework.
27 # Whether or not we are building the Ash shell.
30 # Copy conditionally-set variables out one scope.
31 'chromeos%': '<(chromeos)',
32 'use_aura%': '<(use_aura)',
33 'use_ash%': '<(use_ash)',
35 # Whether we are using Views Toolkit
38 # Use OpenSSL instead of NSS. Under development: see http://crbug.com/62803
41 # Disable viewport meta tag by default.
42 'enable_viewport%': 0,
44 # Enable HiDPI support.
47 # Enable touch optimized art assets and metrics.
48 'enable_touch_ui%': 0,
50 # Override buildtype to select the desired build flavor.
51 # Dev - everyday build for development/testing
52 # Official - release build (generally implies additional processing)
53 # TODO(mmoss) Once 'buildtype' is fully supported (e.g. Windows gyp
54 # conversion is done), some of the things which are now controlled by
55 # 'branding', such as symbol generation, will need to be refactored
56 # based on 'buildtype' (i.e. we don't care about saving symbols for
57 # non-Official # builds).
61 # ChromeOS implies ash.
67 # For now, Windows builds that |use_aura| should also imply using
68 # ash. This rule should be removed for the future when Windows is
69 # using the aura windows without the ash interface.
70 ['use_aura==1 and OS=="win"', {
77 # Compute the architecture that we're building on.
78 ['OS=="win" or OS=="mac" or OS=="ios"', {
81 # This handles the Unix platforms for which there is some support.
82 # Anything else gets passed through, which probably won't work
83 # very well; such hosts should pass an explicit target_arch to
86 '<!(uname -m | sed -e "s/i.86/ia32/;s/x86_64/x64/;s/amd64/x64/;s/arm.*/arm/;s/i86pc/ia32/")',
90 # Copy conditionally-set variables out one scope.
91 'chromeos%': '<(chromeos)',
92 'use_aura%': '<(use_aura)',
93 'use_ash%': '<(use_ash)',
94 'use_openssl%': '<(use_openssl)',
95 'enable_viewport%': '<(enable_viewport)',
96 'enable_hidpi%': '<(enable_hidpi)',
97 'enable_touch_ui%': '<(enable_touch_ui)',
98 'buildtype%': '<(buildtype)',
99 'host_arch%': '<(host_arch)',
101 # Default architecture we're building for is the architecture we're
103 'target_arch%': '<(host_arch)',
105 # Sets whether we're building with the Android SDK/NDK (and hence with
106 # Ant, value 0), or as part of the Android system (and hence with the
107 # Android build system, value 1).
108 'android_build_type%': 0,
111 # Set default value of toolkit_views based on OS.
112 ['OS=="win" or chromeos==1 or use_aura==1', {
118 # Set toolkit_uses_gtk for the Chromium browser on Linux.
119 ['(OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris") and use_aura==0', {
120 'toolkit_uses_gtk%': 1,
122 'toolkit_uses_gtk%': 0,
125 # Enable HiDPI on Mac OS and Chrome OS.
126 ['OS=="mac" or chromeos==1', {
130 # Enable touch UI on Metro.
132 'enable_touch_ui%': 1,
135 # Enable App Launcher only on ChromeOS, Windows and OSX.
136 ['use_ash==1 or OS=="win" or OS=="mac"', {
137 'enable_app_list%': 1,
139 'enable_app_list%': 0,
142 # Enable Message Center only on ChromeOS and Windows for now.
143 ['use_ash==1 or OS=="win"', {
144 'enable_message_center%': 1,
146 'enable_message_center%': 0,
149 ['use_aura==1 or (OS!="win" and OS!="mac" and OS!="ios" and OS!="android")', {
150 'use_default_render_theme%': 1,
152 'use_default_render_theme%': 0,
157 # Copy conditionally-set variables out one scope.
158 'chromeos%': '<(chromeos)',
159 'host_arch%': '<(host_arch)',
160 'target_arch%': '<(target_arch)',
161 'toolkit_views%': '<(toolkit_views)',
162 'toolkit_uses_gtk%': '<(toolkit_uses_gtk)',
163 'use_aura%': '<(use_aura)',
164 'use_ash%': '<(use_ash)',
165 'use_openssl%': '<(use_openssl)',
166 'enable_viewport%': '<(enable_viewport)',
167 'enable_hidpi%': '<(enable_hidpi)',
168 'enable_touch_ui%': '<(enable_touch_ui)',
169 'android_build_type%': '<(android_build_type)',
170 'enable_app_list%': '<(enable_app_list)',
171 'enable_message_center%': '<(enable_message_center)',
172 'use_default_render_theme%': '<(use_default_render_theme)',
173 'buildtype%': '<(buildtype)',
175 # We used to provide a variable for changing how libraries were built.
176 # This variable remains until we can clean up all the users.
177 # This needs to be one nested variables dict in so that dependent
178 # gyp files can make use of it in their outer variables. (Yikes!)
179 # http://code.google.com/p/chromium/issues/detail?id=83308
180 'library%': 'static_library',
182 # Override branding to select the desired branding flavor.
183 'branding%': 'Chromium',
185 # This variable tells WebCore.gyp and JavaScriptCore.gyp whether they are
186 # are built under a chromium full build (1) or a webkit.org chromium
188 'inside_chromium_build%': 1,
190 # Set to 1 to enable fast builds. It disables debug info for fastest
194 # Set to 1 to enable dcheck in release without having to use the flag.
195 'dcheck_always_on%': 0,
197 # Disable file manager component extension by default.
198 'file_manager_extension%': 0,
201 'python_ver%': '2.6',
203 # Set ARM-v7 compilation flags
206 # Set Neon compilation flags (only meaningful if armv7==1).
209 # The system root for cross-compiles. Default: none.
212 # The system libdir used for this ABI.
213 'system_libdir%': 'lib',
215 # On Linux, we build with sse2 for Chromium builds.
218 # Use libjpeg-turbo as the JPEG codec used by Chromium.
219 'use_libjpeg_turbo%': 1,
221 # Use system libjpeg. Note that the system's libjepg will be used even if
222 # use_libjpeg_turbo is set.
223 'use_system_libjpeg%': 0,
225 # Variable 'component' is for cases where we would like to build some
226 # components as dynamic shared libraries but still need variable
227 # 'library' for static libraries.
228 # By default, component is set to whatever library is set to and
229 # it can be overriden by the GYP command line or by ~/.gyp/include.gypi.
230 'component%': 'static_library',
232 # Set to select the Title Case versions of strings in GRD files.
233 'use_titlecase_in_grd_files%': 0,
235 # Use translations provided by volunteers at launchpad.net. This
236 # currently only works on Linux.
237 'use_third_party_translations%': 0,
239 # Remoting compilation is enabled by default. Set to 0 to disable.
242 # Configuration policy is enabled by default. Set to 0 to disable.
243 'configuration_policy%': 1,
245 # Variable safe_browsing is used to control the build time configuration
246 # for safe browsing feature. Safe browsing can be compiled in 3 different
247 # levels: 0 disables it, 1 enables it fully, and 2 enables only UI and
248 # reporting features without enabling phishing and malware detection. This
249 # is useful to integrate a third party phishing/malware detection to
250 # existing safe browsing logic.
253 # Speech input is compiled in by default. Set to 0 to disable.
256 # Notifications are compiled in by default. Set to 0 to disable.
257 'notifications%' : 1,
259 # Use dsymutil to generate real .dSYM files on Mac. The default is 0 for
260 # regular builds and 1 for ASan builds.
261 'mac_want_real_dsym%': 'default',
263 # If this is set, the clang plugins used on the buildbot will be used.
264 # Run tools/clang/scripts/update.sh to make sure they are compiled.
265 # This causes 'clang_chrome_plugins_flags' to be set.
266 # Has no effect if 'clang' is not set as well.
267 'clang_use_chrome_plugins%': 1,
269 # Enable building with ASAN (Clang's -fsanitize=address option).
270 # -fsanitize=address only works with clang, but asan=1 implies clang=1
271 # See https://sites.google.com/a/chromium.org/dev/developers/testing/addresssanitizer
274 # Enable building with TSAN (Clang's -fsanitize=thread option).
275 # -fsanitize=thread only works with clang, but tsan=1 implies clang=1
276 # See http://clang.llvm.org/docs/ThreadSanitizer.html
278 'tsan_blacklist%': '<(PRODUCT_DIR)/../../tools/valgrind/tsan_v2/ignores.txt',
280 # Use a modified version of Clang to intercept allocated types and sizes
281 # for allocated objects. clang_type_profiler=1 implies clang=1.
282 # See http://dev.chromium.org/developers/deep-memory-profiler/cpp-object-type-identifier
283 # TODO(dmikurube): Support mac. See http://crbug.com/123758#c11
284 'clang_type_profiler%': 0,
286 # Set to true to instrument the code with function call logger.
287 # See src/third_party/cygprofile/cyg-profile.cc for details.
288 'order_profiling%': 0,
290 # Use the provided profiled order file to link Chrome image with it.
291 # This makes Chrome faster by better using CPU cache when executing code.
292 # This is known as PGO (profile guided optimization).
293 # See https://sites.google.com/a/google.com/chrome-msk/dev/boot-speed-up-effort
294 'order_text_section%' : "",
296 # Set to 1 compile with -fPIC cflag on linux. This is a must for shared
297 # libraries on linux x86-64 and arm, plus ASLR.
300 # Whether one-click signin is enabled or not.
301 'enable_one_click_signin%': 0,
303 # Enable Web Intents support in WebKit.
304 'enable_web_intents%': 1,
306 # Enable Chrome browser extensions
307 'enable_extensions%': 1,
309 # Enable browser automation.
310 'enable_automation%': 1,
313 'enable_google_now%': 1,
315 # Enable language detection.
316 'enable_language_detection%': 1,
318 # Enable printing support and UI.
319 'enable_printing%': 1,
321 # Enable Web Intents web content registration via HTML element
322 # and WebUI managing such registrations.
323 'enable_web_intents_tag%': 0,
325 # Webrtc compilation is enabled by default. Set to 0 to disable.
328 # PPAPI by default does not support plugins making calls off the main
329 # thread. Set to 1 to turn on experimental support for out-of-process
330 # plugins to make call of the main thread.
331 'enable_pepper_threading%': 1,
333 # Enables use of the session service, which is enabled by default.
334 # Support for disabling depends on the platform.
335 'enable_session_service%': 1,
337 # Enables theme support, which is enabled by default. Support for
338 # disabling depends on the platform.
341 # Uses OEM-specific wallpaper resources on Chrome OS.
342 'use_oem_wallpaper%': 0,
344 # Enables support for background apps.
345 'enable_background%': 1,
347 # Enable the task manager by default.
348 'enable_task_manager%': 1,
350 # Enable FTP support by default.
351 'disable_ftp_support%': 0,
353 # XInput2 multitouch support is disabled by default (use_xi2_mt=0).
354 # Setting to non-zero value enables XI2 MT. When XI2 MT is enabled,
355 # the input value also defines the required XI2 minor minimum version.
356 # For example, use_xi2_mt=2 means XI2.2 or above version is required.
359 # Use of precompiled headers on Windows.
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.
366 # http://code.google.com/p/chromium/wiki/WindowsPrecompiledHeaders
368 'chromium_win_pch%': 0,
370 # Set this to true when building with Clang.
371 # See http://code.google.com/p/chromium/wiki/Clang for details.
374 # Enable plug-in installation by default.
375 'enable_plugin_installation%': 1,
377 # Enable PPAPI and NPAPI by default.
378 # TODO(nileshagrawal): Make this flag enable/disable NPAPI as well
379 # as PPAPI; see crbug.com/162667.
380 'enable_plugins%': 1,
382 # Specifies whether to use canvas_skia.cc in place of platform
383 # specific implementations of gfx::Canvas. Affects text drawing in the
385 # TODO(asvitkine): Enable this on all platforms and delete this flag.
386 # http://crbug.com/105550
387 'use_canvas_skia%': 0,
389 # Set to "tsan", "memcheck", or "drmemory" to configure the build to work
390 # with one of those tools.
391 'build_for_tool%': '',
393 # Whether tests targets should be run, archived or just have the
394 # dependencies verified. All the tests targets have the '_run' suffix,
395 # e.g. base_unittests_run runs the target base_unittests. The test target
396 # always calls tools/swarm_client/isolate.py. See the script's --help for
397 # more information and the valid --mode values. Meant to be overriden with
399 # TODO(maruel): Converted the default from 'check' to 'noop' so work can
400 # be done while the builders are being reconfigured to check out test data
402 'test_isolation_mode%': 'noop',
403 # If no directory is specified then a temporary directory will be used.
404 'test_isolation_outdir%': '',
406 'sas_dll_path%': '<(DEPTH)/third_party/platformsdk_win7/files/redist/x86',
407 'wix_path%': '<(DEPTH)/third_party/wix',
409 # Managed users are enabled by default.
410 'enable_managed_users%': 1,
413 # TODO(epoger): Figure out how to set use_skia=1 for Mac outside of
414 # the 'conditions' clause. Initial attempts resulted in chromium and
415 # webkit disagreeing on its setting.
422 # A flag for POSIX platforms
429 # A flag for BSD platforms
430 ['OS=="freebsd" or OS=="openbsd"', {
437 ['(OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris") and use_openssl==0', {
443 # Flags to use X11 on non-Mac POSIX platforms
444 ['OS=="win" or OS=="mac" or OS=="ios" or OS=="android"', {
452 # We always use skia text rendering in Aura on Windows, since GDI
453 # doesn't agree with our BackingStore.
454 # TODO(beng): remove once skia text rendering is on by default.
455 ['use_aura==1 and OS=="win"', {
456 'enable_skia_text%': 1,
459 # A flag to enable or disable our compile-time dependency
460 # on gnome-keyring. If that dependency is disabled, no gnome-keyring
461 # support will be available. This option is useful
462 # for Linux distributions and for Aura.
463 ['chromeos==1 or use_aura==1', {
464 'use_gnome_keyring%': 0,
466 'use_gnome_keyring%': 1,
469 ['toolkit_uses_gtk==1 or OS=="mac" or OS=="ios"', {
470 # GTK+, Mac and iOS want Title Case strings
471 'use_titlecase_in_grd_files%': 1,
474 # Enable file manager extension on Chrome OS.
476 'file_manager_extension%': 1,
478 'file_manager_extension%': 0,
481 ['OS=="win" or OS=="mac" or (OS=="linux" and use_aura==0)', {
482 'enable_one_click_signin%': 1,
486 'enable_automation%': 0,
487 'enable_extensions%': 0,
488 'enable_google_now%': 0,
489 'enable_language_detection%': 0,
490 'enable_printing%': 0,
492 'proprietary_codecs%': 1,
496 ['OS=="android" and android_build_type==0', {
500 # Disable WebRTC for building WebView as part of Android system.
501 # TODO(boliu): Decide if we want WebRTC, and if so, also merge
502 # the necessary third_party repositories.
503 ['OS=="android" and android_build_type==1', {
508 'configuration_policy%': 0,
509 'disable_ftp_support%': 1,
510 'enable_automation%': 0,
511 'enable_extensions%': 0,
512 'enable_google_now%': 0,
513 'enable_language_detection%': 0,
514 'enable_printing%': 0,
515 'enable_session_service%': 0,
521 'enable_managed_users%': 0,
524 # Use GPU accelerated cross process image transport by default
525 # on linux builds with the Aura window manager
526 ['use_aura==1 and OS=="linux"', {
527 'ui_compositor_image_transport%': 1,
529 'ui_compositor_image_transport%': 0,
532 # Turn precompiled headers on by default.
533 ['OS=="win" and buildtype!="Official"', {
534 'chromium_win_pch%': 1
537 ['use_aura==1 or chromeos==1 or OS=="android"', {
538 'enable_plugin_installation%': 0,
540 'enable_plugin_installation%': 1,
543 ['OS=="android" or OS=="ios"', {
544 'enable_plugins%': 0,
546 'enable_plugins%': 1,
549 # linux_use_gold_binary: whether to use the binary checked into
552 'linux_use_gold_binary%': 1,
554 'linux_use_gold_binary%': 0,
557 # linux_use_gold_flags: whether to use build flags that rely on gold.
558 # On by default for x64 Linux. Temporarily off for ChromeOS as
559 # it failed on a buildbot.
560 ['OS=="linux" and chromeos==0', {
561 'linux_use_gold_flags%': 1,
563 'linux_use_gold_flags%': 0,
567 'linux_use_libgps%': 1,
569 # Do not use libgps on desktop Linux by default,
570 # see http://crbug.com/103751.
571 'linux_use_libgps%': 0,
574 ['OS=="android" or OS=="ios"', {
575 'enable_captive_portal_detection%': 0,
577 'enable_captive_portal_detection%': 1,
580 # Enable Skia UI text drawing incrementally on different platforms.
581 # http://crbug.com/105550
583 # On Aura, this allows per-tile painting to be used in the browser
585 ['OS!="mac" and OS!="android"', {
586 'use_canvas_skia%': 1,
590 # When building for ChromeOS we dont want Chromium to use libjpeg_turbo.
591 'use_libjpeg_turbo%': 0,
595 # When building as part of the Android system, use system libraries
596 # where possible to reduce ROM size.
597 'use_system_libjpeg%': '<(android_build_type)',
600 # Enable Settings App only on Windows.
601 ['enable_app_list==1 and OS=="win"', {
602 'enable_settings_app%': 1,
604 'enable_settings_app%': 0,
607 ['OS=="linux" and target_arch=="arm" and chromeos==0', {
608 # Set some defaults for arm/linux chrome builds
610 'linux_breakpad%': 0,
611 'linux_use_tcmalloc%': 0,
612 'linux_use_gold_flags%': 0,
613 # sysroot needs to be an absolute path otherwise it generates
614 # incorrect results when passed to pkg-config
615 'sysroot%': '<!(cd <(DEPTH) && pwd -P)/arm-sysroot',
616 }], # OS=="linux" and target_arch=="arm" and chromeos==0
619 # Set this to 1 to use the Google-internal file containing
620 # official API keys for Google Chrome even in a developer build.
621 # Setting this variable explicitly to 1 will cause your build to
622 # fail if the internal file is missing.
624 # Set this to 0 to not use the internal file, even when it
625 # exists in your checkout.
627 # Leave set to 2 to have this variable implicitly set to 1 if
628 # you have src/google_apis/internal/google_chrome_api_keys.h in
629 # your checkout, and implicitly set to 0 if not.
631 # Note that official builds always behave as if this variable
632 # was explicitly set to 1, i.e. they always use official keys,
633 # and will fail to build if the internal file is missing.
634 'use_official_google_api_keys%': 2,
636 # Set these to bake the specified API keys and OAuth client
637 # IDs/secrets into your build.
639 # If you create a build without values baked in, you can instead
640 # set environment variables to provide the keys at runtime (see
641 # src/google_apis/google_api_keys.h for details). Features that
642 # require server-side APIs may fail to work if no keys are
645 # Note that if you are building an official build or if
646 # use_official_google_api_keys has been set to 1 (explicitly or
647 # implicitly), these values will be ignored and the official
648 # keys will be used instead.
649 'google_api_key%': '',
650 'google_default_client_id%': '',
651 'google_default_client_secret%': '',
654 # Copy conditionally-set variables out one scope.
655 'branding%': '<(branding)',
656 'buildtype%': '<(buildtype)',
657 'target_arch%': '<(target_arch)',
658 'host_arch%': '<(host_arch)',
659 'library%': 'static_library',
660 'toolkit_views%': '<(toolkit_views)',
661 'ui_compositor_image_transport%': '<(ui_compositor_image_transport)',
662 'use_aura%': '<(use_aura)',
663 'use_ash%': '<(use_ash)',
664 'use_openssl%': '<(use_openssl)',
665 'use_nss%': '<(use_nss)',
666 'os_bsd%': '<(os_bsd)',
667 'os_posix%': '<(os_posix)',
668 'use_glib%': '<(use_glib)',
669 'toolkit_uses_gtk%': '<(toolkit_uses_gtk)',
670 'use_skia%': '<(use_skia)',
671 'use_x11%': '<(use_x11)',
672 'use_gnome_keyring%': '<(use_gnome_keyring)',
673 'linux_fpic%': '<(linux_fpic)',
674 'enable_pepper_threading%': '<(enable_pepper_threading)',
675 'chromeos%': '<(chromeos)',
676 'enable_viewport%': '<(enable_viewport)',
677 'enable_hidpi%': '<(enable_hidpi)',
678 'enable_touch_ui%': '<(enable_touch_ui)',
679 'use_xi2_mt%':'<(use_xi2_mt)',
680 'file_manager_extension%': '<(file_manager_extension)',
681 'inside_chromium_build%': '<(inside_chromium_build)',
682 'fastbuild%': '<(fastbuild)',
683 'dcheck_always_on%': '<(dcheck_always_on)',
684 'python_ver%': '<(python_ver)',
685 'armv7%': '<(armv7)',
686 'arm_neon%': '<(arm_neon)',
687 'sysroot%': '<(sysroot)',
688 'system_libdir%': '<(system_libdir)',
689 'component%': '<(component)',
690 'use_titlecase_in_grd_files%': '<(use_titlecase_in_grd_files)',
691 'use_third_party_translations%': '<(use_third_party_translations)',
692 'remoting%': '<(remoting)',
693 'enable_one_click_signin%': '<(enable_one_click_signin)',
694 'enable_webrtc%': '<(enable_webrtc)',
695 'chromium_win_pch%': '<(chromium_win_pch)',
696 'configuration_policy%': '<(configuration_policy)',
697 'safe_browsing%': '<(safe_browsing)',
698 'input_speech%': '<(input_speech)',
699 'notifications%': '<(notifications)',
700 'clang_use_chrome_plugins%': '<(clang_use_chrome_plugins)',
701 'mac_want_real_dsym%': '<(mac_want_real_dsym)',
704 'tsan_blacklist%': '<(tsan_blacklist)',
705 'clang_type_profiler%': '<(clang_type_profiler)',
706 'order_profiling%': '<(order_profiling)',
707 'order_text_section%': '<(order_text_section)',
708 'enable_extensions%': '<(enable_extensions)',
709 'enable_web_intents%': '<(enable_web_intents)',
710 'enable_web_intents_tag%': '<(enable_web_intents_tag)',
711 'enable_plugin_installation%': '<(enable_plugin_installation)',
712 'enable_plugins%': '<(enable_plugins)',
713 'enable_session_service%': '<(enable_session_service)',
714 'enable_themes%': '<(enable_themes)',
715 'use_oem_wallpaper%': '<(use_oem_wallpaper)',
716 'enable_background%': '<(enable_background)',
717 'linux_use_gold_binary%': '<(linux_use_gold_binary)',
718 'linux_use_gold_flags%': '<(linux_use_gold_flags)',
719 'linux_use_libgps%': '<(linux_use_libgps)',
720 'use_canvas_skia%': '<(use_canvas_skia)',
721 'test_isolation_mode%': '<(test_isolation_mode)',
722 'test_isolation_outdir%': '<(test_isolation_outdir)',
723 'enable_automation%': '<(enable_automation)',
724 'enable_printing%': '<(enable_printing)',
725 'enable_google_now%': '<(enable_google_now)',
726 'enable_language_detection%': '<(enable_language_detection)',
727 'enable_captive_portal_detection%': '<(enable_captive_portal_detection)',
728 'disable_ftp_support%': '<(disable_ftp_support)',
729 'enable_task_manager%': '<(enable_task_manager)',
730 'sas_dll_path%': '<(sas_dll_path)',
731 'wix_path%': '<(wix_path)',
732 'use_libjpeg_turbo%': '<(use_libjpeg_turbo)',
733 'use_system_libjpeg%': '<(use_system_libjpeg)',
734 'android_build_type%': '<(android_build_type)',
735 'enable_app_list%': '<(enable_app_list)',
736 'enable_message_center%': '<(enable_message_center)',
737 'use_default_render_theme%': '<(use_default_render_theme)',
738 'enable_settings_app%': '<(enable_settings_app)',
739 'use_official_google_api_keys%': '<(use_official_google_api_keys)',
740 'google_api_key%': '<(google_api_key)',
741 'google_default_client_id%': '<(google_default_client_id)',
742 'google_default_client_secret%': '<(google_default_client_secret)',
743 'enable_managed_users%': '<(enable_managed_users)',
745 # Use system mesa instead of bundled one.
746 'use_system_mesa%': 0,
748 # Use system nspr instead of the bundled one.
749 'use_system_nspr%': 0,
751 # Use system protobuf instead of bundled one.
752 'use_system_protobuf%': 0,
754 # Use system yasm instead of bundled one.
755 'use_system_yasm%': 0,
757 # Default to enabled PIE; this is important for ASLR but we may need to be
758 # able to turn it off for various reasons.
759 'linux_disable_pie%': 0,
761 # The release channel that this build targets. This is used to restrict
762 # channel-specific build options, like which installer packages to create.
763 # The default is 'all', which does no channel-specific filtering.
766 # Override chromium_mac_pch and set it to 0 to suppress the use of
767 # precompiled headers on the Mac. Prefix header injection may still be
768 # used, but prefix headers will not be precompiled. This is useful when
769 # using distcc to distribute a build to compile slaves that don't
770 # share the same compiler executable as the system driving the compilation,
771 # because precompiled headers rely on pointers into a specific compiler
772 # executable's image. Setting this to 0 is needed to use an experimental
773 # Linux-Mac cross compiler distcc farm.
774 'chromium_mac_pch%': 1,
776 # The default value for mac_strip in target_defaults. This cannot be
777 # set there, per the comment about variable% in a target_defaults.
778 'mac_strip_release%': 1,
780 # Set to 1 to enable code coverage. In addition to build changes
781 # (e.g. extra CFLAGS), also creates a new target in the src/chrome
782 # project file called "coverage".
783 # Currently ignored on Windows.
786 # Set to 1 to force Visual C++ to use legacy debug information format /Z7.
787 # This is useful for parallel compilation tools which can't support /Zi.
788 # Only used on Windows.
791 # Although base/allocator lets you select a heap library via an
792 # environment variable, the libcmt shim it uses sometimes gets in
793 # the way. To disable it entirely, and switch to normal msvcrt, do e.g.
794 # 'win_use_allocator_shim': 0,
795 # 'win_release_RuntimeLibrary': 2
796 # to ~/.gyp/include.gypi, gclient runhooks --force, and do a release build.
797 'win_use_allocator_shim%': 1, # 1 = shim allocator via libcmt; 0 = msvcrt
799 # Whether usage of OpenMAX is enabled.
800 'enable_openmax%': 0,
802 # Whether proprietary audio/video codecs are assumed to be included with
803 # this build (only meaningful if branding!=Chrome).
804 'proprietary_codecs%': 0,
806 # TODO(bradnelson): eliminate this when possible.
807 # To allow local gyp files to prevent release.vsprops from being included.
808 # Yes(1) means include release.vsprops.
809 # Once all vsprops settings are migrated into gyp, this can go away.
810 'msvs_use_common_release%': 1,
812 # TODO(bradnelson): eliminate this when possible.
813 # To allow local gyp files to override additional linker options for msvs.
814 # Yes(1) means set use the common linker options.
815 'msvs_use_common_linker_extras%': 1,
817 # TODO(sgk): eliminate this if possible.
818 # It would be nicer to support this via a setting in 'target_defaults'
819 # in chrome/app/locales/locales.gypi overriding the setting in the
820 # 'Debug' configuration in the 'target_defaults' dict below,
821 # but that doesn't work as we'd like.
822 'msvs_debug_link_incremental%': '2',
824 # Needed for some of the largest modules.
825 'msvs_debug_link_nonincremental%': '1',
827 # Turns on Use Library Dependency Inputs for linking chrome.dll on Windows
828 # to get incremental linking to be faster in debug builds.
829 'incremental_chrome_dll%': '0',
831 # The default settings for third party code for treating
832 # warnings-as-errors. Ideally, this would not be required, however there
833 # is some third party code that takes a long time to fix/roll. So, this
834 # flag allows us to have warnings as errors in general to prevent
835 # regressions in most modules, while working on the bits that are
837 'win_third_party_warn_as_error%': 'true',
839 # This is the location of the sandbox binary. Chrome looks for this before
840 # running the zygote process. If found, and SUID, it will be used to
841 # sandbox the zygote process and, thus, all renderer processes.
842 'linux_sandbox_path%': '',
844 # Set this to true to enable SELinux support.
848 'clang%': '<(clang)',
849 'make_clang_dir%': 'third_party/llvm-build/Release+Asserts',
851 # These two variables can be set in GYP_DEFINES while running
852 # |gclient runhooks| to let clang run a plugin in every compilation.
853 # Only has an effect if 'clang=1' is in GYP_DEFINES as well.
855 # GYP_DEFINES='clang=1 clang_load=/abs/path/to/libPrintFunctionNames.dylib clang_add_plugin=print-fns' gclient runhooks
858 'clang_add_plugin%': '',
860 # The default type of gtest.
861 'gtest_target_type%': 'executable',
863 # Enable sampling based profiler.
864 # See http://google-perftools.googlecode.com/svn/trunk/doc/cpuprofile.html
867 # Enable strict glibc debug mode.
869 # Compile in Breakpad support by default so that it can be tested,
870 # even if it not enabled by default at runtime.
871 'linux_breakpad%': 1,
872 # And if we want to dump symbols for Breakpad-enabled builds.
873 'linux_dump_symbols%': 0,
874 # And if we want to strip the binary after dumping symbols.
875 'linux_strip_binary%': 0,
876 # Strip the test binaries needed for Linux reliability tests.
877 'linux_strip_reliability_tests%': 0,
880 'linux_use_tcmalloc%': 1,
882 # Disable TCMalloc's heapchecker.
883 'linux_use_heapchecker%': 0,
885 # Disable shadow stack keeping used by heapcheck to unwind the stacks
887 'linux_keep_shadow_stacks%': 0,
889 # Set to 1 to link against libgnome-keyring instead of using dlopen().
890 'linux_link_gnome_keyring%': 0,
891 # Set to 1 to link against gsettings APIs instead of using dlopen().
892 'linux_link_gsettings%': 0,
894 # Set Thumb compilation flags.
897 # Set ARM fpu compilation flags (only meaningful if armv7==1 and
901 # Set ARM float abi compilation flag.
902 'arm_float_abi%': 'softfp',
904 # Enable new NPDevice API.
905 'enable_new_npdevice_api%': 0,
907 # Enable EGLImage support in OpenMAX
908 'enable_eglimage%': 1,
910 # Enable a variable used elsewhere throughout the GYP files to determine
911 # whether to compile in the sources for the GPU plugin / process.
914 # .gyp files or targets should set chromium_code to 1 if they build
915 # Chromium-specific code, as opposed to external code. This variable is
916 # used to control such things as the set of warnings to enable, and
917 # whether warnings are treated as errors.
920 'release_valgrind_build%': 0,
922 # TODO(thakis): Make this a blacklist instead, http://crbug.com/101600
923 'enable_wexit_time_destructors%': 0,
925 # Set to 1 to compile with the built in pdf viewer.
928 # Set to 1 to compile with the OpenGL ES 2.0 conformance tests.
929 'internal_gles2_conform_tests%': 0,
931 # NOTE: When these end up in the Mac bundle, we need to replace '-' for '_'
932 # so Cocoa is happy (http://crbug.com/20441).
934 'am', 'ar', 'bg', 'bn', 'ca', 'cs', 'da', 'de', 'el', 'en-GB',
935 'en-US', 'es-419', 'es', 'et', 'fa', 'fi', 'fil', 'fr', 'gu', 'he',
936 'hi', 'hr', 'hu', 'id', 'it', 'ja', 'kn', 'ko', 'lt', 'lv',
937 'ml', 'mr', 'ms', 'nb', 'nl', 'pl', 'pt-PT', 'ro', 'ru',
938 'sk', 'sl', 'sr', 'sv', 'sw', 'ta', 'te', 'th', 'tr', 'uk',
939 'vi', 'zh-CN', 'zh-TW',
942 # Pseudo locales are special locales which are used for testing and
943 # debugging. They don't get copied to the final app. For more info,
944 # check out https://sites.google.com/a/chromium.org/dev/Home/fake-bidi
951 # If debug_devtools is set to 1, JavaScript files for DevTools are
952 # stored as is and loaded from disk. Otherwise, a concatenated file
953 # is stored in resources.pak. It is still possible to load JS files
954 # from disk by passing --debug-devtools cmdline switch.
955 'debug_devtools%': 0,
957 # The Java Bridge is not compiled in by default.
960 # Code signing for iOS binaries. The bots need to be able to disable this.
961 'chromium_ios_signing%': 1,
963 # This flag is only used when disable_nacl==0 and disables all those
964 # subcomponents which would require the installation of a native_client
965 # untrusted toolchain.
966 'disable_nacl_untrusted%': 0,
968 # Disable Dart by default.
971 # The desired version of Windows SDK can be set in ~/.gyp/include.gypi.
972 'msbuild_toolset%': '',
974 # Native Client is enabled by default.
977 # Whether to build full debug version for Debug configuration on Android.
978 # Compared to full debug version, the default Debug configuration on Android
979 # has no full v8 debug, has size optimization and linker gc section, so that
980 # we can build a debug version with acceptable size and performance.
981 'android_full_debug%': 0,
983 # Sets the default version name and code for Android app, by default we
984 # do a developer build.
985 'android_app_version_name%': 'Developer Build',
986 'android_app_version_code%': 0,
988 'sas_dll_exists': '<!(python <(DEPTH)/build/dir_exists.py <(sas_dll_path))',
989 'wix_exists': '<!(python <(DEPTH)/build/dir_exists.py <(wix_path))',
991 'windows_sdk_default_path': '<(DEPTH)/third_party/platformsdk_win8/files',
992 'directx_sdk_default_path': '<(DEPTH)/third_party/directxsdk/files',
994 # Whether we are using the rlz library or not. Platforms like Android send
995 # rlz codes for searches but do not use the library.
999 ['OS=="win" and "<!(python <(DEPTH)/build/dir_exists.py <(windows_sdk_default_path))"=="True"', {
1000 'windows_sdk_path%': '<(windows_sdk_default_path)',
1002 'windows_sdk_path%': 'C:/Program Files (x86)/Windows Kits/8.0',
1004 ['OS=="win" and "<!(python <(DEPTH)/build/dir_exists.py <(directx_sdk_default_path))"=="True"', {
1005 'directx_sdk_path%': '<(directx_sdk_default_path)',
1007 'directx_sdk_path%': '$(DXSDK_DIR)',
1010 'windows_driver_kit_path%': '$(WDK_DIR)',
1012 # If use_official_google_api_keys is already set (to 0 or 1), we
1013 # do none of the implicit checking. If it is set to 1 and the
1014 # internal keys file is missing, the build will fail at compile
1015 # time. If it is set to 0 and keys are not provided by other
1016 # means, a warning will be printed at compile time.
1017 ['use_official_google_api_keys==2', {
1018 'use_official_google_api_keys%':
1019 '<!(python <(DEPTH)/google_apis/build/check_internal.py <(DEPTH)/google_apis/internal/google_chrome_api_keys.h)',
1021 ['os_posix==1 and OS!="mac" and OS!="ios"', {
1022 # Figure out the python architecture to decide if we build pyauto.
1023 'python_arch%': '<!(<(DEPTH)/build/linux/python_arch.sh <(sysroot)/usr/<(system_libdir)/libpython<(python_ver).so.1.0)',
1025 # TODO(glider): set clang to 1 earlier for ASan and TSan builds so
1026 # that it takes effect here.
1027 ['clang==0 and asan==0 and tsan==0', {
1028 # This will set gcc_version to XY if you are running gcc X.Y.*.
1029 # This is used to tweak build flags for gcc 4.5.
1030 'gcc_version%': '<!(python <(DEPTH)/build/compiler_version.py)',
1034 # All Chrome builds have breakpad symbols, but only process the
1035 # symbols from official builds.
1036 ['(branding=="Chrome" and buildtype=="Official")', {
1037 'linux_dump_symbols%': 1,
1040 }], # os_posix==1 and OS!="mac" and OS!="ios"
1043 'enable_background%': 0,
1045 'enable_task_manager%': 0,
1046 'icu_use_data_file_flag%': 1,
1047 'use_system_bzip2%': 1,
1048 'use_system_libxml%': 1,
1049 'use_system_sqlite%': 1,
1051 # The Mac SDK is set for iOS builds and passed through to Mac
1052 # sub-builds. This allows the Mac sub-build SDK in an iOS build to be
1053 # overridden from the command line the same way it is for a Mac build.
1054 'mac_sdk%': '<!(python <(DEPTH)/build/mac/find_sdk.py 10.6)',
1056 # iOS SDK and deployment target support. The iOS 5.0 SDK is actually
1057 # what is required, but the value is left blank so when it is set in
1058 # the project files it will be the "current" iOS SDK. Forcing 5.0
1059 # even though it is "current" causes Xcode to spit out a warning for
1060 # every single project file for not using the "current" SDK.
1062 'ios_sdk_path%': '',
1063 'ios_deployment_target%': '5.0',
1066 # ios_product_name is set to the name of the .app bundle as it should
1068 ['branding=="Chrome"', {
1069 'ios_product_name%': 'Chrome',
1070 }, { # else: branding!="Chrome"
1071 'ios_product_name%': 'Chromium',
1073 ['branding=="Chrome" and buildtype=="Official"', {
1075 }, { # else: branding!="Chrome" or buildtype!="Official"
1081 # Location of Android NDK.
1084 # Unfortuantely we have to use absolute paths to the SDK/NDK beause
1085 # they're passed to ant which uses a different relative path from
1087 'android_ndk_root%': '<!(cd <(DEPTH) && pwd -P)/third_party/android_tools/ndk/',
1088 'android_sdk_root%': '<!(cd <(DEPTH) && pwd -P)/third_party/android_tools/sdk/',
1089 'android_host_arch%': '<!(uname -m)',
1091 # Copy conditionally-set variables out one scope.
1092 'android_ndk_root%': '<(android_ndk_root)',
1093 'android_sdk_root%': '<(android_sdk_root)',
1095 # Android API-level of the SDK used for compilation.
1096 'android_sdk_version%': '17',
1099 ['target_arch == "ia32"', {
1100 'android_app_abi%': 'x86',
1101 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-x86/gdbserver/gdbserver',
1102 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-9/arch-x86',
1103 'android_toolchain%': '<(android_ndk_root)/toolchains/x86-4.6/prebuilt/<(host_os)-<(android_host_arch)/bin',
1105 ['target_arch=="arm"', {
1108 'android_app_abi%': 'armeabi',
1110 'android_app_abi%': 'armeabi-v7a',
1113 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-arm/gdbserver/gdbserver',
1114 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-9/arch-arm',
1115 'android_toolchain%': '<(android_ndk_root)/toolchains/arm-linux-androideabi-4.6/prebuilt/<(host_os)-<(android_host_arch)/bin',
1119 # Copy conditionally-set variables out one scope.
1120 'android_app_abi%': '<(android_app_abi)',
1121 'android_gdbserver%': '<(android_gdbserver)',
1122 'android_ndk_root%': '<(android_ndk_root)',
1123 'android_ndk_sysroot': '<(android_ndk_sysroot)',
1124 'android_sdk_root%': '<(android_sdk_root)',
1125 'android_sdk_version%': '<(android_sdk_version)',
1126 'android_toolchain%': '<(android_toolchain)',
1128 'android_ndk_include': '<(android_ndk_sysroot)/usr/include',
1129 'android_ndk_lib': '<(android_ndk_sysroot)/usr/lib',
1130 'android_sdk_tools%': '<(android_sdk_root)/platform-tools',
1131 'android_sdk%': '<(android_sdk_root)/platforms/android-<(android_sdk_version)',
1133 # Location of the "strip" binary, used by both gyp and scripts.
1134 'android_strip%' : '<!(/bin/echo -n <(android_toolchain)/*-strip)',
1136 # Provides an absolute path to PRODUCT_DIR (e.g. out/Release). Used
1137 # to specify the output directory for Ant in the Android build.
1138 'ant_build_out': '`cd <(PRODUCT_DIR) && pwd -P`',
1140 # Always uses openssl.
1143 'proprietary_codecs%': '<(proprietary_codecs)',
1144 'enable_task_manager%': 0,
1145 'safe_browsing%': 2,
1146 'configuration_policy%': 0,
1148 'enable_web_intents%': 0,
1149 'enable_automation%': 0,
1151 'build_ffmpegsumo%': 0,
1152 'linux_use_tcmalloc%': 0,
1154 # Disable Native Client.
1157 # Android does not support background apps.
1158 'enable_background%': 0,
1160 # Sessions are store separately in the Java side.
1161 'enable_session_service%': 0,
1163 # Set to 1 once we have a notification system for Android.
1164 # http://crbug.com/115320
1165 'notifications%': 0,
1169 # TODO(jrg): when 'gtest_target_type'=='shared_library' and
1170 # OS==android, make all gtest_targets depend on
1171 # testing/android/native_test.gyp:native_test_apk.
1172 'gtest_target_type%': 'shared_library',
1174 # Uses system APIs for decoding audio and video.
1175 'use_libffmpeg%': '0',
1177 # Always use the chromium skia.
1178 'use_system_skia%': '0',
1180 # When building as part of the Android system, use system libraries
1181 # where possible to reduce ROM size.
1182 # TODO(steveblock): Investigate using the system version of sqlite.
1183 'use_system_sqlite%': 0, # '<(android_build_type)',
1184 'use_system_expat%': '<(android_build_type)',
1185 'use_system_icu%': '<(android_build_type)',
1186 'use_system_stlport%': '<(android_build_type)',
1188 'enable_managed_users%': 0,
1190 # Copy it out one scope.
1191 'android_build_type%': '<(android_build_type)',
1195 # Mac OS X SDK and deployment target support. The SDK identifies
1196 # the version of the system headers that will be used, and
1197 # corresponds to the MAC_OS_X_VERSION_MAX_ALLOWED compile-time
1198 # macro. "Maximum allowed" refers to the operating system version
1199 # whose APIs are available in the headers. The deployment target
1200 # identifies the minimum system version that the built products are
1201 # expected to function on. It corresponds to the
1202 # MAC_OS_X_VERSION_MIN_REQUIRED compile-time macro. To ensure these
1203 # macros are available, #include <AvailabilityMacros.h>. Additional
1204 # documentation on these macros is available at
1205 # http://developer.apple.com/mac/library/technotes/tn2002/tn2064.html#SECTION3
1206 # Chrome normally builds with the Mac OS X 10.6 SDK and sets the
1207 # deployment target to 10.6. Other projects, such as O3D, may
1208 # override these defaults.
1210 # Normally, mac_sdk_min is used to find an SDK that Xcode knows
1211 # about that is at least the specified version. In official builds,
1212 # the SDK must match mac_sdk_min exactly. If the SDK is installed
1213 # someplace that Xcode doesn't know about, set mac_sdk_path to the
1214 # path to the SDK; when set to a non-empty string, SDK detection
1215 # based on mac_sdk_min will be bypassed entirely.
1216 'mac_sdk_min%': '10.6',
1217 'mac_sdk_path%': '',
1219 'mac_deployment_target%': '10.6',
1222 'mac_sdk_min': '<(mac_sdk_min)',
1223 'mac_sdk_path': '<(mac_sdk_path)',
1224 'mac_deployment_target': '<(mac_deployment_target)',
1226 # Enable clang on mac by default!
1229 # Compile in Breakpad support by default so that it can be
1230 # tested, even if it is not enabled by default at runtime.
1231 'mac_breakpad_compiled_in%': 1,
1233 # mac_product_name is set to the name of the .app bundle as it should
1234 # appear on disk. This duplicates data from
1235 # chrome/app/theme/chromium/BRANDING and
1236 # chrome/app/theme/google_chrome/BRANDING, but is necessary to get
1237 # these names into the build system.
1238 ['branding=="Chrome"', {
1239 'mac_product_name%': 'Google Chrome',
1240 }, { # else: branding!="Chrome"
1241 'mac_product_name%': 'Chromium',
1244 ['branding=="Chrome" and buildtype=="Official"', {
1245 'mac_sdk%': '<!(python <(DEPTH)/build/mac/find_sdk.py --verify <(mac_sdk_min) --sdk_path=<(mac_sdk_path))',
1246 # Enable uploading crash dumps.
1247 'mac_breakpad_uploads%': 1,
1248 # Enable dumping symbols at build time for use by Mac Breakpad.
1250 # Enable Keystone auto-update support.
1252 }, { # else: branding!="Chrome" or buildtype!="Official"
1253 'mac_sdk%': '<!(python <(DEPTH)/build/mac/find_sdk.py <(mac_sdk_min))',
1254 'mac_breakpad_uploads%': 0,
1262 ['component=="shared_library"', {
1263 'win_use_allocator_shim%': 0,
1265 ['component=="shared_library" and "<(GENERATOR)"=="ninja"', {
1266 # Only enabled by default for ninja because it's buggy in VS.
1267 # Not enabled for component=static_library because some targets
1268 # are too large and the toolchain fails due to the size of the
1270 'incremental_chrome_dll%': 1,
1272 # Don't do incremental linking for large modules on 32-bit.
1273 ['MSVS_OS_BITS==32', {
1274 'msvs_large_module_debug_link_mode%': '1', # No
1276 'msvs_large_module_debug_link_mode%': '2', # Yes
1278 ['MSVS_VERSION=="2012e" or MSVS_VERSION=="2010e"', {
1286 'nacl_win64_defines': [
1287 # This flag is used to minimize dependencies when building
1288 # Native Client loader for 64-bit Windows.
1293 ['os_posix==1 and chromeos==0 and OS!="android" and OS!="ios"', {
1299 # Native Client glibc toolchain is enabled by default except on arm.
1300 ['target_arch=="arm"', {
1301 'disable_glibc%': 1,
1303 'disable_glibc%': 0,
1306 # Disable SSE2 when building for ARM or MIPS.
1307 ['target_arch=="arm" or target_arch=="mipsel"', {
1310 'disable_sse2%': '<(disable_sse2)',
1313 # Set the relative path from this file to the GYP file of the JPEG
1314 # library used by Chromium.
1315 ['use_system_libjpeg==1 or use_libjpeg_turbo==0', {
1316 # Configuration for using the system libjeg is here.
1317 'libjpeg_gyp_path': '../third_party/libjpeg/libjpeg.gyp',
1319 'libjpeg_gyp_path': '../third_party/libjpeg_turbo/libjpeg.gyp',
1322 # Options controlling the use of GConf (the classic GNOME configuration
1323 # system) and GIO, which contains GSettings (the new GNOME config system).
1332 # Set up -D and -E flags passed into grit.
1333 ['branding=="Chrome"', {
1334 # TODO(mmoss) The .grd files look for _google_chrome, but for
1335 # consistency they should look for google_chrome_build like C++.
1336 'grit_defines': ['-D', '_google_chrome',
1337 '-E', 'CHROMIUM_BUILD=google_chrome'],
1339 'grit_defines': ['-D', '_chromium',
1340 '-E', 'CHROMIUM_BUILD=chromium'],
1343 'grit_defines': ['-D', 'chromeos', '-D', 'scale_factors=2x'],
1345 ['toolkit_views==1', {
1346 'grit_defines': ['-D', 'toolkit_views'],
1349 'grit_defines': ['-D', 'use_aura'],
1352 'grit_defines': ['-D', 'use_ash'],
1355 'grit_defines': ['-D', 'use_nss'],
1357 ['file_manager_extension==1', {
1358 'grit_defines': ['-D', 'file_manager_extension'],
1361 'grit_defines': ['-D', 'remoting'],
1363 ['use_titlecase_in_grd_files==1', {
1364 'grit_defines': ['-D', 'use_titlecase'],
1366 ['use_third_party_translations==1', {
1367 'grit_defines': ['-D', 'use_third_party_translations'],
1369 'ast', 'bs', 'ca@valencia', 'en-AU', 'eo', 'eu', 'gl', 'hy', 'ia',
1370 'ka', 'ku', 'kw', 'ms', 'ug'
1374 'grit_defines': ['-D', 'android'],
1377 'grit_defines': ['-D', 'scale_factors=2x'],
1381 # define for iOS specific resources.
1383 # iOS uses a whitelist to filter resources.
1384 '-w', '<(DEPTH)/build/ios/grit_whitelist.txt'
1386 # iOS uses pt instead of pt-BR.
1389 'locales': ['pt-BR'],
1391 ['enable_extensions==1', {
1392 'grit_defines': ['-D', 'enable_extensions'],
1394 ['enable_printing==1', {
1395 'grit_defines': ['-D', 'enable_printing'],
1397 ['enable_themes==1', {
1398 'grit_defines': ['-D', 'enable_themes'],
1400 ['use_oem_wallpaper==1', {
1401 'grit_defines': ['-D', 'use_oem_wallpaper'],
1403 ['enable_app_list==1', {
1404 'grit_defines': ['-D', 'enable_app_list'],
1406 ['enable_settings_app==1', {
1407 'grit_defines': ['-D', 'enable_settings_app'],
1409 ['clang_use_chrome_plugins==1 and OS!="win"', {
1410 'clang_chrome_plugins_flags': [
1411 '<!@(<(DEPTH)/tools/clang/scripts/plugin_flags.sh)'
1415 ['enable_web_intents_tag==1', {
1416 'grit_defines': ['-D', 'enable_web_intents_tag'],
1419 ['asan==1 and OS!="win"', {
1422 ['asan==1 and OS=="mac"', {
1423 # See http://crbug.com/145503.
1424 'component': "static_library",
1430 ['OS=="linux" and clang_type_profiler==1', {
1432 'clang_use_chrome_plugins%': 0,
1434 ['host_arch=="x64"', {
1435 'make_clang_dir%': 'third_party/llvm-allocated-type/Linux_x64',
1437 ['host_arch=="ia32"', {
1438 # 32-bit Clang is unsupported. It may not build. Put your 32-bit
1439 # Clang in this directory at your own risk if needed for some
1440 # purpose (e.g. to compare 32-bit and 64-bit behavior like memory
1441 # usage). Any failure by this compiler should not close the tree.
1442 'make_clang_dir%': 'third_party/llvm-allocated-type/Linux_ia32',
1447 # On valgrind bots, override the optimizer settings so we don't inline too
1448 # much and make the stacks harder to figure out.
1450 # TODO(rnk): Kill off variables that no one else uses and just implement
1451 # them under a build_for_tool== condition.
1452 ['build_for_tool=="memcheck" or build_for_tool=="tsan"', {
1454 'mac_debug_optimization': '1',
1455 'mac_release_optimization': '1',
1456 'release_optimize': '1',
1457 'no_gc_sections': 1,
1458 'debug_extra_cflags': '-g -fno-inline -fno-omit-frame-pointer '
1459 '-fno-builtin -fno-optimize-sibling-calls',
1460 'release_extra_cflags': '-g -fno-inline -fno-omit-frame-pointer '
1461 '-fno-builtin -fno-optimize-sibling-calls',
1463 # MSVS flags for TSan on Pin and Windows.
1464 'win_debug_RuntimeChecks': '0',
1465 'win_debug_disable_iterator_debugging': '1',
1466 'win_debug_Optimization': '1',
1467 'win_debug_InlineFunctionExpansion': '0',
1468 'win_release_InlineFunctionExpansion': '0',
1469 'win_release_OmitFramePointers': '0',
1471 'linux_use_tcmalloc': 1,
1472 'release_valgrind_build': 1,
1474 'component': 'static_library',
1475 'use_system_zlib': 0,
1478 # Build tweaks for DrMemory.
1479 # TODO(rnk): Combine with tsan config to share the builder.
1480 # http://crbug.com/108155
1481 ['build_for_tool=="drmemory"', {
1482 # These runtime checks force initialization of stack vars which blocks
1483 # DrMemory's uninit detection.
1484 'win_debug_RuntimeChecks': '0',
1485 # Iterator debugging is slow.
1486 'win_debug_disable_iterator_debugging': '1',
1487 # Try to disable optimizations that mess up stacks in a release build.
1488 # DrM-i#1054 (http://code.google.com/p/drmemory/issues/detail?id=1054)
1489 # /O2 and /Ob0 (disable inline) cannot be used together because of a
1490 # compiler bug, so we use /Ob1 instead.
1491 'win_release_InlineFunctionExpansion': '1',
1492 'win_release_OmitFramePointers': '0',
1493 # Ditto for debug, to support bumping win_debug_Optimization.
1494 'win_debug_InlineFunctionExpansion': 0,
1495 'win_debug_OmitFramePointers': 0,
1496 # Keep the code under #ifndef NVALGRIND.
1497 'release_valgrind_build': 1,
1500 # Enable RLZ on Win, Mac and ChromeOS.
1501 ['branding=="Chrome" and (OS=="win" or OS=="mac" or chromeos==1)', {
1506 # List of default apps to install in new profiles. The first list contains
1507 # the source files as found in svn. The second list, used only for linux,
1508 # contains the destination location for each of the files. When a crx
1509 # is added or removed from the list, the chrome/browser/resources/
1510 # default_apps/external_extensions.json file must also be updated.
1511 'default_apps_list': [
1512 'browser/resources/default_apps/external_extensions.json',
1513 'browser/resources/default_apps/gmail.crx',
1514 'browser/resources/default_apps/search.crx',
1515 'browser/resources/default_apps/youtube.crx',
1516 'browser/resources/default_apps/drive.crx',
1517 'browser/resources/default_apps/docs.crx',
1519 'default_apps_list_linux_dest': [
1520 '<(PRODUCT_DIR)/default_apps/external_extensions.json',
1521 '<(PRODUCT_DIR)/default_apps/gmail.crx',
1522 '<(PRODUCT_DIR)/default_apps/search.crx',
1523 '<(PRODUCT_DIR)/default_apps/youtube.crx',
1524 '<(PRODUCT_DIR)/default_apps/drive.crx',
1525 '<(PRODUCT_DIR)/default_apps/docs.crx',
1528 'target_defaults': {
1530 # The condition that operates on chromium_code is in a target_conditions
1531 # section, and will not have access to the default fallback value of
1532 # chromium_code at the top of this file, or to the chromium_code
1533 # variable placed at the root variables scope of .gyp files, because
1534 # those variables are not set at target scope. As a workaround,
1535 # if chromium_code is not set at target scope, define it in target scope
1536 # to contain whatever value it has during early variable expansion.
1537 # That's enough to make it available during target conditional
1539 'chromium_code%': '<(chromium_code)',
1541 # See http://msdn.microsoft.com/en-us/library/aa652360(VS.71).aspx
1542 'win_release_Optimization%': '2', # 2 = /Os
1543 'win_debug_Optimization%': '0', # 0 = /Od
1545 # See http://msdn.microsoft.com/en-us/library/2kxx5t2c(v=vs.80).aspx
1546 # Tri-state: blank is default, 1 on, 0 off
1547 'win_release_OmitFramePointers%': '0',
1548 # Tri-state: blank is default, 1 on, 0 off
1549 'win_debug_OmitFramePointers%': '',
1551 # See http://msdn.microsoft.com/en-us/library/8wtf2dfz(VS.71).aspx
1552 'win_debug_RuntimeChecks%': '3', # 3 = all checks enabled, 0 = off
1554 # See http://msdn.microsoft.com/en-us/library/47238hez(VS.71).aspx
1555 'win_debug_InlineFunctionExpansion%': '', # empty = default, 0 = off,
1556 'win_release_InlineFunctionExpansion%': '2', # 1 = only __inline, 2 = max
1558 # VS inserts quite a lot of extra checks to algorithms like
1559 # std::partial_sort in Debug build which make them O(N^2)
1560 # instead of O(N*logN). This is particularly slow under memory
1561 # tools like ThreadSanitizer so we want it to be disablable.
1562 # See http://msdn.microsoft.com/en-us/library/aa985982(v=VS.80).aspx
1563 'win_debug_disable_iterator_debugging%': '0',
1565 'release_extra_cflags%': '',
1566 'debug_extra_cflags%': '',
1568 'release_valgrind_build%': '<(release_valgrind_build)',
1570 # the non-qualified versions are widely assumed to be *nix-only
1571 'win_release_extra_cflags%': '',
1572 'win_debug_extra_cflags%': '',
1574 # TODO(thakis): Make this a blacklist instead, http://crbug.com/101600
1575 'enable_wexit_time_destructors%': '<(enable_wexit_time_destructors)',
1577 # Only used by Windows build for now. Can be used to build into a
1578 # differet output directory, e.g., a build_dir_prefix of VS2010_ would
1579 # output files in src/build/VS2010_{Debug,Release}.
1580 'build_dir_prefix%': '',
1582 # Targets are by default not nacl untrusted code.
1583 'nacl_untrusted_build%': 0,
1585 'pnacl_compile_flags': [
1586 # pnacl uses the clang compiler so we need to supress all the
1587 # same warnings as we do for clang.
1588 # TODO(sbc): Remove these if/when they are removed from the clang
1590 '-Wno-unused-function',
1591 '-Wno-char-subscripts',
1592 '-Wno-c++11-extensions',
1593 '-Wno-unnamed-type-template-args',
1597 ['OS=="win" and component=="shared_library"', {
1598 # See http://msdn.microsoft.com/en-us/library/aa652367.aspx
1599 'win_release_RuntimeLibrary%': '2', # 2 = /MD (nondebug DLL)
1600 'win_debug_RuntimeLibrary%': '3', # 3 = /MDd (debug DLL)
1602 # See http://msdn.microsoft.com/en-us/library/aa652367.aspx
1603 'win_release_RuntimeLibrary%': '0', # 0 = /MT (nondebug static)
1604 'win_debug_RuntimeLibrary%': '1', # 1 = /MTd (debug static)
1607 # See http://gcc.gnu.org/onlinedocs/gcc-4.4.2/gcc/Optimize-Options.html
1608 'mac_release_optimization%': 's', # Use -Os unless overridden
1609 'mac_debug_optimization%': '0', # Use -O0 unless overridden
1611 # See http://gcc.gnu.org/onlinedocs/gcc-4.4.2/gcc/Optimize-Options.html
1612 'mac_release_optimization%': '3', # Use -O3 unless overridden
1613 'mac_debug_optimization%': '0', # Use -O0 unless overridden
1618 ['OS=="linux" and linux_use_tcmalloc==1 and clang_type_profiler==1', {
1619 'cflags_cc!': ['-fno-rtti'],
1622 '-gline-tables-only',
1623 '-fintercept-allocation-functions',
1625 'defines': ['TYPE_PROFILING'],
1627 '<(DEPTH)/base/allocator/allocator.gyp:type_profiler',
1630 ['OS=="linux" and clang==1 and host_arch=="ia32"', {
1631 # TODO(dmikurube): Remove -Wno-sentinel when Clang/LLVM is fixed.
1632 # See http://crbug.com/162818.
1633 'cflags+': ['-Wno-sentinel'],
1635 ['OS=="win" and "<(msbuild_toolset)"!=""', {
1636 'msbuild_toolset': '<(msbuild_toolset)',
1638 ['branding=="Chrome"', {
1639 'defines': ['GOOGLE_CHROME_BUILD'],
1640 }, { # else: branding!="Chrome"
1641 'defines': ['CHROMIUM_BUILD'],
1643 ['OS=="mac" and component=="shared_library"', {
1645 'DYLIB_INSTALL_NAME_BASE': '@rpath',
1646 'LD_RUNPATH_SEARCH_PATHS': [
1647 # For unbundled binaries.
1649 # For bundled binaries, to get back from Binary.app/Contents/MacOS.
1650 '@loader_path/../../..',
1655 'defines': ['ENABLE_RLZ'],
1657 ['component=="shared_library"', {
1658 'defines': ['COMPONENT_BUILD'],
1660 ['toolkit_views==1', {
1661 'defines': ['TOOLKIT_VIEWS=1'],
1663 ['ui_compositor_image_transport==1', {
1664 'defines': ['UI_COMPOSITOR_IMAGE_TRANSPORT'],
1667 'defines': ['USE_AURA=1'],
1670 'defines': ['USE_ASH=1'],
1672 ['use_default_render_theme==1', {
1673 'defines': ['USE_DEFAULT_RENDER_THEME=1'],
1675 ['use_libjpeg_turbo==1', {
1676 'defines': ['USE_LIBJPEG_TURBO=1'],
1679 'defines': ['USE_NSS=1'],
1681 ['enable_one_click_signin==1', {
1682 'defines': ['ENABLE_ONE_CLICK_SIGNIN'],
1684 ['toolkit_uses_gtk==1 and toolkit_views==0', {
1685 # TODO(erg): We are progressively sealing up use of deprecated features
1686 # in gtk in preparation for an eventual porting to gtk3.
1687 'defines': ['GTK_DISABLE_SINGLE_INCLUDES=1'],
1690 'defines': ['OS_CHROMEOS=1'],
1693 'defines': ['USE_XI2_MT=<(use_xi2_mt)'],
1695 ['file_manager_extension==1', {
1696 'defines': ['FILE_MANAGER_EXTENSION=1'],
1699 'defines': ['ENABLE_PROFILING=1'],
1701 ['OS=="linux" and glibcxx_debug==1', {
1702 'defines': ['_GLIBCXX_DEBUG=1',],
1703 'cflags_cc+': ['-g'],
1706 'defines': ['ENABLE_REMOTING=1'],
1708 ['enable_webrtc==1', {
1709 'defines': ['ENABLE_WEBRTC=1'],
1711 ['proprietary_codecs==1', {
1712 'defines': ['USE_PROPRIETARY_CODECS'],
1714 ['enable_pepper_threading==1', {
1715 'defines': ['ENABLE_PEPPER_THREADING'],
1717 ['enable_viewport==1', {
1718 'defines': ['ENABLE_VIEWPORT'],
1720 ['configuration_policy==1', {
1721 'defines': ['ENABLE_CONFIGURATION_POLICY'],
1723 ['input_speech==1', {
1724 'defines': ['ENABLE_INPUT_SPEECH'],
1726 ['notifications==1', {
1727 'defines': ['ENABLE_NOTIFICATIONS'],
1729 ['enable_hidpi==1', {
1730 'defines': ['ENABLE_HIDPI=1'],
1733 # Clang creates chubby debug information, which makes linking very
1734 # slow. For now, don't create debug information with clang. See
1735 # http://crbug.com/70000
1741 'debug_extra_cflags': '-g0',
1744 # Android builds symbols on release by default, disable them.
1747 'debug_extra_cflags': '-g0',
1748 'release_extra_cflags': '-g0',
1752 }, { # else clang!=1
1754 # For Windows and Mac, we don't genererate debug information.
1758 'GenerateDebugInformation': 'false',
1760 'VCCLCompilerTool': {
1761 'DebugInformationFormat': '0',
1767 'GCC_GENERATE_DEBUGGING_SYMBOLS': 'NO',
1772 'debug_extra_cflags': '-g1',
1777 'debug_extra_cflags': '-g1',
1778 'release_extra_cflags': '-g1',
1785 ['dcheck_always_on!=0', {
1786 'defines': ['DCHECK_ALWAYS_ON=1'],
1787 }], # dcheck_always_on!=0
1789 'defines': ['CHROMIUM_SELINUX=1'],
1791 ['win_use_allocator_shim==0', {
1794 'defines': ['NO_TCMALLOC'],
1803 ['use_openssl==1', {
1808 ['enable_eglimage==1', {
1810 'ENABLE_EGLIMAGE=1',
1818 ['asan==1 and OS=="win"', {
1819 # Since asan on windows uses Syzygy, we need /PROFILE turned on to
1820 # produce appropriate pdbs.
1826 'defines': ['ADDRESS_SANITIZER'],
1827 }], # asan==1 and OS=="win"
1830 ['OS=="mac" or OS=="ios"', {
1832 'GCC_INSTRUMENT_PROGRAM_FLOW_ARCS': 'YES', # -fprofile-arcs
1833 'GCC_GENERATE_TEST_COVERAGE_FILES': 'YES', # -ftest-coverage
1837 # Add -lgcov for types executable, shared_library, and
1838 # loadable_module; not for static_library.
1839 # This is a delayed conditional.
1840 'target_conditions': [
1841 ['_type!="static_library"', {
1842 'xcode_settings': { 'OTHER_LDFLAGS': [ '-lgcov' ] },
1846 ['OS=="linux" or OS=="android"', {
1847 'cflags': [ '-ftest-coverage',
1849 'link_settings': { 'libraries': [ '-lgcov' ] },
1853 # Disable incremental linking for all modules.
1854 # 0: inherit, 1: disabled, 2: enabled.
1855 'msvs_debug_link_incremental': '1',
1856 'msvs_large_module_debug_link_mode': '1',
1859 # Disable iterator debugging (huge speed boost without any
1860 # change in coverage results).
1861 '_HAS_ITERATOR_DEBUGGING=0',
1865 # Enable profile information (necessary for coverage
1866 # instrumentation). This is incompatible with incremental
1872 ], # conditions for coverage
1877 '_CRT_SECURE_NO_DEPRECATE',
1878 '_SCL_SECURE_NO_DEPRECATE',
1879 # This define is required to pull in the new Win8 interfaces from
1880 # system headers like ShObjIdl.h.
1881 'NTDDI_VERSION=0x06020000',
1884 '<(DEPTH)/third_party/wtl/include',
1889 # Generates debug info when win_z7=1
1890 # even if fastbuild=1 (that makes GenerateDebugInformation false).
1892 'GenerateDebugInformation': 'true',
1894 'VCCLCompilerTool': {
1895 'DebugInformationFormat': '1',
1899 ['"<(GENERATOR)"=="msvs"', {
1902 # Make the pdb name sane. Otherwise foo.exe and foo.dll both
1903 # have foo.pdb. The ninja generator already defaults to this and
1904 # can't handle the $(TargetPath) macro.
1905 'ProgramDatabaseFile': '$(TargetPath).pdb',
1911 ['enable_task_manager==1', {
1913 'ENABLE_TASK_MANAGER=1',
1916 ['enable_web_intents==1', {
1918 'ENABLE_WEB_INTENTS=1',
1921 ['enable_extensions==1', {
1923 'ENABLE_EXTENSIONS=1',
1926 ['OS=="win" and branding=="Chrome"', {
1927 'defines': ['ENABLE_SWIFTSHADER'],
1929 ['enable_dart==1', {
1930 'defines': ['WEBKIT_USING_DART=1'],
1932 ['enable_plugin_installation==1', {
1933 'defines': ['ENABLE_PLUGIN_INSTALLATION=1'],
1935 ['enable_plugins==1', {
1936 'defines': ['ENABLE_PLUGINS=1'],
1938 ['enable_session_service==1', {
1939 'defines': ['ENABLE_SESSION_SERVICE=1'],
1941 ['enable_themes==1', {
1942 'defines': ['ENABLE_THEMES=1'],
1944 ['enable_background==1', {
1945 'defines': ['ENABLE_BACKGROUND=1'],
1947 ['enable_automation==1', {
1948 'defines': ['ENABLE_AUTOMATION=1'],
1950 ['enable_google_now==1', {
1951 'defines': ['ENABLE_GOOGLE_NOW=1'],
1953 ['enable_language_detection==1', {
1954 'defines': ['ENABLE_LANGUAGE_DETECTION=1'],
1956 ['enable_printing==1', {
1957 'defines': ['ENABLE_PRINTING=1'],
1959 ['enable_captive_portal_detection==1', {
1960 'defines': ['ENABLE_CAPTIVE_PORTAL_DETECTION=1'],
1962 ['enable_app_list==1', {
1963 'defines': ['ENABLE_APP_LIST=1'],
1965 ['enable_message_center==1', {
1966 'defines': ['ENABLE_MESSAGE_CENTER=1'],
1968 ['enable_settings_app==1', {
1969 'defines': ['ENABLE_SETTINGS_APP=1'],
1971 ['disable_ftp_support==1', {
1972 'defines': ['DISABLE_FTP_SUPPORT=1'],
1974 ['enable_managed_users==1', {
1975 'defines': ['ENABLE_MANAGED_USERS=1'],
1977 ], # conditions for 'target_defaults'
1978 'target_conditions': [
1979 ['enable_wexit_time_destructors==1', {
1983 '-Wexit-time-destructors',
1987 '-Wexit-time-destructors',
1993 ['chromium_code==0', {
1995 [ 'os_posix==1 and OS!="mac" and OS!="ios"', {
1996 # We don't want to get warnings from third-party code,
1997 # so remove any existing warning-enabling flags like -Wall.
2003 # Don't warn about hash_map in third-party code.
2007 # Don't warn about printf format problems.
2008 # This is off by default in gcc but on in Ubuntu's gcc(!).
2012 # TODO(fischman): remove this.
2013 # http://code.google.com/p/chromium/issues/detail?id=90453
2017 # TODO: Fix all warnings on chromeos too.
2018 [ 'os_posix==1 and OS!="mac" and OS!="ios" and (clang!=1 or chromeos==1)', {
2023 [ 'os_posix==1 and os_bsd!=1 and OS!="mac" and OS!="android"', {
2025 # Don't warn about ignoring the return value from e.g. close().
2026 # This is off by default in some gccs but on by default in others.
2027 # BSD systems do not support this option, since they are usually
2028 # using gcc 4.2.1, which does not have this flag yet.
2029 '-Wno-unused-result',
2034 '_CRT_SECURE_NO_DEPRECATE',
2035 '_CRT_NONSTDC_NO_WARNINGS',
2036 '_CRT_NONSTDC_NO_DEPRECATE',
2037 '_SCL_SECURE_NO_DEPRECATE',
2039 'msvs_disabled_warnings': [4800],
2041 'VCCLCompilerTool': {
2042 'WarningLevel': '3',
2043 'WarnAsError': '<(win_third_party_warn_as_error)',
2044 'Detect64BitPortabilityProblems': 'false',
2048 ['buildtype=="Official"', {
2050 'VCCLCompilerTool': { 'WarnAsError': 'false' },
2055 # TODO(darin): Unfortunately, some third_party code depends on base.
2056 [ 'OS=="win" and component=="shared_library"', {
2057 'msvs_disabled_warnings': [
2058 4251, # class 'std::xx' needs to have dll-interface.
2061 [ 'OS=="mac" or OS=="ios"', {
2063 'WARNING_CFLAGS!': ['-Wall', '-Wextra'],
2066 ['buildtype=="Official"', {
2068 'GCC_TREAT_WARNINGS_AS_ERRORS': 'NO', # -Werror
2075 # TODO(ios): Fix remaining warnings in third-party code, then
2076 # remove this; the Mac cleanup didn't get everything that's
2077 # flagged in an iOS build.
2078 'GCC_TREAT_WARNINGS_AS_ERRORS': 'NO',
2079 'RUN_CLANG_STATIC_ANALYZER': 'NO',
2085 # Rules for excluding e.g. foo_win.cc from the build on non-Windows.
2086 'filename_rules.gypi',
2088 # In Chromium code, we define __STDC_foo_MACROS in order to get the
2089 # C99 macros on Mac and Linux.
2091 '__STDC_CONSTANT_MACROS',
2092 '__STDC_FORMAT_MACROS',
2096 # turn on warnings for signed/unsigned mismatch on chromium code.
2098 'VCCLCompilerTool': {
2099 'AdditionalOptions': ['/we4389'],
2103 ['OS=="win" and component=="shared_library"', {
2104 'msvs_disabled_warnings': [
2105 4251, # class 'std::xx' needs to have dll-interface.
2110 ], # target_conditions for 'target_defaults'
2111 'default_configuration': 'Debug',
2113 # VCLinkerTool LinkIncremental values below:
2115 # 1 == /INCREMENTAL:NO
2117 # Debug links incremental, Release does not.
2119 # Abstract base configurations to cover common attributes.
2123 'msvs_configuration_attributes': {
2124 'OutputDirectory': '<(DEPTH)\\build\\<(build_dir_prefix)$(ConfigurationName)',
2125 'IntermediateDirectory': '$(OutDir)\\obj\\$(ProjectName)',
2126 'CharacterSet': '1',
2133 'TargetMachine': '1',
2136 'msvs_configuration_platform': 'Win32',
2140 'msvs_configuration_platform': 'x64',
2143 'TargetMachine': '17', # x86 - 64
2144 'AdditionalLibraryDirectories!':
2145 ['<(windows_sdk_path)/Lib/win8/um/x86'],
2146 'AdditionalLibraryDirectories':
2147 ['<(windows_sdk_path)/Lib/win8/um/x64'],
2149 'VCLibrarianTool': {
2150 'AdditionalLibraryDirectories!':
2151 ['<(windows_sdk_path)/Lib/win8/um/x86'],
2152 'AdditionalLibraryDirectories':
2153 ['<(windows_sdk_path)/Lib/win8/um/x64'],
2157 # Not sure if tcmalloc works on 64-bit Windows.
2164 'DYNAMIC_ANNOTATIONS_ENABLED=1',
2165 'WTF_USE_DYNAMIC_ANNOTATIONS=1',
2168 'COPY_PHASE_STRIP': 'NO',
2169 'GCC_OPTIMIZATION_LEVEL': '<(mac_debug_optimization)',
2171 '<@(debug_extra_cflags)',
2175 'VCCLCompilerTool': {
2176 'Optimization': '<(win_debug_Optimization)',
2177 'PreprocessorDefinitions': ['_DEBUG'],
2178 'BasicRuntimeChecks': '<(win_debug_RuntimeChecks)',
2179 'RuntimeLibrary': '<(win_debug_RuntimeLibrary)',
2181 # According to MSVS, InlineFunctionExpansion=0 means
2182 # "default inlining", not "/Ob0".
2183 # Thus, we have to handle InlineFunctionExpansion==0 separately.
2184 ['win_debug_InlineFunctionExpansion==0', {
2185 'AdditionalOptions': ['/Ob0'],
2187 ['win_debug_InlineFunctionExpansion!=""', {
2188 'InlineFunctionExpansion':
2189 '<(win_debug_InlineFunctionExpansion)',
2191 ['win_debug_disable_iterator_debugging==1', {
2192 'PreprocessorDefinitions': ['_HAS_ITERATOR_DEBUGGING=0'],
2195 # if win_debug_OmitFramePointers is blank, leave as default
2196 ['win_debug_OmitFramePointers==1', {
2197 'OmitFramePointers': 'true',
2199 ['win_debug_OmitFramePointers==0', {
2200 'OmitFramePointers': 'false',
2201 # The above is not sufficient (http://crbug.com/106711): it
2202 # simply eliminates an explicit "/Oy", but both /O2 and /Ox
2203 # perform FPO regardless, so we must explicitly disable.
2204 # We still want the false setting above to avoid having
2205 # "/Oy /Oy-" and warnings about overriding.
2206 'AdditionalOptions': ['/Oy-'],
2209 'AdditionalOptions': [ '<@(win_debug_extra_cflags)', ],
2212 'LinkIncremental': '<(msvs_debug_link_incremental)',
2213 # ASLR makes debugging with windbg difficult because Chrome.exe and
2214 # Chrome.dll share the same base name. As result, windbg will
2215 # name the Chrome.dll module like chrome_<base address>, where
2216 # <base address> typically changes with each launch. This in turn
2217 # means that breakpoints in Chrome.dll don't stick from one launch
2218 # to the next. For this reason, we turn ASLR off in debug builds.
2219 # Note that this is a three-way bool, where 0 means to pick up
2220 # the default setting, 1 is off and 2 is on.
2221 'RandomizedBaseAddress': 1,
2223 'VCResourceCompilerTool': {
2224 'PreprocessorDefinitions': ['_DEBUG'],
2228 ['OS=="linux" or OS=="android"', {
2229 'target_conditions': [
2230 ['_toolset=="target"', {
2232 '<@(debug_extra_cflags)',
2237 # Disabled on iOS because it was causing a crash on startup.
2238 # TODO(michelea): investigate, create a reduced test and possibly
2240 ['release_valgrind_build==0 and OS!="ios"', {
2243 '-fstack-protector-all', # Implies -fstack-protector
2255 'DEAD_CODE_STRIPPING': 'YES', # -Wl,-dead_strip
2256 'GCC_OPTIMIZATION_LEVEL': '<(mac_release_optimization)',
2257 'OTHER_CFLAGS': [ '<@(release_extra_cflags)', ],
2260 'VCCLCompilerTool': {
2261 'RuntimeLibrary': '<(win_release_RuntimeLibrary)',
2263 # In official builds, each target will self-select
2264 # an optimization level.
2265 ['buildtype!="Official"', {
2266 'Optimization': '<(win_release_Optimization)',
2269 # According to MSVS, InlineFunctionExpansion=0 means
2270 # "default inlining", not "/Ob0".
2271 # Thus, we have to handle InlineFunctionExpansion==0 separately.
2272 ['win_release_InlineFunctionExpansion==0', {
2273 'AdditionalOptions': ['/Ob0'],
2275 ['win_release_InlineFunctionExpansion!=""', {
2276 'InlineFunctionExpansion':
2277 '<(win_release_InlineFunctionExpansion)',
2280 # if win_release_OmitFramePointers is blank, leave as default
2281 ['win_release_OmitFramePointers==1', {
2282 'OmitFramePointers': 'true',
2284 ['win_release_OmitFramePointers==0', {
2285 'OmitFramePointers': 'false',
2286 # The above is not sufficient (http://crbug.com/106711): it
2287 # simply eliminates an explicit "/Oy", but both /O2 and /Ox
2288 # perform FPO regardless, so we must explicitly disable.
2289 # We still want the false setting above to avoid having
2290 # "/Oy /Oy-" and warnings about overriding.
2291 'AdditionalOptions': ['/Oy-'],
2294 'AdditionalOptions': [ '<@(win_release_extra_cflags)', ],
2297 # LinkIncremental is a tri-state boolean, where 0 means default
2298 # (i.e., inherit from parent solution), 1 means false, and
2300 'LinkIncremental': '1',
2301 # This corresponds to the /PROFILE flag which ensures the PDB
2302 # file contains FIXUP information (growing the PDB file by about
2303 # 5%) but does not otherwise alter the output binary. This
2304 # information is used by the Syzygy optimization tool when
2305 # decomposing the release image.
2310 ['msvs_use_common_release', {
2311 'includes': ['release.gypi'],
2313 ['release_valgrind_build==0 and tsan==0', {
2316 'DYNAMIC_ANNOTATIONS_ENABLED=0',
2320 'DYNAMIC_ANNOTATIONS_ENABLED=1',
2321 'WTF_USE_DYNAMIC_ANNOTATIONS=1',
2324 ['win_use_allocator_shim==0', {
2325 'defines': ['NO_TCMALLOC'],
2327 ['os_posix==1 and chromium_code==1', {
2328 # Non-chromium code is not guaranteed to compile cleanly
2329 # with _FORTIFY_SOURCE. Also, fortified build may fail
2330 # when optimizations are disabled, so only do that for Release
2333 '_FORTIFY_SOURCE=2',
2336 ['OS=="linux" or OS=="android"', {
2337 'target_conditions': [
2338 ['_toolset=="target"', {
2340 '<@(release_extra_cflags)',
2348 # Concrete configurations
2351 'inherit_from': ['Common_Base', 'x86_Base', 'Debug_Base'],
2354 'inherit_from': ['Common_Base', 'x86_Base', 'Release_Base'],
2358 # TODO(bradnelson): add a gyp mechanism to make this more graceful.
2360 'inherit_from': ['Common_Base', 'x64_Base', 'Debug_Base'],
2363 'inherit_from': ['Common_Base', 'x64_Base', 'Release_Base'],
2371 'target_defaults': {
2373 # TODO(phajdan.jr): Use -fstack-protector-strong when our gcc
2375 '-fstack-protector',
2376 '--param=ssp-buffer-size=4',
2384 ['os_posix==1 and OS!="mac" and OS!="ios"', {
2385 'target_defaults': {
2386 # Enable -Werror by default, but put it in a variable so it can
2387 # be disabled in ~/.gyp/include.gypi on the valgrind builders.
2389 'werror%': '-Werror',
2390 'libraries_for_target%': '',
2393 '_FILE_OFFSET_BITS=64',
2396 '<(werror)', # See note above about the werror variable.
2399 '-fno-strict-aliasing', # See http://crbug.com/32204
2401 # TODO(evan): turn this back on once all the builds work.
2403 # Don't warn about unused function params. We use those everywhere.
2404 '-Wno-unused-parameter',
2405 # Don't warn about the "struct foo f = {0};" initialization pattern.
2406 '-Wno-missing-field-initializers',
2407 # Don't export any symbols (for example, to plugins we dlopen()).
2408 # Note: this is *required* to make some plugins work.
2409 '-fvisibility=hidden',
2414 '-fno-threadsafe-statics',
2415 # Make inline functions have hidden visiblity by default.
2416 # Surprisingly, not covered by -fvisibility=hidden.
2417 '-fvisibility-inlines-hidden',
2418 # GCC turns on -Wsign-compare for C++ under -Wall, but clang doesn't,
2419 # so we specify it explicitly.
2420 # TODO(fischman): remove this if http://llvm.org/PR10448 obsoletes it.
2421 # http://code.google.com/p/chromium/issues/detail?id=90453
2425 '-pthread', '-Wl,-z,noexecstack',
2428 '<(libraries_for_target)',
2433 'debug_optimize%': '0',
2439 '-O>(debug_optimize)',
2443 ['OS=="android" and android_full_debug==0', {
2444 # Some configurations are copied from Release_Base to reduce
2447 'debug_optimize%': 's',
2450 '-fomit-frame-pointer',
2452 '-ffunction-sections',
2457 '-Wl,--gc-sections',
2464 'release_optimize%': '2',
2465 # Binaries become big and gold is unable to perform GC
2466 # and remove unused sections for some of test targets
2467 # on 32 bit platform.
2468 # (This is currently observed only in chromeos valgrind bots)
2469 # The following flag is to disable --gc-sections linker
2470 # option for these bots.
2471 'no_gc_sections%': 0,
2473 # TODO(bradnelson): reexamine how this is done if we change the
2474 # expansion of configurations
2475 'release_valgrind_build%': 0,
2478 '-O<(release_optimize)',
2479 # Don't emit the GCC version ident directives, they just end up
2480 # in the .comment section taking up binary size.
2482 # Put data and code in their own sections, so that unused symbols
2483 # can be removed at link time with --gc-sections.
2485 '-ffunction-sections',
2488 # Specifically tell the linker to perform optimizations.
2489 # See http://lwn.net/Articles/192624/ .
2494 ['no_gc_sections==0', {
2496 '-Wl,--gc-sections',
2501 'release_optimize%': 's',
2504 '-fomit-frame-pointer',
2514 '-fno-omit-frame-pointer',
2523 'cflags': ['-fprofile-arcs', '-ftest-coverage'],
2524 'ldflags': ['-fprofile-arcs'],
2527 'cflags': ['-pg', '-g'],
2535 ['target_arch=="ia32"', {
2536 'target_conditions': [
2537 ['_toolset=="target"', {
2539 # Needed so that libs with .s files (e.g. libicudata.a)
2540 # are compatible with the general 32-bit-ness.
2543 # All floating-point computations on x87 happens in 80-bit
2544 # precision. Because the C and C++ language standards allow
2545 # the compiler to keep the floating-point values in higher
2546 # precision than what's specified in the source and doing so
2547 # is more efficient than constantly rounding up to 64-bit or
2548 # 32-bit precision as specified in the source, the compiler,
2549 # especially in the optimized mode, tries very hard to keep
2550 # values in x87 floating-point stack (in 80-bit precision)
2551 # as long as possible. This has important side effects, that
2552 # the real value used in computation may change depending on
2553 # how the compiler did the optimization - that is, the value
2554 # kept in 80-bit is different than the value rounded down to
2555 # 64-bit or 32-bit. There are possible compiler options to
2556 # make this behavior consistent (e.g. -ffloat-store would keep
2557 # all floating-values in the memory, thus force them to be
2558 # rounded to its original precision) but they have significant
2559 # runtime performance penalty.
2561 # -mfpmath=sse -msse2 makes the compiler use SSE instructions
2562 # which keep floating-point values in SSE registers in its
2563 # native precision (32-bit for single precision, and 64-bit
2564 # for double precision values). This means the floating-point
2565 # value used during computation does not change depending on
2566 # how the compiler optimized the code, since the value is
2567 # always kept in its specified precision.
2569 ['branding=="Chromium" and disable_sse2==0', {
2576 # ChromeOS targets Pinetrail, which is sse3, but most of the
2577 # benefit comes from sse2 so this setting allows ChromeOS
2578 # to build on other CPUs. In the future -march=atom would
2579 # help but requires a newer compiler.
2580 ['chromeos==1 and disable_sse2==0', {
2585 # Install packages have started cropping up with
2586 # different headers between the 32-bit and 64-bit
2587 # versions, so we have to shadow those differences off
2588 # and make sure a 32-bit-on-64-bit build picks up the
2590 # For android build, use NDK headers instead of host headers
2591 ['host_arch!="ia32" and OS!="android"', {
2597 # -mmmx allows mmintrin.h to be used for mmx intrinsics.
2598 # video playback is mmx and sse2 optimized.
2609 ['target_arch=="arm"', {
2610 'target_conditions': [
2611 ['_toolset=="target"', {
2613 # The codesourcery arm-2009q3 toolchain warns at that the ABI
2614 # has changed whenever it encounters a varargs function. This
2615 # silences those warnings, as they are not helpful and
2616 # clutter legitimate warnings.
2629 '-mfloat-abi=<(arm_float_abi)',
2633 'cflags': [ '-mfpu=neon', ],
2635 'cflags': [ '-mfpu=<(arm_fpu)', ],
2640 # Most of the following flags are derived from what Android
2641 # uses by default when building for arm, reference for which
2642 # can be found in the following file in the Android NDK:
2643 # toolchains/arm-linux-androideabi-4.4.3/setup.mk
2645 # The tree-sra optimization (scalar replacement for
2646 # aggregates enabling subsequent optimizations) leads to
2647 # invalid code generation when using the Android NDK's
2648 # compiler (r5-r7). This can be verified using
2649 # TestWebKitAPI's WTF.Checked_int8_t test.
2654 # Android now supports .relro sections properly.
2655 # NOTE: While these flags enable the generation of .relro
2656 # sections, the generated libraries can still be loaded on
2657 # older Android platform versions.
2665 # Android toolchain doesn't support -mimplicit-it=thumb
2666 'cflags!': [ '-Wa,-mimplicit-it=thumb' ],
2667 'cflags': [ '-mthumb-interwork' ],
2670 # Flags suitable for Android emulator
2685 '-marm', # Probably reduntant, but recommend by "perf" docs.
2686 '-mapcs-frame', # Seems required by -fno-omit-frame-pointer.
2691 # Clang does not support the following options.
2692 '-mthumb-interwork',
2693 '-finline-limit=64',
2700 'target_conditions': [
2701 # ndk-build copies .a's around the filesystem, breaking
2702 # relative paths in thin archives. Disable using thin
2703 # archives to avoid problems until one of these is fixed:
2704 # http://code.google.com/p/android/issues/detail?id=40302
2705 # http://code.google.com/p/android/issues/detail?id=40303
2706 ['_type=="static_library"', {
2707 'standalone_static_library': 1,
2724 'target_conditions': [
2725 ['_toolset=="target"', {
2727 '--sysroot=<(sysroot)',
2730 '--sysroot=<(sysroot)',
2737 # Clang spots more unused functions.
2738 '-Wno-unused-function',
2739 # Don't die on dtoa code that uses a char as an array index.
2740 '-Wno-char-subscripts',
2741 # Especially needed for gtest macros using enum values from Mac
2743 # TODO(pkasting): In C++11 this is legal, so this should be
2744 # removed when we change to that. (This is also why we don't
2745 # bother fixing all these cases today.)
2746 '-Wno-unnamed-type-template-args',
2747 # This (rightfully) complains about 'override', which we use
2749 '-Wno-c++11-extensions',
2751 # Warns on switches on enums that cover all enum values but
2752 # also contain a default: branch. Chrome is full of that.
2753 '-Wno-covered-switch-default',
2756 # Clang doesn't seem to know know this flag.
2760 ['clang==1 and clang_use_chrome_plugins==1', {
2762 '<@(clang_chrome_plugins_flags)',
2765 ['clang==1 and clang_load!=""', {
2767 '-Xclang', '-load', '-Xclang', '<(clang_load)',
2770 ['clang==1 and clang_add_plugin!=""', {
2772 '-Xclang', '-add-plugin', '-Xclang', '<(clang_add_plugin)',
2775 ['clang==1 and "<(GENERATOR)"=="ninja"', {
2777 # See http://crbug.com/110262
2778 '-fcolor-diagnostics',
2782 'target_conditions': [
2783 ['_toolset=="target"', {
2785 '-fsanitize=address',
2786 '-fno-omit-frame-pointer',
2787 '-w', # http://crbug.com/162783
2790 '-fsanitize=address',
2793 'ADDRESS_SANITIZER',
2799 'target_conditions': [
2800 ['_toolset=="target"', {
2802 '-fsanitize=thread',
2803 '-fno-omit-frame-pointer',
2805 '-mllvm', '-tsan-blacklist=<(tsan_blacklist)',
2808 '-fsanitize=thread',
2812 'DYNAMIC_ANNOTATIONS_EXTERNAL_IMPL=1',
2813 'WTF_USE_DYNAMIC_ANNOTATIONS_NOIMPL=1',
2815 'target_conditions': [
2816 ['_type=="executable"', {
2825 ['order_profiling!=0 and (chromeos==1 or OS=="linux" or OS=="android")', {
2826 'target_conditions' : [
2827 ['_toolset=="target"', {
2829 '-finstrument-functions',
2830 # Allow mmx intrinsics to inline, so that the
2831 # compiler can expand the intrinsics.
2832 '-finstrument-functions-exclude-file-list=mmintrin.h',
2837 ['linux_breakpad==1', {
2838 'defines': ['USE_LINUX_BREAKPAD'],
2840 ['linux_dump_symbols==1', {
2843 ['target_arch=="ia32"', {
2844 'target_conditions': [
2845 ['_toolset=="target"', {
2847 # Workaround for linker OOM. http://crbug.com/160253.
2848 '-Wl,--no-keep-files-mapped',
2855 ['linux_use_heapchecker==1', {
2856 'variables': {'linux_use_tcmalloc%': 1},
2857 'defines': ['USE_HEAPCHECKER'],
2859 ['linux_use_tcmalloc==0', {
2860 'defines': ['NO_TCMALLOC'],
2862 ['linux_keep_shadow_stacks==1', {
2863 'defines': ['KEEP_SHADOW_STACKS'],
2865 '-finstrument-functions',
2866 # Allow mmx intrinsics to inline, so that the compiler can expand
2868 '-finstrument-functions-exclude-file-list=mmintrin.h',
2871 ['linux_use_gold_flags==1', {
2873 # Experimentation found that using four linking threads
2874 # saved ~20% of link time.
2875 # https://groups.google.com/a/chromium.org/group/chromium-dev/browse_thread/thread/281527606915bb36
2877 '-Wl,--thread-count=4',
2880 ['release_valgrind_build==0', {
2881 'target_conditions': [
2882 ['_toolset=="target"', {
2884 # There seems to be a conflict of --icf and -pie
2885 # in gold which can generate crashy binaries. As
2886 # a security measure, -pie takes precendence for
2896 ['linux_use_gold_binary==1', {
2899 ['inside_chromium_build==1', {
2900 # We pass the path to gold to the compiler. gyp leaves
2901 # unspecified what the cwd is when running the compiler,
2902 # so the normal gyp path-munging fails us. This hack
2903 # gets the right path.
2904 'gold_path': '<(PRODUCT_DIR)/../../third_party/gold',
2906 'gold_path': '<(PRODUCT_DIR)/../../Source/WebKit/chromium/third_party/gold',
2911 # Put our gold binary in the search path for the linker.
2918 # FreeBSD-specific options; note that most FreeBSD options are set above,
2921 'target_defaults': {
2923 '-Wl,--no-keep-memory',
2927 # Android-specific options; note that most are set above with Linux.
2930 # This is a unique identifier for a given build. It's used for
2931 # identifying various build artifacts corresponding to a particular
2932 # build of chrome (e.g. where to find archived symbols).
2933 'chrome_build_id%': '',
2935 # Use shared stlport library when system one used.
2936 # Figure this out early since it needs symbols from libgcc.a, so it
2937 # has to be before that in the set of libraries.
2938 ['use_system_stlport==1', {
2939 'android_stlport_library': 'stlport',
2942 ['component=="shared_library"', {
2943 'android_stlport_library': 'stlport_shared',
2945 'android_stlport_library': 'stlport_static',
2951 # Placing this variable here prevents from forking libvpx, used
2952 # by remoting. Remoting is off, so it needn't built,
2953 # so forking it's deps seems like overkill.
2954 # But this variable need defined to properly run gyp.
2955 # A proper solution is to have an OS==android conditional
2956 # in third_party/libvpx/libvpx.gyp to define it.
2957 'libvpx_path': 'lib/linux/arm',
2959 'target_defaults': {
2961 'release_extra_cflags%': '',
2964 'target_conditions': [
2965 # Settings for building device targets using Android's toolchain.
2966 # These are based on the setup.mk file from the Android NDK.
2968 # The NDK Android executable link step looks as follows:
2970 # $(TARGET_CRTBEGIN_DYNAMIC_O) <-- crtbegin.o
2971 # $(PRIVATE_OBJECTS) <-- The .o that we built
2972 # $(PRIVATE_STATIC_LIBRARIES) <-- The .a that we built
2973 # $(TARGET_LIBGCC) <-- libgcc.a
2974 # $(PRIVATE_SHARED_LIBRARIES) <-- The .so that we built
2975 # $(PRIVATE_LDLIBS) <-- System .so
2976 # $(TARGET_CRTEND_O) <-- crtend.o
2978 # For now the above are approximated for executables by adding
2979 # crtbegin.o to the end of the ldflags and 'crtend.o' to the end
2982 # The NDK Android shared library link step looks as follows:
2984 # $(PRIVATE_OBJECTS) <-- The .o that we built
2985 # -l,--whole-archive
2986 # $(PRIVATE_WHOLE_STATIC_LIBRARIES)
2987 # -l,--no-whole-archive
2988 # $(PRIVATE_STATIC_LIBRARIES) <-- The .a that we built
2989 # $(TARGET_LIBGCC) <-- libgcc.a
2990 # $(PRIVATE_SHARED_LIBRARIES) <-- The .so that we built
2991 # $(PRIVATE_LDLIBS) <-- System .so
2993 # For now, assume that whole static libraries are not needed.
2995 # For both executables and shared libraries, add the proper
2996 # libgcc.a to the start of libraries which puts it in the
2997 # proper spot after .o and .a files get linked in.
2999 # TODO: The proper thing to do longer-tem would be proper gyp
3000 # support for a custom link command line.
3001 ['_toolset=="target"', {
3003 '-pthread', # Not supported by Android toolchain.
3006 '-ffunction-sections',
3009 '-fstack-protector',
3011 '-finline-limit=64',
3012 '-Wa,--noexecstack',
3013 '<@(release_extra_cflags)',
3017 '__GNU_SOURCE=1', # Necessary for clone()
3019 '_STLP_USE_PTR_SPECIALIZATIONS=1',
3020 'CHROME_BUILD_ID="<(chrome_build_id)"',
3023 '-pthread', # Not supported by Android toolchain.
3027 '-Wl,--no-undefined',
3028 # Don't export symbols from statically linked libraries.
3029 '-Wl,--exclude-libs=ALL',
3032 '-l<(android_stlport_library)',
3033 # Manually link the libgcc.a that the cross compiler uses.
3034 '<!(<(android_toolchain)/*-gcc -print-libgcc-file-name)',
3041 ['component=="shared_library"', {
3046 '-Wl,--exclude-libs=ALL',
3051 # Work around incompatibilities between bionic and clang
3053 '-D__compiler_offsetof=__builtin_offsetof',
3054 '-Dnan=__builtin_nan',
3057 ['target_arch=="arm"', {
3059 '-target arm-linux-androideabi',
3060 '-mllvm -arm-enable-ehabi',
3063 '-target arm-linux-androideabi',
3066 ['target_arch=="ia32"', {
3068 '-target x86-linux-androideabi',
3071 '-target x86-linux-androideabi',
3078 # Android build relies on -Wl,--gc-sections removing
3079 # unreachable code. ASan instrumentation for globals inhibits
3080 # this and results in a library with unresolvable relocations.
3081 # TODO(eugenis): find a way to reenable this.
3082 '-mllvm -asan-globals=0',
3085 ['android_build_type==0', {
3087 # The NDK has these things, but doesn't define the constants
3088 # to say that it does. Define them here instead.
3092 '--sysroot=<(android_ndk_sysroot)',
3095 '--sysroot=<(android_ndk_sysroot)',
3098 ['android_build_type==1', {
3100 # OpenAL headers from the Android tree.
3101 '<(android_src)/frameworks/wilhelm/include',
3104 # Android predefines this as 1; undefine it here so Chromium
3105 # can redefine it later to be 2 for chromium code and unset
3106 # for third party code. This works because cflags are added
3108 '-U_FORTIFY_SOURCE',
3109 # Disable any additional warnings enabled by the Android build system but which
3110 # chromium does not build cleanly with (when treating warning as errors).
3111 # Things that are part of -Wextra:
3112 '-Wno-extra', # Enabled by -Wextra, but no specific flag
3113 '-Wno-ignored-qualifiers',
3115 # Other things unrelated to -Wextra:
3116 '-Wno-non-virtual-dtor',
3120 # Disabling c++0x-compat should be handled in WebKit, but
3121 # this currently doesn't work because gcc_version is not set
3122 # correctly when building with the Android build system.
3123 # TODO(torne): Fix this in WebKit.
3124 '-Wno-error=c++0x-compat',
3127 ['android_build_type==1 and chromium_code==0', {
3129 # There is a class of warning which:
3130 # 1) Android always enables and also treats as errors
3131 # 2) Chromium ignores in third party code
3132 # For now, I am leaving these warnings enabled but preventing
3133 # them from being treated as errors here.
3135 '-Wno-format-security',
3136 '-Wno-non-virtual-dtor',
3138 '-Wno-sequence-point',
3141 ['target_arch == "arm"', {
3143 # Enable identical code folding to reduce size.
3147 # NOTE: The stlport header include paths below are specified in
3148 # cflags rather than include_dirs because they need to come
3149 # after include_dirs. Think of them like system headers, but
3150 # don't use '-isystem' because the arm-linux-androideabi-4.4.3
3151 # toolchain (circa Gingerbread) will exhibit strange errors.
3152 # The include ordering here is important; change with caution.
3153 ['use_system_stlport==1', {
3155 # For libstdc++/include, which is used by stlport.
3156 '-I<(android_src)/bionic',
3157 '-I<(android_src)/external/stlport/stlport',
3159 }, { # else: use_system_stlport!=1
3161 '-I<(android_ndk_root)/sources/cxx-stl/stlport/stlport',
3162 '-I<(android_ndk_root)/sources/cxx-stl/gnu-libstdc++/4.6/include',
3165 ['target_arch=="arm" and armv7==1', {
3167 '-L<(android_ndk_root)/sources/cxx-stl/stlport/libs/armeabi-v7a',
3168 '-L<(android_ndk_root)/sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi-v7a',
3171 ['target_arch=="arm" and armv7==0', {
3173 '-L<(android_ndk_root)/sources/cxx-stl/stlport/libs/armeabi',
3174 '-L<(android_ndk_root)/sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi',
3177 ['target_arch=="ia32"', {
3179 '-L<(android_ndk_root)/sources/cxx-stl/stlport/libs/x86',
3180 '-L<(android_ndk_root)/sources/cxx-stl/gnu-libstdc++/4.6/libs/x86',
3185 ['target_arch=="ia32"', {
3186 # The x86 toolchain currently has problems with stack-protector.
3188 '-fstack-protector',
3191 '-fno-stack-protector',
3195 'target_conditions': [
3196 ['_type=="executable"', {
3199 '-Wl,-dynamic-linker,/system/bin/linker',
3200 '-Wl,--gc-sections',
3201 '-Wl,-z,nocopyreloc',
3202 # crtbegin_dynamic.o should be the last item in ldflags.
3203 '<(android_ndk_lib)/crtbegin_dynamic.o',
3206 # crtend_android.o needs to be the last item in libraries.
3207 # Do not add any libraries after this!
3208 '<(android_ndk_lib)/crtend_android.o',
3221 ['_type=="shared_library" or _type=="loadable_module"', {
3223 '-Wl,-shared,-Bsymbolic',
3224 # crtbegin_so.o should be the last item in ldflags.
3225 '<(android_ndk_lib)/crtbegin_so.o',
3228 # crtend_so.o needs to be the last item in libraries.
3229 # Do not add any libraries after this!
3230 '<(android_ndk_lib)/crtend_so.o',
3235 # Settings for building host targets using the system toolchain.
3236 ['_toolset=="host"', {
3238 # Due to issues in Clang build system, using ASan on 32-bit
3239 # binaries on x86_64 host is problematic.
3240 # TODO(eugenis): re-enable.
3241 '-fsanitize=address',
3242 '-w', # http://crbug.com/162783
3245 '-fsanitize=address',
3246 '-Wl,-z,noexecstack',
3247 '-Wl,--gc-sections',
3252 ['exclude', '_android(_unittest)?\\.cc$'],
3253 ['exclude', '(^|/)android/']
3260 'cflags!': ['-fvisibility=hidden'],
3261 'cflags_cc!': ['-fvisibility-inlines-hidden'],
3263 ['OS=="mac" or OS=="ios"', {
3264 'target_defaults': {
3267 'ALWAYS_SEARCH_USER_PATHS': 'NO',
3268 # Don't link in libarclite_macosx.a, see http://crbug.com/156530.
3269 'CLANG_LINK_OBJC_RUNTIME': 'NO', # -fno-objc-link-runtime
3270 'GCC_C_LANGUAGE_STANDARD': 'c99', # -std=c99
3271 'GCC_CW_ASM_SYNTAX': 'NO', # No -fasm-blocks
3272 'GCC_ENABLE_CPP_EXCEPTIONS': 'NO', # -fno-exceptions
3273 'GCC_ENABLE_CPP_RTTI': 'NO', # -fno-rtti
3274 'GCC_ENABLE_PASCAL_STRINGS': 'NO', # No -mpascal-strings
3275 # GCC_INLINES_ARE_PRIVATE_EXTERN maps to -fvisibility-inlines-hidden
3276 'GCC_INLINES_ARE_PRIVATE_EXTERN': 'YES',
3277 'GCC_OBJC_CALL_CXX_CDTORS': 'YES', # -fobjc-call-cxx-cdtors
3278 'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES', # -fvisibility=hidden
3279 'GCC_THREADSAFE_STATICS': 'NO', # -fno-threadsafe-statics
3280 'GCC_TREAT_WARNINGS_AS_ERRORS': 'YES', # -Werror
3281 'GCC_VERSION': '4.2',
3282 'GCC_WARN_ABOUT_MISSING_NEWLINE': 'YES', # -Wnewline-eof
3283 'USE_HEADERMAP': 'NO',
3288 # Don't warn about unused function parameters.
3289 '-Wno-unused-parameter',
3290 # Don't warn about the "struct foo f = {0};" initialization
3292 '-Wno-missing-field-initializers',
3295 ['chromium_mac_pch', {'GCC_PRECOMPILE_PREFIX_HEADER': 'YES'},
3296 {'GCC_PRECOMPILE_PREFIX_HEADER': 'NO'}
3298 # Note that the prebuilt Clang binaries should not be used for iOS
3299 # development except for ASan builds.
3301 'CC': '$(SOURCE_ROOT)/<(clang_dir)/clang',
3302 'LDPLUSPLUS': '$(SOURCE_ROOT)/<(clang_dir)/clang++',
3304 # Don't use -Wc++0x-extensions, which Xcode 4 enables by default
3305 # when building with clang. This warning is triggered when the
3306 # override keyword is used via the OVERRIDE macro from
3307 # base/compiler_specific.h.
3308 'CLANG_WARN_CXX0X_EXTENSIONS': 'NO',
3309 # Warn if automatic synthesis is triggered with
3310 # the -Wobjc-missing-property-synthesis flag.
3311 'CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS': 'YES',
3312 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0',
3316 # This warns on using ints as initializers for floats in
3317 # initializer lists (e.g. |int a = f(); CGSize s = { a, a };|),
3318 # which happens in several places in chrome code. Not sure if
3319 # this is worth fixing.
3320 '-Wno-c++11-narrowing',
3322 # This warns about code like |"0x%08"NACL_PRIxPTR| -- with C++11
3323 # user-defined literals, this is now a string literal with a UD
3324 # suffix. However, this is used heavily in NaCl code, so disable
3325 # the warning for now.
3326 '-Wno-reserved-user-defined-literal',
3328 # Don't die on dtoa code that uses a char as an array index.
3329 # This is required solely for base/third_party/dmg_fp/dtoa.cc.
3330 '-Wno-char-subscripts',
3331 # Clang spots more unused functions.
3332 '-Wno-unused-function',
3334 # Warns on switches on enums that cover all enum values but
3335 # also contain a default: branch. Chrome is full of that.
3336 '-Wno-covered-switch-default',
3338 'OTHER_CPLUSPLUSFLAGS': [
3339 # gnu++11 instead of c++11 so that __ANSI_C__ doesn't get
3340 # defined. (Else e.g. finite() in base/float_util.h needs to
3341 # be isfinite() which doesn't exist on the android bots.)
3342 # typeof() is also disabled in c++11 (but we could use
3343 # decltype() instead).
3344 # TODO(thakis): Use CLANG_CXX_LANGUAGE_STANDARD instead once all
3345 # bots use xcode 4 -- http://crbug.com/147515).
3346 # TODO(thakis): Eventually switch this to c++11 instead of
3347 # gnu++11 (once typeof can be removed, which is blocked on c++11
3348 # being available everywhere).
3349 '$(inherited)', '-std=gnu++11',
3352 ['clang==1 and clang_use_chrome_plugins==1', {
3354 '<@(clang_chrome_plugins_flags)',
3357 ['clang==1 and clang_load!=""', {
3359 '-Xclang', '-load', '-Xclang', '<(clang_load)',
3362 ['clang==1 and clang_add_plugin!=""', {
3364 '-Xclang', '-add-plugin', '-Xclang', '<(clang_add_plugin)',
3367 ['clang==1 and "<(GENERATOR)"=="ninja"', {
3369 # See http://crbug.com/110262
3370 '-fcolor-diagnostics',
3378 'clang_dir': '../third_party/llvm-build/Release+Asserts/bin',
3384 '-fsanitize=address',
3385 '-w', # http://crbug.com/162783
3389 'ADDRESS_SANITIZER',
3393 'target_conditions': [
3394 ['_type!="static_library"', {
3395 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-search_paths_first']},
3400 '-fsanitize=address',
3407 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-ObjC']},
3409 ], # target_conditions
3410 }, # target_defaults
3411 }], # OS=="mac" or OS=="ios"
3413 'target_defaults': {
3415 # These should end with %, but there seems to be a bug with % in
3416 # variables that are intended to be set to different values in
3417 # different targets, like these.
3418 'mac_pie': 1, # Most executables can be position-independent.
3419 # Strip debugging symbols from the target.
3420 'mac_strip': '<(mac_strip_release)',
3424 ['mac_want_real_dsym=="default"', {
3427 'mac_real_dsym': '<(mac_want_real_dsym)'
3432 ['mac_want_real_dsym=="default"', {
3433 'mac_real_dsym': 0, # Fake .dSYMs are fine in most cases.
3435 'mac_real_dsym': '<(mac_want_real_dsym)'
3442 'GCC_DYNAMIC_NO_PIC': 'NO', # No -mdynamic-no-pic
3443 # (Equivalent to -fPIC)
3444 # MACOSX_DEPLOYMENT_TARGET maps to -mmacosx-version-min
3445 'MACOSX_DEPLOYMENT_TARGET': '<(mac_deployment_target)',
3446 # Keep pch files below xcodebuild/.
3447 'SHARED_PRECOMPS_DIR': '$(CONFIGURATION_BUILD_DIR)/SharedPrecompiledHeaders',
3449 '-fno-strict-aliasing', # See http://crbug.com/32204
3452 'target_conditions': [
3453 ['_type=="executable"', {
3456 # Arranges for data (heap) pages to be protected against
3457 # code execution when running on Mac OS X 10.7 ("Lion"), and
3458 # ensures that the position-independent executable (PIE) bit
3459 # is set for ASLR when running on Mac OS X 10.5 ("Leopard").
3461 # Define change_mach_o_flags in a variable ending in _path
3462 # so that GYP understands it's a path and performs proper
3463 # relativization during dict merging.
3464 'change_mach_o_flags_path':
3465 'mac/change_mach_o_flags_from_xcode.sh',
3466 'change_mach_o_flags_options%': [
3468 'target_conditions': [
3469 ['mac_pie==0 or release_valgrind_build==1', {
3470 # Don't enable PIE if it's unwanted. It's unwanted if
3471 # the target specifies mac_pie=0 or if building for
3472 # Valgrind, because Valgrind doesn't understand slide.
3473 # See the similar mac_pie/release_valgrind_build check
3475 'change_mach_o_flags_options': [
3481 'postbuild_name': 'Change Mach-O Flags',
3483 '<(change_mach_o_flags_path)',
3484 '>@(change_mach_o_flags_options)',
3491 'asan_saves_file': 'asan.saves',
3494 'CHROMIUM_STRIP_SAVE_FILE': '<(asan_saves_file)',
3498 'target_conditions': [
3499 ['mac_pie==1 and release_valgrind_build==0', {
3500 # Turn on position-independence (ASLR) for executables. When
3501 # PIE is on for the Chrome executables, the framework will
3502 # also be subject to ASLR.
3503 # Don't do this when building for Valgrind, because Valgrind
3504 # doesn't understand slide. TODO: Make Valgrind on Mac OS X
3505 # understand slide, and get rid of the Valgrind check.
3508 '-Wl,-pie', # Position-independent executable (MH_PIE)
3514 ['(_type=="executable" or _type=="shared_library" or \
3515 _type=="loadable_module") and mac_strip!=0', {
3516 'target_conditions': [
3517 ['mac_real_dsym == 1', {
3518 # To get a real .dSYM bundle produced by dsymutil, set the
3519 # debug information format to dwarf-with-dsym. Since
3520 # strip_from_xcode will not be used, set Xcode to do the
3521 # stripping as well.
3525 'DEBUG_INFORMATION_FORMAT': 'dwarf-with-dsym',
3526 'DEPLOYMENT_POSTPROCESSING': 'YES',
3527 'STRIP_INSTALLED_PRODUCT': 'YES',
3528 'target_conditions': [
3529 ['_type=="shared_library" or _type=="loadable_module"', {
3530 # The Xcode default is to strip debugging symbols
3531 # only (-S). Local symbols should be stripped as
3532 # well, which will be handled by -x. Xcode will
3533 # continue to insert -S when stripping even when
3534 # additional flags are added with STRIPFLAGS.
3536 }], # _type=="shared_library" or _type=="loadable_module"
3537 ['_type=="executable"', {
3540 'STRIPFLAGS': '-s $(CHROMIUM_STRIP_SAVE_FILE)',
3543 }], # _type=="executable" and asan==1
3544 ], # target_conditions
3546 }, # configuration "Release"
3548 }, { # mac_real_dsym != 1
3549 # To get a fast fake .dSYM bundle, use a post-build step to
3550 # produce the .dSYM and strip the executable. strip_from_xcode
3551 # only operates in the Release configuration.
3555 # Define strip_from_xcode in a variable ending in _path
3556 # so that gyp understands it's a path and performs proper
3557 # relativization during dict merging.
3558 'strip_from_xcode_path': 'mac/strip_from_xcode',
3560 'postbuild_name': 'Strip If Needed',
3561 'action': ['<(strip_from_xcode_path)'],
3565 ], # target_conditions
3566 }], # (_type=="executable" or _type=="shared_library" or
3567 # _type=="loadable_module") and mac_strip!=0
3568 ], # target_conditions
3569 }, # target_defaults
3572 'target_defaults': {
3573 'xcode_settings' : {
3574 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0',
3576 # This next block is mostly common with the 'mac' section above,
3577 # but keying off (or setting) 'clang' isn't valid for iOS as it
3578 # also seems to mean using the custom build of clang.
3580 # Don't use -Wc++0x-extensions, which Xcode 4 enables by default
3581 # when building with clang. This warning is triggered when the
3582 # override keyword is used via the OVERRIDE macro from
3583 # base/compiler_specific.h.
3584 'CLANG_WARN_CXX0X_EXTENSIONS': 'NO',
3585 # Warn if automatic synthesis is triggered with
3586 # the -Wobjc-missing-property-synthesis flag.
3587 'CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS': 'YES',
3590 # Don't die on dtoa code that uses a char as an array index.
3591 # This is required solely for base/third_party/dmg_fp/dtoa.cc.
3592 '-Wno-char-subscripts',
3593 # Clang spots more unused functions.
3594 '-Wno-unused-function',
3595 # See comments on this flag higher up in this file.
3596 '-Wno-unnamed-type-template-args',
3597 # This (rightfully) complains about 'override', which we use
3599 '-Wno-c++11-extensions',
3602 'target_conditions': [
3603 ['_type=="executable"', {
3607 'DEPLOYMENT_POSTPROCESSING': 'YES',
3608 'STRIP_INSTALLED_PRODUCT': 'YES',
3613 # Remove dSYM to reduce build time.
3614 'DEBUG_INFORMATION_FORMAT': 'dwarf',
3620 ['chromium_ios_signing', {
3621 # iOS SDK wants everything for device signed.
3622 'CODE_SIGN_IDENTITY[sdk=iphoneos*]': 'iPhone Developer',
3624 'CODE_SIGNING_REQUIRED': 'NO',
3625 'CODE_SIGN_IDENTITY[sdk=iphoneos*]': '',
3630 ], # target_conditions
3631 }, # target_defaults
3634 'target_defaults': {
3636 '_WIN32_WINNT=0x0602',
3643 'CERT_CHAIN_PARA_HAS_EXTRA_FIELDS',
3644 'WIN32_LEAN_AND_MEAN',
3648 ['buildtype=="Official"', {
3649 # In official builds, targets can self-select an optimization
3650 # level by defining a variable named 'optimize', and setting it
3652 # - "size", optimizes for minimal code size - the default.
3653 # - "speed", optimizes for speed over code size.
3654 # - "max", whole program optimization and link-time code
3655 # generation. This is very expensive and should be used
3658 'optimize%': 'size',
3660 'target_conditions': [
3661 ['optimize=="size"', {
3663 'VCCLCompilerTool': {
3664 # 1, optimizeMinSpace, Minimize Size (/O1)
3665 'Optimization': '1',
3666 # 2, favorSize - Favor small code (/Os)
3667 'FavorSizeOrSpeed': '2',
3672 ['optimize=="speed"', {
3674 'VCCLCompilerTool': {
3675 # 2, optimizeMaxSpeed, Maximize Speed (/O2)
3676 'Optimization': '2',
3677 # 1, favorSpeed - Favor fast code (/Ot)
3678 'FavorSizeOrSpeed': '1',
3683 ['optimize=="max"', {
3685 'VCCLCompilerTool': {
3686 # 2, optimizeMaxSpeed, Maximize Speed (/O2)
3687 'Optimization': '2',
3688 # 1, favorSpeed - Favor fast code (/Ot)
3689 'FavorSizeOrSpeed': '1',
3690 # This implies link time code generation.
3691 'WholeProgramOptimization': 'true',
3699 ['component=="static_library"', {
3701 '_HAS_EXCEPTIONS=0',
3714 'AdditionalLibraryDirectories':
3715 ['<(windows_driver_kit_path)/lib/ATL/i386'],
3717 'VCLibrarianTool': {
3718 'AdditionalLibraryDirectories':
3719 ['<(windows_driver_kit_path)/lib/ATL/i386'],
3725 'VCLibrarianTool': {
3726 'AdditionalLibraryDirectories':
3727 ['<(windows_driver_kit_path)/lib/ATL/amd64'],
3730 'AdditionalLibraryDirectories':
3731 ['<(windows_driver_kit_path)/lib/ATL/amd64'],
3738 # Explicitly required when using the ATL with express
3739 'AdditionalDependencies': ['atlthunk.lib'],
3741 # ATL 8.0 included in WDK 7.1 makes the linker to generate
3742 # almost eight hundred LNK4254 and LNK4078 warnings:
3743 # - warning LNK4254: section 'ATL' (50000040) merged into
3744 # '.rdata' (40000040) with different attributes
3745 # - warning LNK4078: multiple 'ATL' sections found with
3746 # different attributes
3747 'AdditionalOptions': ['/ignore:4254', '/ignore:4078'],
3750 'msvs_system_include_dirs': [
3751 '<(windows_driver_kit_path)/inc/atl71',
3752 '<(windows_driver_kit_path)/inc/mfc42',
3756 'msvs_system_include_dirs': [
3757 '<(windows_sdk_path)/Include/shared',
3758 '<(windows_sdk_path)/Include/um',
3759 '<(windows_sdk_path)/Include/winrt',
3760 '$(VSInstallDir)/VC/atlmfc/include',
3762 'msvs_cygwin_dirs': ['<(DEPTH)/third_party/cygwin'],
3763 'msvs_disabled_warnings': [4351, 4396, 4503, 4819,
3764 # TODO(maruel): These warnings are level 4. They will be slowly
3765 # removed as code is fixed.
3766 4100, 4121, 4125, 4127, 4130, 4131, 4189, 4201, 4238, 4244, 4245,
3767 4310, 4355, 4428, 4481, 4505, 4510, 4512, 4530, 4610, 4611, 4701,
3771 'VCCLCompilerTool': {
3772 'AdditionalOptions': ['/MP'],
3773 'MinimalRebuild': 'false',
3774 'BufferSecurityCheck': 'true',
3775 'EnableFunctionLevelLinking': 'true',
3776 'RuntimeTypeInfo': 'false',
3777 'WarningLevel': '4',
3778 'WarnAsError': 'true',
3779 'DebugInformationFormat': '3',
3781 ['component=="shared_library"', {
3782 'ExceptionHandling': '1', # /EHsc
3784 'ExceptionHandling': '0',
3788 'VCLibrarianTool': {
3789 'AdditionalOptions': ['/ignore:4221'],
3790 'AdditionalLibraryDirectories': [
3791 '<(windows_sdk_path)/Lib/win8/um/x86',
3795 'AdditionalDependencies': [
3807 'AdditionalLibraryDirectories': [
3808 '<(windows_sdk_path)/Lib/win8/um/x86',
3810 'GenerateDebugInformation': 'true',
3811 'MapFileName': '$(OutDir)\\$(TargetName).map',
3812 'ImportLibrary': '$(OutDir)\\lib\\$(TargetName).lib',
3813 'FixedBaseAddress': '1',
3816 # 1 == /SUBSYSTEM:CONSOLE
3817 # 2 == /SUBSYSTEM:WINDOWS
3818 # Most of the executables we'll ever create are tests
3819 # and utilities with console output.
3823 'GenerateStublessProxies': 'true',
3824 'TypeLibraryName': '$(InputName).tlb',
3825 'OutputDirectory': '$(IntDir)',
3826 'HeaderFileName': '$(InputName).h',
3827 'DLLDataFileName': '$(InputName).dlldata.c',
3828 'InterfaceIdentifierFileName': '$(InputName)_i.c',
3829 'ProxyFileName': '$(InputName)_p.c',
3831 'VCResourceCompilerTool': {
3833 'AdditionalIncludeDirectories': [
3835 '<(SHARED_INTERMEDIATE_DIR)',
3841 ['disable_nacl==1', {
3842 'target_defaults': {
3848 ['OS=="win" and msvs_use_common_linker_extras', {
3849 'target_defaults': {
3864 'AdditionalOptions': [
3877 'AdditionalOptions': [
3878 # safeseh is not compatible with x64
3890 ['enable_new_npdevice_api==1', {
3891 'target_defaults': {
3893 'ENABLE_NEW_NPDEVICE_API',
3900 # Android could use the goma with clang.
3901 'make_global_settings': [
3902 ['CC', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} ${CHROME_SRC}/<(make_clang_dir)/bin/clang)'],
3903 ['CXX', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} ${CHROME_SRC}/<(make_clang_dir)/bin/clang++)'],
3904 ['LINK', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} ${CHROME_SRC}/<(make_clang_dir)/bin/clang++)'],
3905 ['CC.host', '$(CC)'],
3906 ['CXX.host', '$(CXX)'],
3907 ['LINK.host', '$(LINK)'],
3910 'make_global_settings': [
3911 ['CC', '<(make_clang_dir)/bin/clang'],
3912 ['CXX', '<(make_clang_dir)/bin/clang++'],
3914 ['CC.host', '$(CC)'],
3915 ['CXX.host', '$(CXX)'],
3916 ['LINK.host', '$(LINK)'],
3921 ['OS=="android" and clang==0', {
3922 # Hardcode the compiler names in the Makefile so that
3923 # it won't depend on the environment at make time.
3924 'make_global_settings': [
3925 ['CC', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} <(android_toolchain)/*-gcc)'],
3926 ['CXX', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} <(android_toolchain)/*-g++)'],
3927 ['LINK', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} <(android_toolchain)/*-gcc)'],
3928 ['CC.host', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} <!(which gcc))'],
3929 ['CXX.host', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} <!(which g++))'],
3930 ['LINK.host', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} <!(which g++))'],
3935 # DON'T ADD ANYTHING NEW TO THIS BLOCK UNLESS YOU REALLY REALLY NEED IT!
3936 # This block adds *project-wide* configuration settings to each project
3937 # file. It's almost always wrong to put things here. Specify your
3938 # custom xcode_settings in target_defaults to add them to targets instead.
3941 # In an Xcode Project Info window, the "Base SDK for All Configurations"
3942 # setting sets the SDK on a project-wide basis. In order to get the
3943 # configured SDK to show properly in the Xcode UI, SDKROOT must be set
3944 # here at the project level.
3947 ['mac_sdk_path==""', {
3948 'SDKROOT': 'macosx<(mac_sdk)', # -isysroot
3950 'SDKROOT': '<(mac_sdk_path)', # -isysroot
3956 ['ios_sdk_path==""', {
3957 'SDKROOT': 'iphoneos<(ios_sdk)', # -isysroot
3959 'SDKROOT': '<(ios_sdk_path)', # -isysroot
3964 'ARCHS': '$(ARCHS_UNIVERSAL_IPHONE_OS)',
3965 # Just build armv7, until armv7s is correctly tested.
3966 'VALID_ARCHS': 'armv7 i386',
3967 'IPHONEOS_DEPLOYMENT_TARGET': '<(ios_deployment_target)',
3968 # Target both iPhone and iPad.
3969 'TARGETED_DEVICE_FAMILY': '1,2',
3971 ['target_arch=="x64"', {
3978 # The Xcode generator will look for an xcode_settings section at the root
3979 # of each dict and use it to apply settings on a file-wide basis. Most
3980 # settings should not be here, they should be in target-specific
3981 # xcode_settings sections, or better yet, should use non-Xcode-specific
3982 # settings in target dicts. SYMROOT is a special case, because many other
3983 # Xcode variables depend on it, including variables such as
3984 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something
3985 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the
3986 # files to appear (when present) in the UI as actual files and not red
3987 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR,
3988 # and therefore SYMROOT, needs to be set at the project level.
3989 'SYMROOT': '<(DEPTH)/xcodebuild',