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 # Copy conditionally-set variables out one scope.
37 'chromeos%': '<(chromeos)',
38 'use_aura%': '<(use_aura)',
39 'use_ash%': '<(use_ash)',
40 'use_cras%': '<(use_cras)',
41 'use_ozone%': '<(use_ozone)',
43 # Whether we are using Views Toolkit
46 # Use OpenSSL instead of NSS. Under development: see http://crbug.com/62803
49 # Disable viewport meta tag by default.
50 'enable_viewport%': 0,
52 # Enable HiDPI support.
55 # Enable touch optimized art assets and metrics.
56 'enable_touch_ui%': 0,
58 # Override buildtype to select the desired build flavor.
59 # Dev - everyday build for development/testing
60 # Official - release build (generally implies additional processing)
61 # TODO(mmoss) Once 'buildtype' is fully supported (e.g. Windows gyp
62 # conversion is done), some of the things which are now controlled by
63 # 'branding', such as symbol generation, will need to be refactored
64 # based on 'buildtype' (i.e. we don't care about saving symbols for
65 # non-Official # builds).
68 # Override branding to select the desired branding flavor.
69 'branding%': 'Chromium',
72 # ChromeOS implies ash.
78 # For now, Windows builds that |use_aura| should also imply using
79 # ash. This rule should be removed for the future when Windows is
80 # using the aura windows without the ash interface.
81 ['use_aura==1 and OS=="win"', {
88 # Compute the architecture that we're building on.
89 ['OS=="win" or OS=="mac" or OS=="ios"', {
92 # This handles the Unix platforms for which there is some support.
93 # Anything else gets passed through, which probably won't work
94 # very well; such hosts should pass an explicit target_arch to
97 '<!(uname -m | sed -e "s/i.86/ia32/;s/x86_64/x64/;s/amd64/x64/;s/arm.*/arm/;s/i86pc/ia32/")',
101 # Copy conditionally-set variables out one scope.
102 'chromeos%': '<(chromeos)',
103 'use_aura%': '<(use_aura)',
104 'use_ash%': '<(use_ash)',
105 'use_cras%': '<(use_cras)',
106 'use_ozone%': '<(use_ozone)',
107 'use_openssl%': '<(use_openssl)',
108 'enable_viewport%': '<(enable_viewport)',
109 'enable_hidpi%': '<(enable_hidpi)',
110 'enable_touch_ui%': '<(enable_touch_ui)',
111 'buildtype%': '<(buildtype)',
112 'branding%': '<(branding)',
113 'host_arch%': '<(host_arch)',
115 # Default architecture we're building for is the architecture we're
117 'target_arch%': '<(host_arch)',
119 # This is set when building the Android WebView inside the Android
120 # build system, using the 'android' gyp backend. The WebView code is
121 # still built when this is unset, but builds using the normal chromium
123 'android_webview_build%': 0,
125 # Sets whether chrome is built for google tv device.
128 # Set ARM architecture version.
132 # Set default value of toolkit_views based on OS.
133 ['OS=="win" or chromeos==1 or use_aura==1', {
139 # Set toolkit_uses_gtk for the Chromium browser on Linux.
140 ['(OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris") and use_aura==0 and use_ozone==0', {
141 'toolkit_uses_gtk%': 1,
143 'toolkit_uses_gtk%': 0,
146 # Enable HiDPI on Mac OS and Chrome OS.
147 ['OS=="mac" or chromeos==1', {
151 # Enable touch UI on Metro.
153 'enable_touch_ui%': 1,
156 # Enable App Launcher only on ChromeOS, Windows and OSX.
157 ['use_ash==1 or OS=="win" or OS=="mac"', {
158 'enable_app_list%': 1,
160 'enable_app_list%': 0,
163 ['use_aura==1 or (OS!="win" and OS!="mac" and OS!="ios" and OS!="android")', {
164 'use_default_render_theme%': 1,
166 'use_default_render_theme%': 0,
169 # TODO(thestig) Remove the linux_lsb_release check after all the
170 # official Ubuntu Lucid builder are gone.
171 ['OS=="linux" and branding=="Chrome" and buildtype=="Official" and chromeos==0', {
172 'linux_lsb_release%': '<!(lsb_release -r -s)',
174 'linux_lsb_release%': '',
175 }], # OS=="linux" and branding=="Chrome" and buildtype=="Official" and chromeos==0
179 # Copy conditionally-set variables out one scope.
180 'chromeos%': '<(chromeos)',
181 'host_arch%': '<(host_arch)',
182 'target_arch%': '<(target_arch)',
183 'toolkit_views%': '<(toolkit_views)',
184 'toolkit_uses_gtk%': '<(toolkit_uses_gtk)',
185 'use_aura%': '<(use_aura)',
186 'use_ash%': '<(use_ash)',
187 'use_cras%': '<(use_cras)',
188 'use_ozone%': '<(use_ozone)',
189 'use_openssl%': '<(use_openssl)',
190 'enable_viewport%': '<(enable_viewport)',
191 'enable_hidpi%': '<(enable_hidpi)',
192 'enable_touch_ui%': '<(enable_touch_ui)',
193 'android_webview_build%': '<(android_webview_build)',
194 'google_tv%': '<(google_tv)',
195 'enable_app_list%': '<(enable_app_list)',
196 'use_default_render_theme%': '<(use_default_render_theme)',
197 'buildtype%': '<(buildtype)',
198 'branding%': '<(branding)',
199 'arm_version%': '<(arm_version)',
200 'linux_lsb_release%': '<(linux_lsb_release)',
202 # Set to 1 to enable fast builds. Set to 2 for even faster builds
203 # (it disables debug info for fastest compilation - only for use
204 # on compile-only bots).
207 # Set to 1 to enable dcheck in release without having to use the flag.
208 'dcheck_always_on%': 0,
210 # Set to 1 to make a build that logs like an official build, but is not
211 # necessarily an official build, ie DCHECK and DLOG are disabled and
212 # removed completely in release builds, to minimize binary footprint.
213 # Note: this setting is ignored if buildtype=="Official".
214 'logging_like_official_build%': 0,
216 # Set to 1 to make a build that disables unshipped tracing events.
217 # Note: this setting is ignored if buildtype=="Official".
218 'tracing_like_official_build%': 0,
220 # Disable file manager component extension by default.
221 'file_manager_extension%': 0,
223 # Disable image loader component extension by default.
224 'image_loader_extension%': 0,
227 'python_ver%': '2.6',
230 # Set NEON compilation flags.
233 # Detect NEON support at run-time.
234 'arm_neon_optional%': 0,
236 # The system root for cross-compiles. Default: none.
239 # The system libdir used for this ABI.
240 'system_libdir%': 'lib',
242 # On Linux, we build with sse2 for Chromium builds.
245 # Use libjpeg-turbo as the JPEG codec used by Chromium.
246 'use_libjpeg_turbo%': 1,
248 # Use system libjpeg. Note that the system's libjepg will be used even if
249 # use_libjpeg_turbo is set.
250 'use_system_libjpeg%': 0,
252 # By default, component is set to static_library and it can be overriden
253 # by the GYP command line or by ~/.gyp/include.gypi.
254 'component%': 'static_library',
256 # Set to select the Title Case versions of strings in GRD files.
257 'use_titlecase_in_grd_files%': 0,
259 # Use translations provided by volunteers at launchpad.net. This
260 # currently only works on Linux.
261 'use_third_party_translations%': 0,
263 # Remoting compilation is enabled by default. Set to 0 to disable.
266 # Configuration policy is enabled by default. Set to 0 to disable.
267 'configuration_policy%': 1,
269 # Variable safe_browsing is used to control the build time configuration
270 # for safe browsing feature. Safe browsing can be compiled in 3 different
271 # levels: 0 disables it, 1 enables it fully, and 2 enables only UI and
272 # reporting features without enabling phishing and malware detection. This
273 # is useful to integrate a third party phishing/malware detection to
274 # existing safe browsing logic.
277 # Speech input is compiled in by default. Set to 0 to disable.
280 # Notifications are compiled in by default. Set to 0 to disable.
281 'notifications%' : 1,
283 # Use dsymutil to generate real .dSYM files on Mac. The default is 0 for
284 # regular builds and 1 for ASan builds.
285 'mac_want_real_dsym%': 'default',
287 # If this is set, the clang plugins used on the buildbot will be used.
288 # Run tools/clang/scripts/update.sh to make sure they are compiled.
289 # This causes 'clang_chrome_plugins_flags' to be set.
290 # Has no effect if 'clang' is not set as well.
291 'clang_use_chrome_plugins%': 1,
293 # Enable building with ASAN (Clang's -fsanitize=address option).
294 # -fsanitize=address only works with clang, but asan=1 implies clang=1
295 # See https://sites.google.com/a/chromium.org/dev/developers/testing/addresssanitizer
298 # Enable building with LSan (Clang's -fsanitize=leak option).
299 # -fsanitize=leak only works with clang, but lsan=1 implies clang=1
300 # See https://sites.google.com/a/chromium.org/dev/developers/testing/leaksanitizer
303 # Enable building with TSAN (Clang's -fsanitize=thread option).
304 # -fsanitize=thread only works with clang, but tsan=1 implies clang=1
305 # See http://clang.llvm.org/docs/ThreadSanitizer.html
307 'tsan_blacklist%': '<(PRODUCT_DIR)/../../tools/valgrind/tsan_v2/ignores.txt',
309 # Enable building with MSAN (Clang's -fsanitize=memory option).
310 # MemorySanitizer only works with clang, but msan=1 implies clang=1
311 # See http://clang.llvm.org/docs/MemorySanitizer.html
314 # Use a modified version of Clang to intercept allocated types and sizes
315 # for allocated objects. clang_type_profiler=1 implies clang=1.
316 # See http://dev.chromium.org/developers/deep-memory-profiler/cpp-object-type-identifier
317 # TODO(dmikurube): Support mac. See http://crbug.com/123758#c11
318 'clang_type_profiler%': 0,
320 # Set to true to instrument the code with function call logger.
321 # See src/third_party/cygprofile/cyg-profile.cc for details.
322 'order_profiling%': 0,
324 # Use the provided profiled order file to link Chrome image with it.
325 # This makes Chrome faster by better using CPU cache when executing code.
326 # This is known as PGO (profile guided optimization).
327 # See https://sites.google.com/a/google.com/chrome-msk/dev/boot-speed-up-effort
328 'order_text_section%' : "",
330 # Set to 1 compile with -fPIC cflag on linux. This is a must for shared
331 # libraries on linux x86-64 and arm, plus ASLR.
334 # Whether one-click signin is enabled or not.
335 'enable_one_click_signin%': 0,
337 # Enable Chrome browser extensions
338 'enable_extensions%': 1,
340 # Enable browser automation.
341 'enable_automation%': 1,
344 'enable_google_now%': 1,
346 # Enable printing support and UI. This variable is used to configure
347 # which parts of printing will be built. 0 disables printing completely,
348 # 1 enables it fully, and 2 enables only the codepath to generate a
349 # Metafile (e.g. usually a PDF or EMF) and disables print preview, cloud
351 'enable_printing%': 1,
353 # Enable spell checker.
354 'enable_spellcheck%': 1,
356 # Webrtc compilation is enabled by default. Set to 0 to disable.
359 # Enables use of the session service, which is enabled by default.
360 # Support for disabling depends on the platform.
361 'enable_session_service%': 1,
363 # Enables theme support, which is enabled by default. Support for
364 # disabling depends on the platform.
367 # Enables autofill dialog and associated features; disabled by default.
368 'enable_autofill_dialog%' : 0,
370 # Enables support for background apps.
371 'enable_background%': 1,
373 # Enable the task manager by default.
374 'enable_task_manager%': 1,
376 # Enable FTP support by default.
377 'disable_ftp_support%': 0,
379 # XInput2 multitouch support is disabled by default (use_xi2_mt=0).
380 # Setting to non-zero value enables XI2 MT. When XI2 MT is enabled,
381 # the input value also defines the required XI2 minor minimum version.
382 # For example, use_xi2_mt=2 means XI2.2 or above version is required.
385 # Use of precompiled headers on Windows.
387 # This variable may be explicitly set to 1 (enabled) or 0
388 # (disabled) in ~/.gyp/include.gypi or via the GYP command line.
389 # This setting will override the default.
392 # http://code.google.com/p/chromium/wiki/WindowsPrecompiledHeaders
394 'chromium_win_pch%': 0,
396 # Set this to true when building with Clang.
397 # See http://code.google.com/p/chromium/wiki/Clang for details.
400 # Enable plug-in installation by default.
401 'enable_plugin_installation%': 1,
403 # Enable PPAPI and NPAPI by default.
404 # TODO(nileshagrawal): Make this flag enable/disable NPAPI as well
405 # as PPAPI; see crbug.com/162667.
406 'enable_plugins%': 1,
408 # Specifies whether to use canvas_skia.cc in place of platform
409 # specific implementations of gfx::Canvas. Affects text drawing in the
411 # TODO(asvitkine): Enable this on all platforms and delete this flag.
412 # http://crbug.com/105550
413 'use_canvas_skia%': 0,
415 # Set to "tsan", "memcheck", or "drmemory" to configure the build to work
416 # with one of those tools.
417 'build_for_tool%': '',
419 # If no directory is specified then a temporary directory will be used.
420 'test_isolation_outdir%': '',
421 # True if isolate should fail if the isolate files refer to files
423 'test_isolation_fail_on_missing': 0,
425 'sas_dll_path%': '<(DEPTH)/third_party/platformsdk_win7/files/redist/x86',
426 'wix_path%': '<(DEPTH)/third_party/wix',
428 # Managed users are enabled by default.
429 'enable_managed_users%': 1,
431 # Platform natively supports discardable memory.
432 'native_discardable_memory%': 0,
434 # Platform sends memory pressure signals natively.
435 'native_memory_pressure_signals%': 0,
437 'spdy_proxy_auth_origin%' : '',
438 'spdy_proxy_auth_property%' : '',
439 'spdy_proxy_auth_value%' : '',
443 # A flag for POSIX platforms
450 # A flag for BSD platforms
451 ['OS=="freebsd" or OS=="openbsd"', {
457 # Set armv7 for backward compatibility.
465 ['(OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris") and use_openssl==0', {
471 # Flags to use X11 on non-Mac POSIX platforms.
472 ['OS=="win" or OS=="mac" or OS=="ios" or OS=="android" or use_ozone==1', {
478 # Flags to use pango and glib on non-Mac POSIX platforms.
479 ['OS=="win" or OS=="mac" or OS=="ios" or OS=="android"', {
487 # We always use skia text rendering in Aura on Windows, since GDI
488 # doesn't agree with our BackingStore.
489 # TODO(beng): remove once skia text rendering is on by default.
490 ['use_aura==1 and OS=="win"', {
491 'enable_skia_text%': 1,
494 # A flag to enable or disable our compile-time dependency
495 # on gnome-keyring. If that dependency is disabled, no gnome-keyring
496 # support will be available. This option is useful
497 # for Linux distributions and for Aura.
498 ['chromeos==1 or use_aura==1', {
499 'use_gnome_keyring%': 0,
501 'use_gnome_keyring%': 1,
504 ['toolkit_uses_gtk==1 or OS=="mac" or OS=="ios"', {
505 # GTK+, Mac and iOS want Title Case strings
506 'use_titlecase_in_grd_files%': 1,
509 # Enable file manager and image loader extensions on Chrome OS.
511 'file_manager_extension%': 1,
512 'image_loader_extension%': 1,
514 'file_manager_extension%': 0,
515 'image_loader_extension%': 0,
518 ['OS=="win" or OS=="mac" or (OS=="linux" and chromeos==0)', {
519 'enable_one_click_signin%': 1,
523 'enable_automation%': 0,
524 'enable_extensions%': 0,
525 'enable_google_now%': 0,
526 'enable_spellcheck%': 0,
530 'arm_neon_optional%': 1,
531 'native_discardable_memory%': 1,
532 'native_memory_pressure_signals%': 1,
535 # Enable basic printing for Chrome for Android but disable printing
536 # completely for WebView.
537 ['OS=="android" and android_webview_build==0', {
538 'enable_printing%': 2,
540 ['OS=="android" and android_webview_build==1', {
541 'enable_printing%': 0,
544 # Android OS includes support for proprietary codecs regardless of
545 # building Chromium or Google Chrome. We also ship Google Chrome with
546 # proprietary codecs.
547 ['OS=="android" or branding=="Chrome"', {
548 'proprietary_codecs%': 1,
550 'proprietary_codecs%': 0,
553 # Enable autofill dialog for Android, Mac and Views-enabled platforms.
554 ['toolkit_views==1 or (OS=="android" and android_webview_build==0) or OS=="mac"', {
555 'enable_autofill_dialog%': 1
558 ['OS=="android" and android_webview_build==0', {
562 # Disable WebRTC for building WebView as part of Android system.
563 # TODO(boliu): Decide if we want WebRTC, and if so, also merge
564 # the necessary third_party repositories.
565 ['OS=="android" and android_webview_build==1', {
570 'configuration_policy%': 0,
571 'disable_ftp_support%': 1,
572 'enable_automation%': 0,
573 'enable_extensions%': 0,
574 'enable_google_now%': 0,
575 'enable_printing%': 0,
576 'enable_session_service%': 0,
582 'enable_managed_users%': 0,
585 # Use GPU accelerated cross process image transport by default
586 # on linux builds with the Aura window manager
587 ['use_aura==1 and OS=="linux"', {
588 'ui_compositor_image_transport%': 1,
590 'ui_compositor_image_transport%': 0,
593 # Turn precompiled headers on by default.
594 ['OS=="win" and buildtype!="Official"', {
595 'chromium_win_pch%': 1
598 ['chromeos==1 or OS=="android" or OS=="ios"', {
599 'enable_plugin_installation%': 0,
601 'enable_plugin_installation%': 1,
604 ['(OS=="android" and google_tv!=1) or OS=="ios"', {
605 'enable_plugins%': 0,
607 'enable_plugins%': 1,
610 # linux_use_gold_binary: whether to use the binary checked into
611 # third_party/gold. Gold is not used for 32-bit linux builds
612 # as it runs out of address space.
613 ['OS=="linux" and (target_arch=="x64" or target_arch=="arm")', {
614 'linux_use_gold_binary%': 1,
616 'linux_use_gold_binary%': 0,
619 # linux_use_gold_flags: whether to use build flags that rely on gold.
620 # On by default for x64 Linux. Temporarily off for ChromeOS as
621 # it failed on a buildbot.
622 ['OS=="linux" and target_arch=="x64" and chromeos==0', {
623 'linux_use_gold_flags%': 1,
625 'linux_use_gold_flags%': 0,
629 'linux_use_libgps%': 1,
631 # Do not use libgps on desktop Linux by default,
632 # see http://crbug.com/103751.
633 'linux_use_libgps%': 0,
636 ['OS=="android" or OS=="ios"', {
637 'enable_captive_portal_detection%': 0,
639 'enable_captive_portal_detection%': 1,
642 # Enable Skia UI text drawing incrementally on different platforms.
643 # http://crbug.com/105550
645 # On Aura, this allows per-tile painting to be used in the browser
647 ['OS!="mac" and OS!="android"', {
648 'use_canvas_skia%': 1,
652 # When building for ChromeOS we dont want Chromium to use libjpeg_turbo.
653 'use_libjpeg_turbo%': 0,
657 # When building as part of the Android system, use system libraries
658 # where possible to reduce ROM size.
659 'use_system_libjpeg%': '<(android_webview_build)',
662 # Do not enable the Settings App on ChromeOS.
663 ['enable_app_list==1 and chromeos==0', {
664 'enable_settings_app%': 1,
666 'enable_settings_app%': 0,
669 ['OS=="linux" and target_arch=="arm" and chromeos==0', {
670 # Set some defaults for arm/linux chrome builds
671 'linux_use_tcmalloc%': 0,
672 # sysroot needs to be an absolute path otherwise it generates
673 # incorrect results when passed to pkg-config
674 'sysroot%': '<!(cd <(DEPTH) && pwd -P)/arm-sysroot',
675 }], # OS=="linux" and target_arch=="arm" and chromeos==0
677 ['linux_lsb_release=="12.04"', {
679 ['target_arch=="x64"', {
680 'sysroot%': '<!(cd <(DEPTH) && pwd -P)/chrome/installer/linux/debian_wheezy_amd64-sysroot',
682 ['target_arch=="ia32"', {
683 'sysroot%': '<!(cd <(DEPTH) && pwd -P)/chrome/installer/linux/debian_wheezy_i386-sysroot',
686 }], # linux_lsb_release=="12.04"
688 ['OS=="linux" and target_arch=="mipsel"', {
689 'sysroot%': '<!(cd <(DEPTH) && pwd -P)/mipsel-sysroot/sysroot',
690 'CXX%': '<!(cd <(DEPTH) && pwd -P)/mipsel-sysroot/bin/mipsel-linux-gnu-gcc',
693 # Whether tests targets should be run, archived or just have the
694 # dependencies verified. All the tests targets have the '_run' suffix,
695 # e.g. base_unittests_run runs the target base_unittests. The test
696 # target always calls tools/swarm_client/isolate.py. See the script's
697 # --help for more information and the valid --mode values. Meant to be
698 # overriden with GYP_DEFINES.
699 # TODO(maruel): Remove the conditions as more configurations are
701 # TODO(csharp): Remove OS!="mac" once xcode can run the isolate code
703 # NOTE: The check for disable_nacl==0 and component=="static_library"
704 # can't be used here because these variables are not defined yet, but it
705 # is still not supported.
706 ['OS!="mac" and OS!="ios" and OS!="android" and chromeos==0', {
707 'test_isolation_mode%': 'check',
709 'test_isolation_mode%': 'noop',
711 # Whether Android ARM build uses OpenMAX DL FFT.
712 ['OS=="android" and target_arch=="arm" and android_webview_build==0', {
713 # Currently only supported on Android ARM, without webview.
714 # When enabled, this will also enable WebAudio on Android
715 # ARM. Default is enabled.
716 'use_openmax_dl_fft%': 1,
718 'use_openmax_dl_fft%': 0,
720 ['OS=="win" or OS=="linux"', {
724 # Turns on compiler optimizations in V8 in Debug build, except
725 # on android_clang, where we're hitting a weird linker error.
726 # TODO(dpranke): http://crbug.com/266155 .
728 'v8_optimized_debug': 1,
730 'v8_optimized_debug': 2,
734 # Set this to 1 to enable use of concatenated impulse responses
735 # for the HRTF panner in WebAudio.
736 'use_concatenated_impulse_responses': 1,
738 # You can set the variable 'use_official_google_api_keys' to 1
739 # to use the Google-internal file containing official API keys
740 # for Google Chrome even in a developer build. Setting this
741 # variable explicitly to 1 will cause your build to fail if the
742 # internal file is missing.
744 # The variable is documented here, but not handled in this file;
745 # see //google_apis/determine_use_official_keys.gypi for the
748 # Set the variable to 0 to not use the internal file, even when
749 # it exists in your checkout.
751 # Leave it unset in your include.gypi to have the variable
752 # implicitly set to 1 if you have
753 # src/google_apis/internal/google_chrome_api_keys.h in your
754 # checkout, and implicitly set to 0 if not.
756 # Note that official builds always behave as if the variable
757 # was explicitly set to 1, i.e. they always use official keys,
758 # and will fail to build if the internal file is missing.
760 # NOTE: You MUST NOT explicitly set the variable to 2 in your
761 # include.gypi or by other means. Due to subtleties of GYP, this
762 # is not the same as leaving the variable unset, even though its
764 # //google_apis/determine_use_official_keys.gypi is 2.
766 # Set these to bake the specified API keys and OAuth client
767 # IDs/secrets into your build.
769 # If you create a build without values baked in, you can instead
770 # set environment variables to provide the keys at runtime (see
771 # src/google_apis/google_api_keys.h for details). Features that
772 # require server-side APIs may fail to work if no keys are
775 # Note that if you are building an official build or if
776 # use_official_google_api_keys has been set to 1 (explicitly or
777 # implicitly), these values will be ignored and the official
778 # keys will be used instead.
779 'google_api_key%': '',
780 'google_default_client_id%': '',
781 'google_default_client_secret%': '',
784 # Copy conditionally-set variables out one scope.
785 'branding%': '<(branding)',
786 'buildtype%': '<(buildtype)',
787 'target_arch%': '<(target_arch)',
788 'host_arch%': '<(host_arch)',
789 'toolkit_views%': '<(toolkit_views)',
790 'ui_compositor_image_transport%': '<(ui_compositor_image_transport)',
791 'use_aura%': '<(use_aura)',
792 'use_ash%': '<(use_ash)',
793 'use_cras%': '<(use_cras)',
794 'use_openssl%': '<(use_openssl)',
795 'use_nss%': '<(use_nss)',
796 'os_bsd%': '<(os_bsd)',
797 'os_posix%': '<(os_posix)',
798 'use_glib%': '<(use_glib)',
799 'use_pango%': '<(use_pango)',
800 'use_ozone%': '<(use_ozone)',
801 'toolkit_uses_gtk%': '<(toolkit_uses_gtk)',
802 'use_x11%': '<(use_x11)',
803 'use_gnome_keyring%': '<(use_gnome_keyring)',
804 'linux_fpic%': '<(linux_fpic)',
805 'chromeos%': '<(chromeos)',
806 'enable_viewport%': '<(enable_viewport)',
807 'enable_hidpi%': '<(enable_hidpi)',
808 'enable_touch_ui%': '<(enable_touch_ui)',
809 'use_xi2_mt%':'<(use_xi2_mt)',
810 'file_manager_extension%': '<(file_manager_extension)',
811 'image_loader_extension%': '<(image_loader_extension)',
812 'fastbuild%': '<(fastbuild)',
813 'dcheck_always_on%': '<(dcheck_always_on)',
814 'logging_like_official_build%': '<(logging_like_official_build)',
815 'tracing_like_official_build%': '<(tracing_like_official_build)',
816 'python_ver%': '<(python_ver)',
817 'arm_version%': '<(arm_version)',
818 'armv7%': '<(armv7)',
819 'arm_neon%': '<(arm_neon)',
820 'arm_neon_optional%': '<(arm_neon_optional)',
821 'sysroot%': '<(sysroot)',
822 'system_libdir%': '<(system_libdir)',
823 'component%': '<(component)',
824 'use_titlecase_in_grd_files%': '<(use_titlecase_in_grd_files)',
825 'use_third_party_translations%': '<(use_third_party_translations)',
826 'remoting%': '<(remoting)',
827 'enable_one_click_signin%': '<(enable_one_click_signin)',
828 'enable_webrtc%': '<(enable_webrtc)',
829 'chromium_win_pch%': '<(chromium_win_pch)',
830 'configuration_policy%': '<(configuration_policy)',
831 'safe_browsing%': '<(safe_browsing)',
832 'input_speech%': '<(input_speech)',
833 'notifications%': '<(notifications)',
834 'clang_use_chrome_plugins%': '<(clang_use_chrome_plugins)',
835 'mac_want_real_dsym%': '<(mac_want_real_dsym)',
840 'tsan_blacklist%': '<(tsan_blacklist)',
841 'clang_type_profiler%': '<(clang_type_profiler)',
842 'order_profiling%': '<(order_profiling)',
843 'order_text_section%': '<(order_text_section)',
844 'enable_extensions%': '<(enable_extensions)',
845 'enable_plugin_installation%': '<(enable_plugin_installation)',
846 'enable_plugins%': '<(enable_plugins)',
847 'enable_session_service%': '<(enable_session_service)',
848 'enable_themes%': '<(enable_themes)',
849 'enable_autofill_dialog%': '<(enable_autofill_dialog)',
850 'enable_background%': '<(enable_background)',
851 'linux_use_gold_binary%': '<(linux_use_gold_binary)',
852 'linux_use_gold_flags%': '<(linux_use_gold_flags)',
853 'linux_use_libgps%': '<(linux_use_libgps)',
854 'use_canvas_skia%': '<(use_canvas_skia)',
855 'test_isolation_mode%': '<(test_isolation_mode)',
856 'test_isolation_outdir%': '<(test_isolation_outdir)',
857 'test_isolation_fail_on_missing': '<(test_isolation_fail_on_missing)',
858 'enable_automation%': '<(enable_automation)',
859 'enable_printing%': '<(enable_printing)',
860 'enable_spellcheck%': '<(enable_spellcheck)',
861 'enable_google_now%': '<(enable_google_now)',
862 'enable_captive_portal_detection%': '<(enable_captive_portal_detection)',
863 'disable_ftp_support%': '<(disable_ftp_support)',
864 'enable_task_manager%': '<(enable_task_manager)',
865 'sas_dll_path%': '<(sas_dll_path)',
866 'wix_path%': '<(wix_path)',
867 'use_libjpeg_turbo%': '<(use_libjpeg_turbo)',
868 'use_system_libjpeg%': '<(use_system_libjpeg)',
869 'android_webview_build%': '<(android_webview_build)',
870 'gyp_managed_install%': 0,
871 'create_standalone_apk%': 1,
872 'google_tv%': '<(google_tv)',
873 'enable_app_list%': '<(enable_app_list)',
874 'use_default_render_theme%': '<(use_default_render_theme)',
875 'enable_settings_app%': '<(enable_settings_app)',
876 'google_api_key%': '<(google_api_key)',
877 'google_default_client_id%': '<(google_default_client_id)',
878 'google_default_client_secret%': '<(google_default_client_secret)',
879 'enable_managed_users%': '<(enable_managed_users)',
880 'native_discardable_memory%': '<(native_discardable_memory)',
881 'native_memory_pressure_signals%': '<(native_memory_pressure_signals)',
882 'spdy_proxy_auth_origin%': '<(spdy_proxy_auth_origin)',
883 'spdy_proxy_auth_property%': '<(spdy_proxy_auth_property)',
884 'spdy_proxy_auth_value%': '<(spdy_proxy_auth_value)',
885 'enable_mdns%' : '<(enable_mdns)',
886 'v8_optimized_debug': '<(v8_optimized_debug)',
887 'proprietary_codecs%': '<(proprietary_codecs)',
889 # Use system nspr instead of the bundled one.
890 'use_system_nspr%': 0,
892 # Use system protobuf instead of bundled one.
893 'use_system_protobuf%': 0,
895 # Use system yasm instead of bundled one.
896 'use_system_yasm%': 0,
898 # Use system ICU instead of bundled one.
899 'use_system_icu%' : 0,
901 # Default to enabled PIE; this is important for ASLR but we may need to be
902 # able to turn it off for various reasons.
903 'linux_disable_pie%': 0,
905 # The release channel that this build targets. This is used to restrict
906 # channel-specific build options, like which installer packages to create.
907 # The default is 'all', which does no channel-specific filtering.
910 # Override chromium_mac_pch and set it to 0 to suppress the use of
911 # precompiled headers on the Mac. Prefix header injection may still be
912 # used, but prefix headers will not be precompiled. This is useful when
913 # using distcc to distribute a build to compile slaves that don't
914 # share the same compiler executable as the system driving the compilation,
915 # because precompiled headers rely on pointers into a specific compiler
916 # executable's image. Setting this to 0 is needed to use an experimental
917 # Linux-Mac cross compiler distcc farm.
918 'chromium_mac_pch%': 1,
920 # The default value for mac_strip in target_defaults. This cannot be
921 # set there, per the comment about variable% in a target_defaults.
922 'mac_strip_release%': 1,
924 # Set to 1 to enable code coverage. In addition to build changes
925 # (e.g. extra CFLAGS), also creates a new target in the src/chrome
926 # project file called "coverage".
927 # Currently ignored on Windows.
930 # Set to 1 to enable java code coverage. Instruments classes during build
931 # to produce .ec files during runtime.
934 # Set to 1 to force Visual C++ to use legacy debug information format /Z7.
935 # This is useful for parallel compilation tools which can't support /Zi.
936 # Only used on Windows.
939 # Although base/allocator lets you select a heap library via an
940 # environment variable, the libcmt shim it uses sometimes gets in
941 # the way. To disable it entirely, and switch to normal msvcrt, do e.g.
942 # 'win_use_allocator_shim': 0,
943 # 'win_release_RuntimeLibrary': 2
944 # to ~/.gyp/include.gypi, gclient runhooks --force, and do a release build.
945 'win_use_allocator_shim%': 1, # 1 = shim allocator via libcmt; 0 = msvcrt
947 # TODO(bradnelson): eliminate this when possible.
948 # To allow local gyp files to prevent release.vsprops from being included.
949 # Yes(1) means include release.vsprops.
950 # Once all vsprops settings are migrated into gyp, this can go away.
951 'msvs_use_common_release%': 1,
953 # TODO(bradnelson): eliminate this when possible.
954 # To allow local gyp files to override additional linker options for msvs.
955 # Yes(1) means set use the common linker options.
956 'msvs_use_common_linker_extras%': 1,
958 # TODO(sgk): eliminate this if possible.
959 # It would be nicer to support this via a setting in 'target_defaults'
960 # in chrome/app/locales/locales.gypi overriding the setting in the
961 # 'Debug' configuration in the 'target_defaults' dict below,
962 # but that doesn't work as we'd like.
963 'msvs_debug_link_incremental%': '2',
965 # Needed for some of the largest modules.
966 'msvs_debug_link_nonincremental%': '1',
968 # Turns on Use Library Dependency Inputs for linking chrome.dll on Windows
969 # to get incremental linking to be faster in debug builds.
970 'incremental_chrome_dll%': '0',
972 # Experimental setting to break chrome.dll into multiple pieces based on
974 'chrome_multiple_dll%': '0',
976 # The default settings for third party code for treating
977 # warnings-as-errors. Ideally, this would not be required, however there
978 # is some third party code that takes a long time to fix/roll. So, this
979 # flag allows us to have warnings as errors in general to prevent
980 # regressions in most modules, while working on the bits that are
982 'win_third_party_warn_as_error%': 'true',
985 'clang%': '<(clang)',
986 'make_clang_dir%': 'third_party/llvm-build/Release+Asserts',
988 # These two variables can be set in GYP_DEFINES while running
989 # |gclient runhooks| to let clang run a plugin in every compilation.
990 # Only has an effect if 'clang=1' is in GYP_DEFINES as well.
992 # GYP_DEFINES='clang=1 clang_load=/abs/path/to/libPrintFunctionNames.dylib clang_add_plugin=print-fns' gclient runhooks
995 'clang_add_plugin%': '',
997 # The default type of gtest.
998 'gtest_target_type%': 'executable',
1000 # Enable sampling based profiler.
1001 # See http://google-perftools.googlecode.com/svn/trunk/doc/cpuprofile.html
1003 # Profile without optimizing out stack frames when profiling==1.
1004 'profiling_full_stack_frames%': '0',
1006 # Enable strict glibc debug mode.
1007 'glibcxx_debug%': 0,
1008 # And if we want to dump symbols for Breakpad-enabled builds.
1009 'linux_dump_symbols%': 0,
1010 # And if we want to strip the binary after dumping symbols.
1011 'linux_strip_binary%': 0,
1012 # Strip the test binaries needed for Linux reliability tests.
1013 'linux_strip_reliability_tests%': 0,
1016 'linux_use_tcmalloc%': 1,
1017 'android_use_tcmalloc%': 0,
1019 # Disable TCMalloc's heapchecker.
1020 'linux_use_heapchecker%': 0,
1022 # Disable shadow stack keeping used by heapcheck to unwind the stacks
1024 'linux_keep_shadow_stacks%': 0,
1026 # Set to 1 to link against libgnome-keyring instead of using dlopen().
1027 'linux_link_gnome_keyring%': 0,
1028 # Set to 1 to link against gsettings APIs instead of using dlopen().
1029 'linux_link_gsettings%': 0,
1031 # Default arch variant for MIPS.
1032 'mips_arch_variant%': 'mips32r2',
1034 # Enable use of OpenMAX DL FFT routines.
1035 'use_openmax_dl_fft%': '<(use_openmax_dl_fft)',
1037 # Enable new NPDevice API.
1038 'enable_new_npdevice_api%': 0,
1040 # Enable EGLImage support in OpenMAX
1041 'enable_eglimage%': 1,
1043 # Enable a variable used elsewhere throughout the GYP files to determine
1044 # whether to compile in the sources for the GPU plugin / process.
1047 # .gyp files or targets should set chromium_code to 1 if they build
1048 # Chromium-specific code, as opposed to external code. This variable is
1049 # used to control such things as the set of warnings to enable, and
1050 # whether warnings are treated as errors.
1051 'chromium_code%': 0,
1053 'release_valgrind_build%': 0,
1055 # TODO(thakis): Make this a blacklist instead, http://crbug.com/101600
1056 'enable_wexit_time_destructors%': 0,
1058 # Set to 1 to compile with the built in pdf viewer.
1061 # Set to 1 to compile with the OpenGL ES 2.0 conformance tests.
1062 'internal_gles2_conform_tests%': 0,
1064 # NOTE: When these end up in the Mac bundle, we need to replace '-' for '_'
1065 # so Cocoa is happy (http://crbug.com/20441).
1067 'am', 'ar', 'bg', 'bn', 'ca', 'cs', 'da', 'de', 'el', 'en-GB',
1068 'en-US', 'es-419', 'es', 'et', 'fa', 'fi', 'fil', 'fr', 'gu', 'he',
1069 'hi', 'hr', 'hu', 'id', 'it', 'ja', 'kn', 'ko', 'lt', 'lv',
1070 'ml', 'mr', 'ms', 'nb', 'nl', 'pl', 'pt-BR', 'pt-PT', 'ro', 'ru',
1071 'sk', 'sl', 'sr', 'sv', 'sw', 'ta', 'te', 'th', 'tr', 'uk',
1072 'vi', 'zh-CN', 'zh-TW',
1075 # Pseudo locales are special locales which are used for testing and
1076 # debugging. They don't get copied to the final app. For more info,
1077 # check out https://sites.google.com/a/chromium.org/dev/Home/fake-bidi
1084 # If debug_devtools is set to 1, JavaScript files for DevTools are
1085 # stored as is and loaded from disk. Otherwise, a concatenated file
1086 # is stored in resources.pak. It is still possible to load JS files
1087 # from disk by passing --debug-devtools cmdline switch.
1088 'debug_devtools%': 0,
1090 # The Java Bridge is not compiled in by default.
1093 # Code signing for iOS binaries. The bots need to be able to disable this.
1094 'chromium_ios_signing%': 1,
1096 # This flag is only used when disable_nacl==0 and disables all those
1097 # subcomponents which would require the installation of a native_client
1098 # untrusted toolchain.
1099 'disable_nacl_untrusted%': 0,
1101 # Disable Dart by default.
1104 # The desired version of Windows SDK can be set in ~/.gyp/include.gypi.
1105 'msbuild_toolset%': '',
1107 # Native Client is enabled by default.
1110 # Portable Native Client is enabled by default.
1111 'disable_pnacl%': 0,
1113 # Whether to build full debug version for Debug configuration on Android.
1114 # Compared to full debug version, the default Debug configuration on Android
1115 # has no full v8 debug, has size optimization and linker gc section, so that
1116 # we can build a debug version with acceptable size and performance.
1117 'android_full_debug%': 0,
1119 # Sets the default version name and code for Android app, by default we
1120 # do a developer build.
1121 'android_app_version_name%': 'Developer Build',
1122 'android_app_version_code%': 0,
1124 # Contains data about the attached devices for gyp_managed_install.
1125 'build_device_config_path': '<(PRODUCT_DIR)/build_devices.cfg',
1127 'sas_dll_exists': '<!(python <(DEPTH)/build/dir_exists.py <(sas_dll_path))',
1128 'wix_exists': '<!(python <(DEPTH)/build/dir_exists.py <(wix_path))',
1130 'windows_sdk_default_path': '<(DEPTH)/third_party/platformsdk_win8/files',
1131 'directx_sdk_default_path': '<(DEPTH)/third_party/directxsdk/files',
1133 # Whether we are using the rlz library or not. Platforms like Android send
1134 # rlz codes for searches but do not use the library.
1137 # Turns on the i18n support in V8.
1138 'v8_enable_i18n_support': 1,
1140 # Use the chromium skia by default.
1141 'use_system_skia%': '0',
1144 # The version of GCC in use, set later in platforms that use GCC and have
1145 # not explicitly chosen to build with clang. Currently, this means all
1146 # platforms except Windows, Mac and iOS.
1147 # TODO(glider): set clang to 1 earlier for ASan and TSan builds so that
1148 # it takes effect here.
1149 ['os_posix==1 and OS!="mac" and OS!="ios" and clang==0 and asan==0 and lsan==0 and tsan==0 and msan==0', {
1150 'gcc_version%': '<!(python <(DEPTH)/build/compiler_version.py)',
1154 ['OS=="win" and "<!(python <(DEPTH)/build/dir_exists.py <(windows_sdk_default_path))"=="True"', {
1155 'windows_sdk_path%': '<(windows_sdk_default_path)',
1157 'windows_sdk_path%': 'C:/Program Files (x86)/Windows Kits/8.0',
1159 ['OS=="win" and "<!(python <(DEPTH)/build/dir_exists.py <(directx_sdk_default_path))"=="True"', {
1160 'directx_sdk_path%': '<(directx_sdk_default_path)',
1162 'directx_sdk_path%': '$(DXSDK_DIR)',
1165 'windows_driver_kit_path%': '$(WDK_DIR)',
1166 # Set the python arch to prevent conflicts with pyauto on Win64 build.
1167 # TODO(jschuh): crbug.com/177664 Investigate Win64 pyauto build.
1168 'python_arch%': 'ia32',
1170 ['os_posix==1 and OS!="mac" and OS!="ios"', {
1171 # Figure out the python architecture to decide if we build pyauto.
1172 'python_arch%': '<!(<(DEPTH)/build/linux/python_arch.sh <(sysroot)/usr/<(system_libdir)/libpython<(python_ver).so.1.0)',
1174 ['target_arch=="mipsel"', {
1177 'nacl_untrusted_build%': 0,
1178 'linux_use_tcmalloc%': 0,
1180 ['OS=="linux" and target_arch=="mipsel"', {
1181 'sysroot%': '<(sysroot)',
1184 # All Chrome builds have breakpad symbols, but only process the
1185 # symbols from official builds.
1186 ['(branding=="Chrome" and buildtype=="Official")', {
1187 'linux_dump_symbols%': 1,
1190 }], # os_posix==1 and OS!="mac" and OS!="ios"
1193 'enable_background%': 0,
1195 'enable_task_manager%': 0,
1196 'icu_use_data_file_flag%': 1,
1197 'use_system_libxml%': 1,
1198 'use_system_sqlite%': 1,
1200 'ar', 'ca', 'cs', 'da', 'de', 'el', 'en-GB', 'en-US', 'es', 'fi',
1201 'fr', 'he', 'hr', 'hu', 'id', 'it', 'ja', 'ko', 'ms', 'nb', 'nl',
1202 'pl', 'pt', 'pt-PT', 'ro', 'ru', 'sk', 'sv', 'th', 'tr', 'uk', 'vi',
1206 # The Mac SDK is set for iOS builds and passed through to Mac
1207 # sub-builds. This allows the Mac sub-build SDK in an iOS build to be
1208 # overridden from the command line the same way it is for a Mac build.
1209 'mac_sdk%': '<!(python <(DEPTH)/build/mac/find_sdk.py 10.6)',
1211 # iOS SDK and deployment target support. The |ios_sdk| value is left
1212 # blank so that when it is set in the project files it will be the
1213 # "current" iOS SDK. Forcing a specific SDK even if it is "current"
1214 # causes Xcode to spit out a warning for every single project file for
1215 # not using the "current" SDK.
1217 'ios_sdk_path%': '',
1218 'ios_deployment_target%': '6.0',
1221 # ios_product_name is set to the name of the .app bundle as it should
1223 ['branding=="Chrome"', {
1224 'ios_product_name%': 'Chrome',
1225 }, { # else: branding!="Chrome"
1226 'ios_product_name%': 'Chromium',
1228 ['branding=="Chrome" and buildtype=="Official"', {
1230 }, { # else: branding!="Chrome" or buildtype!="Official"
1236 # Location of Android NDK.
1239 # Unfortuantely we have to use absolute paths to the SDK/NDK beause
1240 # they're passed to ant which uses a different relative path from
1242 'android_ndk_root%': '<!(cd <(DEPTH) && pwd -P)/third_party/android_tools/ndk/',
1243 'android_sdk_root%': '<!(cd <(DEPTH) && pwd -P)/third_party/android_tools/sdk/',
1244 'android_host_arch%': '<!(uname -m)',
1245 # Android API-level of the SDK used for compilation.
1246 'android_sdk_version%': '<!(/bin/echo -n ${ANDROID_SDK_VERSION})',
1247 # Android SDK build tools (e.g. dx, aapt, aidl)
1248 'android_sdk_tools%': '<!(/bin/echo -n ${ANDROID_SDK_TOOLS})',
1250 # Copy conditionally-set variables out one scope.
1251 'android_ndk_root%': '<(android_ndk_root)',
1252 'android_sdk_root%': '<(android_sdk_root)',
1253 'android_sdk_version%': '<(android_sdk_version)',
1254 'android_sdk_tools%': '<(android_sdk_tools)',
1255 'android_stlport_root': '<(android_ndk_root)/sources/cxx-stl/stlport',
1257 'android_sdk%': '<(android_sdk_root)/platforms/android-<(android_sdk_version)',
1259 # Android API level 14 is ICS (Android 4.0) which is the minimum
1260 # platform requirement for Chrome on Android, we use it for native
1263 ['target_arch == "ia32"', {
1264 'android_app_abi%': 'x86',
1265 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-x86/gdbserver/gdbserver',
1266 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-14/arch-x86',
1267 'android_toolchain%': '<(android_ndk_root)/toolchains/x86-4.6/prebuilt/<(host_os)-<(android_host_arch)/bin',
1269 ['target_arch=="arm"', {
1272 'android_app_abi%': 'armeabi',
1274 'android_app_abi%': 'armeabi-v7a',
1277 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-arm/gdbserver/gdbserver',
1278 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-14/arch-arm',
1279 'android_toolchain%': '<(android_ndk_root)/toolchains/arm-linux-androideabi-4.6/prebuilt/<(host_os)-<(android_host_arch)/bin',
1281 ['target_arch == "mipsel"', {
1282 'android_app_abi%': 'mips',
1283 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-mips/gdbserver/gdbserver',
1284 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-14/arch-mips',
1285 'android_toolchain%': '<(android_ndk_root)/toolchains/mipsel-linux-android-4.6/prebuilt/<(host_os)-<(android_host_arch)/bin',
1289 # Copy conditionally-set variables out one scope.
1290 'android_app_abi%': '<(android_app_abi)',
1291 'android_gdbserver%': '<(android_gdbserver)',
1292 'android_ndk_root%': '<(android_ndk_root)',
1293 'android_ndk_sysroot': '<(android_ndk_sysroot)',
1294 'android_sdk_root%': '<(android_sdk_root)',
1295 'android_sdk_version%': '<(android_sdk_version)',
1296 'android_toolchain%': '<(android_toolchain)',
1298 'android_ndk_include': '<(android_ndk_sysroot)/usr/include',
1299 'android_ndk_lib': '<(android_ndk_sysroot)/usr/lib',
1300 'android_sdk_tools%': '<(android_sdk_tools)',
1301 'android_sdk%': '<(android_sdk)',
1302 'android_sdk_jar%': '<(android_sdk)/android.jar',
1304 'android_stlport_root': '<(android_stlport_root)',
1305 'android_stlport_include': '<(android_stlport_root)/stlport',
1306 'android_stlport_libs_dir': '<(android_stlport_root)/libs/<(android_app_abi)',
1308 # Location of the "strip" binary, used by both gyp and scripts.
1309 'android_strip%' : '<!(/bin/echo -n <(android_toolchain)/*-strip)',
1311 # Location of the "readelf" binary.
1312 'android_readelf%' : '<!(/bin/echo -n <(android_toolchain)/*-readelf)',
1314 # Provides an absolute path to PRODUCT_DIR (e.g. out/Release). Used
1315 # to specify the output directory for Ant in the Android build.
1316 'ant_build_out': '`cd <(PRODUCT_DIR) && pwd -P`',
1318 # Determines whether we should optimize JNI generation at the cost of
1319 # breaking assumptions in the build system that when inputs have changed
1320 # the outputs should always change as well. This is meant purely for
1321 # developer builds, to avoid spurious re-linking of native files.
1322 'optimize_jni_generation%': 0,
1324 # Always uses openssl.
1327 'proprietary_codecs%': '<(proprietary_codecs)',
1328 'enable_task_manager%': 0,
1329 'safe_browsing%': 2,
1331 'enable_automation%': 0,
1333 'build_ffmpegsumo%': 0,
1334 'linux_use_tcmalloc%': 0,
1336 # Disable Native Client.
1339 # Android does not support background apps.
1340 'enable_background%': 0,
1342 # Sessions are store separately in the Java side.
1343 'enable_session_service%': 0,
1345 # Set to 1 once we have a notification system for Android.
1346 # http://crbug.com/115320
1347 'notifications%': 0,
1351 'gtest_target_type%': 'shared_library',
1353 # Uses system APIs for decoding audio and video.
1354 'use_libffmpeg%': '0',
1356 # When building as part of the Android system, use system libraries
1357 # where possible to reduce ROM size.
1358 # TODO(steveblock): Investigate using the system version of sqlite.
1359 'use_system_sqlite%': 0, # '<(android_webview_build)',
1360 'use_system_expat%': '<(android_webview_build)',
1361 'use_system_icu%': '<(android_webview_build)',
1362 'use_system_stlport%': '<(android_webview_build)',
1364 'enable_managed_users%': 0,
1366 # Copy it out one scope.
1367 'android_webview_build%': '<(android_webview_build)',
1369 ['android_webview_build==1', {
1370 # When building the WebView in the Android tree, jarjar will remap all
1371 # the class names, so the JNI generator needs to know this.
1372 'jni_generator_jarjar_file': '../android_webview/build/jarjar-rules.txt',
1375 # Enable clang on mac by default!
1378 ['OS=="mac" or OS=="ios"', {
1380 # Mac OS X SDK and deployment target support. The SDK identifies
1381 # the version of the system headers that will be used, and
1382 # corresponds to the MAC_OS_X_VERSION_MAX_ALLOWED compile-time
1383 # macro. "Maximum allowed" refers to the operating system version
1384 # whose APIs are available in the headers. The deployment target
1385 # identifies the minimum system version that the built products are
1386 # expected to function on. It corresponds to the
1387 # MAC_OS_X_VERSION_MIN_REQUIRED compile-time macro. To ensure these
1388 # macros are available, #include <AvailabilityMacros.h>. Additional
1389 # documentation on these macros is available at
1390 # http://developer.apple.com/mac/library/technotes/tn2002/tn2064.html#SECTION3
1391 # Chrome normally builds with the Mac OS X 10.6 SDK and sets the
1392 # deployment target to 10.6. Other projects, such as O3D, may
1393 # override these defaults.
1395 # Normally, mac_sdk_min is used to find an SDK that Xcode knows
1396 # about that is at least the specified version. In official builds,
1397 # the SDK must match mac_sdk_min exactly. If the SDK is installed
1398 # someplace that Xcode doesn't know about, set mac_sdk_path to the
1399 # path to the SDK; when set to a non-empty string, SDK detection
1400 # based on mac_sdk_min will be bypassed entirely.
1401 'mac_sdk_min%': '10.6',
1402 'mac_sdk_path%': '',
1404 'mac_deployment_target%': '10.6',
1407 'mac_sdk_min': '<(mac_sdk_min)',
1408 'mac_sdk_path': '<(mac_sdk_path)',
1409 'mac_deployment_target': '<(mac_deployment_target)',
1411 # Compile in Breakpad support by default so that it can be
1412 # tested, even if it is not enabled by default at runtime.
1413 'mac_breakpad_compiled_in%': 1,
1415 # mac_product_name is set to the name of the .app bundle as it should
1416 # appear on disk. This duplicates data from
1417 # chrome/app/theme/chromium/BRANDING and
1418 # chrome/app/theme/google_chrome/BRANDING, but is necessary to get
1419 # these names into the build system.
1420 ['branding=="Chrome"', {
1421 'mac_product_name%': 'Google Chrome',
1422 }, { # else: branding!="Chrome"
1423 'mac_product_name%': 'Chromium',
1426 ['branding=="Chrome" and buildtype=="Official"', {
1427 'mac_sdk%': '<!(python <(DEPTH)/build/mac/find_sdk.py --verify <(mac_sdk_min) --sdk_path=<(mac_sdk_path))',
1428 # Enable uploading crash dumps.
1429 'mac_breakpad_uploads%': 1,
1430 # Enable dumping symbols at build time for use by Mac Breakpad.
1432 # Enable Keystone auto-update support.
1434 }, { # else: branding!="Chrome" or buildtype!="Official"
1435 'mac_sdk%': '<!(python <(DEPTH)/build/mac/find_sdk.py <(mac_sdk_min))',
1436 'mac_breakpad_uploads%': 0,
1441 }], # OS=="mac" or OS=="ios"
1444 # This is the architecture convention used in WinSDK paths.
1445 ['target_arch=="ia32"', {
1446 'winsdk_arch%': 'x86',
1448 'winsdk_arch%': '<(target_arch)',
1450 ['component=="shared_library"', {
1451 'win_use_allocator_shim%': 0,
1453 # Turn on multiple dll by default on Windows when in static_library.
1454 'chrome_multiple_dll%': 1,
1456 ['component=="shared_library" and "<(GENERATOR)"=="ninja"', {
1457 # Only enabled by default for ninja because it's buggy in VS.
1458 # Not enabled for component=static_library because some targets
1459 # are too large and the toolchain fails due to the size of the
1461 'incremental_chrome_dll%': 1,
1463 # Don't do incremental linking for large modules on 32-bit.
1464 ['MSVS_OS_BITS==32', {
1465 'msvs_large_module_debug_link_mode%': '1', # No
1467 'msvs_large_module_debug_link_mode%': '2', # Yes
1469 ['MSVS_VERSION=="2012e" or MSVS_VERSION=="2010e"', {
1477 'nacl_win64_defines': [
1478 # This flag is used to minimize dependencies when building
1479 # Native Client loader for 64-bit Windows.
1484 ['os_posix==1 and chromeos==0 and OS!="android" and OS!="ios"', {
1490 ['enable_plugins==1 and (OS=="linux" or OS=="mac" or OS=="win" or google_tv==1)', {
1491 'enable_pepper_cdms%': 1,
1493 'enable_pepper_cdms%': 0,
1496 # Native Client glibc toolchain is enabled
1497 # by default except on arm and mips.
1498 ['target_arch=="arm" or target_arch=="mipsel"', {
1499 'disable_glibc%': 1,
1501 'disable_glibc%': 0,
1504 # Disable SSE2 when building for ARM or MIPS.
1505 ['target_arch=="arm" or target_arch=="mipsel"', {
1508 'disable_sse2%': '<(disable_sse2)',
1511 # Set the relative path from this file to the GYP file of the JPEG
1512 # library used by Chromium.
1513 ['use_system_libjpeg==1 or use_libjpeg_turbo==0', {
1514 # Configuration for using the system libjeg is here.
1515 'libjpeg_gyp_path': '../third_party/libjpeg/libjpeg.gyp',
1517 'libjpeg_gyp_path': '../third_party/libjpeg_turbo/libjpeg.gyp',
1520 # Options controlling the use of GConf (the classic GNOME configuration
1521 # system) and GIO, which contains GSettings (the new GNOME config system).
1530 # Set up -D and -E flags passed into grit.
1531 ['branding=="Chrome"', {
1532 # TODO(mmoss) The .grd files look for _google_chrome, but for
1533 # consistency they should look for google_chrome_build like C++.
1534 'grit_defines': ['-D', '_google_chrome',
1535 '-E', 'CHROMIUM_BUILD=google_chrome'],
1537 'grit_defines': ['-D', '_chromium',
1538 '-E', 'CHROMIUM_BUILD=chromium'],
1541 'grit_defines': ['-D', 'chromeos', '-D', 'scale_factors=2x'],
1543 ['toolkit_views==1', {
1544 'grit_defines': ['-D', 'toolkit_views'],
1547 'grit_defines': ['-D', 'use_aura'],
1550 'grit_defines': ['-D', 'use_ash'],
1553 'grit_defines': ['-D', 'use_nss'],
1556 'grit_defines': ['-D', 'use_ozone'],
1558 ['file_manager_extension==1', {
1559 'grit_defines': ['-D', 'file_manager_extension'],
1561 ['image_loader_extension==1', {
1562 'grit_defines': ['-D', 'image_loader_extension'],
1565 'grit_defines': ['-D', 'remoting'],
1567 ['use_titlecase_in_grd_files==1', {
1568 'grit_defines': ['-D', 'use_titlecase'],
1570 ['use_third_party_translations==1', {
1571 'grit_defines': ['-D', 'use_third_party_translations'],
1573 'ast', 'bs', 'ca@valencia', 'en-AU', 'eo', 'eu', 'gl', 'hy', 'ia',
1574 'ka', 'ku', 'kw', 'ms', 'ug'
1578 'grit_defines': ['-t', 'android',
1579 '-E', 'ANDROID_JAVA_TAGGED_ONLY=true'],
1582 'grit_defines': ['-D', 'google_tv'],
1586 ['OS=="mac" or OS=="ios"', {
1587 'grit_defines': ['-D', 'scale_factors=2x'],
1592 # iOS uses a whitelist to filter resources.
1593 '-w', '<(DEPTH)/build/ios/grit_whitelist.txt'
1596 # Enable clang and host builds when generating with ninja-ios.
1598 ['"<(GENERATOR)"=="ninja"', {
1604 ['enable_extensions==1', {
1605 'grit_defines': ['-D', 'enable_extensions'],
1607 ['enable_printing!=0', {
1608 'grit_defines': ['-D', 'enable_printing'],
1610 ['enable_themes==1', {
1611 'grit_defines': ['-D', 'enable_themes'],
1613 ['enable_app_list==1', {
1614 'grit_defines': ['-D', 'enable_app_list'],
1616 ['enable_settings_app==1', {
1617 'grit_defines': ['-D', 'enable_settings_app'],
1619 ['enable_google_now==1', {
1620 'grit_defines': ['-D', 'enable_google_now'],
1622 ['use_concatenated_impulse_responses==1', {
1623 'grit_defines': ['-D', 'use_concatenated_impulse_responses'],
1625 ['enable_webrtc==1', {
1626 'grit_defines': ['-D', 'enable_webrtc'],
1628 ['enable_mdns==1', {
1629 'grit_defines': ['-D', 'enable_mdns'],
1631 ['clang_use_chrome_plugins==1 and OS!="win"', {
1632 'clang_chrome_plugins_flags': [
1633 '<!@(<(DEPTH)/tools/clang/scripts/plugin_flags.sh)'
1637 ['asan==1 and OS!="win"', {
1640 ['asan==1 and OS=="mac"', {
1641 # TODO(glider): we do not strip ASan binaries until the dynamic ASan
1642 # runtime is fully adopted. See http://crbug.com/242503.
1643 'mac_strip_release': 0,
1655 ['OS=="linux" and clang_type_profiler==1', {
1657 'clang_use_chrome_plugins%': 0,
1659 ['host_arch=="x64"', {
1660 'make_clang_dir%': 'third_party/llvm-allocated-type/Linux_x64',
1662 ['host_arch=="ia32"', {
1663 # 32-bit Clang is unsupported. It may not build. Put your 32-bit
1664 # Clang in this directory at your own risk if needed for some
1665 # purpose (e.g. to compare 32-bit and 64-bit behavior like memory
1666 # usage). Any failure by this compiler should not close the tree.
1667 'make_clang_dir%': 'third_party/llvm-allocated-type/Linux_ia32',
1672 # On valgrind bots, override the optimizer settings so we don't inline too
1673 # much and make the stacks harder to figure out.
1675 # TODO(rnk): Kill off variables that no one else uses and just implement
1676 # them under a build_for_tool== condition.
1677 ['build_for_tool=="memcheck" or build_for_tool=="tsan"', {
1679 'mac_debug_optimization': '1',
1680 'mac_release_optimization': '1',
1681 'release_optimize': '1',
1682 'no_gc_sections': 1,
1683 'debug_extra_cflags': '-g -fno-inline -fno-omit-frame-pointer '
1684 '-fno-builtin -fno-optimize-sibling-calls',
1685 'release_extra_cflags': '-g -fno-inline -fno-omit-frame-pointer '
1686 '-fno-builtin -fno-optimize-sibling-calls',
1688 # MSVS flags for TSan on Pin and Windows.
1689 'win_debug_RuntimeChecks': '0',
1690 'win_debug_disable_iterator_debugging': '1',
1691 'win_debug_Optimization': '1',
1692 'win_debug_InlineFunctionExpansion': '0',
1693 'win_release_InlineFunctionExpansion': '0',
1694 'win_release_OmitFramePointers': '0',
1696 'linux_use_tcmalloc': 1,
1697 'release_valgrind_build': 1,
1699 'component': 'static_library',
1700 'use_system_zlib': 0,
1703 # Build tweaks for DrMemory.
1704 # TODO(rnk): Combine with tsan config to share the builder.
1705 # http://crbug.com/108155
1706 ['build_for_tool=="drmemory"', {
1707 # These runtime checks force initialization of stack vars which blocks
1708 # DrMemory's uninit detection.
1709 'win_debug_RuntimeChecks': '0',
1710 # Iterator debugging is slow.
1711 'win_debug_disable_iterator_debugging': '1',
1712 # Try to disable optimizations that mess up stacks in a release build.
1713 # DrM-i#1054 (http://code.google.com/p/drmemory/issues/detail?id=1054)
1714 # /O2 and /Ob0 (disable inline) cannot be used together because of a
1715 # compiler bug, so we use /Ob1 instead.
1716 'win_release_InlineFunctionExpansion': '1',
1717 'win_release_OmitFramePointers': '0',
1718 # Ditto for debug, to support bumping win_debug_Optimization.
1719 'win_debug_InlineFunctionExpansion': 0,
1720 'win_debug_OmitFramePointers': 0,
1721 # Keep the code under #ifndef NVALGRIND.
1722 'release_valgrind_build': 1,
1725 # Enable RLZ on Win, Mac and ChromeOS.
1726 ['branding=="Chrome" and (OS=="win" or OS=="mac" or chromeos==1)', {
1730 # Set default compiler flags depending on ARM version.
1731 ['arm_version==5 and android_webview_build==0', {
1732 # Flags suitable for Android emulator
1733 'arm_arch%': 'armv5te',
1734 'arm_tune%': 'xscale',
1736 'arm_float_abi%': 'soft',
1739 ['arm_version==6 and android_webview_build==0', {
1740 'arm_arch%': 'armv6',
1743 'arm_float_abi%': 'soft',
1746 ['arm_version==7 and android_webview_build==0', {
1747 'arm_arch%': 'armv7-a',
1748 'arm_tune%': 'cortex-a8',
1753 'arm_fpu%': 'vfpv3-d16',
1756 'arm_float_abi%': 'softfp',
1760 ['android_webview_build==1', {
1761 # The WebView build gets its cpu-specific flags from the Android build system.
1765 'arm_float_abi%': '',
1771 # The path to the ANGLE library. TODO(apatrick): This is to help
1772 # transition to a new version of ANGLE at a new location. After the
1773 # transition is complete, this can be removed.
1774 'angle_path': '<(DEPTH)/third_party/angle_dx11',
1776 # List of default apps to install in new profiles. The first list contains
1777 # the source files as found in svn. The second list, used only for linux,
1778 # contains the destination location for each of the files. When a crx
1779 # is added or removed from the list, the chrome/browser/resources/
1780 # default_apps/external_extensions.json file must also be updated.
1781 'default_apps_list': [
1782 'browser/resources/default_apps/external_extensions.json',
1783 'browser/resources/default_apps/gmail.crx',
1784 'browser/resources/default_apps/search.crx',
1785 'browser/resources/default_apps/youtube.crx',
1786 'browser/resources/default_apps/drive.crx',
1787 'browser/resources/default_apps/docs.crx',
1789 'default_apps_list_linux_dest': [
1790 '<(PRODUCT_DIR)/default_apps/external_extensions.json',
1791 '<(PRODUCT_DIR)/default_apps/gmail.crx',
1792 '<(PRODUCT_DIR)/default_apps/search.crx',
1793 '<(PRODUCT_DIR)/default_apps/youtube.crx',
1794 '<(PRODUCT_DIR)/default_apps/drive.crx',
1795 '<(PRODUCT_DIR)/default_apps/docs.crx',
1798 'target_defaults': {
1800 # The condition that operates on chromium_code is in a target_conditions
1801 # section, and will not have access to the default fallback value of
1802 # chromium_code at the top of this file, or to the chromium_code
1803 # variable placed at the root variables scope of .gyp files, because
1804 # those variables are not set at target scope. As a workaround,
1805 # if chromium_code is not set at target scope, define it in target scope
1806 # to contain whatever value it has during early variable expansion.
1807 # That's enough to make it available during target conditional
1809 'chromium_code%': '<(chromium_code)',
1811 # See http://msdn.microsoft.com/en-us/library/aa652360(VS.71).aspx
1812 'win_release_Optimization%': '2', # 2 = /Os
1813 'win_debug_Optimization%': '0', # 0 = /Od
1815 # See http://msdn.microsoft.com/en-us/library/2kxx5t2c(v=vs.80).aspx
1816 # Tri-state: blank is default, 1 on, 0 off
1817 'win_release_OmitFramePointers%': '0',
1818 # Tri-state: blank is default, 1 on, 0 off
1819 'win_debug_OmitFramePointers%': '',
1821 # See http://msdn.microsoft.com/en-us/library/8wtf2dfz(VS.71).aspx
1822 'win_debug_RuntimeChecks%': '3', # 3 = all checks enabled, 0 = off
1824 # See http://msdn.microsoft.com/en-us/library/47238hez(VS.71).aspx
1825 'win_debug_InlineFunctionExpansion%': '', # empty = default, 0 = off,
1826 'win_release_InlineFunctionExpansion%': '2', # 1 = only __inline, 2 = max
1828 # VS inserts quite a lot of extra checks to algorithms like
1829 # std::partial_sort in Debug build which make them O(N^2)
1830 # instead of O(N*logN). This is particularly slow under memory
1831 # tools like ThreadSanitizer so we want it to be disablable.
1832 # See http://msdn.microsoft.com/en-us/library/aa985982(v=VS.80).aspx
1833 'win_debug_disable_iterator_debugging%': '0',
1835 # An application manifest fragment to declare compatibility settings for
1836 # 'executable' targets. Ignored in other target type.
1837 'win_exe_compatibility_manifest%':
1838 '<(DEPTH)\\build\\win\\compatibility.manifest',
1840 # Set to 1 to generate external manifest instead of embedding it for
1841 # 'executable' target. Does nothing for other target type. This flag is
1842 # used to make mini_installer compatible with the component build.
1843 # See http://crbug.com/127233
1844 'win_use_external_manifest%': 0,
1846 'release_extra_cflags%': '',
1847 'debug_extra_cflags%': '',
1849 'release_valgrind_build%': '<(release_valgrind_build)',
1851 # the non-qualified versions are widely assumed to be *nix-only
1852 'win_release_extra_cflags%': '',
1853 'win_debug_extra_cflags%': '',
1855 # TODO(thakis): Make this a blacklist instead, http://crbug.com/101600
1856 'enable_wexit_time_destructors%': '<(enable_wexit_time_destructors)',
1858 # Only used by Windows build for now. Can be used to build into a
1859 # differet output directory, e.g., a build_dir_prefix of VS2010_ would
1860 # output files in src/build/VS2010_{Debug,Release}.
1861 'build_dir_prefix%': '',
1863 # Targets are by default not nacl untrusted code.
1864 'nacl_untrusted_build%': 0,
1866 'pnacl_compile_flags': [
1867 # pnacl uses the clang compiler so we need to supress all the
1868 # same warnings as we do for clang.
1869 # TODO(sbc): Remove these if/when they are removed from the clang
1871 '-Wno-unused-function',
1872 '-Wno-char-subscripts',
1873 '-Wno-c++11-extensions',
1874 '-Wno-unnamed-type-template-args',
1878 ['OS=="win" and component=="shared_library"', {
1879 # See http://msdn.microsoft.com/en-us/library/aa652367.aspx
1880 'win_release_RuntimeLibrary%': '2', # 2 = /MD (nondebug DLL)
1881 'win_debug_RuntimeLibrary%': '3', # 3 = /MDd (debug DLL)
1883 # See http://msdn.microsoft.com/en-us/library/aa652367.aspx
1884 'win_release_RuntimeLibrary%': '0', # 0 = /MT (nondebug static)
1885 'win_debug_RuntimeLibrary%': '1', # 1 = /MTd (debug static)
1888 # See http://gcc.gnu.org/onlinedocs/gcc-4.4.2/gcc/Optimize-Options.html
1889 'mac_release_optimization%': 's', # Use -Os unless overridden
1890 'mac_debug_optimization%': '0', # Use -O0 unless overridden
1892 # See http://gcc.gnu.org/onlinedocs/gcc-4.4.2/gcc/Optimize-Options.html
1893 'mac_release_optimization%': '3', # Use -O3 unless overridden
1894 'mac_debug_optimization%': '0', # Use -O0 unless overridden
1899 # Set this to use the new DX11 version of ANGLE.
1900 # TODO(apatrick): Remove this when the transition is complete.
1904 ['(OS=="mac" or OS=="ios") and asan==1', {
1906 '<(DEPTH)/build/mac/asan.gyp:asan_dynamic_runtime',
1909 ['OS=="linux" and linux_use_tcmalloc==1 and clang_type_profiler==1', {
1910 'cflags_cc!': ['-fno-rtti'],
1913 '-gline-tables-only',
1914 '-fintercept-allocation-functions',
1916 'defines': ['TYPE_PROFILING'],
1918 '<(DEPTH)/base/allocator/allocator.gyp:type_profiler',
1921 ['OS=="linux" and clang==1 and host_arch=="ia32"', {
1922 # TODO(dmikurube): Remove -Wno-sentinel when Clang/LLVM is fixed.
1923 # See http://crbug.com/162818.
1924 'cflags+': ['-Wno-sentinel'],
1926 ['OS=="win" and "<(msbuild_toolset)"!=""', {
1927 'msbuild_toolset': '<(msbuild_toolset)',
1929 ['branding=="Chrome"', {
1930 'defines': ['GOOGLE_CHROME_BUILD'],
1931 }, { # else: branding!="Chrome"
1932 'defines': ['CHROMIUM_BUILD'],
1934 ['OS=="mac" and component=="shared_library"', {
1936 'DYLIB_INSTALL_NAME_BASE': '@rpath',
1937 'LD_RUNPATH_SEARCH_PATHS': [
1938 # For unbundled binaries.
1940 # For bundled binaries, to get back from Binary.app/Contents/MacOS.
1941 '@loader_path/../../..',
1946 'defines': ['ENABLE_RLZ'],
1948 ['component=="shared_library"', {
1949 'defines': ['COMPONENT_BUILD'],
1951 ['toolkit_views==1', {
1952 'defines': ['TOOLKIT_VIEWS=1'],
1954 ['ui_compositor_image_transport==1', {
1955 'defines': ['UI_COMPOSITOR_IMAGE_TRANSPORT'],
1958 'defines': ['USE_AURA=1'],
1961 'defines': ['USE_ASH=1'],
1964 'defines': ['USE_CRAS=1'],
1967 'defines': ['USE_OZONE=1'],
1969 ['use_default_render_theme==1', {
1970 'defines': ['USE_DEFAULT_RENDER_THEME=1'],
1972 ['use_libjpeg_turbo==1', {
1973 'defines': ['USE_LIBJPEG_TURBO=1'],
1976 'defines': ['USE_NSS=1'],
1979 'defines': ['USE_X11=1'],
1981 ['enable_one_click_signin==1', {
1982 'defines': ['ENABLE_ONE_CLICK_SIGNIN'],
1984 ['toolkit_uses_gtk==1 and toolkit_views==0', {
1985 # TODO(erg): We are progressively sealing up use of deprecated features
1986 # in gtk in preparation for an eventual porting to gtk3.
1987 'defines': ['GTK_DISABLE_SINGLE_INCLUDES=1'],
1990 'defines': ['OS_CHROMEOS=1'],
1993 'defines': ['GOOGLE_TV=1'],
1996 'defines': ['USE_XI2_MT=<(use_xi2_mt)'],
1998 ['file_manager_extension==1', {
1999 'defines': ['FILE_MANAGER_EXTENSION=1'],
2001 ['image_loader_extension==1', {
2002 'defines': ['IMAGE_LOADER_EXTENSION=1'],
2005 'defines': ['ENABLE_PROFILING=1'],
2007 ['OS=="linux" and glibcxx_debug==1', {
2008 'defines': ['_GLIBCXX_DEBUG=1',],
2009 'cflags_cc+': ['-g'],
2012 'defines': ['ENABLE_REMOTING=1'],
2014 ['enable_webrtc==1', {
2015 'defines': ['ENABLE_WEBRTC=1'],
2017 ['proprietary_codecs==1', {
2018 'defines': ['USE_PROPRIETARY_CODECS'],
2020 ['enable_viewport==1', {
2021 'defines': ['ENABLE_VIEWPORT'],
2023 ['enable_pepper_cdms==1', {
2024 'defines': ['ENABLE_PEPPER_CDMS'],
2026 ['configuration_policy==1', {
2027 'defines': ['ENABLE_CONFIGURATION_POLICY'],
2029 ['input_speech==1', {
2030 'defines': ['ENABLE_INPUT_SPEECH'],
2032 ['notifications==1', {
2033 'defines': ['ENABLE_NOTIFICATIONS'],
2035 ['enable_hidpi==1', {
2036 'defines': ['ENABLE_HIDPI=1'],
2040 'GCC_GENERATE_DEBUGGING_SYMBOLS': 'NO',
2044 # Clang creates chubby debug information, which makes linking very
2045 # slow. For now, don't create debug information with clang. See
2046 # http://crbug.com/70000
2050 'debug_extra_cflags': '-g0',
2053 # Android builds symbols on release by default, disable them.
2056 'debug_extra_cflags': '-g0',
2057 'release_extra_cflags': '-g0',
2061 }, { # else clang!=1
2063 ['OS=="win" and fastbuild==2', {
2064 # Completely disable debug information.
2067 'GenerateDebugInformation': 'false',
2069 'VCCLCompilerTool': {
2070 'DebugInformationFormat': '0',
2074 ['OS=="win" and fastbuild==1', {
2077 # This tells the linker to generate .pdbs, so that
2078 # we can get meaningful stack traces.
2079 'GenerateDebugInformation': 'true',
2081 'VCCLCompilerTool': {
2082 # No debug info to be generated by compiler.
2083 'DebugInformationFormat': '0',
2087 ['OS=="linux" and fastbuild==2', {
2089 'debug_extra_cflags': '-g0',
2092 ['OS=="linux" and fastbuild==1', {
2094 'debug_extra_cflags': '-g1',
2097 ['OS=="android" and fastbuild==2', {
2099 'debug_extra_cflags': '-g0',
2100 'release_extra_cflags': '-g0',
2103 ['OS=="android" and fastbuild==1', {
2105 'debug_extra_cflags': '-g1',
2106 'release_extra_cflags': '-g1',
2113 ['dcheck_always_on!=0', {
2114 'defines': ['DCHECK_ALWAYS_ON=1'],
2115 }], # dcheck_always_on!=0
2116 ['logging_like_official_build!=0', {
2117 'defines': ['LOGGING_IS_OFFICIAL_BUILD=1'],
2118 }], # logging_like_official_build!=0
2119 ['tracing_like_official_build!=0', {
2120 'defines': ['TRACING_IS_OFFICIAL_BUILD=1'],
2121 }], # tracing_like_official_build!=0
2122 ['win_use_allocator_shim==0', {
2125 'defines': ['NO_TCMALLOC'],
2134 ['use_openssl==1', {
2139 ['enable_eglimage==1', {
2141 'ENABLE_EGLIMAGE=1',
2144 ['asan==1 and OS=="win"', {
2145 # Since asan on windows uses Syzygy, we need /PROFILE turned on to
2146 # produce appropriate pdbs.
2153 'ADDRESS_SANITIZER',
2154 'MEMORY_TOOL_REPLACES_ALLOCATOR',
2156 }], # asan==1 and OS=="win"
2159 ['OS=="mac" or OS=="ios"', {
2161 'GCC_INSTRUMENT_PROGRAM_FLOW_ARCS': 'YES', # -fprofile-arcs
2162 'GCC_GENERATE_TEST_COVERAGE_FILES': 'YES', # -ftest-coverage
2166 # Add -lgcov for types executable, shared_library, and
2167 # loadable_module; not for static_library.
2168 # This is a delayed conditional.
2169 'target_conditions': [
2170 ['_type!="static_library"', {
2171 'xcode_settings': { 'OTHER_LDFLAGS': [ '-lgcov' ] },
2175 ['OS=="linux" or OS=="android"', {
2176 'cflags': [ '-ftest-coverage',
2178 'link_settings': { 'libraries': [ '-lgcov' ] },
2182 # Disable incremental linking for all modules.
2183 # 0: inherit, 1: disabled, 2: enabled.
2184 'msvs_debug_link_incremental': '1',
2185 'msvs_large_module_debug_link_mode': '1',
2186 # Disable RTC. Syzygy explicitly doesn't support RTC instrumented
2188 'win_debug_RuntimeChecks': '0',
2191 # Disable iterator debugging (huge speed boost without any
2192 # change in coverage results).
2193 '_HAS_ITERATOR_DEBUGGING=0',
2197 # Enable profile information (necessary for coverage
2198 # instrumentation). This is incompatible with incremental
2204 ], # conditions for coverage
2209 '_CRT_SECURE_NO_DEPRECATE',
2210 '_SCL_SECURE_NO_DEPRECATE',
2211 # This define is required to pull in the new Win8 interfaces from
2212 # system headers like ShObjIdl.h.
2213 'NTDDI_VERSION=0x06020000',
2216 '<(DEPTH)/third_party/wtl/include',
2221 # Generates debug info when win_z7=1
2222 # even if fastbuild=1 (that makes GenerateDebugInformation false).
2224 'GenerateDebugInformation': 'true',
2226 'VCCLCompilerTool': {
2227 'DebugInformationFormat': '1',
2231 ['"<(GENERATOR)"=="msvs"', {
2234 # Make the pdb name sane. Otherwise foo.exe and foo.dll both
2235 # have foo.pdb. The ninja generator already defaults to this and
2236 # can't handle the $(TargetPath) macro.
2237 'ProgramDatabaseFile': '$(TargetPath).pdb',
2243 ['enable_task_manager==1', {
2245 'ENABLE_TASK_MANAGER=1',
2248 ['enable_extensions==1', {
2250 'ENABLE_EXTENSIONS=1',
2253 ['OS=="win" and branding=="Chrome"', {
2254 'defines': ['ENABLE_SWIFTSHADER'],
2256 ['enable_dart==1', {
2257 'defines': ['WEBKIT_USING_DART=1'],
2259 ['enable_plugin_installation==1', {
2260 'defines': ['ENABLE_PLUGIN_INSTALLATION=1'],
2262 ['enable_plugins==1', {
2263 'defines': ['ENABLE_PLUGINS=1'],
2265 ['enable_session_service==1', {
2266 'defines': ['ENABLE_SESSION_SERVICE=1'],
2268 ['enable_themes==1', {
2269 'defines': ['ENABLE_THEMES=1'],
2271 ['enable_autofill_dialog==1', {
2272 'defines': ['ENABLE_AUTOFILL_DIALOG=1'],
2274 ['enable_background==1', {
2275 'defines': ['ENABLE_BACKGROUND=1'],
2277 ['enable_automation==1', {
2278 'defines': ['ENABLE_AUTOMATION=1'],
2280 ['enable_google_now==1', {
2281 'defines': ['ENABLE_GOOGLE_NOW=1'],
2283 ['enable_printing==1', {
2284 'defines': ['ENABLE_FULL_PRINTING=1', 'ENABLE_PRINTING=1'],
2286 ['enable_printing==2', {
2287 'defines': ['ENABLE_PRINTING=1'],
2289 ['enable_spellcheck==1', {
2290 'defines': ['ENABLE_SPELLCHECK=1'],
2292 ['enable_captive_portal_detection==1', {
2293 'defines': ['ENABLE_CAPTIVE_PORTAL_DETECTION=1'],
2295 ['enable_app_list==1', {
2296 'defines': ['ENABLE_APP_LIST=1'],
2298 ['enable_settings_app==1', {
2299 'defines': ['ENABLE_SETTINGS_APP=1'],
2301 ['disable_ftp_support==1', {
2302 'defines': ['DISABLE_FTP_SUPPORT=1'],
2304 ['enable_managed_users==1', {
2305 'defines': ['ENABLE_MANAGED_USERS=1'],
2307 ['spdy_proxy_auth_origin != ""', {
2308 'defines': ['SPDY_PROXY_AUTH_ORIGIN="<(spdy_proxy_auth_origin)"'],
2310 ['spdy_proxy_auth_property != ""', {
2311 'defines': ['SPDY_PROXY_AUTH_PROPERTY="<(spdy_proxy_auth_property)"'],
2313 ['spdy_proxy_auth_value != ""', {
2314 'defines': ['SPDY_PROXY_AUTH_VALUE="<(spdy_proxy_auth_value)"'],
2316 ['enable_mdns==1', {
2317 'defines': ['ENABLE_MDNS=1'],
2319 ], # conditions for 'target_defaults'
2320 'target_conditions': [
2321 ['enable_wexit_time_destructors==1', {
2325 '-Wexit-time-destructors',
2329 '-Wexit-time-destructors',
2335 ['chromium_code==0', {
2337 [ 'os_posix==1 and OS!="mac" and OS!="ios"', {
2338 # We don't want to get warnings from third-party code,
2339 # so remove any existing warning-enabling flags like -Wall.
2345 # Don't warn about hash_map in third-party code.
2349 # Don't warn about printf format problems.
2350 # This is off by default in gcc but on in Ubuntu's gcc(!).
2354 # TODO(fischman): remove this.
2355 # http://code.google.com/p/chromium/issues/detail?id=90453
2359 # TODO: Fix all warnings on chromeos too.
2360 [ 'os_posix==1 and OS!="mac" and OS!="ios" and (clang!=1 or chromeos==1)', {
2365 [ 'os_posix==1 and os_bsd!=1 and OS!="mac" and OS!="android"', {
2367 # Don't warn about ignoring the return value from e.g. close().
2368 # This is off by default in some gccs but on by default in others.
2369 # BSD systems do not support this option, since they are usually
2370 # using gcc 4.2.1, which does not have this flag yet.
2371 '-Wno-unused-result',
2376 '_CRT_SECURE_NO_DEPRECATE',
2377 '_CRT_NONSTDC_NO_WARNINGS',
2378 '_CRT_NONSTDC_NO_DEPRECATE',
2379 '_SCL_SECURE_NO_DEPRECATE',
2381 'msvs_disabled_warnings': [4800],
2383 'VCCLCompilerTool': {
2384 'WarningLevel': '3',
2385 'WarnAsError': '<(win_third_party_warn_as_error)',
2386 'Detect64BitPortabilityProblems': 'false',
2390 ['buildtype=="Official"', {
2392 'VCCLCompilerTool': { 'WarnAsError': 'false' },
2397 # TODO(darin): Unfortunately, some third_party code depends on base.
2398 [ 'OS=="win" and component=="shared_library"', {
2399 'msvs_disabled_warnings': [
2400 4251, # class 'std::xx' needs to have dll-interface.
2403 [ 'OS=="mac" or OS=="ios"', {
2405 'WARNING_CFLAGS!': ['-Wall', '-Wextra'],
2408 ['buildtype=="Official"', {
2410 'GCC_TREAT_WARNINGS_AS_ERRORS': 'NO', # -Werror
2417 # TODO(ios): Fix remaining warnings in third-party code, then
2418 # remove this; the Mac cleanup didn't get everything that's
2419 # flagged in an iOS build.
2420 'GCC_TREAT_WARNINGS_AS_ERRORS': 'NO',
2421 'RUN_CLANG_STATIC_ANALYZER': 'NO',
2427 # Rules for excluding e.g. foo_win.cc from the build on non-Windows.
2428 'filename_rules.gypi',
2430 # In Chromium code, we define __STDC_foo_MACROS in order to get the
2431 # C99 macros on Mac and Linux.
2433 '__STDC_CONSTANT_MACROS',
2434 '__STDC_FORMAT_MACROS',
2438 # turn on warnings for signed/unsigned mismatch on chromium code.
2440 'VCCLCompilerTool': {
2441 'AdditionalOptions': ['/we4389'],
2445 ['OS=="win" and component=="shared_library"', {
2446 'msvs_disabled_warnings': [
2447 4251, # class 'std::xx' needs to have dll-interface.
2452 ], # target_conditions for 'target_defaults'
2453 'default_configuration': 'Debug',
2455 # VCLinkerTool LinkIncremental values below:
2457 # 1 == /INCREMENTAL:NO
2459 # Debug links incremental, Release does not.
2461 # Abstract base configurations to cover common attributes.
2465 'msvs_configuration_attributes': {
2466 'OutputDirectory': '<(DEPTH)\\build\\<(build_dir_prefix)$(ConfigurationName)',
2467 'IntermediateDirectory': '$(OutDir)\\obj\\$(ProjectName)',
2468 'CharacterSet': '1',
2470 # Add the default import libs.
2473 'AdditionalDependencies': [
2495 'TargetMachine': '1',
2498 'msvs_configuration_platform': 'Win32',
2502 'msvs_configuration_platform': 'x64',
2505 'TargetMachine': '17', # x86 - 64
2506 'AdditionalLibraryDirectories!':
2507 ['<(windows_sdk_path)/Lib/win8/um/x86'],
2508 'AdditionalLibraryDirectories':
2509 ['<(windows_sdk_path)/Lib/win8/um/x64'],
2510 # Doesn't exist x64 SDK. Should use oleaut32 in any case.
2511 'IgnoreDefaultLibraryNames': [ 'olepro32.lib' ],
2513 'VCLibrarianTool': {
2514 'AdditionalLibraryDirectories!':
2515 ['<(windows_sdk_path)/Lib/win8/um/x86'],
2516 'AdditionalLibraryDirectories':
2517 ['<(windows_sdk_path)/Lib/win8/um/x64'],
2524 'DYNAMIC_ANNOTATIONS_ENABLED=1',
2525 'WTF_USE_DYNAMIC_ANNOTATIONS=1',
2528 'COPY_PHASE_STRIP': 'NO',
2529 'GCC_OPTIMIZATION_LEVEL': '<(mac_debug_optimization)',
2531 '<@(debug_extra_cflags)',
2535 'VCCLCompilerTool': {
2536 'Optimization': '<(win_debug_Optimization)',
2537 'PreprocessorDefinitions': ['_DEBUG'],
2538 'BasicRuntimeChecks': '<(win_debug_RuntimeChecks)',
2539 'RuntimeLibrary': '<(win_debug_RuntimeLibrary)',
2541 # According to MSVS, InlineFunctionExpansion=0 means
2542 # "default inlining", not "/Ob0".
2543 # Thus, we have to handle InlineFunctionExpansion==0 separately.
2544 ['win_debug_InlineFunctionExpansion==0', {
2545 'AdditionalOptions': ['/Ob0'],
2547 ['win_debug_InlineFunctionExpansion!=""', {
2548 'InlineFunctionExpansion':
2549 '<(win_debug_InlineFunctionExpansion)',
2551 ['win_debug_disable_iterator_debugging==1', {
2552 'PreprocessorDefinitions': ['_HAS_ITERATOR_DEBUGGING=0'],
2555 # if win_debug_OmitFramePointers is blank, leave as default
2556 ['win_debug_OmitFramePointers==1', {
2557 'OmitFramePointers': 'true',
2559 ['win_debug_OmitFramePointers==0', {
2560 'OmitFramePointers': 'false',
2561 # The above is not sufficient (http://crbug.com/106711): it
2562 # simply eliminates an explicit "/Oy", but both /O2 and /Ox
2563 # perform FPO regardless, so we must explicitly disable.
2564 # We still want the false setting above to avoid having
2565 # "/Oy /Oy-" and warnings about overriding.
2566 'AdditionalOptions': ['/Oy-'],
2569 'AdditionalOptions': [ '<@(win_debug_extra_cflags)', ],
2572 'LinkIncremental': '<(msvs_debug_link_incremental)',
2573 # ASLR makes debugging with windbg difficult because Chrome.exe and
2574 # Chrome.dll share the same base name. As result, windbg will
2575 # name the Chrome.dll module like chrome_<base address>, where
2576 # <base address> typically changes with each launch. This in turn
2577 # means that breakpoints in Chrome.dll don't stick from one launch
2578 # to the next. For this reason, we turn ASLR off in debug builds.
2579 # Note that this is a three-way bool, where 0 means to pick up
2580 # the default setting, 1 is off and 2 is on.
2581 'RandomizedBaseAddress': 1,
2583 'VCResourceCompilerTool': {
2584 'PreprocessorDefinitions': ['_DEBUG'],
2588 ['OS=="linux" or OS=="android"', {
2589 'target_conditions': [
2590 ['_toolset=="target"', {
2592 '<@(debug_extra_cflags)',
2597 # Disabled on iOS because it was causing a crash on startup.
2598 # TODO(michelea): investigate, create a reduced test and possibly
2600 ['release_valgrind_build==0 and OS!="ios"', {
2603 '-fstack-protector-all', # Implies -fstack-protector
2615 'DEAD_CODE_STRIPPING': 'YES', # -Wl,-dead_strip
2616 'GCC_OPTIMIZATION_LEVEL': '<(mac_release_optimization)',
2617 'OTHER_CFLAGS': [ '<@(release_extra_cflags)', ],
2620 'VCCLCompilerTool': {
2621 'RuntimeLibrary': '<(win_release_RuntimeLibrary)',
2623 # In official builds, each target will self-select
2624 # an optimization level.
2625 ['buildtype!="Official"', {
2626 'Optimization': '<(win_release_Optimization)',
2629 # According to MSVS, InlineFunctionExpansion=0 means
2630 # "default inlining", not "/Ob0".
2631 # Thus, we have to handle InlineFunctionExpansion==0 separately.
2632 ['win_release_InlineFunctionExpansion==0', {
2633 'AdditionalOptions': ['/Ob0'],
2635 ['win_release_InlineFunctionExpansion!=""', {
2636 'InlineFunctionExpansion':
2637 '<(win_release_InlineFunctionExpansion)',
2640 # if win_release_OmitFramePointers is blank, leave as default
2641 ['win_release_OmitFramePointers==1', {
2642 'OmitFramePointers': 'true',
2644 ['win_release_OmitFramePointers==0', {
2645 'OmitFramePointers': 'false',
2646 # The above is not sufficient (http://crbug.com/106711): it
2647 # simply eliminates an explicit "/Oy", but both /O2 and /Ox
2648 # perform FPO regardless, so we must explicitly disable.
2649 # We still want the false setting above to avoid having
2650 # "/Oy /Oy-" and warnings about overriding.
2651 'AdditionalOptions': ['/Oy-'],
2654 'AdditionalOptions': [ '<@(win_release_extra_cflags)', ],
2657 # LinkIncremental is a tri-state boolean, where 0 means default
2658 # (i.e., inherit from parent solution), 1 means false, and
2660 'LinkIncremental': '1',
2661 # This corresponds to the /PROFILE flag which ensures the PDB
2662 # file contains FIXUP information (growing the PDB file by about
2663 # 5%) but does not otherwise alter the output binary. This
2664 # information is used by the Syzygy optimization tool when
2665 # decomposing the release image.
2670 ['msvs_use_common_release', {
2671 'includes': ['release.gypi'],
2673 ['release_valgrind_build==0 and tsan==0', {
2676 'DYNAMIC_ANNOTATIONS_ENABLED=0',
2680 'MEMORY_TOOL_REPLACES_ALLOCATOR',
2681 'DYNAMIC_ANNOTATIONS_ENABLED=1',
2682 'WTF_USE_DYNAMIC_ANNOTATIONS=1',
2685 ['win_use_allocator_shim==0', {
2686 'defines': ['NO_TCMALLOC'],
2688 ['os_posix==1 and chromium_code==1', {
2689 # Non-chromium code is not guaranteed to compile cleanly
2690 # with _FORTIFY_SOURCE. Also, fortified build may fail
2691 # when optimizations are disabled, so only do that for Release
2694 '_FORTIFY_SOURCE=2',
2697 ['OS=="linux" or OS=="android"', {
2698 'target_conditions': [
2699 ['_toolset=="target"', {
2701 '<@(release_extra_cflags)',
2708 'NS_BLOCK_ASSERTIONS=1',
2714 # Concrete configurations
2717 'inherit_from': ['Common_Base', 'x86_Base', 'Debug_Base'],
2720 'inherit_from': ['Common_Base', 'x86_Base', 'Release_Base'],
2724 # TODO(bradnelson): add a gyp mechanism to make this more graceful.
2726 'inherit_from': ['Common_Base', 'x64_Base', 'Debug_Base'],
2729 'inherit_from': ['Common_Base', 'x64_Base', 'Release_Base'],
2737 'target_defaults': {
2744 ['os_posix==1 and chromeos==0', {
2745 # Chrome OS enables -fstack-protector-strong via its build wrapper,
2746 # and we want to avoid overriding this, so stack-protector is only
2747 # enabled when not building on Chrome OS.
2748 # TODO(phajdan.jr): Use -fstack-protector-strong when our gcc
2750 'target_defaults': {
2752 '-fstack-protector',
2753 '--param=ssp-buffer-size=4',
2757 ['os_posix==1 and OS!="mac" and OS!="ios"', {
2758 'target_defaults': {
2759 # Enable -Werror by default, but put it in a variable so it can
2760 # be disabled in ~/.gyp/include.gypi on the valgrind builders.
2762 'werror%': '-Werror',
2763 'libraries_for_target%': '',
2766 '_FILE_OFFSET_BITS=64',
2769 '<(werror)', # See note above about the werror variable.
2772 '-fno-strict-aliasing', # See http://crbug.com/32204
2774 # TODO(evan): turn this back on once all the builds work.
2776 # Don't warn about unused function params. We use those everywhere.
2777 '-Wno-unused-parameter',
2778 # Don't warn about the "struct foo f = {0};" initialization pattern.
2779 '-Wno-missing-field-initializers',
2780 # Don't export any symbols (for example, to plugins we dlopen()).
2781 # Note: this is *required* to make some plugins work.
2782 '-fvisibility=hidden',
2787 '-fno-threadsafe-statics',
2788 # Make inline functions have hidden visiblity by default.
2789 # Surprisingly, not covered by -fvisibility=hidden.
2790 '-fvisibility-inlines-hidden',
2791 # GCC turns on -Wsign-compare for C++ under -Wall, but clang doesn't,
2792 # so we specify it explicitly.
2793 # TODO(fischman): remove this if http://llvm.org/PR10448 obsoletes it.
2794 # http://code.google.com/p/chromium/issues/detail?id=90453
2798 '-pthread', '-Wl,-z,noexecstack',
2801 '<(libraries_for_target)',
2806 'debug_optimize%': '0',
2812 '-O>(debug_optimize)',
2818 '-Wl,--fatal-warnings',
2819 # Only link with needed input sections. This is to avoid
2820 # getting undefined reference to __cxa_bad_typeid in the CDU
2822 '-Wl,--gc-sections',
2823 # Warn in case of text relocations.
2824 '-Wl,--warn-shared-textrel',
2827 ['OS=="android" and android_webview_build==1', {
2829 # Must not turn on --fatal-warnings or warn-shared-textrel,
2830 # see crbug.com/157326.
2831 '-Wl,--fatal-warnings',
2832 '-Wl,--warn-shared-textrel',
2835 ['OS=="android" and android_full_debug==0', {
2836 # Some configurations are copied from Release_Base to reduce
2839 'debug_optimize%': 's',
2842 '-fomit-frame-pointer',
2844 '-ffunction-sections',
2851 ['OS=="linux" and target_arch=="ia32"', {
2853 '-Wl,--no-as-needed',
2860 'release_optimize%': '2',
2861 # Binaries become big and gold is unable to perform GC
2862 # and remove unused sections for some of test targets
2863 # on 32 bit platform.
2864 # (This is currently observed only in chromeos valgrind bots)
2865 # The following flag is to disable --gc-sections linker
2866 # option for these bots.
2867 'no_gc_sections%': 0,
2869 # TODO(bradnelson): reexamine how this is done if we change the
2870 # expansion of configurations
2871 'release_valgrind_build%': 0,
2874 '-O<(release_optimize)',
2875 # Don't emit the GCC version ident directives, they just end up
2876 # in the .comment section taking up binary size.
2878 # Put data and code in their own sections, so that unused symbols
2879 # can be removed at link time with --gc-sections.
2881 '-ffunction-sections',
2884 # Specifically tell the linker to perform optimizations.
2885 # See http://lwn.net/Articles/192624/ .
2890 ['no_gc_sections==0', {
2892 '-Wl,--gc-sections',
2897 'release_optimize%': 's',
2900 '-fomit-frame-pointer',
2903 '-Wl,--fatal-warnings',
2904 # Warn in case of text relocations.
2905 '-Wl,--warn-shared-textrel',
2908 ['OS=="android" and android_webview_build==1', {
2910 # Must not turn on --fatal-warnings or
2911 # shared-text-rel, see crbug.com/157326.
2912 '-Wl,--fatal-warnings',
2913 '-Wl,--warn-shared-textrel',
2923 '-fno-omit-frame-pointer',
2927 ['profiling_full_stack_frames==1', {
2930 '-fno-optimize-sibling-calls',
2935 # Can be omitted to reduce output size. Does not seem to affect
2937 ['target_arch=="ia32"', {
2939 '-fno-unwind-tables',
2940 '-fno-asynchronous-unwind-tables',
2948 'cflags': ['-fprofile-arcs', '-ftest-coverage'],
2949 'ldflags': ['-fprofile-arcs'],
2952 'cflags': ['-pg', '-g'],
2960 ['target_arch=="ia32"', {
2961 'target_conditions': [
2962 ['_toolset=="target"', {
2964 # Needed so that libs with .s files (e.g. libicudata.a)
2965 # are compatible with the general 32-bit-ness.
2968 # All floating-point computations on x87 happens in 80-bit
2969 # precision. Because the C and C++ language standards allow
2970 # the compiler to keep the floating-point values in higher
2971 # precision than what's specified in the source and doing so
2972 # is more efficient than constantly rounding up to 64-bit or
2973 # 32-bit precision as specified in the source, the compiler,
2974 # especially in the optimized mode, tries very hard to keep
2975 # values in x87 floating-point stack (in 80-bit precision)
2976 # as long as possible. This has important side effects, that
2977 # the real value used in computation may change depending on
2978 # how the compiler did the optimization - that is, the value
2979 # kept in 80-bit is different than the value rounded down to
2980 # 64-bit or 32-bit. There are possible compiler options to
2981 # make this behavior consistent (e.g. -ffloat-store would keep
2982 # all floating-values in the memory, thus force them to be
2983 # rounded to its original precision) but they have significant
2984 # runtime performance penalty.
2986 # -mfpmath=sse -msse2 makes the compiler use SSE instructions
2987 # which keep floating-point values in SSE registers in its
2988 # native precision (32-bit for single precision, and 64-bit
2989 # for double precision values). This means the floating-point
2990 # value used during computation does not change depending on
2991 # how the compiler optimized the code, since the value is
2992 # always kept in its specified precision.
2994 ['branding=="Chromium" and disable_sse2==0', {
3001 # ChromeOS targets Pinetrail, which is sse3, but most of the
3002 # benefit comes from sse2 so this setting allows ChromeOS
3003 # to build on other CPUs. In the future -march=atom would
3004 # help but requires a newer compiler.
3005 ['chromeos==1 and disable_sse2==0', {
3011 # Use gold linker for Android ia32 target.
3020 # Install packages have started cropping up with
3021 # different headers between the 32-bit and 64-bit
3022 # versions, so we have to shadow those differences off
3023 # and make sure a 32-bit-on-64-bit build picks up the
3025 # For android build, use NDK headers instead of host headers
3026 ['host_arch!="ia32" and OS!="android"', {
3032 # -mmmx allows mmintrin.h to be used for mmx intrinsics.
3033 # video playback is mmx and sse2 optimized.
3044 ['target_arch=="arm"', {
3045 'target_conditions': [
3046 ['_toolset=="target"', {
3048 # The codesourcery arm-2009q3 toolchain warns at that the ABI
3049 # has changed whenever it encounters a varargs function. This
3050 # silences those warnings, as they are not helpful and
3051 # clutter legitimate warnings.
3057 '-march=<(arm_arch)',
3062 '-mtune=<(arm_tune)',
3070 ['arm_float_abi!=""', {
3072 '-mfloat-abi=<(arm_float_abi)',
3081 # Most of the following flags are derived from what Android
3082 # uses by default when building for arm, reference for which
3083 # can be found in the following file in the Android NDK:
3084 # toolchains/arm-linux-androideabi-4.4.3/setup.mk
3086 # The tree-sra optimization (scalar replacement for
3087 # aggregates enabling subsequent optimizations) leads to
3088 # invalid code generation when using the Android NDK's
3089 # compiler (r5-r7). This can be verified using
3090 # webkit_unit_tests' WTF.Checked_int8_t test.
3095 # Android now supports .relro sections properly.
3096 # NOTE: While these flags enable the generation of .relro
3097 # sections, the generated libraries can still be loaded on
3098 # older Android platform versions.
3106 'cflags': [ '-mthumb-interwork' ],
3110 '-marm', # Probably reduntant, but recommend by "perf" docs.
3111 '-mapcs-frame', # Seems required by -fno-omit-frame-pointer.
3116 # Clang does not support the following options.
3117 '-mthumb-interwork',
3118 '-finline-limit=64',
3130 ['target_arch=="mipsel"', {
3131 'target_conditions': [
3132 ['_toolset=="target"', {
3134 ['android_webview_build==0 and mips_arch_variant=="mips32r2"', {
3135 'cflags': ['-mips32r2', '-Wa,-mips32r2'],
3137 ['android_webview_build==0 and mips_arch_variant!="mips32r2"', {
3138 'cflags': ['-mips32', '-Wa,-mips32'],
3147 '-Wl,--no-keep-memory'
3150 '-Wno-uninitialized',
3164 'target_conditions': [
3165 ['_toolset=="target"', {
3167 '--sysroot=<(sysroot)',
3170 '--sysroot=<(sysroot)',
3171 '<!(<(DEPTH)/build/linux/sysroot_ld_path.sh <(sysroot))',
3179 # Don't die on dtoa code that uses a char as an array index.
3180 '-Wno-char-subscripts',
3182 # Clang spots more unused functions.
3183 '-Wno-unused-function',
3185 # Warns on switches on enums that cover all enum values but
3186 # also contain a default: branch. Chrome is full of that.
3187 '-Wno-covered-switch-default',
3189 # Warns when a const char[] is converted to bool.
3190 '-Wstring-conversion',
3192 # C++11-related flags:
3194 # This warns on using ints as initializers for floats in
3195 # initializer lists (e.g. |int a = f(); CGSize s = { a, a };|),
3196 # which happens in several places in chrome code. Not sure if
3197 # this is worth fixing.
3198 '-Wno-c++11-narrowing',
3200 # TODO(thakis): Remove, http://crbug.com/263960
3201 '-Wno-reserved-user-defined-literal',
3203 # Clang considers the `register` keyword as deprecated, but e.g.
3204 # code generated by flex (used in angle) contains that keyword.
3205 # http://crbug.com/255186
3206 '-Wno-deprecated-register',
3209 # Clang doesn't seem to know know this flag.
3213 # See the comment in the Mac section for what it takes to move
3214 # this to -std=c++11.
3218 ['clang==1 and OS=="android"', {
3219 # Android uses stlport, whose include/new defines
3220 # `void operator delete[](void* ptr) throw();`, which
3221 # clang's -Wimplicit-exception-spec-mismatch warns about for some
3222 # reason -- http://llvm.org/PR16638. TODO(thakis): Include stlport
3223 # via -isystem instead.
3225 '-Wno-implicit-exception-spec-mismatch',
3228 ['clang==1 and clang_use_chrome_plugins==1', {
3230 '<@(clang_chrome_plugins_flags)',
3233 ['clang==1 and clang_load!=""', {
3235 '-Xclang', '-load', '-Xclang', '<(clang_load)',
3238 ['clang==1 and clang_add_plugin!=""', {
3240 '-Xclang', '-add-plugin', '-Xclang', '<(clang_add_plugin)',
3243 ['clang==1 and target_arch=="ia32"', {
3245 # Else building libyuv gives clang's register allocator issues,
3246 # see llvm.org/PR15798 / crbug.com/233709
3247 '-momit-leaf-frame-pointer',
3250 ['clang==1 and "<(GENERATOR)"=="ninja"', {
3252 # See http://crbug.com/110262
3253 '-fcolor-diagnostics',
3256 # Common options for AddressSanitizer, LeakSanitizer,
3257 # ThreadSanitizer and MemorySanitizer.
3258 ['asan==1 or lsan==1 or tsan==1 or msan==1', {
3259 'target_conditions': [
3260 ['_toolset=="target"', {
3262 '-fno-omit-frame-pointer',
3263 '-gline-tables-only',
3266 # Functions interposed by the sanitizers can make ld think
3267 # that some libraries aren't needed when they actually are,
3268 # http://crbug.com/234010. As workaround, disable --as-needed.
3272 'MEMORY_TOOL_REPLACES_ALLOCATOR',
3275 ['_toolset=="target" and OS=="linux"', {
3277 # http://crbug.com/234010.
3284 'target_conditions': [
3285 ['_toolset=="target"', {
3287 '-fsanitize=address',
3288 '-w', # http://crbug.com/162783
3291 '-fsanitize=address',
3294 'ADDRESS_SANITIZER',
3301 '-mllvm -asan-globals=0', # http://crbug.com/196561
3307 'target_conditions': [
3308 ['_toolset=="target"', {
3322 'target_conditions': [
3323 ['_toolset=="target"', {
3325 '-fsanitize=thread',
3327 '-mllvm', '-tsan-blacklist=<(tsan_blacklist)',
3330 '-fsanitize=thread',
3334 'DYNAMIC_ANNOTATIONS_EXTERNAL_IMPL=1',
3335 'WTF_USE_DYNAMIC_ANNOTATIONS_NOIMPL=1',
3337 'target_conditions': [
3338 ['_type=="executable"', {
3348 'target_conditions': [
3349 ['_toolset=="target"', {
3351 '-fsanitize=memory',
3352 '-fsanitize-memory-track-origins',
3356 '-fsanitize=memory',
3361 'target_conditions': [
3362 ['_type=="executable"', {
3371 ['order_profiling!=0 and (chromeos==1 or OS=="linux" or OS=="android")', {
3372 'target_conditions' : [
3373 ['_toolset=="target"', {
3375 '-finstrument-functions',
3376 # Allow mmx intrinsics to inline, so that the
3377 #0 compiler can expand the intrinsics.
3378 '-finstrument-functions-exclude-file-list=mmintrin.h',
3381 ['_toolset=="target" and OS=="android"', {
3383 # Avoids errors with current NDK:
3384 # "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"
3385 '-finstrument-functions-exclude-file-list=arm_neon.h',
3390 ['linux_dump_symbols==1', {
3393 ['target_arch=="ia32" and OS!="android"', {
3394 'target_conditions': [
3395 ['_toolset=="target"', {
3397 # Workaround for linker OOM.
3398 '-Wl,--no-keep-memory',
3405 ['linux_use_heapchecker==1', {
3406 'variables': {'linux_use_tcmalloc%': 1},
3409 'MEMORY_TOOL_REPLACES_ALLOCATOR',
3412 ['component=="shared_library"', {
3413 # See crbug.com/112389
3414 # TODO(glider): replace with --dynamic-list or something
3415 'ldflags': ['-rdynamic'],
3419 ['linux_use_tcmalloc==0 and android_use_tcmalloc==0', {
3420 'defines': ['NO_TCMALLOC'],
3422 ['linux_keep_shadow_stacks==1', {
3423 'defines': ['KEEP_SHADOW_STACKS'],
3425 '-finstrument-functions',
3426 # Allow mmx intrinsics to inline, so that the compiler can expand
3428 '-finstrument-functions-exclude-file-list=mmintrin.h',
3431 ['linux_use_gold_flags==1', {
3432 'target_conditions': [
3433 ['_toolset=="target"', {
3435 # Experimentation found that using four linking threads
3436 # saved ~20% of link time.
3437 # https://groups.google.com/a/chromium.org/group/chromium-dev/browse_thread/thread/281527606915bb36
3438 # Only apply this to the target linker, since the host
3439 # linker might not be gold, but isn't used much anyway.
3441 '-Wl,--thread-count=4',
3446 ['release_valgrind_build==0', {
3447 'target_conditions': [
3448 ['_toolset=="target"', {
3450 # There seems to be a conflict of --icf and -pie
3451 # in gold which can generate crashy binaries. As
3452 # a security measure, -pie takes precendence for
3462 ['linux_use_gold_binary==1', {
3464 # Put our gold binary in the search path for the linker.
3465 # We pass the path to gold to the compiler. gyp leaves
3466 # unspecified what the cwd is when running the compiler,
3467 # so the normal gyp path-munging fails us. This hack
3468 # gets the right path.
3469 '-B<(PRODUCT_DIR)/../../third_party/gold',
3472 ['native_discardable_memory', {
3473 'defines': ['DISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY'],
3475 ['native_memory_pressure_signals', {
3476 'defines': ['SYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE'],
3481 # FreeBSD-specific options; note that most FreeBSD options are set above,
3484 'target_defaults': {
3486 '-Wl,--no-keep-memory',
3490 # Android-specific options; note that most are set above with Linux.
3493 # This is a unique identifier for a given build. It's used for
3494 # identifying various build artifacts corresponding to a particular
3495 # build of chrome (e.g. where to find archived symbols).
3496 'chrome_build_id%': '',
3498 # Use shared stlport library when system one used.
3499 # Figure this out early since it needs symbols from libgcc.a, so it
3500 # has to be before that in the set of libraries.
3501 ['use_system_stlport==1', {
3502 'android_stlport_library': 'stlport',
3505 ['component=="shared_library"', {
3506 'android_stlport_library': 'stlport_shared',
3508 'android_stlport_library': 'stlport_static',
3514 # Placing this variable here prevents from forking libvpx, used
3515 # by remoting. Remoting is off, so it needn't built,
3516 # so forking it's deps seems like overkill.
3517 # But this variable need defined to properly run gyp.
3518 # A proper solution is to have an OS==android conditional
3519 # in third_party/libvpx/libvpx.gyp to define it.
3520 'libvpx_path': 'lib/linux/arm',
3522 'target_defaults': {
3524 'release_extra_cflags%': '',
3526 # If we're using the components build, append "cr" to all shared
3527 # libraries to avoid naming collisions with android system library
3528 # versions with the same name (e.g. skia, icu).
3529 ['component=="shared_library"', {
3530 'android_product_extension': 'cr.so',
3532 'android_product_extension': 'so',
3536 'target_conditions': [
3537 ['_type=="shared_library"', {
3538 'product_extension': '<(android_product_extension)',
3541 # Settings for building device targets using Android's toolchain.
3542 # These are based on the setup.mk file from the Android NDK.
3544 # The NDK Android executable link step looks as follows:
3546 # $(TARGET_CRTBEGIN_DYNAMIC_O) <-- crtbegin.o
3547 # $(PRIVATE_OBJECTS) <-- The .o that we built
3548 # $(PRIVATE_STATIC_LIBRARIES) <-- The .a that we built
3549 # $(TARGET_LIBGCC) <-- libgcc.a
3550 # $(PRIVATE_SHARED_LIBRARIES) <-- The .so that we built
3551 # $(PRIVATE_LDLIBS) <-- System .so
3552 # $(TARGET_CRTEND_O) <-- crtend.o
3554 # For now the above are approximated for executables by adding
3555 # crtbegin.o to the end of the ldflags and 'crtend.o' to the end
3558 # The NDK Android shared library link step looks as follows:
3560 # $(PRIVATE_OBJECTS) <-- The .o that we built
3561 # -l,--whole-archive
3562 # $(PRIVATE_WHOLE_STATIC_LIBRARIES)
3563 # -l,--no-whole-archive
3564 # $(PRIVATE_STATIC_LIBRARIES) <-- The .a that we built
3565 # $(TARGET_LIBGCC) <-- libgcc.a
3566 # $(PRIVATE_SHARED_LIBRARIES) <-- The .so that we built
3567 # $(PRIVATE_LDLIBS) <-- System .so
3569 # For now, assume that whole static libraries are not needed.
3571 # For both executables and shared libraries, add the proper
3572 # libgcc.a to the start of libraries which puts it in the
3573 # proper spot after .o and .a files get linked in.
3575 # TODO: The proper thing to do longer-tem would be proper gyp
3576 # support for a custom link command line.
3577 ['_toolset=="target"', {
3579 '-pthread', # Not supported by Android toolchain.
3582 '-ffunction-sections',
3585 '-fstack-protector',
3587 '-finline-limit=64',
3588 '-Wa,--noexecstack',
3589 '<@(release_extra_cflags)',
3593 '__GNU_SOURCE=1', # Necessary for clone()
3595 '_STLP_USE_PTR_SPECIALIZATIONS=1',
3596 'CHROME_BUILD_ID="<(chrome_build_id)"',
3599 '-pthread', # Not supported by Android toolchain.
3603 '-Wl,--no-undefined',
3604 # Don't export symbols from statically linked libraries.
3605 '-Wl,--exclude-libs=ALL',
3608 '-l<(android_stlport_library)',
3609 # Manually link the libgcc.a that the cross compiler uses.
3610 '<!(<(android_toolchain)/*-gcc -print-libgcc-file-name)',
3616 ['component=="shared_library"', {
3618 '-Wl,--exclude-libs=ALL',
3623 # Work around incompatibilities between bionic and clang
3625 '-D__compiler_offsetof=__builtin_offsetof',
3626 '-Dnan=__builtin_nan',
3629 ['target_arch=="arm"', {
3631 '-target arm-linux-androideabi',
3632 '-mllvm -arm-enable-ehabi',
3635 '-target arm-linux-androideabi',
3638 ['target_arch=="ia32"', {
3640 '-target x86-linux-androideabi',
3643 '-target x86-linux-androideabi',
3650 # Android build relies on -Wl,--gc-sections removing
3651 # unreachable code. ASan instrumentation for globals inhibits
3652 # this and results in a library with unresolvable relocations.
3653 # TODO(eugenis): find a way to reenable this.
3654 '-mllvm -asan-globals=0',
3657 ['android_webview_build==0', {
3659 # The NDK has these things, but doesn't define the constants
3660 # to say that it does. Define them here instead.
3664 '--sysroot=<(android_ndk_sysroot)',
3667 '--sysroot=<(android_ndk_sysroot)',
3670 ['android_webview_build==1', {
3672 # OpenAL headers from the Android tree.
3673 '<(android_src)/frameworks/wilhelm/include',
3676 # Android predefines this as 1; undefine it here so Chromium
3677 # can redefine it later to be 2 for chromium code and unset
3678 # for third party code. This works because cflags are added
3680 '-U_FORTIFY_SOURCE',
3681 # Disable any additional warnings enabled by the Android build system but which
3682 # chromium does not build cleanly with (when treating warning as errors).
3683 # Things that are part of -Wextra:
3684 '-Wno-extra', # Enabled by -Wextra, but no specific flag
3685 '-Wno-ignored-qualifiers',
3689 # Disabling c++0x-compat should be handled in WebKit, but
3690 # this currently doesn't work because gcc_version is not set
3691 # correctly when building with the Android build system.
3692 # TODO(torne): Fix this in WebKit.
3693 '-Wno-error=c++0x-compat',
3694 # Other things unrelated to -Wextra:
3695 '-Wno-non-virtual-dtor',
3699 ['android_webview_build==1 and chromium_code==0', {
3701 # There is a class of warning which:
3702 # 1) Android always enables and also treats as errors
3703 # 2) Chromium ignores in third party code
3704 # So we re-enable those warnings when building Android.
3706 '-Wno-format-security',
3708 '-Wno-sequence-point',
3711 '-Wno-non-virtual-dtor',
3714 ['target_arch == "arm"', {
3716 # Enable identical code folding to reduce size.
3720 # NOTE: The stlport header include paths below are specified in
3721 # cflags rather than include_dirs because they need to come
3722 # after include_dirs. Think of them like system headers, but
3723 # don't use '-isystem' because the arm-linux-androideabi-4.4.3
3724 # toolchain (circa Gingerbread) will exhibit strange errors.
3725 # The include ordering here is important; change with caution.
3726 ['use_system_stlport==1', {
3728 # For libstdc++/include, which is used by stlport.
3729 '-I<(android_src)/bionic',
3730 '-I<(android_src)/external/stlport/stlport',
3732 }, { # else: use_system_stlport!=1
3734 '-I<(android_stlport_include)',
3737 '-L<(android_stlport_libs_dir)',
3740 ['target_arch=="ia32"', {
3741 # The x86 toolchain currently has problems with stack-protector.
3743 '-fstack-protector',
3746 '-fno-stack-protector',
3750 'target_conditions': [
3751 ['_type=="executable"', {
3754 '-Wl,-dynamic-linker,/system/bin/linker',
3755 '-Wl,--gc-sections',
3756 '-Wl,-z,nocopyreloc',
3757 # crtbegin_dynamic.o should be the last item in ldflags.
3758 '<(android_ndk_lib)/crtbegin_dynamic.o',
3761 # crtend_android.o needs to be the last item in libraries.
3762 # Do not add any libraries after this!
3763 '<(android_ndk_lib)/crtend_android.o',
3776 ['_type=="shared_library" or _type=="loadable_module"', {
3778 '-Wl,-shared,-Bsymbolic',
3781 ['android_webview_build==0', {
3783 # crtbegin_so.o should be the last item in ldflags.
3784 '<(android_ndk_lib)/crtbegin_so.o',
3787 # crtend_so.o needs to be the last item in libraries.
3788 # Do not add any libraries after this!
3789 '<(android_ndk_lib)/crtend_so.o',
3794 # ndk-build copies .a's around the filesystem, breaking
3795 # relative paths in thin archives. Disable using thin
3796 # archives to avoid problems until one of these is fixed:
3797 # http://code.google.com/p/android/issues/detail?id=40302
3798 # http://code.google.com/p/android/issues/detail?id=40303
3799 ['_type=="static_library"', {
3800 'standalone_static_library': 1,
3804 # Settings for building host targets using the system toolchain.
3805 ['_toolset=="host"', {
3807 # Due to issues in Clang build system, using ASan on 32-bit
3808 # binaries on x86_64 host is problematic.
3809 # TODO(eugenis): re-enable.
3810 '-fsanitize=address',
3811 '-w', # http://crbug.com/162783
3814 '-fsanitize=address',
3815 '-Wl,-z,noexecstack',
3816 '-Wl,--gc-sections',
3821 # Settings for building host targets on mac.
3822 ['_toolset=="host" and host_os=="mac"', {
3832 'cflags!': ['-fvisibility=hidden'],
3833 'cflags_cc!': ['-fvisibility-inlines-hidden'],
3835 ['OS=="mac" or OS=="ios"', {
3836 'target_defaults': {
3839 'ALWAYS_SEARCH_USER_PATHS': 'NO',
3840 # Don't link in libarclite_macosx.a, see http://crbug.com/156530.
3841 'CLANG_LINK_OBJC_RUNTIME': 'NO', # -fno-objc-link-runtime
3842 'GCC_C_LANGUAGE_STANDARD': 'c99', # -std=c99
3843 'GCC_CW_ASM_SYNTAX': 'NO', # No -fasm-blocks
3844 'GCC_ENABLE_CPP_EXCEPTIONS': 'NO', # -fno-exceptions
3845 'GCC_ENABLE_CPP_RTTI': 'NO', # -fno-rtti
3846 'GCC_ENABLE_PASCAL_STRINGS': 'NO', # No -mpascal-strings
3847 # GCC_INLINES_ARE_PRIVATE_EXTERN maps to -fvisibility-inlines-hidden
3848 'GCC_INLINES_ARE_PRIVATE_EXTERN': 'YES',
3849 'GCC_OBJC_CALL_CXX_CDTORS': 'YES', # -fobjc-call-cxx-cdtors
3850 'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES', # -fvisibility=hidden
3851 'GCC_THREADSAFE_STATICS': 'NO', # -fno-threadsafe-statics
3852 'GCC_TREAT_WARNINGS_AS_ERRORS': 'YES', # -Werror
3853 'GCC_VERSION': '4.2',
3854 'GCC_WARN_ABOUT_MISSING_NEWLINE': 'YES', # -Wnewline-eof
3855 'USE_HEADERMAP': 'NO',
3860 # Don't warn about unused function parameters.
3861 '-Wno-unused-parameter',
3862 # Don't warn about the "struct foo f = {0};" initialization
3864 '-Wno-missing-field-initializers',
3867 ['chromium_mac_pch', {'GCC_PRECOMPILE_PREFIX_HEADER': 'YES'},
3868 {'GCC_PRECOMPILE_PREFIX_HEADER': 'NO'}
3870 # Note that the prebuilt Clang binaries should not be used for iOS
3871 # development except for ASan builds.
3873 'CC': '$(SOURCE_ROOT)/<(clang_dir)/clang',
3874 'LDPLUSPLUS': '$(SOURCE_ROOT)/<(clang_dir)/clang++',
3876 # Don't use -Wc++0x-extensions, which Xcode 4 enables by default
3877 # when building with clang. This warning is triggered when the
3878 # override keyword is used via the OVERRIDE macro from
3879 # base/compiler_specific.h.
3880 'CLANG_WARN_CXX0X_EXTENSIONS': 'NO',
3881 # Warn if automatic synthesis is triggered with
3882 # the -Wobjc-missing-property-synthesis flag.
3883 'CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS': 'YES',
3884 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0',
3888 # This warns on using ints as initializers for floats in
3889 # initializer lists (e.g. |int a = f(); CGSize s = { a, a };|),
3890 # which happens in several places in chrome code. Not sure if
3891 # this is worth fixing.
3892 '-Wno-c++11-narrowing',
3894 # Don't die on dtoa code that uses a char as an array index.
3895 # This is required solely for base/third_party/dmg_fp/dtoa.cc.
3896 '-Wno-char-subscripts',
3898 # Clang spots more unused functions.
3899 '-Wno-unused-function',
3901 # Warns on switches on enums that cover all enum values but
3902 # also contain a default: branch. Chrome is full of that.
3903 '-Wno-covered-switch-default',
3905 # Warns when a const char[] is converted to bool.
3906 '-Wstring-conversion',
3908 # Clang considers the `register` keyword as deprecated, but e.g.
3909 # code generated by flex (used in angle) contains that keyword.
3910 # http://crbug.com/255186
3911 '-Wno-deprecated-register',
3913 'OTHER_CPLUSPLUSFLAGS': [
3914 # gnu++11 instead of c++11 is needed because some code uses
3915 # typeof() (a GNU extension).
3916 # TODO(thakis): Eventually switch this to c++11 instead of
3917 # gnu++11 (once typeof can be removed, which is blocked on c++11
3918 # being available everywhere).
3919 # TODO(thakis): Use CLANG_CXX_LANGUAGE_STANDARD instead once all
3920 # bots use xcode 4 -- http://crbug.com/147515).
3921 '$(inherited)', '-std=gnu++11',
3924 ['clang==1 and clang_use_chrome_plugins==1', {
3926 '<@(clang_chrome_plugins_flags)',
3929 ['clang==1 and clang_load!=""', {
3931 '-Xclang', '-load', '-Xclang', '<(clang_load)',
3934 ['clang==1 and clang_add_plugin!=""', {
3936 '-Xclang', '-add-plugin', '-Xclang', '<(clang_add_plugin)',
3939 ['clang==1 and "<(GENERATOR)"=="ninja"', {
3941 # See http://crbug.com/110262
3942 '-fcolor-diagnostics',
3950 'clang_dir': '../third_party/llvm-build/Release+Asserts/bin',
3956 '-fsanitize=address',
3957 '-mllvm -asan-globals=0', # http://crbug.com/196561
3958 '-w', # http://crbug.com/162783
3962 'ADDRESS_SANITIZER',
3963 'MEMORY_TOOL_REPLACES_ALLOCATOR',
3967 'target_conditions': [
3968 ['_type!="static_library"', {
3969 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-search_paths_first']},
3974 '-fsanitize=address',
3981 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-ObjC']},
3982 'target_conditions': [
3983 ['_type=="executable"', {
3989 # Define copy_asan_dylib_path in a variable ending in
3990 # _path so that gyp understands it's a path and
3991 # performs proper relativization during dict merging.
3992 'copy_asan_dylib_path':
3993 'mac/copy_asan_runtime_dylib.sh',
3995 'postbuild_name': 'Copy ASan runtime dylib',
3997 '<(copy_asan_dylib_path)',
4006 ], # target_conditions
4007 }, # target_defaults
4008 }], # OS=="mac" or OS=="ios"
4010 'target_defaults': {
4012 # These should end with %, but there seems to be a bug with % in
4013 # variables that are intended to be set to different values in
4014 # different targets, like these.
4015 'mac_pie': 1, # Most executables can be position-independent.
4016 # Strip debugging symbols from the target.
4017 'mac_strip': '<(mac_strip_release)',
4021 ['mac_want_real_dsym=="default"', {
4024 'mac_real_dsym': '<(mac_want_real_dsym)'
4029 ['mac_want_real_dsym=="default"', {
4030 'mac_real_dsym': 0, # Fake .dSYMs are fine in most cases.
4032 'mac_real_dsym': '<(mac_want_real_dsym)'
4039 'GCC_DYNAMIC_NO_PIC': 'NO', # No -mdynamic-no-pic
4040 # (Equivalent to -fPIC)
4041 # MACOSX_DEPLOYMENT_TARGET maps to -mmacosx-version-min
4042 'MACOSX_DEPLOYMENT_TARGET': '<(mac_deployment_target)',
4043 # Keep pch files below xcodebuild/.
4044 'SHARED_PRECOMPS_DIR': '$(CONFIGURATION_BUILD_DIR)/SharedPrecompiledHeaders',
4046 # Someday this can be replaced by an 'GCC_STRICT_ALIASING': 'NO'
4047 # xcode_setting, but not until all downstream projects' mac bots are
4048 # using xcode >= 4.6, because that's when the default value of the
4049 # flag in the compiler switched. Pre-4.6, the value 'NO' for that
4050 # setting is a no-op as far as xcode is concerned, but the compiler
4051 # behaves differently based on whether -fno-strict-aliasing is
4053 '-fno-strict-aliasing', # See http://crbug.com/32204.
4056 'target_conditions': [
4057 ['_type=="executable"', {
4060 # Arranges for data (heap) pages to be protected against
4061 # code execution when running on Mac OS X 10.7 ("Lion"), and
4062 # ensures that the position-independent executable (PIE) bit
4063 # is set for ASLR when running on Mac OS X 10.5 ("Leopard").
4065 # Define change_mach_o_flags in a variable ending in _path
4066 # so that GYP understands it's a path and performs proper
4067 # relativization during dict merging.
4068 'change_mach_o_flags_path':
4069 'mac/change_mach_o_flags_from_xcode.sh',
4070 'change_mach_o_flags_options%': [
4072 'target_conditions': [
4073 ['mac_pie==0 or release_valgrind_build==1', {
4074 # Don't enable PIE if it's unwanted. It's unwanted if
4075 # the target specifies mac_pie=0 or if building for
4076 # Valgrind, because Valgrind doesn't understand slide.
4077 # See the similar mac_pie/release_valgrind_build check
4079 'change_mach_o_flags_options': [
4085 'postbuild_name': 'Change Mach-O Flags',
4087 '<(change_mach_o_flags_path)',
4088 '>@(change_mach_o_flags_options)',
4095 'asan_saves_file': 'asan.saves',
4098 'CHROMIUM_STRIP_SAVE_FILE': '<(asan_saves_file)',
4102 'target_conditions': [
4103 ['mac_pie==1 and release_valgrind_build==0', {
4104 # Turn on position-independence (ASLR) for executables. When
4105 # PIE is on for the Chrome executables, the framework will
4106 # also be subject to ASLR.
4107 # Don't do this when building for Valgrind, because Valgrind
4108 # doesn't understand slide. TODO: Make Valgrind on Mac OS X
4109 # understand slide, and get rid of the Valgrind check.
4112 '-Wl,-pie', # Position-independent executable (MH_PIE)
4118 ['(_type=="executable" or _type=="shared_library" or \
4119 _type=="loadable_module") and mac_strip!=0', {
4120 'target_conditions': [
4121 ['mac_real_dsym == 1', {
4122 # To get a real .dSYM bundle produced by dsymutil, set the
4123 # debug information format to dwarf-with-dsym. Since
4124 # strip_from_xcode will not be used, set Xcode to do the
4125 # stripping as well.
4129 'DEBUG_INFORMATION_FORMAT': 'dwarf-with-dsym',
4130 'DEPLOYMENT_POSTPROCESSING': 'YES',
4131 'STRIP_INSTALLED_PRODUCT': 'YES',
4132 'target_conditions': [
4133 ['_type=="shared_library" or _type=="loadable_module"', {
4134 # The Xcode default is to strip debugging symbols
4135 # only (-S). Local symbols should be stripped as
4136 # well, which will be handled by -x. Xcode will
4137 # continue to insert -S when stripping even when
4138 # additional flags are added with STRIPFLAGS.
4140 }], # _type=="shared_library" or _type=="loadable_module"
4141 ['_type=="executable"', {
4144 'STRIPFLAGS': '-s $(CHROMIUM_STRIP_SAVE_FILE)',
4147 }], # _type=="executable" and asan==1
4148 ], # target_conditions
4150 }, # configuration "Release"
4152 }, { # mac_real_dsym != 1
4153 # To get a fast fake .dSYM bundle, use a post-build step to
4154 # produce the .dSYM and strip the executable. strip_from_xcode
4155 # only operates in the Release configuration.
4159 # Define strip_from_xcode in a variable ending in _path
4160 # so that gyp understands it's a path and performs proper
4161 # relativization during dict merging.
4162 'strip_from_xcode_path': 'mac/strip_from_xcode',
4164 'postbuild_name': 'Strip If Needed',
4165 'action': ['<(strip_from_xcode_path)'],
4169 ], # target_conditions
4170 }], # (_type=="executable" or _type=="shared_library" or
4171 # _type=="loadable_module") and mac_strip!=0
4172 ], # target_conditions
4173 }, # target_defaults
4176 'target_defaults': {
4177 'xcode_settings' : {
4178 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0',
4180 # This next block is mostly common with the 'mac' section above,
4181 # but keying off (or setting) 'clang' isn't valid for iOS as it
4182 # also seems to mean using the custom build of clang.
4184 # TODO(stuartmorgan): switch to c++0x (see TODOs in the clang
4186 'CLANG_CXX_LANGUAGE_STANDARD': 'gnu++0x',
4187 # Don't use -Wc++0x-extensions, which Xcode 4 enables by default
4188 # when building with clang. This warning is triggered when the
4189 # override keyword is used via the OVERRIDE macro from
4190 # base/compiler_specific.h.
4191 'CLANG_WARN_CXX0X_EXTENSIONS': 'NO',
4192 # Warn if automatic synthesis is triggered with
4193 # the -Wobjc-missing-property-synthesis flag.
4194 'CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS': 'YES',
4197 # Don't die on dtoa code that uses a char as an array index.
4198 # This is required solely for base/third_party/dmg_fp/dtoa.cc.
4199 '-Wno-char-subscripts',
4200 # Clang spots more unused functions.
4201 '-Wno-unused-function',
4202 # See comments on this flag higher up in this file.
4203 '-Wno-unnamed-type-template-args',
4204 # Match OS X clang C++11 warning settings.
4205 '-Wno-c++11-narrowing',
4208 'target_conditions': [
4209 ['_toolset=="host"', {
4211 'SDKROOT': 'macosx<(mac_sdk)', # -isysroot
4212 'MACOSX_DEPLOYMENT_TARGET': '<(mac_deployment_target)',
4215 ['"<(GENERATOR)"!="xcode"', {
4216 'xcode_settings': { 'ARCHS': [ 'x86_64' ] },
4220 ['_toolset=="target"', {
4222 # This section should be for overriding host settings. But,
4223 # since we can't negate the iphone deployment target above, we
4224 # instead set it here for target only.
4225 'IPHONEOS_DEPLOYMENT_TARGET': '<(ios_deployment_target)',
4228 ['target_arch=="armv7" and "<(GENERATOR)"!="xcode"', {
4229 'xcode_settings': { 'ARCHS': [ 'armv7' ]},
4231 'xcode_settings': { 'ARCHS': [ 'i386' ] },
4235 ['_type=="executable"', {
4239 'DEPLOYMENT_POSTPROCESSING': 'YES',
4240 'STRIP_INSTALLED_PRODUCT': 'YES',
4245 # Remove dSYM to reduce build time.
4246 'DEBUG_INFORMATION_FORMAT': 'dwarf',
4251 ['"<(GENERATOR)"=="xcode"', {
4253 # TODO(justincohen): ninja builds don't support signing yet.
4255 ['chromium_ios_signing', {
4256 # iOS SDK wants everything for device signed.
4257 'CODE_SIGN_IDENTITY[sdk=iphoneos*]': 'iPhone Developer',
4259 'CODE_SIGNING_REQUIRED': 'NO',
4260 'CODE_SIGN_IDENTITY[sdk=iphoneos*]': '',
4265 ['"<(GENERATOR)"=="xcode" and clang!=1', {
4267 # It is necessary to link with the -fobjc-arc flag to use
4268 # subscripting on iOS < 6.
4275 'target_conditions': [
4276 ['_toolset=="target"', {
4278 'developer_dir': '<!(xcode-select -print-path)',
4279 'arc_toolchain_path': '<(developer_dir)/Toolchains/XcodeDefault.xctoolchain/usr/lib/arc',
4281 # It is necessary to force load libarclite from Xcode for
4282 # third_party/llvm-build because libarclite_* is only
4283 # distributed by Xcode.
4285 ['"<(GENERATOR)"=="ninja" and target_arch=="armv7"', {
4289 '<(arc_toolchain_path)/libarclite_iphoneos.a',
4293 ['"<(GENERATOR)"=="ninja" and target_arch!="armv7"', {
4297 '<(arc_toolchain_path)/libarclite_iphonesimulator.a',
4301 # Xcode sets target_arch at compile-time.
4302 ['"<(GENERATOR)"=="xcode"', {
4304 'OTHER_LDFLAGS[arch=armv7]': [
4307 '<(arc_toolchain_path)/libarclite_iphoneos.a',
4309 'OTHER_LDFLAGS[arch=i386]': [
4312 '<(arc_toolchain_path)/libarclite_iphonesimulator.a',
4322 ], # target_conditions
4323 }, # target_defaults
4326 'target_defaults': {
4328 '_WIN32_WINNT=0x0602',
4335 'CERT_CHAIN_PARA_HAS_EXTRA_FIELDS',
4336 'WIN32_LEAN_AND_MEAN',
4340 ['buildtype=="Official"', {
4341 # In official builds, targets can self-select an optimization
4342 # level by defining a variable named 'optimize', and setting it
4344 # - "size", optimizes for minimal code size - the default.
4345 # - "speed", optimizes for speed over code size.
4346 # - "max", whole program optimization and link-time code
4347 # generation. This is very expensive and should be used
4350 'optimize%': 'size',
4352 'target_conditions': [
4353 ['optimize=="size"', {
4355 'VCCLCompilerTool': {
4356 # 1, optimizeMinSpace, Minimize Size (/O1)
4357 'Optimization': '1',
4358 # 2, favorSize - Favor small code (/Os)
4359 'FavorSizeOrSpeed': '2',
4364 ['optimize=="speed"', {
4366 'VCCLCompilerTool': {
4367 # 2, optimizeMaxSpeed, Maximize Speed (/O2)
4368 'Optimization': '2',
4369 # 1, favorSpeed - Favor fast code (/Ot)
4370 'FavorSizeOrSpeed': '1',
4375 ['optimize=="max"', {
4377 'VCCLCompilerTool': {
4378 # 2, optimizeMaxSpeed, Maximize Speed (/O2)
4379 'Optimization': '2',
4380 # 1, favorSpeed - Favor fast code (/Ot)
4381 'FavorSizeOrSpeed': '1',
4382 # This implies link time code generation.
4383 'WholeProgramOptimization': 'true',
4391 ['component=="static_library"', {
4393 '_HAS_EXCEPTIONS=0',
4406 'AdditionalLibraryDirectories':
4407 ['<(windows_driver_kit_path)/lib/ATL/i386'],
4409 'VCLibrarianTool': {
4410 'AdditionalLibraryDirectories':
4411 ['<(windows_driver_kit_path)/lib/ATL/i386'],
4417 'VCLibrarianTool': {
4418 'AdditionalLibraryDirectories':
4419 ['<(windows_driver_kit_path)/lib/ATL/amd64'],
4422 'AdditionalLibraryDirectories':
4423 ['<(windows_driver_kit_path)/lib/ATL/amd64'],
4430 # Explicitly required when using the ATL with express
4431 'AdditionalDependencies': ['atlthunk.lib'],
4433 # ATL 8.0 included in WDK 7.1 makes the linker to generate
4434 # almost eight hundred LNK4254 and LNK4078 warnings:
4435 # - warning LNK4254: section 'ATL' (50000040) merged into
4436 # '.rdata' (40000040) with different attributes
4437 # - warning LNK4078: multiple 'ATL' sections found with
4438 # different attributes
4439 'AdditionalOptions': ['/ignore:4254', '/ignore:4078'],
4442 'msvs_system_include_dirs': [
4443 '<(windows_driver_kit_path)/inc/atl71',
4444 '<(windows_driver_kit_path)/inc/mfc42',
4448 'msvs_system_include_dirs': [
4449 '<(windows_sdk_path)/Include/shared',
4450 '<(windows_sdk_path)/Include/um',
4451 '<(windows_sdk_path)/Include/winrt',
4452 '$(VSInstallDir)/VC/atlmfc/include',
4454 'msvs_cygwin_dirs': ['<(DEPTH)/third_party/cygwin'],
4455 'msvs_disabled_warnings': [4351, 4355, 4396, 4503, 4819,
4456 # TODO(maruel): These warnings are level 4. They will be slowly
4457 # removed as code is fixed.
4458 4100, 4121, 4125, 4127, 4130, 4131, 4189, 4201, 4238, 4244, 4245,
4459 4310, 4428, 4481, 4505, 4510, 4512, 4530, 4610, 4611, 4701, 4702,
4463 'VCCLCompilerTool': {
4464 'AdditionalOptions': ['/MP'],
4465 'MinimalRebuild': 'false',
4466 'BufferSecurityCheck': 'true',
4467 'EnableFunctionLevelLinking': 'true',
4468 'RuntimeTypeInfo': 'false',
4469 'WarningLevel': '4',
4470 'WarnAsError': 'true',
4471 'DebugInformationFormat': '3',
4473 ['component=="shared_library"', {
4474 'ExceptionHandling': '1', # /EHsc
4476 'ExceptionHandling': '0',
4480 'VCLibrarianTool': {
4481 'AdditionalOptions': ['/ignore:4221'],
4482 'AdditionalLibraryDirectories': [
4483 '<(windows_sdk_path)/Lib/win8/um/x86',
4487 'AdditionalDependencies': [
4499 'AdditionalLibraryDirectories': [
4500 '<(windows_sdk_path)/Lib/win8/um/x86',
4502 'GenerateDebugInformation': 'true',
4503 'MapFileName': '$(OutDir)\\$(TargetName).map',
4504 'ImportLibrary': '$(OutDir)\\lib\\$(TargetName).lib',
4505 'FixedBaseAddress': '1',
4508 # 1 == /SUBSYSTEM:CONSOLE
4509 # 2 == /SUBSYSTEM:WINDOWS
4510 # Most of the executables we'll ever create are tests
4511 # and utilities with console output.
4515 'GenerateStublessProxies': 'true',
4516 'TypeLibraryName': '$(InputName).tlb',
4517 'OutputDirectory': '$(IntDir)',
4518 'HeaderFileName': '$(InputName).h',
4519 'DLLDataFileName': '$(InputName).dlldata.c',
4520 'InterfaceIdentifierFileName': '$(InputName)_i.c',
4521 'ProxyFileName': '$(InputName)_p.c',
4523 'VCResourceCompilerTool': {
4525 'AdditionalIncludeDirectories': [
4527 '<(SHARED_INTERMEDIATE_DIR)',
4530 'target_conditions': [
4531 ['_type=="executable" and ">(win_exe_compatibility_manifest)"!=""', {
4533 'AdditionalManifestFiles': [
4534 '>(win_exe_compatibility_manifest)',
4538 ['_type=="executable" and >(win_use_external_manifest)==0', {
4540 'EmbedManifest': 'true',
4543 ['_type=="executable" and >(win_use_external_manifest)==1', {
4545 'EmbedManifest': 'false',
4552 ['disable_nacl==1', {
4553 'target_defaults': {
4559 ['OS=="win" and msvs_use_common_linker_extras', {
4560 'target_defaults': {
4575 'AdditionalOptions': [
4584 'AdditionalOptions': ['/largeaddressaware'],
4587 'AdditionalOptions!': ['/safeseh'],
4596 'AdditionalOptions': [
4597 # safeseh is not compatible with x64
4609 ['enable_new_npdevice_api==1', {
4610 'target_defaults': {
4612 'ENABLE_NEW_NPDEVICE_API',
4616 # Don't warn about the "typedef 'foo' locally defined but not used"
4618 # TODO: remove this flag once all builds work. See crbug.com/227506
4619 ['gcc_version>=48', {
4620 'target_defaults': {
4622 '-Wno-unused-local-typedefs',
4629 # Android could use the goma with clang.
4630 'make_global_settings': [
4631 ['CC', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} ${CHROME_SRC}/<(make_clang_dir)/bin/clang)'],
4632 ['CXX', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} ${CHROME_SRC}/<(make_clang_dir)/bin/clang++)'],
4633 ['LINK', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} ${CHROME_SRC}/<(make_clang_dir)/bin/clang++)'],
4634 ['CC.host', '$(CC)'],
4635 ['CXX.host', '$(CXX)'],
4636 ['LINK.host', '$(LINK)'],
4639 'make_global_settings': [
4640 ['CC', '<(make_clang_dir)/bin/clang'],
4641 ['CXX', '<(make_clang_dir)/bin/clang++'],
4643 ['CC.host', '$(CC)'],
4644 ['CXX.host', '$(CXX)'],
4645 ['LINK.host', '$(LINK)'],
4650 ['OS=="android" and clang==0', {
4651 # Hardcode the compiler names in the Makefile so that
4652 # it won't depend on the environment at make time.
4653 'make_global_settings': [
4654 ['CC', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} <(android_toolchain)/*-gcc)'],
4655 ['CXX', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} <(android_toolchain)/*-g++)'],
4656 ['LINK', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} <(android_toolchain)/*-gcc)'],
4657 ['CC.host', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} <!(which gcc))'],
4658 ['CXX.host', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} <!(which g++))'],
4659 ['LINK.host', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} <!(which g++))'],
4662 ['OS=="linux" and target_arch=="mipsel"', {
4663 'make_global_settings': [
4664 ['CC', '<(sysroot)/../bin/mipsel-linux-gnu-gcc'],
4665 ['CXX', '<(sysroot)/../bin/mipsel-linux-gnu-g++'],
4667 ['CC.host', '<!(which gcc)'],
4668 ['CXX.host', '<!(which g++)'],
4669 ['LINK.host', '<!(which g++)'],
4674 # DON'T ADD ANYTHING NEW TO THIS BLOCK UNLESS YOU REALLY REALLY NEED IT!
4675 # This block adds *project-wide* configuration settings to each project
4676 # file. It's almost always wrong to put things here. Specify your
4677 # custom xcode_settings in target_defaults to add them to targets instead.
4680 # In an Xcode Project Info window, the "Base SDK for All Configurations"
4681 # setting sets the SDK on a project-wide basis. In order to get the
4682 # configured SDK to show properly in the Xcode UI, SDKROOT must be set
4683 # here at the project level.
4686 ['mac_sdk_path==""', {
4687 'SDKROOT': 'macosx<(mac_sdk)', # -isysroot
4689 'SDKROOT': '<(mac_sdk_path)', # -isysroot
4695 ['ios_sdk_path==""', {
4697 # TODO(justincohen): Ninja only supports simulator for now.
4698 ['"<(GENERATOR)"=="xcode" or ("<(GENERATOR)"=="ninja" and target_arch=="armv7")', {
4699 'SDKROOT': 'iphoneos<(ios_sdk)', # -isysroot
4701 'SDKROOT': 'iphonesimulator<(ios_sdk)', # -isysroot
4705 'SDKROOT': '<(ios_sdk_path)', # -isysroot
4710 # Just build armv7, until armv7s is correctly tested.
4711 'VALID_ARCHS': 'armv7 i386',
4712 # Target both iPhone and iPad.
4713 'TARGETED_DEVICE_FAMILY': '1,2',
4715 ['target_arch=="x64"', {
4722 # The Xcode generator will look for an xcode_settings section at the root
4723 # of each dict and use it to apply settings on a file-wide basis. Most
4724 # settings should not be here, they should be in target-specific
4725 # xcode_settings sections, or better yet, should use non-Xcode-specific
4726 # settings in target dicts. SYMROOT is a special case, because many other
4727 # Xcode variables depend on it, including variables such as
4728 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something
4729 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the
4730 # files to appear (when present) in the UI as actual files and not red
4731 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR,
4732 # and therefore SYMROOT, needs to be set at the project level.
4733 'SYMROOT': '<(DEPTH)/xcodebuild',