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 # Whether or not we are using CRAS, the ChromeOS Audio Server.
33 # Use a raw surface abstraction.
36 # Configure the build for small devices. See crbug.com/318413
39 # Copy conditionally-set variables out one scope.
40 'chromeos%': '<(chromeos)',
41 'use_aura%': '<(use_aura)',
42 'use_ash%': '<(use_ash)',
43 'use_cras%': '<(use_cras)',
44 'use_ozone%': '<(use_ozone)',
45 'embedded%': '<(embedded)',
47 # Whether we are using Views Toolkit
50 # Use OpenSSL instead of NSS. Under development: see http://crbug.com/62803
53 # Disable viewport meta tag by default.
54 'enable_viewport%': 0,
56 # Enable HiDPI support.
59 # Enable touch optimized art assets and metrics.
60 'enable_touch_ui%': 0,
62 # Override buildtype to select the desired build flavor.
63 # Dev - everyday build for development/testing
64 # Official - release build (generally implies additional processing)
65 # TODO(mmoss) Once 'buildtype' is fully supported (e.g. Windows gyp
66 # conversion is done), some of the things which are now controlled by
67 # 'branding', such as symbol generation, will need to be refactored
68 # based on 'buildtype' (i.e. we don't care about saving symbols for
69 # non-Official # builds).
72 # Override branding to select the desired branding flavor.
73 'branding%': 'Chromium',
76 # ChromeOS and Windows use Aura and Ash.
77 ['chromeos==1 or OS=="win"', {
87 # ToT Linux should be aura.
89 # TODO(erg): Merge this into the previous block once compiling with
90 # aura safely implies including ash capabilities.
95 # Whether we're a traditional desktop unix.
96 ['(OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris") and chromeos==0', {
102 # Compute the architecture that we're building on.
103 ['OS=="win" or OS=="mac" or OS=="ios"', {
104 'host_arch%': 'ia32',
106 'host_arch%': '<!(python <(DEPTH)/build/linux/detect_host_arch.py)',
109 # Embedded implies ozone.
115 'use_system_fontconfig%': 0,
117 'use_system_fontconfig%': 1,
121 # Copy conditionally-set variables out one scope.
122 'chromeos%': '<(chromeos)',
123 'desktop_linux%': '<(desktop_linux)',
124 'use_aura%': '<(use_aura)',
125 'use_ash%': '<(use_ash)',
126 'use_cras%': '<(use_cras)',
127 'use_ozone%': '<(use_ozone)',
128 'embedded%': '<(embedded)',
129 'use_openssl%': '<(use_openssl)',
130 'use_system_fontconfig%': '<(use_system_fontconfig)',
131 'enable_viewport%': '<(enable_viewport)',
132 'enable_hidpi%': '<(enable_hidpi)',
133 'enable_touch_ui%': '<(enable_touch_ui)',
134 'buildtype%': '<(buildtype)',
135 'branding%': '<(branding)',
136 'host_arch%': '<(host_arch)',
138 # Default architecture we're building for is the architecture we're
139 # building on, and possibly sub-architecture (for iOS builds).
140 'target_arch%': '<(host_arch)',
141 'target_subarch%': '',
143 # This is set when building the Android WebView inside the Android
144 # build system, using the 'android' gyp backend. The WebView code is
145 # still built when this is unset, but builds using the normal chromium
147 'android_webview_build%': 0,
149 # Set ARM architecture version.
152 # Use aurax11 for clipboard implementation. This is true on linux_aura.
153 'use_clipboard_aurax11%': 0,
157 # If no gomadir is set, it uses the default gomadir.
167 # Set default value of toolkit_views based on OS.
168 ['OS=="win" or chromeos==1 or use_aura==1', {
174 # Embedded builds use aura without ash or views.
181 # Set toolkit_uses_gtk for the Chromium browser on Linux.
182 ['desktop_linux==1 and use_aura==0 and use_ozone==0', {
183 'toolkit_uses_gtk%': 1,
185 'toolkit_uses_gtk%': 0,
188 # Enable HiDPI on Mac OS and Chrome OS.
189 ['OS=="mac" or chromeos==1', {
193 # Enable touch UI on Metro.
195 'enable_touch_ui%': 1,
198 # Enable App Launcher on ChromeOS, Windows and OSX.
199 # On Linux, enable App Launcher for the Aura build.
200 ['use_ash==1 or OS=="win" or OS=="mac" or (desktop_linux==1 and use_aura==1)', {
201 'enable_app_list%': 1,
203 'enable_app_list%': 0,
206 ['use_aura==1 or (OS!="win" and OS!="mac" and OS!="ios" and OS!="android")', {
207 'use_default_render_theme%': 1,
209 'use_default_render_theme%': 0,
213 'use_ozone_evdev%': 1,
215 'use_ozone_evdev%': 0,
218 # Set default gomadir.
220 'gomadir': 'c:\\goma\\goma-win',
222 'gomadir': '<!(/bin/echo -n ${HOME}/goma)',
225 # Set the default "target_subarch" on iOS. Valid values are "arm32",
226 # "arm64" and "both" (meaning a fat binary).
228 # TODO(sdefresne): change the default from "arm32" to "both" for
229 # "target_subarch" once http://crbug.com/339477 is fixed.
231 # TODO(sdefresne): set the "target_arch" to "arm" once compilation
232 # of skia has been fixed for simulator. http://crbug.com/342377
234 'target_subarch%': 'arm32',
239 # Copy conditionally-set variables out one scope.
240 'chromeos%': '<(chromeos)',
241 'host_arch%': '<(host_arch)',
242 'target_arch%': '<(target_arch)',
243 'target_subarch%': '<(target_subarch)',
244 'toolkit_views%': '<(toolkit_views)',
245 'toolkit_uses_gtk%': '<(toolkit_uses_gtk)',
246 'desktop_linux%': '<(desktop_linux)',
247 'use_aura%': '<(use_aura)',
248 'use_ash%': '<(use_ash)',
249 'use_cras%': '<(use_cras)',
250 'use_ozone%': '<(use_ozone)',
251 'use_ozone_evdev%': '<(use_ozone_evdev)',
252 'use_clipboard_aurax11%': '<(use_clipboard_aurax11)',
253 'embedded%': '<(embedded)',
254 'use_openssl%': '<(use_openssl)',
255 'use_system_fontconfig%': '<(use_system_fontconfig)',
256 'enable_viewport%': '<(enable_viewport)',
257 'enable_hidpi%': '<(enable_hidpi)',
258 'enable_touch_ui%': '<(enable_touch_ui)',
259 'android_webview_build%': '<(android_webview_build)',
260 'use_goma%': '<(use_goma)',
261 'gomadir%': '<(gomadir)',
262 'enable_app_list%': '<(enable_app_list)',
263 'use_default_render_theme%': '<(use_default_render_theme)',
264 'buildtype%': '<(buildtype)',
265 'branding%': '<(branding)',
266 'arm_version%': '<(arm_version)',
268 # Set to 1 to enable fast builds. Set to 2 for even faster builds
269 # (it disables debug info for fastest compilation - only for use
270 # on compile-only bots).
273 # Set to 1 to enable dcheck in release without having to use the flag.
274 'dcheck_always_on%': 0,
276 # Set to 1 to make a build that logs like an official build, but is not
277 # necessarily an official build, ie DCHECK and DLOG are disabled and
278 # removed completely in release builds, to minimize binary footprint.
279 # Note: this setting is ignored if buildtype=="Official".
280 'logging_like_official_build%': 0,
282 # Set to 1 to make a build that disables unshipped tracing events.
283 # Note: this setting is ignored if buildtype=="Official".
284 'tracing_like_official_build%': 0,
286 # Disable image loader component extension by default.
287 'image_loader_extension%': 0,
290 'python_ver%': '2.6',
292 # Set NEON compilation flags.
295 # Detect NEON support at run-time.
296 'arm_neon_optional%': 0,
298 # The system root for cross-compiles. Default: none.
301 # The system libdir used for this ABI.
302 'system_libdir%': 'lib',
304 # On Linux, we build with sse2 for Chromium builds.
307 # Use libjpeg-turbo as the JPEG codec used by Chromium.
308 'use_libjpeg_turbo%': 1,
310 # Use system libjpeg. Note that the system's libjepg will be used even if
311 # use_libjpeg_turbo is set.
312 'use_system_libjpeg%': 0,
314 # By default, component is set to static_library and it can be overriden
315 # by the GYP command line or by ~/.gyp/include.gypi.
316 'component%': 'static_library',
318 # Set to select the Title Case versions of strings in GRD files.
319 'use_titlecase_in_grd_files%': 0,
321 # Use translations provided by volunteers at launchpad.net. This
322 # currently only works on Linux.
323 'use_third_party_translations%': 0,
325 # Remoting compilation is enabled by default. Set to 0 to disable.
328 # Configuration policy is enabled by default. Set to 0 to disable.
329 'configuration_policy%': 1,
331 # Variable safe_browsing is used to control the build time configuration
332 # for safe browsing feature. Safe browsing can be compiled in 3 different
333 # levels: 0 disables it, 1 enables it fully, and 2 enables only UI and
334 # reporting features without enabling phishing and malware detection. This
335 # is useful to integrate a third party phishing/malware detection to
336 # existing safe browsing logic.
339 # Speech input is compiled in by default. Set to 0 to disable.
342 # Notifications are compiled in by default. Set to 0 to disable.
343 'notifications%' : 1,
345 # Use dsymutil to generate real .dSYM files on Mac. The default is 0 for
346 # regular builds and 1 for ASan builds.
347 'mac_want_real_dsym%': 'default',
349 # If this is set, the clang plugins used on the buildbot will be used.
350 # Run tools/clang/scripts/update.sh to make sure they are compiled.
351 # This causes 'clang_chrome_plugins_flags' to be set.
352 # Has no effect if 'clang' is not set as well.
353 'clang_use_chrome_plugins%': 1,
355 # Enable building with ASAN (Clang's -fsanitize=address option).
356 # -fsanitize=address only works with clang, but asan=1 implies clang=1
357 # See https://sites.google.com/a/chromium.org/dev/developers/testing/addresssanitizer
359 # Enable coverage gathering instrumentation in ASan. This flag also
360 # controls coverage granularity (experimental).
363 # Enable building with LSan (Clang's -fsanitize=leak option).
364 # -fsanitize=leak only works with clang, but lsan=1 implies clang=1
365 # See https://sites.google.com/a/chromium.org/dev/developers/testing/leaksanitizer
368 # Enable building with TSAN (Clang's -fsanitize=thread option).
369 # -fsanitize=thread only works with clang, but tsan=1 implies clang=1
370 # See http://clang.llvm.org/docs/ThreadSanitizer.html
372 'tsan_blacklist%': '<(PRODUCT_DIR)/../../tools/valgrind/tsan_v2/ignores.txt',
374 # Enable building with MSAN (Clang's -fsanitize=memory option).
375 # MemorySanitizer only works with clang, but msan=1 implies clang=1
376 # See http://clang.llvm.org/docs/MemorySanitizer.html
378 'msan_blacklist%': '<(PRODUCT_DIR)/../../tools/msan/blacklist.txt',
380 # Use the dynamic libraries instrumented by one of the sanitizers
381 # instead of the standard system libraries.
382 'use_instrumented_libraries%': 0,
384 # Use libc++ (third_party/libc++ and third_party/libc++abi) instead of
385 # stdlibc++ as standard library. This is intended to use for instrumented
387 'use_custom_libcxx%': 0,
389 # Use a modified version of Clang to intercept allocated types and sizes
390 # for allocated objects. clang_type_profiler=1 implies clang=1.
391 # See http://dev.chromium.org/developers/deep-memory-profiler/cpp-object-type-identifier
392 # TODO(dmikurube): Support mac. See http://crbug.com/123758#c11
393 'clang_type_profiler%': 0,
395 # Set to true to instrument the code with function call logger.
396 # See src/third_party/cygprofile/cyg-profile.cc for details.
397 'order_profiling%': 0,
399 # Use the provided profiled order file to link Chrome image with it.
400 # This makes Chrome faster by better using CPU cache when executing code.
401 # This is known as PGO (profile guided optimization).
402 # See https://sites.google.com/a/google.com/chrome-msk/dev/boot-speed-up-effort
403 'order_text_section%' : "",
405 # Set to 1 compile with -fPIC cflag on linux. This is a must for shared
406 # libraries on linux x86-64 and arm, plus ASLR.
409 # Whether one-click signin is enabled or not.
410 'enable_one_click_signin%': 0,
412 # Enable Chrome browser extensions
413 'enable_extensions%': 1,
415 # Enable browser automation.
416 'enable_automation%': 1,
419 'enable_google_now%': 1,
421 # Enable printing support and UI. This variable is used to configure
422 # which parts of printing will be built. 0 disables printing completely,
423 # 1 enables it fully, and 2 enables only the codepath to generate a
424 # Metafile (e.g. usually a PDF or EMF) and disables print preview, cloud
426 'enable_printing%': 1,
428 # Set the version of CLD.
429 # 0: Don't specify the version. This option is for the Finch testing.
434 # Enable spell checker.
435 'enable_spellcheck%': 1,
437 # Webrtc compilation is enabled by default. Set to 0 to disable.
440 # Enables use of the session service, which is enabled by default.
441 # Support for disabling depends on the platform.
442 'enable_session_service%': 1,
444 # Enables theme support, which is enabled by default. Support for
445 # disabling depends on the platform.
448 # Enables autofill dialog and associated features; disabled by default.
449 'enable_autofill_dialog%' : 0,
451 # Enables support for background apps.
452 'enable_background%': 1,
454 # Enable the task manager by default.
455 'enable_task_manager%': 1,
457 # Enable FTP support by default.
458 'disable_ftp_support%': 0,
460 # XInput2 multitouch support is enabled by default (use_xi2_mt=2).
461 # Setting to zero value disables XI2 MT. When XI2 MT is enabled,
462 # the input value also defines the required XI2 minor minimum version.
463 # For example, use_xi2_mt=2 means XI2.2 or above version is required.
466 # Use of precompiled headers on Windows.
468 # This variable may be explicitly set to 1 (enabled) or 0
469 # (disabled) in ~/.gyp/include.gypi or via the GYP command line.
470 # This setting will override the default.
473 # http://code.google.com/p/chromium/wiki/WindowsPrecompiledHeaders
475 'chromium_win_pch%': 0,
477 # Set this to true when building with Clang.
478 # See http://code.google.com/p/chromium/wiki/Clang for details.
481 # Enable plug-in installation by default.
482 'enable_plugin_installation%': 1,
484 # Enable PPAPI and NPAPI by default.
485 # TODO(nileshagrawal): Make this flag enable/disable NPAPI as well
486 # as PPAPI; see crbug.com/162667.
487 'enable_plugins%': 1,
489 # Specifies whether to use canvas_skia.cc in place of platform
490 # specific implementations of gfx::Canvas. Affects text drawing in the
492 # TODO(asvitkine): Enable this on all platforms and delete this flag.
493 # http://crbug.com/105550
494 'use_canvas_skia%': 0,
496 # Set to "tsan", "memcheck", or "drmemory" to configure the build to work
497 # with one of those tools.
498 'build_for_tool%': '',
500 # If no directory is specified then a temporary directory will be used.
501 'test_isolation_outdir%': '',
502 # True if isolate should fail if the isolate files refer to files
504 'test_isolation_fail_on_missing': 0,
506 'sas_dll_path%': '<(DEPTH)/third_party/platformsdk_win7/files/redist/x86',
507 'wix_path%': '<(DEPTH)/third_party/wix',
509 # Managed users are enabled by default.
510 'enable_managed_users%': 1,
512 # Platform natively supports discardable memory.
513 'native_discardable_memory%': 0,
515 # Platform sends memory pressure signals natively.
516 'native_memory_pressure_signals%': 0,
518 'data_reduction_fallback_host%' : '',
519 'data_reduction_dev_host%' : '',
520 'spdy_proxy_auth_origin%' : '',
521 'spdy_proxy_auth_property%' : '',
522 'spdy_proxy_auth_value%' : '',
523 'data_reduction_proxy_probe_url%' : '',
525 'enable_enhanced_bookmarks%': 0,
528 # A flag for POSIX platforms
535 # A flag for BSD platforms
536 ['OS=="freebsd" or OS=="openbsd"', {
543 ['(OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris") and use_openssl==0', {
549 # libudev usage. This currently only affects the content layer.
550 ['OS=="linux" and embedded==0', {
556 # Flags to use X11 on non-Mac POSIX platforms.
557 ['OS=="win" or OS=="mac" or OS=="ios" or OS=="android" or use_ozone==1', {
564 ['OS=="win" or OS=="mac" or OS=="ios" or OS=="android" or embedded==1', {
570 # Flags to use pango and cairo.
571 ['OS=="win" or OS=="mac" or OS=="ios" or OS=="android" or embedded==1', {
580 ['OS=="linux" and embedded==0', {
586 # We always use skia text rendering in Aura on Windows, since GDI
587 # doesn't agree with our BackingStore.
588 # TODO(beng): remove once skia text rendering is on by default.
589 ['use_aura==1 and OS=="win"', {
590 'enable_skia_text%': 1,
593 # A flag to enable or disable our compile-time dependency
594 # on gnome-keyring. If that dependency is disabled, no gnome-keyring
595 # support will be available. This option is useful
596 # for Linux distributions and for Aura.
597 ['OS!="linux" or chromeos==1 or use_aura==1', {
598 'use_gnome_keyring%': 0,
600 'use_gnome_keyring%': 1,
603 ['toolkit_uses_gtk==1 or OS=="mac" or OS=="ios"', {
604 # GTK+, Mac and iOS want Title Case strings
605 'use_titlecase_in_grd_files%': 1,
608 # Enable loader extensions on Chrome OS.
610 'image_loader_extension%': 1,
612 'image_loader_extension%': 0,
615 ['OS=="win" or OS=="mac" or (OS=="linux" and chromeos==0)', {
616 'enable_one_click_signin%': 1,
620 'enable_automation%': 0,
621 'enable_extensions%': 0,
622 'enable_google_now%': 0,
624 'enable_spellcheck%': 0,
628 'arm_neon_optional%': 1,
629 'native_discardable_memory%': 1,
630 'native_memory_pressure_signals%': 1,
631 'enable_printing%': 2,
632 'enable_task_manager%':0,
635 # Android OS includes support for proprietary codecs regardless of
636 # building Chromium or Google Chrome. We also ship Google Chrome with
637 # proprietary codecs.
638 ['OS=="android" or branding=="Chrome"', {
639 'proprietary_codecs%': 1,
641 'proprietary_codecs%': 0,
644 ['OS=="mac" or OS=="ios"', {
645 'native_discardable_memory%': 1,
646 'native_memory_pressure_signals%': 1,
649 # Enable autofill dialog for Android, Mac and Views-enabled platforms.
650 ['toolkit_views==1 or (OS=="android" and android_webview_build==0) or OS=="mac"', {
651 'enable_autofill_dialog%': 1
654 ['OS=="android" and android_webview_build==0', {
658 # Disable WebRTC for building WebView as part of Android system.
659 # TODO(boliu): Decide if we want WebRTC, and if so, also merge
660 # the necessary third_party repositories.
661 ['OS=="android" and android_webview_build==1', {
666 'disable_ftp_support%': 1,
667 'enable_automation%': 0,
668 'enable_extensions%': 0,
669 'enable_google_now%': 0,
671 'enable_printing%': 0,
672 'enable_session_service%': 0,
678 'enable_managed_users%': 0,
679 'enable_task_manager%': 0,
682 # Use GPU accelerated cross process image transport by default
683 # on linux builds with the Aura window manager
684 ['use_aura==1 and OS=="linux"', {
685 'ui_compositor_image_transport%': 1,
687 'ui_compositor_image_transport%': 0,
690 # Turn precompiled headers on by default.
691 ['OS=="win" and buildtype!="Official"', {
692 'chromium_win_pch%': 1
695 ['chromeos==1 or OS=="android" or OS=="ios"', {
696 'enable_plugin_installation%': 0,
698 'enable_plugin_installation%': 1,
701 ['OS=="android" or OS=="ios" or embedded==1', {
702 'enable_plugins%': 0,
704 'enable_plugins%': 1,
707 # linux_use_gold_binary: whether to use the binary checked into
708 # third_party/gold. Gold is not used for 32-bit linux builds
709 # as it runs out of address space.
710 ['OS=="linux" and (target_arch=="x64" or target_arch=="arm")', {
711 'linux_use_gold_binary%': 1,
713 'linux_use_gold_binary%': 0,
716 # linux_use_gold_flags: whether to use build flags that rely on gold.
717 # On by default for x64 Linux. Temporarily off for ChromeOS as
718 # it failed on a buildbot.
719 ['OS=="linux" and target_arch=="x64" and chromeos==0', {
720 'linux_use_gold_flags%': 1,
722 'linux_use_gold_flags%': 0,
725 ['OS=="android" or OS=="ios"', {
726 'enable_captive_portal_detection%': 0,
728 'enable_captive_portal_detection%': 1,
731 # Enable Skia UI text drawing incrementally on different platforms.
732 # http://crbug.com/105550
734 # On Aura, this allows per-tile painting to be used in the browser
737 'use_canvas_skia%': 1,
741 # When building for ChromeOS we dont want Chromium to use libjpeg_turbo.
742 'use_libjpeg_turbo%': 0,
746 # When building as part of the Android system, use system libraries
747 # where possible to reduce ROM size.
748 'use_system_libjpeg%': '<(android_webview_build)',
751 # Do not enable the Settings App on ChromeOS.
752 ['enable_app_list==1 and chromeos==0', {
753 'enable_settings_app%': 1,
755 'enable_settings_app%': 0,
758 ['OS=="linux" and target_arch=="arm" and chromeos==0', {
759 # Set some defaults for arm/linux chrome builds
760 'linux_use_tcmalloc%': 0,
761 # sysroot needs to be an absolute path otherwise it generates
762 # incorrect results when passed to pkg-config
763 'sysroot%': '<!(cd <(DEPTH) && pwd -P)/arm-sysroot',
764 }], # OS=="linux" and target_arch=="arm" and chromeos==0
766 ['OS=="linux" and branding=="Chrome" and buildtype=="Official" and chromeos==0', {
768 ['target_arch=="x64"', {
769 'sysroot%': '<!(cd <(DEPTH) && pwd -P)/chrome/installer/linux/debian_wheezy_amd64-sysroot',
771 ['target_arch=="ia32"', {
772 'sysroot%': '<!(cd <(DEPTH) && pwd -P)/chrome/installer/linux/debian_wheezy_i386-sysroot',
775 }], # OS=="linux" and branding=="Chrome" and buildtype=="Official" and chromeos==0
777 ['OS=="linux" and target_arch=="mipsel"', {
778 'sysroot%': '<!(cd <(DEPTH) && pwd -P)/mipsel-sysroot/sysroot',
779 'CXX%': '<!(cd <(DEPTH) && pwd -P)/mipsel-sysroot/bin/mipsel-linux-gnu-gcc',
782 # Whether tests targets should be run, archived or just have the
783 # dependencies verified. All the tests targets have the '_run' suffix,
784 # e.g. base_unittests_run runs the target base_unittests. The test
785 # target always calls tools/swarming_client/isolate.py. See the script's
786 # --help for more information and the valid --mode values. Meant to be
787 # overriden with GYP_DEFINES.
788 # TODO(maruel): Remove the conditions as more configurations are
790 # NOTE: The check for disable_nacl==0 and component=="static_library"
791 # can't be used here because these variables are not defined yet, but it
792 # is still not supported.
793 ['OS!="ios" and OS!="android" and chromeos==0', {
794 'test_isolation_mode%': 'check',
796 'test_isolation_mode%': 'noop',
798 # Whether Android ARM or x86 build uses OpenMAX DL FFT.
799 ['OS=="android" and ((target_arch=="arm" and arm_version >= 7) or target_arch=="ia32") and android_webview_build==0', {
800 # Currently only supported on Android ARMv7+, or ia32
801 # without webview. When enabled, this will also enable
802 # WebAudio support on Android ARM and ia32. Default is
803 # enabled. Whether WebAudio is actually available depends
804 # on runtime settings and flags.
805 'use_openmax_dl_fft%': 1,
807 'use_openmax_dl_fft%': 0,
809 ['OS=="win" or OS=="linux"', {
813 # Turns on compiler optimizations in V8 in Debug build, except
814 # on android_clang, where we're hitting a weird linker error.
815 # TODO(dpranke): http://crbug.com/266155 .
817 'v8_optimized_debug%': 1,
819 'v8_optimized_debug%': 2,
822 # Disable various features by default on embedded.
825 'enable_printing%': 0,
829 # Set this to 1 to enable use of concatenated impulse responses
830 # for the HRTF panner in WebAudio.
831 'use_concatenated_impulse_responses': 1,
833 # You can set the variable 'use_official_google_api_keys' to 1
834 # to use the Google-internal file containing official API keys
835 # for Google Chrome even in a developer build. Setting this
836 # variable explicitly to 1 will cause your build to fail if the
837 # internal file is missing.
839 # The variable is documented here, but not handled in this file;
840 # see //google_apis/determine_use_official_keys.gypi for the
843 # Set the variable to 0 to not use the internal file, even when
844 # it exists in your checkout.
846 # Leave it unset in your include.gypi to have the variable
847 # implicitly set to 1 if you have
848 # src/google_apis/internal/google_chrome_api_keys.h in your
849 # checkout, and implicitly set to 0 if not.
851 # Note that official builds always behave as if the variable
852 # was explicitly set to 1, i.e. they always use official keys,
853 # and will fail to build if the internal file is missing.
855 # NOTE: You MUST NOT explicitly set the variable to 2 in your
856 # include.gypi or by other means. Due to subtleties of GYP, this
857 # is not the same as leaving the variable unset, even though its
859 # //google_apis/determine_use_official_keys.gypi is 2.
861 # Set these to bake the specified API keys and OAuth client
862 # IDs/secrets into your build.
864 # If you create a build without values baked in, you can instead
865 # set environment variables to provide the keys at runtime (see
866 # src/google_apis/google_api_keys.h for details). Features that
867 # require server-side APIs may fail to work if no keys are
870 # Note that if you are building an official build or if
871 # use_official_google_api_keys has been set to 1 (explicitly or
872 # implicitly), these values will be ignored and the official
873 # keys will be used instead.
874 'google_api_key%': '',
875 'google_default_client_id%': '',
876 'google_default_client_secret%': '',
879 # Copy conditionally-set variables out one scope.
880 'branding%': '<(branding)',
881 'buildtype%': '<(buildtype)',
882 'target_arch%': '<(target_arch)',
883 'target_subarch%': '<(target_subarch)',
884 'host_arch%': '<(host_arch)',
885 'toolkit_views%': '<(toolkit_views)',
886 'ui_compositor_image_transport%': '<(ui_compositor_image_transport)',
887 'use_aura%': '<(use_aura)',
888 'use_ash%': '<(use_ash)',
889 'use_cras%': '<(use_cras)',
890 'use_openssl%': '<(use_openssl)',
891 'use_nss%': '<(use_nss)',
892 'use_udev%': '<(use_udev)',
893 'os_bsd%': '<(os_bsd)',
894 'os_posix%': '<(os_posix)',
895 'use_dbus%': '<(use_dbus)',
896 'use_glib%': '<(use_glib)',
897 'use_pango%': '<(use_pango)',
898 'use_cairo%': '<(use_cairo)',
899 'use_ozone%': '<(use_ozone)',
900 'use_ozone_evdev%': '<(use_ozone_evdev)',
901 'use_clipboard_aurax11%': '<(use_clipboard_aurax11)',
902 'use_system_fontconfig%': '<(use_system_fontconfig)',
903 'toolkit_uses_gtk%': '<(toolkit_uses_gtk)',
904 'desktop_linux%': '<(desktop_linux)',
905 'use_x11%': '<(use_x11)',
906 'use_gnome_keyring%': '<(use_gnome_keyring)',
907 'linux_fpic%': '<(linux_fpic)',
908 'chromeos%': '<(chromeos)',
909 'enable_viewport%': '<(enable_viewport)',
910 'enable_hidpi%': '<(enable_hidpi)',
911 'enable_touch_ui%': '<(enable_touch_ui)',
912 'use_xi2_mt%':'<(use_xi2_mt)',
913 'image_loader_extension%': '<(image_loader_extension)',
914 'fastbuild%': '<(fastbuild)',
915 'dcheck_always_on%': '<(dcheck_always_on)',
916 'logging_like_official_build%': '<(logging_like_official_build)',
917 'tracing_like_official_build%': '<(tracing_like_official_build)',
918 'python_ver%': '<(python_ver)',
919 'arm_version%': '<(arm_version)',
920 'arm_neon%': '<(arm_neon)',
921 'arm_neon_optional%': '<(arm_neon_optional)',
922 'sysroot%': '<(sysroot)',
923 'system_libdir%': '<(system_libdir)',
924 'component%': '<(component)',
925 'use_titlecase_in_grd_files%': '<(use_titlecase_in_grd_files)',
926 'use_third_party_translations%': '<(use_third_party_translations)',
927 'remoting%': '<(remoting)',
928 'enable_one_click_signin%': '<(enable_one_click_signin)',
929 'enable_webrtc%': '<(enable_webrtc)',
930 'chromium_win_pch%': '<(chromium_win_pch)',
931 'configuration_policy%': '<(configuration_policy)',
932 'safe_browsing%': '<(safe_browsing)',
933 'input_speech%': '<(input_speech)',
934 'notifications%': '<(notifications)',
935 'clang_use_chrome_plugins%': '<(clang_use_chrome_plugins)',
936 'mac_want_real_dsym%': '<(mac_want_real_dsym)',
938 'asan_coverage%': '<(asan_coverage)',
941 'msan_blacklist%': '<(msan_blacklist)',
943 'tsan_blacklist%': '<(tsan_blacklist)',
944 'use_instrumented_libraries%': '<(use_instrumented_libraries)',
945 'use_custom_libcxx%': '<(use_custom_libcxx)',
946 'clang_type_profiler%': '<(clang_type_profiler)',
947 'order_profiling%': '<(order_profiling)',
948 'order_text_section%': '<(order_text_section)',
949 'enable_extensions%': '<(enable_extensions)',
950 'enable_plugin_installation%': '<(enable_plugin_installation)',
951 'enable_plugins%': '<(enable_plugins)',
952 'enable_session_service%': '<(enable_session_service)',
953 'enable_themes%': '<(enable_themes)',
954 'enable_autofill_dialog%': '<(enable_autofill_dialog)',
955 'enable_background%': '<(enable_background)',
956 'linux_use_gold_binary%': '<(linux_use_gold_binary)',
957 'linux_use_gold_flags%': '<(linux_use_gold_flags)',
958 'use_canvas_skia%': '<(use_canvas_skia)',
959 'test_isolation_mode%': '<(test_isolation_mode)',
960 'test_isolation_outdir%': '<(test_isolation_outdir)',
961 'test_isolation_fail_on_missing': '<(test_isolation_fail_on_missing)',
962 'enable_automation%': '<(enable_automation)',
963 'enable_printing%': '<(enable_printing)',
964 'enable_spellcheck%': '<(enable_spellcheck)',
965 'enable_google_now%': '<(enable_google_now)',
966 'cld_version%': '<(cld_version)',
967 'enable_captive_portal_detection%': '<(enable_captive_portal_detection)',
968 'disable_ftp_support%': '<(disable_ftp_support)',
969 'enable_task_manager%': '<(enable_task_manager)',
970 'sas_dll_path%': '<(sas_dll_path)',
971 'wix_path%': '<(wix_path)',
972 'use_libjpeg_turbo%': '<(use_libjpeg_turbo)',
973 'use_system_libjpeg%': '<(use_system_libjpeg)',
974 'android_webview_build%': '<(android_webview_build)',
975 'gyp_managed_install%': 0,
976 'create_standalone_apk%': 1,
977 'enable_app_list%': '<(enable_app_list)',
978 'use_default_render_theme%': '<(use_default_render_theme)',
979 'enable_settings_app%': '<(enable_settings_app)',
980 'google_api_key%': '<(google_api_key)',
981 'google_default_client_id%': '<(google_default_client_id)',
982 'google_default_client_secret%': '<(google_default_client_secret)',
983 'enable_managed_users%': '<(enable_managed_users)',
984 'native_discardable_memory%': '<(native_discardable_memory)',
985 'native_memory_pressure_signals%': '<(native_memory_pressure_signals)',
986 'data_reduction_fallback_host%': '<(data_reduction_fallback_host)',
987 'data_reduction_dev_host%': '<(data_reduction_dev_host)',
988 'spdy_proxy_auth_origin%': '<(spdy_proxy_auth_origin)',
989 'spdy_proxy_auth_property%': '<(spdy_proxy_auth_property)',
990 'spdy_proxy_auth_value%': '<(spdy_proxy_auth_value)',
991 'data_reduction_proxy_probe_url%': '<(data_reduction_proxy_probe_url)',
992 'enable_mdns%' : '<(enable_mdns)',
993 'enable_enhanced_bookmarks%' : '<(enable_enhanced_bookmarks)',
994 'v8_optimized_debug%': '<(v8_optimized_debug)',
995 'proprietary_codecs%': '<(proprietary_codecs)',
996 'use_goma%': '<(use_goma)',
997 'gomadir%': '<(gomadir)',
999 # Use system nspr instead of the bundled one.
1000 'use_system_nspr%': 0,
1002 # Use system protobuf instead of bundled one.
1003 'use_system_protobuf%': 0,
1005 # Use system yasm instead of bundled one.
1006 'use_system_yasm%': 0,
1008 # Use system ICU instead of bundled one.
1009 'use_system_icu%' : 0,
1011 # Default to enabled PIE; this is important for ASLR but we may need to be
1012 # able to turn it off for various reasons.
1013 'linux_disable_pie%': 0,
1015 # The release channel that this build targets. This is used to restrict
1016 # channel-specific build options, like which installer packages to create.
1017 # The default is 'all', which does no channel-specific filtering.
1020 # Override chromium_mac_pch and set it to 0 to suppress the use of
1021 # precompiled headers on the Mac. Prefix header injection may still be
1022 # used, but prefix headers will not be precompiled. This is useful when
1023 # using distcc to distribute a build to compile slaves that don't
1024 # share the same compiler executable as the system driving the compilation,
1025 # because precompiled headers rely on pointers into a specific compiler
1026 # executable's image. Setting this to 0 is needed to use an experimental
1027 # Linux-Mac cross compiler distcc farm.
1028 'chromium_mac_pch%': 1,
1030 # The default value for mac_strip in target_defaults. This cannot be
1031 # set there, per the comment about variable% in a target_defaults.
1032 'mac_strip_release%': 0,
1034 # Set to 1 to enable java code coverage. Instruments classes during build
1035 # to produce .ec files during runtime.
1036 'emma_coverage%': 0,
1038 # EMMA filter string consisting of a list of inclusion/exclusion patterns
1039 # separated with whitespace and/or comma. Only has effect if
1040 # 'emma_coverage=1'.
1043 # Set to 1 to enable running Android lint on java/class files.
1046 # Set to 1 to force Visual C++ to use legacy debug information format /Z7.
1047 # This is useful for parallel compilation tools which can't support /Zi.
1048 # Only used on Windows.
1051 # Although base/allocator lets you select a heap library via an
1052 # environment variable, the libcmt shim it uses sometimes gets in
1053 # the way. To disable it entirely, and switch to normal msvcrt, do e.g.
1054 # 'win_use_allocator_shim': 0,
1055 # 'win_release_RuntimeLibrary': 2
1056 # to ~/.gyp/include.gypi, gclient runhooks --force, and do a release build.
1057 'win_use_allocator_shim%': 1, # 1 = shim allocator via libcmt; 0 = msvcrt
1059 # TODO(bradnelson): eliminate this when possible.
1060 # To allow local gyp files to prevent release.vsprops from being included.
1061 # Yes(1) means include release.vsprops.
1062 # Once all vsprops settings are migrated into gyp, this can go away.
1063 'msvs_use_common_release%': 1,
1065 # TODO(bradnelson): eliminate this when possible.
1066 # To allow local gyp files to override additional linker options for msvs.
1067 # Yes(1) means set use the common linker options.
1068 'msvs_use_common_linker_extras%': 1,
1070 # TODO(sgk): eliminate this if possible.
1071 # It would be nicer to support this via a setting in 'target_defaults'
1072 # in chrome/app/locales/locales.gypi overriding the setting in the
1073 # 'Debug' configuration in the 'target_defaults' dict below,
1074 # but that doesn't work as we'd like.
1075 'msvs_debug_link_incremental%': '2',
1077 # Needed for some of the largest modules.
1078 'msvs_debug_link_nonincremental%': '1',
1080 # Turns on Use Library Dependency Inputs for linking chrome.dll on Windows
1081 # to get incremental linking to be faster in debug builds.
1082 'incremental_chrome_dll%': '0',
1084 # Experimental setting to break chrome.dll into multiple pieces based on
1086 'chrome_multiple_dll%': '0',
1088 # The default settings for third party code for treating
1089 # warnings-as-errors. Ideally, this would not be required, however there
1090 # is some third party code that takes a long time to fix/roll. So, this
1091 # flag allows us to have warnings as errors in general to prevent
1092 # regressions in most modules, while working on the bits that are
1094 'win_third_party_warn_as_error%': 'true',
1097 'clang%': '<(clang)',
1098 'make_clang_dir%': 'third_party/llvm-build/Release+Asserts',
1100 # Control which version of clang to use when 'clang' is set to 1 when
1101 # building for iOS (Apple has not yet open-sourced support for "arm64"
1102 # so when building for that 'target_arch' we have to use clang shipped
1103 # with Xcode that does not supports some flags).
1104 # TODO(sdefresne): remove this once http://crbug.com/341453 is fixed.
1107 # These two variables can be set in GYP_DEFINES while running
1108 # |gclient runhooks| to let clang run a plugin in every compilation.
1109 # Only has an effect if 'clang=1' is in GYP_DEFINES as well.
1111 # GYP_DEFINES='clang=1 clang_load=/abs/path/to/libPrintFunctionNames.dylib clang_add_plugin=print-fns' gclient runhooks
1114 'clang_add_plugin%': '',
1116 # Tell ld64 to write map files describing binary layout. Useful
1117 # for looking at what contributes to binary size, e.g. with
1118 # https://github.com/nico/bloat
1119 'mac_write_linker_maps%': 0,
1121 # The default type of gtest.
1122 'gtest_target_type%': 'executable',
1124 # Enable sampling based profiler.
1125 # See http://google-perftools.googlecode.com/svn/trunk/doc/cpuprofile.html
1127 # Profile without optimizing out stack frames when profiling==1.
1128 'profiling_full_stack_frames%': '0',
1130 # And if we want to dump symbols for Breakpad-enabled builds.
1131 'linux_dump_symbols%': 0,
1132 # And if we want to strip the binary after dumping symbols.
1133 'linux_strip_binary%': 0,
1134 # Strip the test binaries needed for Linux reliability tests.
1135 'linux_strip_reliability_tests%': 0,
1136 # If we want stack unwind support for backtrace().
1137 'debug_unwind_tables%': 1,
1138 'release_unwind_tables%': 1,
1141 'linux_use_tcmalloc%': 1,
1142 'android_use_tcmalloc%': 0,
1144 # Set to 1 to link against libgnome-keyring instead of using dlopen().
1145 'linux_link_gnome_keyring%': 0,
1146 # Set to 1 to link against gsettings APIs instead of using dlopen().
1147 'linux_link_gsettings%': 0,
1149 # Default arch variant for MIPS.
1150 'mips_arch_variant%': 'mips32r1',
1152 # Enable use of OpenMAX DL FFT routines.
1153 'use_openmax_dl_fft%': '<(use_openmax_dl_fft)',
1155 # Enable new NPDevice API.
1156 'enable_new_npdevice_api%': 0,
1158 # Enable EGLImage support in OpenMAX
1159 'enable_eglimage%': 1,
1161 # .gyp files or targets should set chromium_code to 1 if they build
1162 # Chromium-specific code, as opposed to external code. This variable is
1163 # used to control such things as the set of warnings to enable, and
1164 # whether warnings are treated as errors.
1165 'chromium_code%': 0,
1167 'release_valgrind_build%': 0,
1169 # TODO(thakis): Make this a blacklist instead, http://crbug.com/101600
1170 'enable_wexit_time_destructors%': 0,
1172 # Build libpeerconnection as a static library by default.
1173 'libpeer_target_type%': 'static_library',
1175 # Set to 1 to compile with the built in pdf viewer.
1178 # Set to 1 to compile with the OpenGL ES 2.0 conformance tests.
1179 'internal_gles2_conform_tests%': 0,
1181 # Set to 1 to compile the filter fuzzer.
1182 'internal_filter_fuzzer%': 0,
1184 # NOTE: When these end up in the Mac bundle, we need to replace '-' for '_'
1185 # so Cocoa is happy (http://crbug.com/20441).
1187 'am', 'ar', 'bg', 'bn', 'ca', 'cs', 'da', 'de', 'el', 'en-GB',
1188 'en-US', 'es-419', 'es', 'et', 'fa', 'fi', 'fil', 'fr', 'gu', 'he',
1189 'hi', 'hr', 'hu', 'id', 'it', 'ja', 'kn', 'ko', 'lt', 'lv',
1190 'ml', 'mr', 'ms', 'nb', 'nl', 'pl', 'pt-BR', 'pt-PT', 'ro', 'ru',
1191 'sk', 'sl', 'sr', 'sv', 'sw', 'ta', 'te', 'th', 'tr', 'uk',
1192 'vi', 'zh-CN', 'zh-TW',
1195 # Pseudo locales are special locales which are used for testing and
1196 # debugging. They don't get copied to the final app. For more info,
1197 # check out https://sites.google.com/a/chromium.org/dev/Home/fake-bidi
1204 # If debug_devtools is set to 1, JavaScript files for DevTools are
1205 # stored as is and loaded from disk. Otherwise, a concatenated file
1206 # is stored in resources.pak. It is still possible to load JS files
1207 # from disk by passing --debug-devtools cmdline switch.
1208 'debug_devtools%': 0,
1210 # The Java Bridge is not compiled in by default.
1213 # Code signing for iOS binaries. The bots need to be able to disable this.
1214 'chromium_ios_signing%': 1,
1216 # This flag is only used when disable_nacl==0 and disables all those
1217 # subcomponents which would require the installation of a native_client
1218 # untrusted toolchain.
1219 'disable_nacl_untrusted%': 0,
1221 # Disable Dart by default.
1224 # Native Client is enabled by default.
1227 # Portable Native Client is enabled by default.
1228 'disable_pnacl%': 0,
1230 # Whether to build full debug version for Debug configuration on Android.
1231 # Compared to full debug version, the default Debug configuration on Android
1232 # has no full v8 debug, has size optimization and linker gc section, so that
1233 # we can build a debug version with acceptable size and performance.
1234 'android_full_debug%': 0,
1236 # Sets the default version name and code for Android app, by default we
1237 # do a developer build.
1238 'android_app_version_name%': 'Developer Build',
1239 'android_app_version_code%': 0,
1241 # Contains data about the attached devices for gyp_managed_install.
1242 'build_device_config_path': '<(PRODUCT_DIR)/build_devices.cfg',
1244 'sas_dll_exists': '<!(python <(DEPTH)/build/dir_exists.py "<(sas_dll_path)")',
1245 'wix_exists': '<!(python <(DEPTH)/build/dir_exists.py "<(wix_path)")',
1247 'windows_sdk_default_path': '<(DEPTH)/third_party/platformsdk_win8/files',
1248 'directx_sdk_default_path': '<(DEPTH)/third_party/directxsdk/files',
1250 # Whether we are using the rlz library or not. Platforms like Android send
1251 # rlz codes for searches but do not use the library.
1254 # Turns on the i18n support in V8.
1255 'v8_enable_i18n_support': 1,
1257 # Compile d8 for the host toolset.
1258 'v8_toolset_for_d8': 'host',
1260 # Use the chromium skia by default.
1261 'use_system_skia%': '0',
1263 # Use brlapi from brltty for braille display support.
1266 # Relative path to icu.gyp from this file.
1267 'icu_gyp_path': '../third_party/icu/icu.gyp',
1269 # IPC fuzzer is disabled by default.
1270 'enable_ipc_fuzzer%': 0,
1272 # Whether or not to use "icu*.dat" file for ICU data.
1273 # Do not use it by default.
1274 'icu_use_data_file_flag%': 0,
1276 # Force disable libstdc++ debug mode.
1277 'disable_glibcxx_debug%': 0,
1280 # The version of GCC in use, set later in platforms that use GCC and have
1281 # not explicitly chosen to build with clang. Currently, this means all
1282 # platforms except Windows, Mac and iOS.
1283 # TODO(glider): set clang to 1 earlier for ASan and TSan builds so that
1284 # it takes effect here.
1285 ['os_posix==1 and OS!="mac" and OS!="ios" and clang==0 and asan==0 and lsan==0 and tsan==0 and msan==0', {
1288 # We directly set the gcc_version since we know what we use.
1291 'gcc_version%': '<!(python <(DEPTH)/build/compiler_version.py)',
1297 ['OS=="win" and "<!(python <(DEPTH)/build/dir_exists.py <(windows_sdk_default_path))"=="True"', {
1298 'windows_sdk_path%': '<(windows_sdk_default_path)',
1300 'windows_sdk_path%': 'C:/Program Files (x86)/Windows Kits/8.0',
1302 ['OS=="win" and "<!(python <(DEPTH)/build/dir_exists.py <(directx_sdk_default_path))"=="True"', {
1303 'directx_sdk_path%': '<(directx_sdk_default_path)',
1305 'directx_sdk_path%': '$(DXSDK_DIR)',
1308 'windows_driver_kit_path%': '$(WDK_DIR)',
1309 'icu_use_data_file_flag%': 1,
1311 ['os_posix==1 and OS!="mac" and OS!="ios"', {
1313 ['target_arch=="mipsel"', {
1316 'nacl_untrusted_build%': 0,
1317 'linux_use_tcmalloc%': 0,
1319 ['OS=="linux" and target_arch=="mipsel"', {
1320 'sysroot%': '<(sysroot)',
1323 # All Chrome builds have breakpad symbols, but only process the
1324 # symbols from official builds.
1325 ['(branding=="Chrome" and buildtype=="Official")', {
1326 'linux_dump_symbols%': 1,
1328 # Omit unwind support in official release builds to save space. We
1329 # can use breakpad for these builds.
1330 'release_unwind_tables%': 0,
1332 # TODO(jungshik): Turn this on on Android and Chrome OS
1333 ['OS!="android" and chromeos==0', {
1334 'icu_use_data_file_flag%': 1,
1337 }], # os_posix==1 and OS!="mac" and OS!="ios"
1339 'icu_use_data_file_flag%': 1,
1343 'enable_background%': 0,
1344 'icu_use_data_file_flag%': 1,
1345 'use_system_libxml%': 1,
1346 'use_system_sqlite%': 1,
1348 'ar', 'ca', 'cs', 'da', 'de', 'el', 'en-GB', 'en-US', 'es', 'es-MX',
1349 'fi', 'fr', 'he', 'hr', 'hu', 'id', 'it', 'ja', 'ko', 'ms', 'nb',
1350 'nl', 'pl', 'pt', 'pt-PT', 'ro', 'ru', 'sk', 'sv', 'th', 'tr', 'uk',
1351 'vi', 'zh-CN', 'zh-TW',
1354 # The Mac SDK is set for iOS builds and passed through to Mac
1355 # sub-builds. This allows the Mac sub-build SDK in an iOS build to be
1356 # overridden from the command line the same way it is for a Mac build.
1357 'mac_sdk%': '<!(python <(DEPTH)/build/mac/find_sdk.py 10.6)',
1359 # iOS SDK and deployment target support. The |ios_sdk| value is left
1360 # blank so that when it is set in the project files it will be the
1361 # "current" iOS SDK. Forcing a specific SDK even if it is "current"
1362 # causes Xcode to spit out a warning for every single project file for
1363 # not using the "current" SDK.
1365 'ios_sdk_path%': '',
1366 'ios_deployment_target%': '6.0',
1369 # ios_product_name is set to the name of the .app bundle as it should
1371 ['branding=="Chrome"', {
1372 'ios_product_name%': 'Chrome',
1373 }, { # else: branding!="Chrome"
1374 'ios_product_name%': 'Chromium',
1376 ['branding=="Chrome" and buildtype=="Official"', {
1378 }, { # else: branding!="Chrome" or buildtype!="Official"
1384 # Location of Android NDK.
1387 # Unfortuantely we have to use absolute paths to the SDK/NDK beause
1388 # they're passed to ant which uses a different relative path from
1390 'android_ndk_root%': '<!(cd <(DEPTH) && pwd -P)/third_party/android_tools/ndk/',
1391 'android_sdk_root%': '<!(cd <(DEPTH) && pwd -P)/third_party/android_tools/sdk/',
1392 'android_host_arch%': '<!(uname -m)',
1393 # Android API-level of the SDK used for compilation.
1394 'android_sdk_version%': '<!(/bin/echo -n ${ANDROID_SDK_VERSION})',
1395 # Android SDK build tools (e.g. dx, aapt, aidl)
1396 'android_sdk_tools%': '<!(/bin/echo -n ${ANDROID_SDK_TOOLS})',
1398 # Copy conditionally-set variables out one scope.
1399 'android_ndk_root%': '<(android_ndk_root)',
1400 'android_sdk_root%': '<(android_sdk_root)',
1401 'android_sdk_version%': '<(android_sdk_version)',
1402 'android_sdk_tools%': '<(android_sdk_tools)',
1403 'android_stlport_root': '<(android_ndk_root)/sources/cxx-stl/stlport',
1405 'android_sdk%': '<(android_sdk_root)/platforms/android-<(android_sdk_version)',
1407 # Android API level 14 is ICS (Android 4.0) which is the minimum
1408 # platform requirement for Chrome on Android, we use it for native
1411 ['target_arch == "ia32"', {
1412 'android_app_abi%': 'x86',
1413 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-x86/gdbserver/gdbserver',
1414 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-14/arch-x86',
1415 'android_toolchain%': '<(android_ndk_root)/toolchains/x86-4.6/prebuilt/<(host_os)-<(android_host_arch)/bin',
1417 ['target_arch=="arm"', {
1420 'android_app_abi%': 'armeabi',
1422 'android_app_abi%': 'armeabi-v7a',
1425 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-arm/gdbserver/gdbserver',
1426 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-14/arch-arm',
1427 'android_toolchain%': '<(android_ndk_root)/toolchains/arm-linux-androideabi-4.6/prebuilt/<(host_os)-<(android_host_arch)/bin',
1429 ['target_arch == "mipsel"', {
1430 'android_app_abi%': 'mips',
1431 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-mips/gdbserver/gdbserver',
1432 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-14/arch-mips',
1433 'android_toolchain%': '<(android_ndk_root)/toolchains/mipsel-linux-android-4.6/prebuilt/<(host_os)-<(android_host_arch)/bin',
1437 # Copy conditionally-set variables out one scope.
1438 'android_app_abi%': '<(android_app_abi)',
1439 'android_gdbserver%': '<(android_gdbserver)',
1440 'android_ndk_root%': '<(android_ndk_root)',
1441 'android_ndk_sysroot': '<(android_ndk_sysroot)',
1442 'android_sdk_root%': '<(android_sdk_root)',
1443 'android_sdk_version%': '<(android_sdk_version)',
1444 'android_toolchain%': '<(android_toolchain)',
1446 'android_ndk_include': '<(android_ndk_sysroot)/usr/include',
1447 'android_ndk_lib': '<(android_ndk_sysroot)/usr/lib',
1448 'android_sdk_tools%': '<(android_sdk_tools)',
1449 'android_sdk%': '<(android_sdk)',
1450 'android_sdk_jar%': '<(android_sdk)/android.jar',
1452 'android_stlport_root': '<(android_stlport_root)',
1453 'android_stlport_include': '<(android_stlport_root)/stlport',
1454 'android_stlport_libs_dir': '<(android_stlport_root)/libs/<(android_app_abi)',
1456 # Location of the "strip" binary, used by both gyp and scripts.
1457 'android_strip%' : '<!(/bin/echo -n <(android_toolchain)/*-strip)',
1459 # Location of the "readelf" binary.
1460 'android_readelf%' : '<!(/bin/echo -n <(android_toolchain)/*-readelf)',
1462 # Determines whether we should optimize JNI generation at the cost of
1463 # breaking assumptions in the build system that when inputs have changed
1464 # the outputs should always change as well. This is meant purely for
1465 # developer builds, to avoid spurious re-linking of native files.
1466 'optimize_jni_generation%': 0,
1468 # Always uses openssl.
1471 'proprietary_codecs%': '<(proprietary_codecs)',
1472 'safe_browsing%': 2,
1474 'enable_automation%': 0,
1476 'build_ffmpegsumo%': 0,
1477 'linux_use_tcmalloc%': 0,
1479 # Disable Native Client.
1482 # Android does not support background apps.
1483 'enable_background%': 0,
1485 # Sessions are store separately in the Java side.
1486 'enable_session_service%': 0,
1488 # Set to 1 once we have a notification system for Android.
1489 # http://crbug.com/115320
1490 'notifications%': 0,
1494 'gtest_target_type%': 'shared_library',
1496 # Uses system APIs for decoding audio and video.
1497 'use_libffmpeg%': '0',
1499 # When building as part of the Android system, use system libraries
1500 # where possible to reduce ROM size.
1501 # TODO(steveblock): Investigate using the system version of sqlite.
1502 'use_system_sqlite%': 0, # '<(android_webview_build)',
1503 'use_system_expat%': '<(android_webview_build)',
1504 'use_system_icu%': '<(android_webview_build)',
1505 'use_system_stlport%': '<(android_webview_build)',
1507 # Copy it out one scope.
1508 'android_webview_build%': '<(android_webview_build)',
1510 ['android_webview_build==1', {
1511 # When building the WebView in the Android tree, jarjar will remap all
1512 # the class names, so the JNI generator needs to know this.
1513 'jni_generator_jarjar_file': '../android_webview/build/jarjar-rules.txt',
1516 # Enable clang on mac by default!
1519 # All Chrome builds have breakpad symbols, but only process the
1520 # symbols from official builds.
1521 ['(branding=="Chrome" and buildtype=="Official")', {
1522 'mac_strip_release%': 1,
1526 ['OS=="mac" or OS=="ios"', {
1528 # Mac OS X SDK and deployment target support. The SDK identifies
1529 # the version of the system headers that will be used, and
1530 # corresponds to the MAC_OS_X_VERSION_MAX_ALLOWED compile-time
1531 # macro. "Maximum allowed" refers to the operating system version
1532 # whose APIs are available in the headers. The deployment target
1533 # identifies the minimum system version that the built products are
1534 # expected to function on. It corresponds to the
1535 # MAC_OS_X_VERSION_MIN_REQUIRED compile-time macro. To ensure these
1536 # macros are available, #include <AvailabilityMacros.h>. Additional
1537 # documentation on these macros is available at
1538 # http://developer.apple.com/mac/library/technotes/tn2002/tn2064.html#SECTION3
1539 # Chrome normally builds with the Mac OS X 10.6 SDK and sets the
1540 # deployment target to 10.6. Other projects, such as O3D, may
1541 # override these defaults.
1543 # Normally, mac_sdk_min is used to find an SDK that Xcode knows
1544 # about that is at least the specified version. In official builds,
1545 # the SDK must match mac_sdk_min exactly. If the SDK is installed
1546 # someplace that Xcode doesn't know about, set mac_sdk_path to the
1547 # path to the SDK; when set to a non-empty string, SDK detection
1548 # based on mac_sdk_min will be bypassed entirely.
1549 'mac_sdk_min%': '10.6',
1550 'mac_sdk_path%': '',
1552 'mac_deployment_target%': '10.6',
1555 'mac_sdk_min': '<(mac_sdk_min)',
1556 'mac_sdk_path': '<(mac_sdk_path)',
1557 'mac_deployment_target': '<(mac_deployment_target)',
1559 # Compile in Breakpad support by default so that it can be
1560 # tested, even if it is not enabled by default at runtime.
1561 'mac_breakpad_compiled_in%': 1,
1563 # mac_product_name is set to the name of the .app bundle as it should
1564 # appear on disk. This duplicates data from
1565 # chrome/app/theme/chromium/BRANDING and
1566 # chrome/app/theme/google_chrome/BRANDING, but is necessary to get
1567 # these names into the build system.
1568 ['branding=="Chrome"', {
1569 'mac_product_name%': 'Google Chrome',
1570 }, { # else: branding!="Chrome"
1571 'mac_product_name%': 'Chromium',
1574 ['branding=="Chrome" and buildtype=="Official"', {
1575 'mac_sdk%': '<!(python <(DEPTH)/build/mac/find_sdk.py --verify <(mac_sdk_min) --sdk_path=<(mac_sdk_path))',
1576 # Enable uploading crash dumps.
1577 'mac_breakpad_uploads%': 1,
1578 # Enable dumping symbols at build time for use by Mac Breakpad.
1580 # Enable Keystone auto-update support.
1582 }, { # else: branding!="Chrome" or buildtype!="Official"
1583 'mac_sdk%': '<!(python <(DEPTH)/build/mac/find_sdk.py <(mac_sdk_min))',
1584 'mac_breakpad_uploads%': 0,
1589 }], # OS=="mac" or OS=="ios"
1592 # This is the architecture convention used in WinSDK paths.
1593 ['target_arch=="ia32"', {
1594 'winsdk_arch%': 'x86',
1596 'winsdk_arch%': '<(target_arch)',
1598 ['component=="shared_library"', {
1599 'win_use_allocator_shim%': 0,
1601 # Turn on multiple dll by default on Windows when in static_library.
1602 'chrome_multiple_dll%': 1,
1604 ['component=="shared_library" and "<(GENERATOR)"=="ninja"', {
1605 # Only enabled by default for ninja because it's buggy in VS.
1606 # Not enabled for component=static_library because some targets
1607 # are too large and the toolchain fails due to the size of the
1609 'incremental_chrome_dll%': 1,
1611 # Don't do incremental linking for large modules on 32-bit or when
1612 # component=static_library as the toolchain fails due to the size of
1614 ['MSVS_OS_BITS==32 or component=="static_library"', {
1615 'msvs_large_module_debug_link_mode%': '1', # No
1617 'msvs_large_module_debug_link_mode%': '2', # Yes
1619 ['MSVS_VERSION=="2013e" or MSVS_VERSION=="2012e" or MSVS_VERSION=="2010e"', {
1627 'nacl_win64_defines': [
1628 # This flag is used to minimize dependencies when building
1629 # Native Client loader for 64-bit Windows.
1634 ['os_posix==1 and chromeos==0 and OS!="android" and OS!="ios"', {
1640 ['enable_plugins==1 and (OS=="linux" or OS=="mac" or OS=="win")', {
1641 'enable_pepper_cdms%': 1,
1643 'enable_pepper_cdms%': 0,
1646 # Native Client glibc toolchain is enabled
1647 # by default except on arm and mips.
1648 ['target_arch=="arm" or target_arch=="mipsel"', {
1649 'disable_glibc%': 1,
1651 'disable_glibc%': 0,
1654 # Disable SSE2 when building for ARM or MIPS.
1655 ['target_arch=="arm" or target_arch=="mipsel"', {
1658 'disable_sse2%': '<(disable_sse2)',
1661 # Set the relative path from this file to the GYP file of the JPEG
1662 # library used by Chromium.
1663 ['use_system_libjpeg==1 or use_libjpeg_turbo==0', {
1664 # Configuration for using the system libjeg is here.
1665 'libjpeg_gyp_path': '../third_party/libjpeg/libjpeg.gyp',
1667 'libjpeg_gyp_path': '../third_party/libjpeg_turbo/libjpeg.gyp',
1670 # Options controlling the use of GConf (the classic GNOME configuration
1671 # system) and GIO, which contains GSettings (the new GNOME config system).
1672 ['chromeos==1 or embedded==1', {
1680 # Set up -D and -E flags passed into grit.
1681 ['branding=="Chrome"', {
1682 # TODO(mmoss) The .grd files look for _google_chrome, but for
1683 # consistency they should look for google_chrome_build like C++.
1684 'grit_defines': ['-D', '_google_chrome',
1685 '-E', 'CHROMIUM_BUILD=google_chrome'],
1687 'grit_defines': ['-D', '_chromium',
1688 '-E', 'CHROMIUM_BUILD=chromium'],
1691 'grit_defines': ['-D', 'chromeos', '-D', 'scale_factors=2x'],
1693 ['desktop_linux==1', {
1694 'grit_defines': ['-D', 'desktop_linux'],
1696 ['toolkit_views==1', {
1697 'grit_defines': ['-D', 'toolkit_views'],
1699 ['toolkit_uses_gtk==1', {
1700 'grit_defines': ['-D', 'toolkit_uses_gtk'],
1703 'grit_defines': ['-D', 'use_aura'],
1706 'grit_defines': ['-D', 'use_ash'],
1709 'grit_defines': ['-D', 'use_nss'],
1712 'grit_defines': ['-D', 'use_ozone'],
1714 ['image_loader_extension==1', {
1715 'grit_defines': ['-D', 'image_loader_extension'],
1718 'grit_defines': ['-D', 'remoting'],
1720 ['use_titlecase_in_grd_files==1', {
1721 'grit_defines': ['-D', 'use_titlecase'],
1723 ['OS=="android" and target_arch=="ia32"', {
1724 # WebAudio on Android/x86 is disabled by default, unlike
1725 # everywhere else, so use appropriate message.
1726 'grit_defines': ['-D', 'use_webaudio_enable_message'],
1728 ['use_third_party_translations==1', {
1729 'grit_defines': ['-D', 'use_third_party_translations'],
1731 'ast', 'bs', 'ca@valencia', 'en-AU', 'eo', 'eu', 'gl', 'hy', 'ia',
1732 'ka', 'ku', 'kw', 'ms', 'ug'
1736 'grit_defines': ['-t', 'android',
1737 '-E', 'ANDROID_JAVA_TAGGED_ONLY=true'],
1739 ['OS=="mac" or OS=="ios"', {
1740 'grit_defines': ['-D', 'scale_factors=2x'],
1745 # iOS uses a whitelist to filter resources.
1746 '-w', '<(DEPTH)/build/ios/grit_whitelist.txt'
1749 # Enable clang and host builds when generating with ninja-ios.
1751 ['"<(GENERATOR)"=="ninja"', {
1755 # Apple has not upstreamed the support for "arm64" yet, so when
1756 # building for "arm64" or "both", we need to use the clang that
1757 # is provided with Xcode.
1758 ['target_subarch!="arm32"', {
1763 ['enable_extensions==1', {
1764 'grit_defines': ['-D', 'enable_extensions'],
1766 ['enable_plugins!=0', {
1767 'grit_defines': ['-D', 'enable_plugins'],
1769 ['enable_printing!=0', {
1770 'grit_defines': ['-D', 'enable_printing'],
1772 ['enable_printing==1', {
1773 'grit_defines': ['-D', 'enable_full_printing'],
1775 ['enable_themes==1', {
1776 'grit_defines': ['-D', 'enable_themes'],
1778 ['enable_app_list==1', {
1779 'grit_defines': ['-D', 'enable_app_list'],
1781 ['enable_settings_app==1', {
1782 'grit_defines': ['-D', 'enable_settings_app'],
1784 ['enable_google_now==1', {
1785 'grit_defines': ['-D', 'enable_google_now'],
1787 ['use_concatenated_impulse_responses==1', {
1788 'grit_defines': ['-D', 'use_concatenated_impulse_responses'],
1790 ['enable_webrtc==1', {
1791 'grit_defines': ['-D', 'enable_webrtc'],
1793 ['enable_mdns==1', {
1794 'grit_defines': ['-D', 'enable_mdns'],
1796 ['enable_enhanced_bookmarks==1', {
1797 'grit_defines': ['-D', 'enable_enhanced_bookmarks'],
1799 ['enable_task_manager==1', {
1800 'grit_defines': ['-D', 'enable_task_manager'],
1802 ['clang_use_chrome_plugins==1 and OS!="win"', {
1803 'clang_chrome_plugins_flags': [
1804 '<!@(<(DEPTH)/tools/clang/scripts/plugin_flags.sh)'
1808 ['asan==1 and OS!="win"', {
1811 ['asan==1 and OS=="mac"', {
1812 # TODO(glider): we do not strip ASan binaries until the dynamic ASan
1813 # runtime is fully adopted. See http://crbug.com/242503.
1814 'mac_strip_release': 0,
1826 ['OS=="linux" and clang_type_profiler==1', {
1828 'clang_use_chrome_plugins%': 0,
1830 ['host_arch=="x64"', {
1831 'make_clang_dir%': 'third_party/llvm-allocated-type/Linux_x64',
1833 ['host_arch=="ia32"', {
1834 # 32-bit Clang is unsupported. It may not build. Put your 32-bit
1835 # Clang in this directory at your own risk if needed for some
1836 # purpose (e.g. to compare 32-bit and 64-bit behavior like memory
1837 # usage). Any failure by this compiler should not close the tree.
1838 'make_clang_dir%': 'third_party/llvm-allocated-type/Linux_ia32',
1843 # On valgrind bots, override the optimizer settings so we don't inline too
1844 # much and make the stacks harder to figure out.
1846 # TODO(rnk): Kill off variables that no one else uses and just implement
1847 # them under a build_for_tool== condition.
1848 ['build_for_tool=="memcheck" or build_for_tool=="tsan"', {
1850 'mac_debug_optimization': '1',
1851 'mac_release_optimization': '1',
1852 'release_optimize': '1',
1853 'no_gc_sections': 1,
1854 'debug_extra_cflags': '-g -fno-inline -fno-omit-frame-pointer '
1855 '-fno-builtin -fno-optimize-sibling-calls',
1856 'release_extra_cflags': '-g -fno-inline -fno-omit-frame-pointer '
1857 '-fno-builtin -fno-optimize-sibling-calls',
1859 # MSVS flags for TSan on Pin and Windows.
1860 'win_debug_RuntimeChecks': '0',
1861 'win_debug_disable_iterator_debugging': '1',
1862 'win_debug_Optimization': '1',
1863 'win_debug_InlineFunctionExpansion': '0',
1864 'win_release_InlineFunctionExpansion': '0',
1865 'win_release_OmitFramePointers': '0',
1867 'linux_use_tcmalloc': 1,
1868 'release_valgrind_build': 1,
1870 'component': 'static_library',
1871 'use_system_zlib': 0,
1874 # Build tweaks for DrMemory.
1875 # TODO(rnk): Combine with tsan config to share the builder.
1876 # http://crbug.com/108155
1877 ['build_for_tool=="drmemory"', {
1878 # These runtime checks force initialization of stack vars which blocks
1879 # DrMemory's uninit detection.
1880 'win_debug_RuntimeChecks': '0',
1881 # Iterator debugging is slow.
1882 'win_debug_disable_iterator_debugging': '1',
1883 # Try to disable optimizations that mess up stacks in a release build.
1884 # DrM-i#1054 (http://code.google.com/p/drmemory/issues/detail?id=1054)
1885 # /O2 and /Ob0 (disable inline) cannot be used together because of a
1886 # compiler bug, so we use /Ob1 instead.
1887 'win_release_InlineFunctionExpansion': '1',
1888 'win_release_OmitFramePointers': '0',
1889 # Ditto for debug, to support bumping win_debug_Optimization.
1890 'win_debug_InlineFunctionExpansion': 0,
1891 'win_debug_OmitFramePointers': 0,
1892 # Keep the code under #ifndef NVALGRIND.
1893 'release_valgrind_build': 1,
1896 # Enable RLZ on Win, Mac, iOS and ChromeOS.
1897 ['branding=="Chrome" and (OS=="win" or OS=="mac" or OS=="ios" or chromeos==1)', {
1901 # Set default compiler flags depending on ARM version.
1902 ['arm_version==6 and android_webview_build==0', {
1903 'arm_arch%': 'armv6',
1906 'arm_float_abi%': 'softfp',
1909 ['arm_version==7 and android_webview_build==0', {
1910 'arm_arch%': 'armv7-a',
1916 'arm_fpu%': 'vfpv3-d16',
1919 # Change the default to hard once the armhf transition is complete.
1920 'arm_float_abi%': 'softfp',
1924 ['android_webview_build==1', {
1925 # The WebView build gets its cpu-specific flags from the Android build system.
1929 'arm_float_abi%': '',
1933 # Enable brlapi by default for chromeos.
1939 # This is the default platform
1940 'ozone_platform%': "test",
1942 # Enable built-in ozone platforms if ozone is enabled.
1943 'ozone_platform_dri%': 1,
1944 'ozone_platform_test%': 1,
1946 'ozone_platform_dri%': 0,
1947 'ozone_platform_test%': 0,
1950 ['desktop_linux==1 and use_aura==1 and use_x11==1', {
1951 'use_clipboard_aurax11%': 1,
1954 ['OS=="win" and use_goma==1', {
1955 # goma doesn't support pch yet.
1956 'chromium_win_pch': 0,
1957 # goma doesn't support PDB yet, so win_z7=1 or fastbuild=1.
1965 ['OS=="win" and clang==1', {
1966 'chromium_win_pch': 0,
1969 # The seccomp-bpf sandbox is only supported on three architectures
1971 # Do not disable seccomp_bpf anywhere without talking to
1972 # security@chromium.org!
1973 ['((OS=="linux" or OS=="android") and '
1974 '(target_arch=="ia32" or target_arch=="x64" or '
1975 'target_arch=="arm"))', {
1976 'use_seccomp_bpf%': 1,
1978 'use_seccomp_bpf%': 0,
1982 # The path to the ANGLE library.
1983 'angle_path': '<(DEPTH)/third_party/angle',
1985 # List of default apps to install in new profiles. The first list contains
1986 # the source files as found in svn. The second list, used only for linux,
1987 # contains the destination location for each of the files. When a crx
1988 # is added or removed from the list, the chrome/browser/resources/
1989 # default_apps/external_extensions.json file must also be updated.
1990 'default_apps_list': [
1991 'browser/resources/default_apps/external_extensions.json',
1992 'browser/resources/default_apps/gmail.crx',
1993 'browser/resources/default_apps/search.crx',
1994 'browser/resources/default_apps/youtube.crx',
1995 'browser/resources/default_apps/drive.crx',
1996 'browser/resources/default_apps/docs.crx',
1998 'default_apps_list_linux_dest': [
1999 '<(PRODUCT_DIR)/default_apps/external_extensions.json',
2000 '<(PRODUCT_DIR)/default_apps/gmail.crx',
2001 '<(PRODUCT_DIR)/default_apps/search.crx',
2002 '<(PRODUCT_DIR)/default_apps/youtube.crx',
2003 '<(PRODUCT_DIR)/default_apps/drive.crx',
2004 '<(PRODUCT_DIR)/default_apps/docs.crx',
2007 'target_defaults': {
2009 # The condition that operates on chromium_code is in a target_conditions
2010 # section, and will not have access to the default fallback value of
2011 # chromium_code at the top of this file, or to the chromium_code
2012 # variable placed at the root variables scope of .gyp files, because
2013 # those variables are not set at target scope. As a workaround,
2014 # if chromium_code is not set at target scope, define it in target scope
2015 # to contain whatever value it has during early variable expansion.
2016 # That's enough to make it available during target conditional
2018 'chromium_code%': '<(chromium_code)',
2020 # See http://msdn.microsoft.com/en-us/library/aa652360(VS.71).aspx
2021 'win_release_Optimization%': '2', # 2 = /Os
2022 'win_debug_Optimization%': '0', # 0 = /Od
2024 # See http://msdn.microsoft.com/en-us/library/2kxx5t2c(v=vs.80).aspx
2025 # Tri-state: blank is default, 1 on, 0 off
2026 'win_release_OmitFramePointers%': '0',
2027 # Tri-state: blank is default, 1 on, 0 off
2028 'win_debug_OmitFramePointers%': '',
2030 # See http://msdn.microsoft.com/en-us/library/8wtf2dfz(VS.71).aspx
2031 'win_debug_RuntimeChecks%': '3', # 3 = all checks enabled, 0 = off
2033 # See http://msdn.microsoft.com/en-us/library/47238hez(VS.71).aspx
2034 'win_debug_InlineFunctionExpansion%': '', # empty = default, 0 = off,
2035 'win_release_InlineFunctionExpansion%': '2', # 1 = only __inline, 2 = max
2037 # VS inserts quite a lot of extra checks to algorithms like
2038 # std::partial_sort in Debug build which make them O(N^2)
2039 # instead of O(N*logN). This is particularly slow under memory
2040 # tools like ThreadSanitizer so we want it to be disablable.
2041 # See http://msdn.microsoft.com/en-us/library/aa985982(v=VS.80).aspx
2042 'win_debug_disable_iterator_debugging%': '0',
2044 # An application manifest fragment to declare compatibility settings for
2045 # 'executable' targets. Ignored in other target type.
2046 'win_exe_compatibility_manifest%':
2047 '<(DEPTH)\\build\\win\\compatibility.manifest',
2049 # Set to 1 to generate external manifest instead of embedding it for
2050 # 'executable' target. Does nothing for other target type. This flag is
2051 # used to make mini_installer compatible with the component build.
2052 # See http://crbug.com/127233
2053 'win_use_external_manifest%': 0,
2055 'release_extra_cflags%': '',
2056 'debug_extra_cflags%': '',
2058 'release_valgrind_build%': '<(release_valgrind_build)',
2060 # the non-qualified versions are widely assumed to be *nix-only
2061 'win_release_extra_cflags%': '',
2062 'win_debug_extra_cflags%': '',
2064 # TODO(thakis): Make this a blacklist instead, http://crbug.com/101600
2065 'enable_wexit_time_destructors%': '<(enable_wexit_time_destructors)',
2067 # Only used by Windows build for now. Can be used to build into a
2068 # differet output directory, e.g., a build_dir_prefix of VS2010_ would
2069 # output files in src/build/VS2010_{Debug,Release}.
2070 'build_dir_prefix%': '',
2072 # Targets are by default not nacl untrusted code.
2073 'nacl_untrusted_build%': 0,
2075 'pnacl_compile_flags': [
2076 # pnacl uses the clang compiler so we need to suppress all the
2077 # same warnings as we do for clang.
2078 # TODO(sbc): Remove these if/when they are removed from the clang
2080 '-Wno-unused-function',
2081 '-Wno-char-subscripts',
2082 '-Wno-c++11-extensions',
2083 '-Wno-unnamed-type-template-args',
2087 ['OS=="win" and component=="shared_library"', {
2088 # See http://msdn.microsoft.com/en-us/library/aa652367.aspx
2089 'win_release_RuntimeLibrary%': '2', # 2 = /MD (nondebug DLL)
2090 'win_debug_RuntimeLibrary%': '3', # 3 = /MDd (debug DLL)
2092 # See http://msdn.microsoft.com/en-us/library/aa652367.aspx
2093 'win_release_RuntimeLibrary%': '0', # 0 = /MT (nondebug static)
2094 'win_debug_RuntimeLibrary%': '1', # 1 = /MTd (debug static)
2097 # See http://gcc.gnu.org/onlinedocs/gcc-4.4.2/gcc/Optimize-Options.html
2098 'mac_release_optimization%': 's', # Use -Os unless overridden
2099 'mac_debug_optimization%': '0', # Use -O0 unless overridden
2101 # See http://gcc.gnu.org/onlinedocs/gcc-4.4.2/gcc/Optimize-Options.html
2102 'mac_release_optimization%': '3', # Use -O3 unless overridden
2103 'mac_debug_optimization%': '0', # Use -O0 unless overridden
2108 # Don't use deprecated V8 APIs anywhere.
2109 'V8_DEPRECATION_WARNINGS',
2112 ['(OS=="mac" or OS=="ios") and asan==1', {
2114 '<(DEPTH)/build/mac/asan.gyp:asan_dynamic_runtime',
2117 ['OS=="linux" and linux_use_tcmalloc==1 and clang_type_profiler==1', {
2118 'cflags_cc!': ['-fno-rtti'],
2121 '-gline-tables-only',
2122 '-fintercept-allocation-functions',
2124 'defines': ['TYPE_PROFILING'],
2126 '<(DEPTH)/base/allocator/allocator.gyp:type_profiler',
2129 ['OS=="linux" and clang==1 and host_arch=="ia32"', {
2130 # TODO(dmikurube): Remove -Wno-sentinel when Clang/LLVM is fixed.
2131 # See http://crbug.com/162818.
2132 'cflags+': ['-Wno-sentinel'],
2134 ['branding=="Chrome"', {
2135 'defines': ['GOOGLE_CHROME_BUILD'],
2136 }, { # else: branding!="Chrome"
2137 'defines': ['CHROMIUM_BUILD'],
2139 ['OS=="mac" and component=="shared_library"', {
2141 'DYLIB_INSTALL_NAME_BASE': '@rpath',
2142 'LD_RUNPATH_SEARCH_PATHS': [
2143 # For unbundled binaries.
2145 # For bundled binaries, to get back from Binary.app/Contents/MacOS.
2146 '@loader_path/../../..',
2151 'defines': ['ENABLE_RLZ'],
2153 ['component=="shared_library"', {
2154 'defines': ['COMPONENT_BUILD'],
2156 ['toolkit_views==1', {
2157 'defines': ['TOOLKIT_VIEWS=1'],
2159 ['ui_compositor_image_transport==1', {
2160 'defines': ['UI_COMPOSITOR_IMAGE_TRANSPORT'],
2163 'defines': ['USE_AURA=1'],
2166 'defines': ['USE_ASH=1'],
2169 'defines': ['USE_CAIRO=1'],
2172 'defines': ['USE_CRAS=1'],
2175 'defines': ['USE_GLIB=1'],
2178 'defines': ['USE_OZONE=1'],
2180 ['use_default_render_theme==1', {
2181 'defines': ['USE_DEFAULT_RENDER_THEME=1'],
2183 ['use_libjpeg_turbo==1', {
2184 'defines': ['USE_LIBJPEG_TURBO=1'],
2187 'defines': ['USE_NSS=1'],
2190 'defines': ['USE_X11=1'],
2192 ['use_clipboard_aurax11==1', {
2193 'defines': ['USE_CLIPBOARD_AURAX11=1'],
2195 ['enable_one_click_signin==1', {
2196 'defines': ['ENABLE_ONE_CLICK_SIGNIN'],
2198 ['toolkit_uses_gtk==1 and toolkit_views==0', {
2199 # TODO(erg): We are progressively sealing up use of deprecated features
2200 # in gtk in preparation for an eventual porting to gtk3.
2201 'defines': ['GTK_DISABLE_SINGLE_INCLUDES=1'],
2204 'defines': ['OS_CHROMEOS=1'],
2206 ['use_xi2_mt!=0 and use_x11==1', {
2207 'defines': ['USE_XI2_MT=<(use_xi2_mt)'],
2209 ['image_loader_extension==1', {
2210 'defines': ['IMAGE_LOADER_EXTENSION=1'],
2213 'defines': ['ENABLE_PROFILING=1'],
2216 'defines': ['ENABLE_REMOTING=1'],
2218 ['enable_webrtc==1', {
2219 'defines': ['ENABLE_WEBRTC=1'],
2221 ['proprietary_codecs==1', {
2222 'defines': ['USE_PROPRIETARY_CODECS'],
2224 ['enable_viewport==1', {
2225 'defines': ['ENABLE_VIEWPORT'],
2227 ['enable_pepper_cdms==1', {
2228 'defines': ['ENABLE_PEPPER_CDMS'],
2230 ['configuration_policy==1', {
2231 'defines': ['ENABLE_CONFIGURATION_POLICY'],
2233 ['input_speech==1', {
2234 'defines': ['ENABLE_INPUT_SPEECH'],
2236 ['notifications==1', {
2237 'defines': ['ENABLE_NOTIFICATIONS'],
2239 ['enable_hidpi==1', {
2240 'defines': ['ENABLE_HIDPI=1'],
2242 ['native_discardable_memory==1', {
2243 'defines': ['DISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY'],
2245 ['native_memory_pressure_signals==1', {
2246 'defines': ['SYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE'],
2249 'defines': ['USE_UDEV'],
2253 'GCC_GENERATE_DEBUGGING_SYMBOLS': 'NO',
2257 # Clang creates chubby debug information, which makes linking very
2258 # slow. For now, don't create debug information with clang. See
2259 # http://crbug.com/70000
2263 'debug_extra_cflags': '-g0',
2266 # Android builds symbols on release by default, disable them.
2269 'debug_extra_cflags': '-g0',
2270 'release_extra_cflags': '-g0',
2274 }, { # else clang!=1
2276 ['OS=="win" and fastbuild==2', {
2277 # Completely disable debug information.
2280 'GenerateDebugInformation': 'false',
2282 'VCCLCompilerTool': {
2283 'DebugInformationFormat': '0',
2287 ['OS=="win" and fastbuild==1', {
2290 # This tells the linker to generate .pdbs, so that
2291 # we can get meaningful stack traces.
2292 'GenerateDebugInformation': 'true',
2294 'VCCLCompilerTool': {
2295 # No debug info to be generated by compiler.
2296 'DebugInformationFormat': '0',
2300 ['OS=="linux" and fastbuild==2', {
2302 'debug_extra_cflags': '-g0',
2305 ['OS=="linux" and fastbuild==1', {
2307 'debug_extra_cflags': '-g1',
2310 ['OS=="android" and fastbuild==2', {
2312 'debug_extra_cflags': '-g0',
2313 'release_extra_cflags': '-g0',
2316 ['OS=="android" and fastbuild==1', {
2318 'debug_extra_cflags': '-g1',
2319 'release_extra_cflags': '-g1',
2326 ['dcheck_always_on!=0', {
2327 'defines': ['DCHECK_ALWAYS_ON=1'],
2328 }], # dcheck_always_on!=0
2329 ['logging_like_official_build!=0', {
2330 'defines': ['LOGGING_IS_OFFICIAL_BUILD=1'],
2331 }], # logging_like_official_build!=0
2332 ['tracing_like_official_build!=0', {
2333 'defines': ['TRACING_IS_OFFICIAL_BUILD=1'],
2334 }], # tracing_like_official_build!=0
2335 ['win_use_allocator_shim==0', {
2338 'defines': ['NO_TCMALLOC'],
2342 ['use_openssl==1', {
2347 ['enable_eglimage==1', {
2349 'ENABLE_EGLIMAGE=1',
2352 ['asan==1 and OS=="win"', {
2353 # Since asan on windows uses Syzygy, we need /PROFILE turned on to
2354 # produce appropriate pdbs.
2361 'ADDRESS_SANITIZER',
2362 'MEMORY_TOOL_REPLACES_ALLOCATOR',
2364 }], # asan==1 and OS=="win"
2368 '_CRT_SECURE_NO_DEPRECATE',
2369 '_SCL_SECURE_NO_DEPRECATE',
2370 # This define is required to pull in the new Win8 interfaces from
2371 # system headers like ShObjIdl.h.
2372 'NTDDI_VERSION=0x06020000',
2373 # This is required for ATL to use XP-safe versions of its functions.
2374 '_USING_V110_SDK71_',
2377 '<(DEPTH)/third_party/wtl/include',
2382 # Generates debug info when win_z7=1
2383 # even if fastbuild=1 (that makes GenerateDebugInformation false).
2385 'GenerateDebugInformation': 'true',
2387 'VCCLCompilerTool': {
2388 'DebugInformationFormat': '1',
2394 ['enable_task_manager==1', {
2396 'ENABLE_TASK_MANAGER=1',
2399 ['enable_extensions==1', {
2401 'ENABLE_EXTENSIONS=1',
2404 ['OS=="win" and branding=="Chrome"', {
2405 'defines': ['ENABLE_SWIFTSHADER'],
2407 ['enable_dart==1', {
2408 'defines': ['WEBKIT_USING_DART=1'],
2410 ['enable_plugin_installation==1', {
2411 'defines': ['ENABLE_PLUGIN_INSTALLATION=1'],
2413 ['enable_plugins==1', {
2414 'defines': ['ENABLE_PLUGINS=1'],
2416 ['enable_session_service==1', {
2417 'defines': ['ENABLE_SESSION_SERVICE=1'],
2419 ['enable_themes==1', {
2420 'defines': ['ENABLE_THEMES=1'],
2422 ['enable_autofill_dialog==1', {
2423 'defines': ['ENABLE_AUTOFILL_DIALOG=1'],
2425 ['enable_background==1', {
2426 'defines': ['ENABLE_BACKGROUND=1'],
2428 ['enable_automation==1', {
2429 'defines': ['ENABLE_AUTOMATION=1'],
2431 ['enable_google_now==1', {
2432 'defines': ['ENABLE_GOOGLE_NOW=1'],
2434 ['cld_version!=0', {
2435 'defines': ['CLD_VERSION=<(cld_version)'],
2437 ['enable_printing==1', {
2438 'defines': ['ENABLE_FULL_PRINTING=1', 'ENABLE_PRINTING=1'],
2440 ['enable_printing==2', {
2441 'defines': ['ENABLE_PRINTING=1'],
2443 ['enable_spellcheck==1', {
2444 'defines': ['ENABLE_SPELLCHECK=1'],
2446 ['enable_captive_portal_detection==1', {
2447 'defines': ['ENABLE_CAPTIVE_PORTAL_DETECTION=1'],
2449 ['enable_app_list==1', {
2450 'defines': ['ENABLE_APP_LIST=1'],
2452 ['enable_settings_app==1', {
2453 'defines': ['ENABLE_SETTINGS_APP=1'],
2455 ['disable_ftp_support==1', {
2456 'defines': ['DISABLE_FTP_SUPPORT=1'],
2458 ['enable_managed_users==1', {
2459 'defines': ['ENABLE_MANAGED_USERS=1'],
2461 ['data_reduction_fallback_host != ""', {
2463 'DATA_REDUCTION_FALLBACK_HOST="<(data_reduction_fallback_host)"'],
2465 ['data_reduction_dev_host != ""', {
2467 'DATA_REDUCTION_DEV_HOST="<(data_reduction_dev_host)"'],
2469 ['spdy_proxy_auth_origin != ""', {
2470 'defines': ['SPDY_PROXY_AUTH_ORIGIN="<(spdy_proxy_auth_origin)"'],
2472 ['spdy_proxy_auth_property != ""', {
2473 'defines': ['SPDY_PROXY_AUTH_PROPERTY="<(spdy_proxy_auth_property)"'],
2475 ['spdy_proxy_auth_value != ""', {
2476 'defines': ['SPDY_PROXY_AUTH_VALUE="<(spdy_proxy_auth_value)"'],
2478 ['data_reduction_proxy_probe_url != ""', {
2480 'DATA_REDUCTION_PROXY_PROBE_URL="<(data_reduction_proxy_probe_url)"'],
2482 ['enable_mdns==1', {
2483 'defines': ['ENABLE_MDNS=1'],
2485 ['enable_enhanced_bookmarks==1', {
2486 'defines': ['ENABLE_ENHANCED_BOOKMARKS=1'],
2488 ['enable_ipc_fuzzer==1', {
2489 'defines': ['ENABLE_IPC_FUZZER=1'],
2491 ], # conditions for 'target_defaults'
2492 'target_conditions': [
2493 ['enable_wexit_time_destructors==1', {
2497 '-Wexit-time-destructors',
2501 '-Wexit-time-destructors',
2507 ['chromium_code==0', {
2509 [ 'os_posix==1 and OS!="mac" and OS!="ios"', {
2510 # We don't want to get warnings from third-party code,
2511 # so remove any existing warning-enabling flags like -Wall.
2517 # Don't warn about hash_map in third-party code.
2521 # Don't warn about printf format problems.
2522 # This is off by default in gcc but on in Ubuntu's gcc(!).
2526 # Necessary because llvm.org/PR10448 is WONTFIX (crbug.com/90453).
2530 # TODO: Fix all warnings on chromeos too.
2531 [ 'os_posix==1 and OS!="mac" and OS!="ios" and (clang!=1 or chromeos==1)', {
2536 [ 'os_posix==1 and os_bsd!=1 and OS!="mac" and OS!="android"', {
2538 # Don't warn about ignoring the return value from e.g. close().
2539 # This is off by default in some gccs but on by default in others.
2540 # BSD systems do not support this option, since they are usually
2541 # using gcc 4.2.1, which does not have this flag yet.
2542 '-Wno-unused-result',
2547 '_CRT_SECURE_NO_DEPRECATE',
2548 '_CRT_NONSTDC_NO_WARNINGS',
2549 '_CRT_NONSTDC_NO_DEPRECATE',
2550 '_SCL_SECURE_NO_DEPRECATE',
2552 'msvs_disabled_warnings': [4800],
2554 'VCCLCompilerTool': {
2555 'WarningLevel': '3',
2556 'WarnAsError': '<(win_third_party_warn_as_error)',
2557 'Detect64BitPortabilityProblems': 'false',
2561 ['buildtype=="Official"', {
2563 'VCCLCompilerTool': { 'WarnAsError': 'false' },
2568 'VCCLCompilerTool': { 'WarnAsError': 'false' },
2573 # TODO(darin): Unfortunately, some third_party code depends on base.
2574 [ 'OS=="win" and component=="shared_library"', {
2575 'msvs_disabled_warnings': [
2576 4251, # class 'std::xx' needs to have dll-interface.
2579 [ 'OS=="mac" or OS=="ios"', {
2581 'WARNING_CFLAGS!': ['-Wall', '-Wextra'],
2584 ['buildtype=="Official"', {
2586 'GCC_TREAT_WARNINGS_AS_ERRORS': 'NO', # -Werror
2593 # TODO(ios): Fix remaining warnings in third-party code, then
2594 # remove this; the Mac cleanup didn't get everything that's
2595 # flagged in an iOS build.
2596 'GCC_TREAT_WARNINGS_AS_ERRORS': 'NO',
2597 'RUN_CLANG_STATIC_ANALYZER': 'NO',
2598 # Several internal ios directories generate numerous warnings for
2599 # -Wobjc-missing-property-synthesis.
2600 'CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS': 'NO',
2606 # Rules for excluding e.g. foo_win.cc from the build on non-Windows.
2607 'filename_rules.gypi',
2609 # In Chromium code, we define __STDC_foo_MACROS in order to get the
2610 # C99 macros on Mac and Linux.
2612 '__STDC_CONSTANT_MACROS',
2613 '__STDC_FORMAT_MACROS',
2617 # turn on warnings for signed/unsigned mismatch on chromium code.
2619 'VCCLCompilerTool': {
2620 'AdditionalOptions': ['/we4389'],
2624 ['OS=="win" and component=="shared_library"', {
2625 'msvs_disabled_warnings': [
2626 4251, # class 'std::xx' needs to have dll-interface.
2631 ], # target_conditions for 'target_defaults'
2632 'default_configuration': 'Debug',
2634 # VCLinkerTool LinkIncremental values below:
2636 # 1 == /INCREMENTAL:NO
2638 # Debug links incremental, Release does not.
2640 # Abstract base configurations to cover common attributes.
2644 'msvs_configuration_attributes': {
2645 'OutputDirectory': '<(DEPTH)\\build\\<(build_dir_prefix)$(ConfigurationName)',
2646 'IntermediateDirectory': '$(OutDir)\\obj\\$(ProjectName)',
2647 'CharacterSet': '1',
2649 # Add the default import libs.
2652 'AdditionalDependencies': [
2676 'MinimumRequiredVersion': '5.01', # XP.
2677 'TargetMachine': '1',
2679 'VCLibrarianTool': {
2680 'TargetMachine': '1',
2683 'msvs_configuration_platform': 'Win32',
2687 'msvs_configuration_platform': 'x64',
2690 'TargetMachine': '17', # x86 - 64
2691 'AdditionalLibraryDirectories!':
2692 ['<(windows_sdk_path)/Lib/win8/um/x86'],
2693 'AdditionalLibraryDirectories':
2694 ['<(windows_sdk_path)/Lib/win8/um/x64'],
2695 # Doesn't exist x64 SDK. Should use oleaut32 in any case.
2696 'IgnoreDefaultLibraryNames': [ 'olepro32.lib' ],
2698 'VCLibrarianTool': {
2699 'AdditionalLibraryDirectories!':
2700 ['<(windows_sdk_path)/Lib/win8/um/x86'],
2701 'AdditionalLibraryDirectories':
2702 ['<(windows_sdk_path)/Lib/win8/um/x64'],
2703 'TargetMachine': '17', # x64
2710 'DYNAMIC_ANNOTATIONS_ENABLED=1',
2711 'WTF_USE_DYNAMIC_ANNOTATIONS=1',
2714 'GCC_OPTIMIZATION_LEVEL': '<(mac_debug_optimization)',
2716 '<@(debug_extra_cflags)',
2720 'VCCLCompilerTool': {
2721 'Optimization': '<(win_debug_Optimization)',
2722 'PreprocessorDefinitions': ['_DEBUG'],
2723 'BasicRuntimeChecks': '<(win_debug_RuntimeChecks)',
2724 'RuntimeLibrary': '<(win_debug_RuntimeLibrary)',
2726 # According to MSVS, InlineFunctionExpansion=0 means
2727 # "default inlining", not "/Ob0".
2728 # Thus, we have to handle InlineFunctionExpansion==0 separately.
2729 ['win_debug_InlineFunctionExpansion==0', {
2730 'AdditionalOptions': ['/Ob0'],
2732 ['win_debug_InlineFunctionExpansion!=""', {
2733 'InlineFunctionExpansion':
2734 '<(win_debug_InlineFunctionExpansion)',
2736 ['win_debug_disable_iterator_debugging==1', {
2737 'PreprocessorDefinitions': ['_HAS_ITERATOR_DEBUGGING=0'],
2740 # if win_debug_OmitFramePointers is blank, leave as default
2741 ['win_debug_OmitFramePointers==1', {
2742 'OmitFramePointers': 'true',
2744 ['win_debug_OmitFramePointers==0', {
2745 'OmitFramePointers': 'false',
2746 # The above is not sufficient (http://crbug.com/106711): it
2747 # simply eliminates an explicit "/Oy", but both /O2 and /Ox
2748 # perform FPO regardless, so we must explicitly disable.
2749 # We still want the false setting above to avoid having
2750 # "/Oy /Oy-" and warnings about overriding.
2751 'AdditionalOptions': ['/Oy-'],
2754 'AdditionalOptions': [ '<@(win_debug_extra_cflags)', ],
2757 'LinkIncremental': '<(msvs_debug_link_incremental)',
2758 # ASLR makes debugging with windbg difficult because Chrome.exe and
2759 # Chrome.dll share the same base name. As result, windbg will
2760 # name the Chrome.dll module like chrome_<base address>, where
2761 # <base address> typically changes with each launch. This in turn
2762 # means that breakpoints in Chrome.dll don't stick from one launch
2763 # to the next. For this reason, we turn ASLR off in debug builds.
2764 # Note that this is a three-way bool, where 0 means to pick up
2765 # the default setting, 1 is off and 2 is on.
2766 'RandomizedBaseAddress': 1,
2768 'VCResourceCompilerTool': {
2769 'PreprocessorDefinitions': ['_DEBUG'],
2773 ['OS=="linux" or OS=="android"', {
2774 'target_conditions': [
2775 ['_toolset=="target"', {
2777 '<@(debug_extra_cflags)',
2782 ['OS=="linux" and target_arch!="ia32" and disable_glibcxx_debug==0', {
2783 # Enable libstdc++ debugging facilities to help catch problems
2784 # early, see http://crbug.com/65151 .
2785 # TODO(phajdan.jr): Should we enable this for all of POSIX?
2786 'defines': ['_GLIBCXX_DEBUG=1',],
2788 # Disabled on iOS because it was causing a crash on startup.
2789 # TODO(michelea): investigate, create a reduced test and possibly
2791 ['release_valgrind_build==0 and OS!="ios"', {
2794 '-fstack-protector-all', # Implies -fstack-protector
2806 'DEAD_CODE_STRIPPING': 'YES', # -Wl,-dead_strip
2807 'GCC_OPTIMIZATION_LEVEL': '<(mac_release_optimization)',
2808 'OTHER_CFLAGS': [ '<@(release_extra_cflags)', ],
2811 'VCCLCompilerTool': {
2812 'RuntimeLibrary': '<(win_release_RuntimeLibrary)',
2814 # In official builds, each target will self-select
2815 # an optimization level.
2816 ['buildtype!="Official"', {
2817 'Optimization': '<(win_release_Optimization)',
2820 # According to MSVS, InlineFunctionExpansion=0 means
2821 # "default inlining", not "/Ob0".
2822 # Thus, we have to handle InlineFunctionExpansion==0 separately.
2823 ['win_release_InlineFunctionExpansion==0', {
2824 'AdditionalOptions': ['/Ob0'],
2826 ['win_release_InlineFunctionExpansion!=""', {
2827 'InlineFunctionExpansion':
2828 '<(win_release_InlineFunctionExpansion)',
2831 # if win_release_OmitFramePointers is blank, leave as default
2832 ['win_release_OmitFramePointers==1', {
2833 'OmitFramePointers': 'true',
2835 ['win_release_OmitFramePointers==0', {
2836 'OmitFramePointers': 'false',
2837 # The above is not sufficient (http://crbug.com/106711): it
2838 # simply eliminates an explicit "/Oy", but both /O2 and /Ox
2839 # perform FPO regardless, so we must explicitly disable.
2840 # We still want the false setting above to avoid having
2841 # "/Oy /Oy-" and warnings about overriding.
2842 'AdditionalOptions': ['/Oy-'],
2845 'AdditionalOptions': [ '<@(win_release_extra_cflags)', ],
2848 # LinkIncremental is a tri-state boolean, where 0 means default
2849 # (i.e., inherit from parent solution), 1 means false, and
2851 'LinkIncremental': '1',
2852 # This corresponds to the /PROFILE flag which ensures the PDB
2853 # file contains FIXUP information (growing the PDB file by about
2854 # 5%) but does not otherwise alter the output binary. This
2855 # information is used by the Syzygy optimization tool when
2856 # decomposing the release image.
2861 ['msvs_use_common_release', {
2862 'includes': ['release.gypi'],
2864 ['release_valgrind_build==0 and tsan==0', {
2867 'DYNAMIC_ANNOTATIONS_ENABLED=0',
2871 'MEMORY_TOOL_REPLACES_ALLOCATOR',
2872 'DYNAMIC_ANNOTATIONS_ENABLED=1',
2873 'WTF_USE_DYNAMIC_ANNOTATIONS=1',
2876 ['win_use_allocator_shim==0', {
2877 'defines': ['NO_TCMALLOC'],
2880 'target_conditions': [
2881 ['chromium_code==1', {
2882 # Non-chromium code is not guaranteed to compile cleanly
2883 # with _FORTIFY_SOURCE. Also, fortified build may fail
2884 # when optimizations are disabled, so only do that for Release
2887 '_FORTIFY_SOURCE=2',
2892 ['OS=="linux" or OS=="android"', {
2893 'target_conditions': [
2894 ['_toolset=="target"', {
2896 '<@(release_extra_cflags)',
2903 'NS_BLOCK_ASSERTIONS=1',
2909 # Concrete configurations
2912 'inherit_from': ['Common_Base', 'x86_Base', 'Debug_Base'],
2915 'inherit_from': ['Common_Base', 'x86_Base', 'Release_Base'],
2919 # TODO(bradnelson): add a gyp mechanism to make this more graceful.
2921 'inherit_from': ['Common_Base', 'x64_Base', 'Debug_Base'],
2924 'inherit_from': ['Common_Base', 'x64_Base', 'Release_Base'],
2932 'target_defaults': {
2939 ['os_posix==1 and chromeos==0', {
2940 # Chrome OS enables -fstack-protector-strong via its build wrapper,
2941 # and we want to avoid overriding this, so stack-protector is only
2942 # enabled when not building on Chrome OS.
2943 # TODO(phajdan.jr): Use -fstack-protector-strong when our gcc
2945 'target_defaults': {
2947 '-fstack-protector',
2948 '--param=ssp-buffer-size=4',
2952 ['os_posix==1 and OS!="mac" and OS!="ios"', {
2953 'target_defaults': {
2954 # Enable -Werror by default, but put it in a variable so it can
2955 # be disabled in ~/.gyp/include.gypi on the valgrind builders.
2957 'werror%': '-Werror',
2958 'libraries_for_target%': '',
2961 '_FILE_OFFSET_BITS=64',
2964 '<(werror)', # See note above about the werror variable.
2967 '-fno-strict-aliasing', # See http://crbug.com/32204
2969 # TODO(evan): turn this back on once all the builds work.
2971 # Don't warn about unused function params. We use those everywhere.
2972 '-Wno-unused-parameter',
2973 # Don't warn about the "struct foo f = {0};" initialization pattern.
2974 '-Wno-missing-field-initializers',
2975 # Don't export any symbols (for example, to plugins we dlopen()).
2976 # Note: this is *required* to make some plugins work.
2977 '-fvisibility=hidden',
2982 '-fno-threadsafe-statics',
2983 # Make inline functions have hidden visiblity by default.
2984 # Surprisingly, not covered by -fvisibility=hidden.
2985 '-fvisibility-inlines-hidden',
2986 # GCC turns on -Wsign-compare for C++ under -Wall, but clang doesn't,
2987 # so we specify it explicitly. (llvm.org/PR10448, crbug.com/90453)
2991 '-pthread', '-Wl,-z,noexecstack',
2994 '<(libraries_for_target)',
2999 'debug_optimize%': '0',
3005 '-O>(debug_optimize)',
3011 '-Wl,--fatal-warnings',
3012 # Only link with needed input sections. This is to avoid
3013 # getting undefined reference to __cxa_bad_typeid in the CDU
3015 '-Wl,--gc-sections',
3016 # Warn in case of text relocations.
3017 '-Wl,--warn-shared-textrel',
3020 ['OS=="android" and android_full_debug==0', {
3021 # Some configurations are copied from Release_Base to reduce
3024 'debug_optimize%': 's',
3027 '-fomit-frame-pointer',
3029 '-ffunction-sections',
3036 ['OS=="linux" and target_arch=="ia32"', {
3038 '-Wl,--no-as-needed',
3041 ['debug_unwind_tables==1', {
3042 'cflags': ['-funwind-tables'],
3044 'cflags': ['-fno-unwind-tables', '-fno-asynchronous-unwind-tables'],
3050 'release_optimize%': '2',
3051 # Binaries become big and gold is unable to perform GC
3052 # and remove unused sections for some of test targets
3053 # on 32 bit platform.
3054 # (This is currently observed only in chromeos valgrind bots)
3055 # The following flag is to disable --gc-sections linker
3056 # option for these bots.
3057 'no_gc_sections%': 0,
3059 # TODO(bradnelson): reexamine how this is done if we change the
3060 # expansion of configurations
3061 'release_valgrind_build%': 0,
3064 '-O<(release_optimize)',
3065 # Don't emit the GCC version ident directives, they just end up
3066 # in the .comment section taking up binary size.
3068 # Put data and code in their own sections, so that unused symbols
3069 # can be removed at link time with --gc-sections.
3071 '-ffunction-sections',
3074 # Specifically tell the linker to perform optimizations.
3075 # See http://lwn.net/Articles/192624/ .
3080 ['no_gc_sections==0', {
3082 '-Wl,--gc-sections',
3087 'release_optimize%': 's',
3090 '-fomit-frame-pointer',
3093 '-Wl,--fatal-warnings',
3094 # Warn in case of text relocations.
3095 '-Wl,--warn-shared-textrel',
3105 '-fno-omit-frame-pointer',
3109 ['profiling_full_stack_frames==1', {
3112 '-fno-optimize-sibling-calls',
3117 ['release_unwind_tables==1', {
3118 'cflags': ['-funwind-tables'],
3120 'cflags': ['-fno-unwind-tables', '-fno-asynchronous-unwind-tables'],
3126 ['target_arch=="ia32"', {
3127 'target_conditions': [
3128 ['_toolset=="target"', {
3130 # Needed so that libs with .s files (e.g. libicudata.a)
3131 # are compatible with the general 32-bit-ness.
3134 # All floating-point computations on x87 happens in 80-bit
3135 # precision. Because the C and C++ language standards allow
3136 # the compiler to keep the floating-point values in higher
3137 # precision than what's specified in the source and doing so
3138 # is more efficient than constantly rounding up to 64-bit or
3139 # 32-bit precision as specified in the source, the compiler,
3140 # especially in the optimized mode, tries very hard to keep
3141 # values in x87 floating-point stack (in 80-bit precision)
3142 # as long as possible. This has important side effects, that
3143 # the real value used in computation may change depending on
3144 # how the compiler did the optimization - that is, the value
3145 # kept in 80-bit is different than the value rounded down to
3146 # 64-bit or 32-bit. There are possible compiler options to
3147 # make this behavior consistent (e.g. -ffloat-store would keep
3148 # all floating-values in the memory, thus force them to be
3149 # rounded to its original precision) but they have significant
3150 # runtime performance penalty.
3152 # -mfpmath=sse -msse2 makes the compiler use SSE instructions
3153 # which keep floating-point values in SSE registers in its
3154 # native precision (32-bit for single precision, and 64-bit
3155 # for double precision values). This means the floating-point
3156 # value used during computation does not change depending on
3157 # how the compiler optimized the code, since the value is
3158 # always kept in its specified precision.
3160 ['branding=="Chromium" and disable_sse2==0', {
3167 # ChromeOS targets Pinetrail, which is sse3, but most of the
3168 # benefit comes from sse2 so this setting allows ChromeOS
3169 # to build on other CPUs. In the future -march=atom would
3170 # help but requires a newer compiler.
3171 ['chromeos==1 and disable_sse2==0', {
3177 # Use gold linker for Android ia32 target.
3186 # Install packages have started cropping up with
3187 # different headers between the 32-bit and 64-bit
3188 # versions, so we have to shadow those differences off
3189 # and make sure a 32-bit-on-64-bit build picks up the
3191 # For android build, use NDK headers instead of host headers
3192 ['host_arch!="ia32" and OS!="android"', {
3198 # -mmmx allows mmintrin.h to be used for mmx intrinsics.
3199 # video playback is mmx and sse2 optimized.
3210 ['target_arch=="arm"', {
3211 'target_conditions': [
3212 ['_toolset=="target"', {
3214 # The codesourcery arm-2009q3 toolchain warns at that the ABI
3215 # has changed whenever it encounters a varargs function. This
3216 # silences those warnings, as they are not helpful and
3217 # clutter legitimate warnings.
3223 '-march=<(arm_arch)',
3228 '-mtune=<(arm_tune)',
3236 ['arm_float_abi!=""', {
3238 '-mfloat-abi=<(arm_float_abi)',
3247 # Most of the following flags are derived from what Android
3248 # uses by default when building for arm, reference for which
3249 # can be found in the following file in the Android NDK:
3250 # toolchains/arm-linux-androideabi-4.4.3/setup.mk
3252 # The tree-sra optimization (scalar replacement for
3253 # aggregates enabling subsequent optimizations) leads to
3254 # invalid code generation when using the Android NDK's
3255 # compiler (r5-r7). This can be verified using
3256 # webkit_unit_tests' WTF.Checked_int8_t test.
3261 # Android now supports .relro sections properly.
3262 # NOTE: While these flags enable the generation of .relro
3263 # sections, the generated libraries can still be loaded on
3264 # older Android platform versions.
3272 'cflags': [ '-mthumb-interwork' ],
3276 '-marm', # Probably reduntant, but recommend by "perf" docs.
3277 '-mapcs-frame', # Seems required by -fno-omit-frame-pointer.
3282 # Clang does not support the following options.
3283 '-mthumb-interwork',
3284 '-finline-limit=64',
3290 # TODO(hans) Enable integrated-as (crbug.com/124610).
3291 '-no-integrated-as',
3292 '-B<(android_toolchain)', # Else /usr/bin/as gets picked up.
3296 # Clang does not support the following options.
3300 # As long as -fuse-ld=gold doesn't work, add a dummy directory
3301 # with an 'ld' that redirects to gold, so that clang uses gold.
3302 '-B<(PRODUCT_DIR)/../../build/android/arm-linux-androideabi-gold',
3307 '-marm', # Required for frame pointer based stack traces.
3316 ['target_arch=="mipsel"', {
3317 'target_conditions': [
3318 ['_toolset=="target"', {
3320 ['android_webview_build==0 and mips_arch_variant=="mips32r2"', {
3321 'cflags': ['-mips32r2', '-Wa,-mips32r2'],
3323 ['android_webview_build==0 and mips_arch_variant!="mips32r2"', {
3324 'cflags': ['-mips32', '-Wa,-mips32'],
3333 '-Wl,--no-keep-memory'
3336 '-Wno-uninitialized',
3350 'target_conditions': [
3351 ['_toolset=="target"', {
3353 '--sysroot=<(sysroot)',
3356 '--sysroot=<(sysroot)',
3357 '<!(<(DEPTH)/build/linux/sysroot_ld_path.sh <(sysroot))',
3365 # Don't die on dtoa code that uses a char as an array index.
3366 '-Wno-char-subscripts',
3368 # TODO(thakis): This used to be implied by -Wno-unused-function,
3369 # which we no longer use. Check if it makes sense to remove
3370 # this as well. http://crbug.com/316352
3371 '-Wno-unneeded-internal-declaration',
3373 # Warns on switches on enums that cover all enum values but
3374 # also contain a default: branch. Chrome is full of that.
3375 '-Wno-covered-switch-default',
3377 # Warns when a const char[] is converted to bool.
3378 '-Wstring-conversion',
3380 # C++11-related flags:
3382 # This warns on using ints as initializers for floats in
3383 # initializer lists (e.g. |int a = f(); CGSize s = { a, a };|),
3384 # which happens in several places in chrome code. Not sure if
3385 # this is worth fixing.
3386 '-Wno-c++11-narrowing',
3388 # TODO(thakis): Remove, http://crbug.com/263960
3389 '-Wno-reserved-user-defined-literal',
3391 # Clang considers the `register` keyword as deprecated, but e.g.
3392 # code generated by flex (used in angle) contains that keyword.
3393 # http://crbug.com/255186
3394 '-Wno-deprecated-register',
3397 # Clang doesn't seem to know know this flag.
3401 # See the comment in the Mac section for what it takes to move
3402 # this to -std=c++11.
3406 ['clang==1 and OS=="android"', {
3407 # Android uses stlport, whose include/new defines
3408 # `void operator delete[](void* ptr) throw();`, which
3409 # clang's -Wimplicit-exception-spec-mismatch warns about for some
3410 # reason -- http://llvm.org/PR16638. TODO(thakis): Include stlport
3411 # via -isystem instead.
3413 '-Wno-implicit-exception-spec-mismatch',
3416 ['clang==1 and clang_use_chrome_plugins==1', {
3418 '<@(clang_chrome_plugins_flags)',
3421 ['clang==1 and clang_load!=""', {
3423 '-Xclang', '-load', '-Xclang', '<(clang_load)',
3426 ['clang==1 and clang_add_plugin!=""', {
3428 '-Xclang', '-add-plugin', '-Xclang', '<(clang_add_plugin)',
3431 ['clang==1 and target_arch=="ia32"', {
3433 # Else building libyuv gives clang's register allocator issues,
3434 # see llvm.org/PR15798 / crbug.com/233709
3435 '-momit-leaf-frame-pointer',
3438 ['clang==1 and "<(GENERATOR)"=="ninja"', {
3440 # See http://crbug.com/110262
3441 '-fcolor-diagnostics',
3444 # Common options for AddressSanitizer, LeakSanitizer,
3445 # ThreadSanitizer and MemorySanitizer.
3446 ['asan==1 or lsan==1 or tsan==1 or msan==1', {
3447 'target_conditions': [
3448 ['_toolset=="target"', {
3450 '-fno-omit-frame-pointer',
3451 '-gline-tables-only',
3454 '-fomit-frame-pointer',
3457 # Functions interposed by the sanitizers can make ld think
3458 # that some libraries aren't needed when they actually are,
3459 # http://crbug.com/234010. As workaround, disable --as-needed.
3463 'MEMORY_TOOL_REPLACES_ALLOCATOR',
3469 'target_conditions': [
3470 ['_toolset=="target"', {
3472 '-fsanitize=address',
3473 '-w', # http://crbug.com/162783
3476 '-fsanitize=address',
3479 'ADDRESS_SANITIZER',
3484 ['asan_coverage!=0', {
3485 'target_conditions': [
3486 ['_toolset=="target"', {
3488 '-mllvm -asan-coverage=<(asan_coverage)',
3494 'target_conditions': [
3495 ['_toolset=="target"', {
3504 'WTF_USE_LEAK_SANITIZER=1',
3510 'target_conditions': [
3511 ['_toolset=="target"', {
3513 '-fsanitize=thread',
3515 '-mllvm', '-tsan-blacklist=<(tsan_blacklist)',
3518 '-fsanitize=thread',
3522 'DYNAMIC_ANNOTATIONS_EXTERNAL_IMPL=1',
3523 'WTF_USE_DYNAMIC_ANNOTATIONS_NOIMPL=1',
3525 'target_conditions': [
3526 ['_type=="executable"', {
3536 'target_conditions': [
3537 ['_toolset=="target"', {
3539 '-fsanitize=memory',
3540 '-fsanitize-memory-track-origins',
3542 '-fsanitize-blacklist=<(msan_blacklist)',
3545 '-fsanitize=memory',
3550 'target_conditions': [
3551 ['_type=="executable"', {
3560 ['use_instrumented_libraries==1', {
3562 '<(DEPTH)/third_party/instrumented_libraries/instrumented_libraries.gyp:instrumented_libraries',
3566 'target_conditions': [
3567 ['_toolset=="target"', {
3569 # Add RPATH to result binary to make it linking instrumented libraries ($ORIGIN means relative RPATH)
3570 '-Wl,-R,\$$ORIGIN/instrumented_libraries/asan/lib/:\$$ORIGIN/instrumented_libraries/asan/usr/lib/x86_64-linux-gnu/',
3577 'target_conditions': [
3578 ['_toolset=="target"', {
3580 '-Wl,-R,\$$ORIGIN/instrumented_libraries/msan/lib/:\$$ORIGIN/instrumented_libraries/msan/usr/lib/x86_64-linux-gnu/',
3588 ['use_custom_libcxx==1', {
3590 '<(DEPTH)/third_party/libc++/libc++.gyp:libc++',
3591 '<(DEPTH)/third_party/libc++abi/libc++abi.gyp:libc++abi',
3594 ['order_profiling!=0 and (chromeos==1 or OS=="linux" or OS=="android")', {
3595 'target_conditions' : [
3596 ['_toolset=="target"', {
3598 '-finstrument-functions',
3599 # Allow mmx intrinsics to inline, so that the
3600 #0 compiler can expand the intrinsics.
3601 '-finstrument-functions-exclude-file-list=mmintrin.h',
3604 ['_toolset=="target" and OS=="android"', {
3606 # Avoids errors with current NDK:
3607 # "third_party/android_tools/ndk/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/include/arm_neon.h:3426:3: error: argument must be a constant"
3608 '-finstrument-functions-exclude-file-list=arm_neon.h',
3613 ['linux_dump_symbols==1', {
3616 ['target_arch=="ia32" and OS!="android"', {
3617 'target_conditions': [
3618 ['_toolset=="target"', {
3620 # Workaround for linker OOM.
3621 '-Wl,--no-keep-memory',
3628 ['linux_use_tcmalloc==0 and android_use_tcmalloc==0', {
3629 'defines': ['NO_TCMALLOC'],
3631 ['linux_use_gold_flags==1', {
3632 'target_conditions': [
3633 ['_toolset=="target"', {
3635 # Experimentation found that using four linking threads
3636 # saved ~20% of link time.
3637 # https://groups.google.com/a/chromium.org/group/chromium-dev/browse_thread/thread/281527606915bb36
3638 # Only apply this to the target linker, since the host
3639 # linker might not be gold, but isn't used much anyway.
3640 # TODO(raymes): Disable threading because gold is frequently
3641 # crashing on the bots: crbug.com/161942.
3643 # '-Wl,--thread-count=4',
3648 ['release_valgrind_build==0', {
3649 'target_conditions': [
3650 ['_toolset=="target"', {
3652 # There seems to be a conflict of --icf and -pie
3653 # in gold which can generate crashy binaries. As
3654 # a security measure, -pie takes precendence for
3664 ['linux_use_gold_binary==1', {
3666 # Put our gold binary in the search path for the linker.
3667 # We pass the path to gold to the compiler. gyp leaves
3668 # unspecified what the cwd is when running the compiler,
3669 # so the normal gyp path-munging fails us. This hack
3670 # gets the right path.
3671 '-B<!(cd <(DEPTH) && pwd -P)/third_party/gold',
3677 # FreeBSD-specific options; note that most FreeBSD options are set above,
3680 'target_defaults': {
3682 '-Wl,--no-keep-memory',
3686 # Android-specific options; note that most are set above with Linux.
3689 # This is a unique identifier for a given build. It's used for
3690 # identifying various build artifacts corresponding to a particular
3691 # build of chrome (e.g. where to find archived symbols).
3692 'chrome_build_id%': '',
3694 # Use shared stlport library when system one used.
3695 # Figure this out early since it needs symbols from libgcc.a, so it
3696 # has to be before that in the set of libraries.
3697 ['use_system_stlport==1', {
3698 'android_stlport_library': 'stlport',
3701 ['component=="shared_library"', {
3702 'android_stlport_library': 'stlport_shared',
3704 'android_stlport_library': 'stlport_static',
3710 # Placing this variable here prevents from forking libvpx, used
3711 # by remoting. Remoting is off, so it needn't built,
3712 # so forking it's deps seems like overkill.
3713 # But this variable need defined to properly run gyp.
3714 # A proper solution is to have an OS==android conditional
3715 # in third_party/libvpx/libvpx.gyp to define it.
3716 'libvpx_path': 'lib/linux/arm',
3718 'target_defaults': {
3720 'release_extra_cflags%': '',
3722 # If we're using the components build, append "cr" to all shared
3723 # libraries to avoid naming collisions with android system library
3724 # versions with the same name (e.g. skia, icu).
3725 ['component=="shared_library"', {
3726 'android_product_extension': 'cr.so',
3728 'android_product_extension': 'so',
3732 'target_conditions': [
3733 ['_type=="shared_library"', {
3734 'product_extension': '<(android_product_extension)',
3737 # Settings for building device targets using Android's toolchain.
3738 # These are based on the setup.mk file from the Android NDK.
3740 # The NDK Android executable link step looks as follows:
3742 # $(TARGET_CRTBEGIN_DYNAMIC_O) <-- crtbegin.o
3743 # $(PRIVATE_OBJECTS) <-- The .o that we built
3744 # $(PRIVATE_STATIC_LIBRARIES) <-- The .a that we built
3745 # $(TARGET_LIBGCC) <-- libgcc.a
3746 # $(PRIVATE_SHARED_LIBRARIES) <-- The .so that we built
3747 # $(PRIVATE_LDLIBS) <-- System .so
3748 # $(TARGET_CRTEND_O) <-- crtend.o
3750 # For now the above are approximated for executables by adding
3751 # crtbegin.o to the end of the ldflags and 'crtend.o' to the end
3754 # The NDK Android shared library link step looks as follows:
3756 # $(PRIVATE_OBJECTS) <-- The .o that we built
3757 # -l,--whole-archive
3758 # $(PRIVATE_WHOLE_STATIC_LIBRARIES)
3759 # -l,--no-whole-archive
3760 # $(PRIVATE_STATIC_LIBRARIES) <-- The .a that we built
3761 # $(TARGET_LIBGCC) <-- libgcc.a
3762 # $(PRIVATE_SHARED_LIBRARIES) <-- The .so that we built
3763 # $(PRIVATE_LDLIBS) <-- System .so
3765 # For now, assume that whole static libraries are not needed.
3767 # For both executables and shared libraries, add the proper
3768 # libgcc.a to the start of libraries which puts it in the
3769 # proper spot after .o and .a files get linked in.
3771 # TODO: The proper thing to do longer-tem would be proper gyp
3772 # support for a custom link command line.
3773 ['_toolset=="target"', {
3775 '-pthread', # Not supported by Android toolchain.
3778 '-ffunction-sections',
3781 '-fstack-protector',
3783 '-finline-limit=64',
3784 '-Wa,--noexecstack',
3785 '<@(release_extra_cflags)',
3789 '__GNU_SOURCE=1', # Necessary for clone()
3791 '_STLP_USE_PTR_SPECIALIZATIONS=1',
3792 'CHROME_BUILD_ID="<(chrome_build_id)"',
3795 '-pthread', # Not supported by Android toolchain.
3799 '-Wl,--no-undefined',
3800 # Don't export symbols from statically linked libraries.
3801 '-Wl,--exclude-libs=ALL',
3804 '-l<(android_stlport_library)',
3805 # Manually link the libgcc.a that the cross compiler uses.
3806 '<!(<(android_toolchain)/*-gcc -print-libgcc-file-name)',
3812 ['component=="shared_library"', {
3814 '-Wl,--exclude-libs=ALL',
3819 # Work around incompatibilities between bionic and clang
3821 '-D__compiler_offsetof=__builtin_offsetof',
3822 '-Dnan=__builtin_nan',
3825 ['target_arch=="arm"', {
3827 '-target arm-linux-androideabi',
3828 '-mllvm -arm-enable-ehabi',
3831 '-target arm-linux-androideabi',
3834 ['target_arch=="ia32"', {
3836 '-target x86-linux-androideabi',
3839 '-target x86-linux-androideabi',
3846 # Android build relies on -Wl,--gc-sections removing
3847 # unreachable code. ASan instrumentation for globals inhibits
3848 # this and results in a library with unresolvable relocations.
3849 # TODO(eugenis): find a way to reenable this.
3850 '-mllvm -asan-globals=0',
3853 ['android_webview_build==0', {
3855 # The NDK has these things, but doesn't define the constants
3856 # to say that it does. Define them here instead.
3860 '--sysroot=<(android_ndk_sysroot)',
3863 '--sysroot=<(android_ndk_sysroot)',
3866 ['android_webview_build==1', {
3868 # OpenAL headers from the Android tree.
3869 '<(android_src)/frameworks/wilhelm/include',
3872 # Android predefines this as 1; undefine it here so Chromium
3873 # can redefine it later to be 2 for chromium code and unset
3874 # for third party code. This works because cflags are added
3876 '-U_FORTIFY_SOURCE',
3877 # Disable any additional warnings enabled by the Android build system but which
3878 # chromium does not build cleanly with (when treating warning as errors).
3879 # Things that are part of -Wextra:
3880 '-Wno-extra', # Enabled by -Wextra, but no specific flag
3881 '-Wno-ignored-qualifiers',
3883 '-Wno-unused-but-set-variable',
3886 # Other things unrelated to -Wextra:
3887 '-Wno-non-virtual-dtor',
3891 ['android_webview_build==1', {
3892 'target_conditions': [
3893 ['chromium_code==0', {
3895 # There is a class of warning which:
3896 # 1) Android always enables and also treats as errors
3897 # 2) Chromium ignores in third party code
3898 # So we re-enable those warnings when building Android.
3900 '-Wno-format-security',
3902 '-Wno-sequence-point',
3905 '-Wno-non-virtual-dtor',
3910 ['target_arch == "arm"', {
3912 # Enable identical code folding to reduce size.
3916 # NOTE: The stlport header include paths below are specified in
3917 # cflags rather than include_dirs because they need to come
3918 # after include_dirs. Think of them like system headers, but
3919 # don't use '-isystem' because the arm-linux-androideabi-4.4.3
3920 # toolchain (circa Gingerbread) will exhibit strange errors.
3921 # The include ordering here is important; change with caution.
3922 ['use_system_stlport==1', {
3924 # For libstdc++/include, which is used by stlport.
3925 '-I<(android_src)/bionic',
3926 '-I<(android_src)/external/stlport/stlport',
3928 }, { # else: use_system_stlport!=1
3930 '-I<(android_stlport_include)',
3933 '-L<(android_stlport_libs_dir)',
3936 ['target_arch=="ia32"', {
3937 # The x86 toolchain currently has problems with stack-protector.
3939 '-fstack-protector',
3942 '-fno-stack-protector',
3946 'target_conditions': [
3947 ['_type=="executable"', {
3950 '-Wl,-dynamic-linker,/system/bin/linker',
3951 '-Wl,--gc-sections',
3952 '-Wl,-z,nocopyreloc',
3953 # crtbegin_dynamic.o should be the last item in ldflags.
3954 '<(android_ndk_lib)/crtbegin_dynamic.o',
3957 # crtend_android.o needs to be the last item in libraries.
3958 # Do not add any libraries after this!
3959 '<(android_ndk_lib)/crtend_android.o',
3972 ['_type=="shared_library" or _type=="loadable_module"', {
3974 '-Wl,-shared,-Bsymbolic',
3977 ['android_webview_build==0', {
3979 # crtbegin_so.o should be the last item in ldflags.
3980 '<(android_ndk_lib)/crtbegin_so.o',
3983 # crtend_so.o needs to be the last item in libraries.
3984 # Do not add any libraries after this!
3985 '<(android_ndk_lib)/crtend_so.o',
3992 # Settings for building host targets using the system toolchain.
3993 ['_toolset=="host"', {
3995 # Due to issues in Clang build system, using ASan on 32-bit
3996 # binaries on x86_64 host is problematic.
3997 # TODO(eugenis): re-enable.
3998 '-fsanitize=address',
3999 '-w', # http://crbug.com/162783
4002 '-fsanitize=address',
4003 '-Wl,-z,noexecstack',
4004 '-Wl,--gc-sections',
4007 '-Wl,--warn-shared-textrel',
4008 '-Wl,--fatal-warnings',
4011 # Settings for building host targets on mac.
4012 ['_toolset=="host" and host_os=="mac"', {
4022 'cflags!': ['-fvisibility=hidden'],
4023 'cflags_cc!': ['-fvisibility-inlines-hidden'],
4025 ['OS=="mac" or OS=="ios"', {
4026 'target_defaults': {
4029 'ALWAYS_SEARCH_USER_PATHS': 'NO',
4030 # Don't link in libarclite_macosx.a, see http://crbug.com/156530.
4031 'CLANG_LINK_OBJC_RUNTIME': 'NO', # -fno-objc-link-runtime
4032 'COPY_PHASE_STRIP': 'NO',
4033 'GCC_C_LANGUAGE_STANDARD': 'c99', # -std=c99
4034 'GCC_CW_ASM_SYNTAX': 'NO', # No -fasm-blocks
4035 'GCC_ENABLE_CPP_EXCEPTIONS': 'NO', # -fno-exceptions
4036 'GCC_ENABLE_CPP_RTTI': 'NO', # -fno-rtti
4037 'GCC_ENABLE_PASCAL_STRINGS': 'NO', # No -mpascal-strings
4038 # GCC_INLINES_ARE_PRIVATE_EXTERN maps to -fvisibility-inlines-hidden
4039 'GCC_INLINES_ARE_PRIVATE_EXTERN': 'YES',
4040 'GCC_OBJC_CALL_CXX_CDTORS': 'YES', # -fobjc-call-cxx-cdtors
4041 'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES', # -fvisibility=hidden
4042 'GCC_THREADSAFE_STATICS': 'NO', # -fno-threadsafe-statics
4043 'GCC_TREAT_WARNINGS_AS_ERRORS': 'YES', # -Werror
4044 'GCC_VERSION': '4.2',
4045 'GCC_WARN_ABOUT_MISSING_NEWLINE': 'YES', # -Wnewline-eof
4046 'USE_HEADERMAP': 'NO',
4051 # Don't warn about unused function parameters.
4052 '-Wno-unused-parameter',
4053 # Don't warn about the "struct foo f = {0};" initialization
4055 '-Wno-missing-field-initializers',
4058 ['chromium_mac_pch', {'GCC_PRECOMPILE_PREFIX_HEADER': 'YES'},
4059 {'GCC_PRECOMPILE_PREFIX_HEADER': 'NO'}
4061 # Note that the prebuilt Clang binaries should not be used for iOS
4062 # development except for ASan builds.
4064 # gnu++11 instead of c++11 is needed because some code uses
4065 # typeof() (a GNU extension).
4066 # TODO(thakis): Eventually switch this to c++11 instead of
4067 # gnu++11 (once typeof can be removed, which is blocked on c++11
4068 # being available everywhere).
4069 'CLANG_CXX_LANGUAGE_STANDARD': 'gnu++11', # -std=gnu++11
4070 # Warn if automatic synthesis is triggered with
4071 # the -Wobjc-missing-property-synthesis flag.
4072 'CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS': 'YES',
4073 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0',
4077 # This warns on using ints as initializers for floats in
4078 # initializer lists (e.g. |int a = f(); CGSize s = { a, a };|),
4079 # which happens in several places in chrome code. Not sure if
4080 # this is worth fixing.
4081 '-Wno-c++11-narrowing',
4083 # Don't die on dtoa code that uses a char as an array index.
4084 # This is required solely for base/third_party/dmg_fp/dtoa.cc.
4085 '-Wno-char-subscripts',
4087 # TODO(thakis): This used to be implied by -Wno-unused-function,
4088 # which we no longer use. Check if it makes sense to remove
4089 # this as well. http://crbug.com/316352
4090 '-Wno-unneeded-internal-declaration',
4092 # Warns on switches on enums that cover all enum values but
4093 # also contain a default: branch. Chrome is full of that.
4094 '-Wno-covered-switch-default',
4096 # Warns when a const char[] is converted to bool.
4097 '-Wstring-conversion',
4101 ['clang_xcode==0', {
4102 'CC': '$(SOURCE_ROOT)/<(clang_dir)/clang',
4103 'LDPLUSPLUS': '$(SOURCE_ROOT)/<(clang_dir)/clang++',
4106 # Clang considers the `register` keyword as deprecated, but
4107 # e.g. code generated by flex (used in angle) contains that
4108 # keyword. http://crbug.com/255186
4110 # Note: clang as shipped with Xcode is older and does not
4111 # treat the `register` as deprecated and does not define
4112 # this flag, so don't enable it if "clang_xcode" is "1".
4113 '-Wno-deprecated-register',
4118 ['clang==1 and clang_xcode==0 and clang_use_chrome_plugins==1', {
4120 '<@(clang_chrome_plugins_flags)',
4123 ['clang==1 and clang_xcode==0 and clang_load!=""', {
4125 '-Xclang', '-load', '-Xclang', '<(clang_load)',
4128 ['clang==1 and clang_xcode==0 and clang_add_plugin!=""', {
4130 '-Xclang', '-add-plugin', '-Xclang', '<(clang_add_plugin)',
4133 ['clang==1 and "<(GENERATOR)"=="ninja"', {
4135 # See http://crbug.com/110262
4136 '-fcolor-diagnostics',
4144 'clang_dir': '../third_party/llvm-build/Release+Asserts/bin',
4150 '-fsanitize=address',
4151 '-w', # http://crbug.com/162783
4155 'ADDRESS_SANITIZER',
4156 'MEMORY_TOOL_REPLACES_ALLOCATOR',
4159 ['asan_coverage!=0', {
4160 'target_conditions': [
4161 ['_toolset=="target"', {
4163 '-mllvm -asan-coverage=<(asan_coverage)',
4169 'target_conditions': [
4170 ['_type!="static_library"', {
4171 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-search_paths_first']},
4176 '-fsanitize=address',
4180 ['mac_write_linker_maps==1', {
4183 '-Wl,-map,>(_target_name).map',
4190 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-ObjC']},
4191 'target_conditions': [
4192 ['_type=="executable"', {
4198 # Define copy_asan_dylib_path in a variable ending in
4199 # _path so that gyp understands it's a path and
4200 # performs proper relativization during dict merging.
4201 'copy_asan_dylib_path':
4202 'mac/copy_asan_runtime_dylib.sh',
4204 'postbuild_name': 'Copy ASan runtime dylib',
4206 '<(copy_asan_dylib_path)',
4215 ], # target_conditions
4216 }, # target_defaults
4217 }], # OS=="mac" or OS=="ios"
4219 'target_defaults': {
4221 # These should end with %, but there seems to be a bug with % in
4222 # variables that are intended to be set to different values in
4223 # different targets, like these.
4224 'mac_pie': 1, # Most executables can be position-independent.
4225 # Strip debugging symbols from the target.
4226 'mac_strip': '<(mac_strip_release)',
4230 ['mac_want_real_dsym=="default"', {
4233 'mac_real_dsym': '<(mac_want_real_dsym)'
4238 ['mac_want_real_dsym=="default"', {
4239 'mac_real_dsym': 0, # Fake .dSYMs are fine in most cases.
4241 'mac_real_dsym': '<(mac_want_real_dsym)'
4248 'GCC_DYNAMIC_NO_PIC': 'NO', # No -mdynamic-no-pic
4249 # (Equivalent to -fPIC)
4250 # MACOSX_DEPLOYMENT_TARGET maps to -mmacosx-version-min
4251 'MACOSX_DEPLOYMENT_TARGET': '<(mac_deployment_target)',
4252 # Keep pch files below xcodebuild/.
4253 'SHARED_PRECOMPS_DIR': '$(CONFIGURATION_BUILD_DIR)/SharedPrecompiledHeaders',
4255 # Someday this can be replaced by an 'GCC_STRICT_ALIASING': 'NO'
4256 # xcode_setting, but not until all downstream projects' mac bots are
4257 # using xcode >= 4.6, because that's when the default value of the
4258 # flag in the compiler switched. Pre-4.6, the value 'NO' for that
4259 # setting is a no-op as far as xcode is concerned, but the compiler
4260 # behaves differently based on whether -fno-strict-aliasing is
4262 '-fno-strict-aliasing', # See http://crbug.com/32204.
4265 'target_conditions': [
4266 ['_type=="executable"', {
4269 # Arranges for data (heap) pages to be protected against
4270 # code execution when running on Mac OS X 10.7 ("Lion"), and
4271 # ensures that the position-independent executable (PIE) bit
4272 # is set for ASLR when running on Mac OS X 10.5 ("Leopard").
4274 # Define change_mach_o_flags in a variable ending in _path
4275 # so that GYP understands it's a path and performs proper
4276 # relativization during dict merging.
4277 'change_mach_o_flags_path':
4278 'mac/change_mach_o_flags_from_xcode.sh',
4279 'change_mach_o_flags_options%': [
4281 'target_conditions': [
4282 ['mac_pie==0 or release_valgrind_build==1', {
4283 # Don't enable PIE if it's unwanted. It's unwanted if
4284 # the target specifies mac_pie=0 or if building for
4285 # Valgrind, because Valgrind doesn't understand slide.
4286 # See the similar mac_pie/release_valgrind_build check
4288 'change_mach_o_flags_options': [
4294 'postbuild_name': 'Change Mach-O Flags',
4296 '<(change_mach_o_flags_path)',
4297 '>@(change_mach_o_flags_options)',
4304 'asan_saves_file': 'asan.saves',
4307 'CHROMIUM_STRIP_SAVE_FILE': '<(asan_saves_file)',
4311 'target_conditions': [
4312 ['mac_pie==1 and release_valgrind_build==0', {
4313 # Turn on position-independence (ASLR) for executables. When
4314 # PIE is on for the Chrome executables, the framework will
4315 # also be subject to ASLR.
4316 # Don't do this when building for Valgrind, because Valgrind
4317 # doesn't understand slide. TODO: Make Valgrind on Mac OS X
4318 # understand slide, and get rid of the Valgrind check.
4321 '-Wl,-pie', # Position-independent executable (MH_PIE)
4327 ['(_type=="executable" or _type=="shared_library" or \
4328 _type=="loadable_module") and mac_strip!=0', {
4329 'target_conditions': [
4330 ['mac_real_dsym == 1', {
4331 # To get a real .dSYM bundle produced by dsymutil, set the
4332 # debug information format to dwarf-with-dsym. Since
4333 # strip_from_xcode will not be used, set Xcode to do the
4334 # stripping as well.
4338 'DEBUG_INFORMATION_FORMAT': 'dwarf-with-dsym',
4339 'DEPLOYMENT_POSTPROCESSING': 'YES',
4340 'STRIP_INSTALLED_PRODUCT': 'YES',
4341 'target_conditions': [
4342 ['_type=="shared_library" or _type=="loadable_module"', {
4343 # The Xcode default is to strip debugging symbols
4344 # only (-S). Local symbols should be stripped as
4345 # well, which will be handled by -x. Xcode will
4346 # continue to insert -S when stripping even when
4347 # additional flags are added with STRIPFLAGS.
4349 }], # _type=="shared_library" or _type=="loadable_module"
4350 ['_type=="executable"', {
4353 'STRIPFLAGS': '-s $(CHROMIUM_STRIP_SAVE_FILE)',
4356 }], # _type=="executable" and asan==1
4357 ], # target_conditions
4359 }, # configuration "Release"
4361 }, { # mac_real_dsym != 1
4362 # To get a fast fake .dSYM bundle, use a post-build step to
4363 # produce the .dSYM and strip the executable. strip_from_xcode
4364 # only operates in the Release configuration.
4368 # Define strip_from_xcode in a variable ending in _path
4369 # so that gyp understands it's a path and performs proper
4370 # relativization during dict merging.
4371 'strip_from_xcode_path': 'mac/strip_from_xcode',
4373 'postbuild_name': 'Strip If Needed',
4374 'action': ['<(strip_from_xcode_path)'],
4378 ], # target_conditions
4379 }], # (_type=="executable" or _type=="shared_library" or
4380 # _type=="loadable_module") and mac_strip!=0
4381 ], # target_conditions
4382 }, # target_defaults
4385 'target_defaults': {
4386 'xcode_settings' : {
4387 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0',
4389 # This next block is mostly common with the 'mac' section above,
4390 # but keying off (or setting) 'clang' isn't valid for iOS as it
4391 # also means using Chromium's build of clang.
4393 # TODO(stuartmorgan): switch to c++0x (see TODOs in the clang
4395 'CLANG_CXX_LANGUAGE_STANDARD': 'gnu++0x',
4396 # Warn if automatic synthesis is triggered with
4397 # the -Wobjc-missing-property-synthesis flag.
4398 'CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS': 'YES',
4401 # Don't die on dtoa code that uses a char as an array index.
4402 # This is required solely for base/third_party/dmg_fp/dtoa.cc.
4403 '-Wno-char-subscripts',
4404 # See comment in the mac clang section above for this flag.
4405 '-Wno-unneeded-internal-declaration',
4406 # Match OS X clang C++11 warning settings.
4407 '-Wno-c++11-narrowing',
4410 # Limit the valid architectures depending on "target_subarch".
4411 # This need to include the "arm" architectures but also the "x86"
4412 # ones (they are used when building for the simulator).
4414 ['target_subarch=="arm32"', {
4415 'VALID_ARCHS': ['armv7', 'i386'],
4417 ['target_subarch=="arm64"', {
4418 'VALID_ARCHS': ['arm64', 'x86_64'],
4420 ['target_subarch=="both"', {
4421 'VALID_ARCHS': ['arm64', 'armv7', 'x86_64', 'i386'],
4425 'target_conditions': [
4426 ['_toolset=="host"', {
4428 'SDKROOT': 'macosx<(mac_sdk)', # -isysroot
4429 'MACOSX_DEPLOYMENT_TARGET': '<(mac_deployment_target)',
4438 ['_toolset=="target"', {
4440 # This section should be for overriding host settings. But,
4441 # since we can't negate the iphone deployment target above, we
4442 # instead set it here for target only.
4443 'IPHONEOS_DEPLOYMENT_TARGET': '<(ios_deployment_target)',
4444 'ARCHS': ['$(ARCHS_STANDARD_INCLUDING_64_BIT)'],
4447 ['_type=="executable"', {
4451 'DEPLOYMENT_POSTPROCESSING': 'YES',
4452 'STRIP_INSTALLED_PRODUCT': 'YES',
4457 # Remove dSYM to reduce build time.
4458 'DEBUG_INFORMATION_FORMAT': 'dwarf',
4464 ['chromium_ios_signing', {
4465 # iOS SDK wants everything for device signed.
4466 'CODE_SIGN_IDENTITY[sdk=iphoneos*]': 'iPhone Developer',
4468 'CODE_SIGNING_REQUIRED': 'NO',
4469 'CODE_SIGN_IDENTITY[sdk=iphoneos*]': '',
4474 ], # target_conditions
4475 }, # target_defaults
4478 'target_defaults': {
4480 '_WIN32_WINNT=0x0602',
4487 'CERT_CHAIN_PARA_HAS_EXTRA_FIELDS',
4488 'WIN32_LEAN_AND_MEAN',
4492 ['buildtype=="Official"', {
4493 # In official builds, targets can self-select an optimization
4494 # level by defining a variable named 'optimize', and setting it
4496 # - "size", optimizes for minimal code size - the default.
4497 # - "speed", optimizes for speed over code size.
4498 # - "max", whole program optimization and link-time code
4499 # generation. This is very expensive and should be used
4502 'optimize%': 'size',
4504 'target_conditions': [
4505 ['optimize=="size"', {
4507 'VCCLCompilerTool': {
4508 # 1, optimizeMinSpace, Minimize Size (/O1)
4509 'Optimization': '1',
4510 # 2, favorSize - Favor small code (/Os)
4511 'FavorSizeOrSpeed': '2',
4516 ['optimize=="speed"', {
4518 'VCCLCompilerTool': {
4519 # 2, optimizeMaxSpeed, Maximize Speed (/O2)
4520 'Optimization': '2',
4521 # 1, favorSpeed - Favor fast code (/Ot)
4522 'FavorSizeOrSpeed': '1',
4527 ['optimize=="max"', {
4529 'VCCLCompilerTool': {
4530 # 2, optimizeMaxSpeed, Maximize Speed (/O2)
4531 'Optimization': '2',
4532 # 1, favorSpeed - Favor fast code (/Ot)
4533 'FavorSizeOrSpeed': '1',
4534 # This implies link time code generation.
4535 'WholeProgramOptimization': 'true',
4543 ['component=="static_library"', {
4545 '_HAS_EXCEPTIONS=0',
4558 'AdditionalLibraryDirectories':
4559 ['<(windows_driver_kit_path)/lib/ATL/i386'],
4561 'VCLibrarianTool': {
4562 'AdditionalLibraryDirectories':
4563 ['<(windows_driver_kit_path)/lib/ATL/i386'],
4569 'VCLibrarianTool': {
4570 'AdditionalLibraryDirectories':
4571 ['<(windows_driver_kit_path)/lib/ATL/amd64'],
4574 'AdditionalLibraryDirectories':
4575 ['<(windows_driver_kit_path)/lib/ATL/amd64'],
4582 # Explicitly required when using the ATL with express
4583 'AdditionalDependencies': ['atlthunk.lib'],
4585 # ATL 8.0 included in WDK 7.1 makes the linker to generate
4586 # almost eight hundred LNK4254 and LNK4078 warnings:
4587 # - warning LNK4254: section 'ATL' (50000040) merged into
4588 # '.rdata' (40000040) with different attributes
4589 # - warning LNK4078: multiple 'ATL' sections found with
4590 # different attributes
4591 'AdditionalOptions': ['/ignore:4254', '/ignore:4078'],
4594 'msvs_system_include_dirs': [
4595 '<(windows_driver_kit_path)/inc/atl71',
4596 '<(windows_driver_kit_path)/inc/mfc42',
4598 'target_conditions': [
4599 ['chromium_code and MSVS_VERSION=="2010e"', {
4600 # Workaround for intsafe in 2010 Express + WDK.
4601 # ATL code uses intsafe.h and both intsafe.h and stdint.h
4602 # define INT8_MIN et al.
4603 # We can't use this workaround in third_party code because
4604 # it has various levels of intolerance for including stdint.h.
4605 # This is not necessary in 2013e, and should be removed once
4606 # mainline is switched: http://crbug.com/340358.
4607 'msvs_system_include_dirs': [
4611 'VCCLCompilerTool': {
4612 'ForcedIncludeFiles': [ 'intsafe_workaround.h', ],
4619 'msvs_system_include_dirs': [
4620 '<(windows_sdk_path)/Include/shared',
4621 '<(windows_sdk_path)/Include/um',
4622 '<(windows_sdk_path)/Include/winrt',
4623 '$(VSInstallDir)/VC/atlmfc/include',
4625 'msvs_cygwin_shell': 0,
4626 'msvs_disabled_warnings': [4351, 4355, 4396, 4503, 4819,
4627 # TODO(maruel): These warnings are level 4. They will be slowly
4628 # removed as code is fixed.
4629 4100, 4121, 4125, 4127, 4130, 4131, 4189, 4201, 4238, 4244, 4245,
4630 4310, 4428, 4481, 4505, 4510, 4512, 4530, 4610, 4611, 4701, 4702,
4634 'VCCLCompilerTool': {
4635 'AdditionalOptions': ['/MP'],
4636 'MinimalRebuild': 'false',
4637 'BufferSecurityCheck': 'true',
4638 'EnableFunctionLevelLinking': 'true',
4639 'RuntimeTypeInfo': 'false',
4640 'WarningLevel': '4',
4641 'WarnAsError': 'true',
4642 'DebugInformationFormat': '3',
4644 ['component=="shared_library"', {
4645 'ExceptionHandling': '1', # /EHsc
4647 'ExceptionHandling': '0',
4651 'VCLibrarianTool': {
4652 'AdditionalOptions': ['/ignore:4221'],
4653 'AdditionalLibraryDirectories': [
4654 '<(windows_sdk_path)/Lib/win8/um/x86',
4658 'AdditionalDependencies': [
4670 'AdditionalLibraryDirectories': [
4671 '<(windows_sdk_path)/Lib/win8/um/x86',
4673 'GenerateDebugInformation': 'true',
4674 'MapFileName': '$(OutDir)\\$(TargetName).map',
4675 'ImportLibrary': '$(OutDir)\\lib\\$(TargetName).lib',
4676 'FixedBaseAddress': '1',
4679 # 1 == /SUBSYSTEM:CONSOLE
4680 # 2 == /SUBSYSTEM:WINDOWS
4681 # Most of the executables we'll ever create are tests
4682 # and utilities with console output.
4686 'GenerateStublessProxies': 'true',
4687 'TypeLibraryName': '$(InputName).tlb',
4688 'OutputDirectory': '$(IntDir)',
4689 'HeaderFileName': '$(InputName).h',
4690 'DLLDataFileName': '$(InputName).dlldata.c',
4691 'InterfaceIdentifierFileName': '$(InputName)_i.c',
4692 'ProxyFileName': '$(InputName)_p.c',
4694 'VCResourceCompilerTool': {
4696 'AdditionalIncludeDirectories': [
4698 '<(SHARED_INTERMEDIATE_DIR)',
4701 'target_conditions': [
4702 ['_type=="executable" and ">(win_exe_compatibility_manifest)"!=""', {
4704 'AdditionalManifestFiles': [
4705 '>(win_exe_compatibility_manifest)',
4709 ['_type=="executable" and >(win_use_external_manifest)==0', {
4711 'EmbedManifest': 'true',
4714 ['_type=="executable" and >(win_use_external_manifest)==1', {
4716 'EmbedManifest': 'false',
4722 # Building with Clang on Windows is a work in progress and very
4723 # experimental. See crbug.com/82385.
4724 'VCCLCompilerTool': {
4725 'WarnAsError': 'false',
4726 'RuntimeTypeInfo': 'false',
4727 'AdditionalOptions': [
4730 # Many files use intrinsics without including this header.
4731 # TODO(hans): Fix those files, or move this to sub-GYPs.
4734 # TODO(hans): Make this list shorter eventually.
4735 '-Qunused-arguments',
4736 '-Wno-c++11-compat-deprecated-writable-strings',
4737 '-Wno-char-subscripts',
4738 '-Wno-deprecated-declarations',
4739 '-Wno-deprecated-register',
4741 '-Wno-enum-conversion',
4742 '-Wno-extra-tokens',
4743 '-Wno-ignored-attributes',
4744 '-Wno-incompatible-pointer-types',
4745 '-Wno-int-to-void-pointer-cast',
4746 '-Wno-invalid-noreturn',
4747 '-Wno-logical-op-parentheses',
4749 '-Wno-missing-braces',
4750 '-Wno-missing-declarations',
4751 '-Wno-msvc-include',
4752 '-Wno-null-dereference',
4753 '-Wno-overloaded-virtual',
4755 '-Wno-pointer-sign',
4757 '-Wno-return-type-c-linkage',
4759 '-Wno-sometimes-uninitialized',
4761 '-Wno-tautological-compare',
4762 '-Wno-unknown-pragmas',
4764 '-Wno-unused-function',
4765 '-Wno-unused-private-field',
4766 '-Wno-unused-value',
4767 '-Wno-unused-variable',
4772 ['MSVS_VERSION=="2013" or MSVS_VERSION=="2013e"', {
4773 'VCCLCompilerTool': {
4774 'AdditionalOptions': [
4775 '-fmsc-version=1800',
4779 ['MSVS_VERSION=="2010" or MSVS_VERSION=="2010e"', {
4780 'VCCLCompilerTool': {
4781 'AdditionalOptions': [
4782 '-fmsc-version=1600',
4792 ['disable_nacl==1', {
4793 'target_defaults': {
4799 ['OS=="win" and msvs_use_common_linker_extras', {
4800 'target_defaults': {
4815 'AdditionalOptions': [
4824 'AdditionalOptions': ['/largeaddressaware'],
4833 'AdditionalOptions': [
4834 # safeseh is not compatible with x64
4846 ['enable_new_npdevice_api==1', {
4847 'target_defaults': {
4849 'ENABLE_NEW_NPDEVICE_API',
4853 # Don't warn about the "typedef 'foo' locally defined but not used"
4855 # TODO: remove this flag once all builds work. See crbug.com/227506
4856 ['gcc_version>=48', {
4857 'target_defaults': {
4859 '-Wno-unused-local-typedefs',
4863 ['clang==1 and ((OS!="mac" and OS!="ios") or clang_xcode==0) '
4865 'make_global_settings': [
4866 ['CC', '<(make_clang_dir)/bin/clang'],
4867 ['CXX', '<(make_clang_dir)/bin/clang++'],
4868 ['CC.host', '$(CC)'],
4869 ['CXX.host', '$(CXX)'],
4872 ['clang==1 and OS=="win"', {
4873 'make_global_settings': [
4874 # On Windows, gyp's ninja generator only looks at CC.
4875 ['CC', '<(make_clang_dir)/bin/clang-cl'],
4878 ['OS=="android" and clang==0', {
4879 # Hardcode the compiler names in the Makefile so that
4880 # it won't depend on the environment at make time.
4881 'make_global_settings': [
4882 ['CC', '<!(/bin/echo -n <(android_toolchain)/*-gcc)'],
4883 ['CXX', '<!(/bin/echo -n <(android_toolchain)/*-g++)'],
4884 ['CC.host', '<!(which gcc)'],
4885 ['CXX.host', '<!(which g++)'],
4888 ['OS=="linux" and target_arch=="mipsel"', {
4889 'make_global_settings': [
4890 ['CC', '<(sysroot)/../bin/mipsel-linux-gnu-gcc'],
4891 ['CXX', '<(sysroot)/../bin/mipsel-linux-gnu-g++'],
4892 ['CC.host', '<!(which gcc)'],
4893 ['CXX.host', '<!(which g++)'],
4897 # TODO(yyanagisawa): supports GENERATOR==make
4898 # make generator doesn't support CC_wrapper without CC
4899 # in make_global_settings yet.
4900 ['use_goma==1 and ((OS!="mac" and OS!="ios") or clang_xcode==0) and '
4901 '("<(GENERATOR)"=="ninja" or clang==1)', {
4902 'make_global_settings': [
4903 ['CC_wrapper', '<(gomadir)/gomacc'],
4904 ['CXX_wrapper', '<(gomadir)/gomacc'],
4905 ['CC.host_wrapper', '<(gomadir)/gomacc'],
4906 ['CXX.host_wrapper', '<(gomadir)/gomacc'],
4911 # DON'T ADD ANYTHING NEW TO THIS BLOCK UNLESS YOU REALLY REALLY NEED IT!
4912 # This block adds *project-wide* configuration settings to each project
4913 # file. It's almost always wrong to put things here. Specify your
4914 # custom xcode_settings in target_defaults to add them to targets instead.
4917 # In an Xcode Project Info window, the "Base SDK for All Configurations"
4918 # setting sets the SDK on a project-wide basis. In order to get the
4919 # configured SDK to show properly in the Xcode UI, SDKROOT must be set
4920 # here at the project level.
4923 ['mac_sdk_path==""', {
4924 'SDKROOT': 'macosx<(mac_sdk)', # -isysroot
4926 'SDKROOT': '<(mac_sdk_path)', # -isysroot
4932 ['ios_sdk_path==""', {
4934 # TODO(justincohen): Ninja only supports simulator for now.
4935 ['"<(GENERATOR)"=="xcode"', {
4936 'SDKROOT': 'iphoneos<(ios_sdk)', # -isysroot
4938 'SDKROOT': 'iphonesimulator<(ios_sdk)', # -isysroot
4942 'SDKROOT': '<(ios_sdk_path)', # -isysroot
4947 # Target both iPhone and iPad.
4948 'TARGETED_DEVICE_FAMILY': '1,2',
4951 ['target_arch=="x64"', {
4956 ['target_arch=="ia32"', {
4965 # The Xcode generator will look for an xcode_settings section at the root
4966 # of each dict and use it to apply settings on a file-wide basis. Most
4967 # settings should not be here, they should be in target-specific
4968 # xcode_settings sections, or better yet, should use non-Xcode-specific
4969 # settings in target dicts. SYMROOT is a special case, because many other
4970 # Xcode variables depend on it, including variables such as
4971 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something
4972 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the
4973 # files to appear (when present) in the UI as actual files and not red
4974 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR,
4975 # and therefore SYMROOT, needs to be set at the project level.
4976 'SYMROOT': '<(DEPTH)/xcodebuild',