1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/media/webrtc/trunk/build/common.gypi Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,3661 @@ 1.4 +# Copyright (c) 2012 The Chromium Authors. All rights reserved. 1.5 +# Use of this source code is governed by a BSD-style license that can be 1.6 +# found in the LICENSE file. 1.7 + 1.8 +# IMPORTANT: 1.9 +# Please don't directly include this file if you are building via gyp_chromium, 1.10 +# since gyp_chromium is automatically forcing its inclusion. 1.11 +{ 1.12 + # Variables expected to be overriden on the GYP command line (-D) or by 1.13 + # ~/.gyp/include.gypi. 1.14 + 'variables': { 1.15 + # Putting a variables dict inside another variables dict looks kind of 1.16 + # weird. This is done so that 'host_arch', 'chromeos', etc are defined as 1.17 + # variables within the outer variables dict here. This is necessary 1.18 + # to get these variables defined for the conditions within this variables 1.19 + # dict that operate on these variables. 1.20 + 'variables': { 1.21 + 'variables': { 1.22 + 'variables': { 1.23 + 'variables': { 1.24 + # Whether we're building a ChromeOS build. 1.25 + 'chromeos%': 0, 1.26 + 1.27 + # Whether or not we are using the Aura windowing framework. 1.28 + 'use_aura%': 0, 1.29 + 1.30 + # Whether or not we are building the Ash shell. 1.31 + 'use_ash%': 0, 1.32 + }, 1.33 + # Copy conditionally-set variables out one scope. 1.34 + 'chromeos%': '<(chromeos)', 1.35 + 'use_aura%': '<(use_aura)', 1.36 + 'use_ash%': '<(use_ash)', 1.37 + 1.38 + # Whether we are using Views Toolkit 1.39 + 'toolkit_views%': 0, 1.40 + 1.41 + # Use OpenSSL instead of NSS. Under development: see http://crbug.com/62803 1.42 + 'use_openssl%': 0, 1.43 + 1.44 + 'use_ibus%': 0, 1.45 + 1.46 + # Disable viewport meta tag by default. 1.47 + 'enable_viewport%': 0, 1.48 + 1.49 + # Enable HiDPI support. 1.50 + 'enable_hidpi%': 0, 1.51 + 1.52 + # Enable touch optimized art assets and metrics. 1.53 + 'enable_touch_ui%': 0, 1.54 + 1.55 + # Is this change part of the android upstream bringup? 1.56 + # Allows us to *temporarily* disable certain things for 1.57 + # staging. Only set to 1 in a GYP_DEFINES. 1.58 + 'android_upstream_bringup%': 0, 1.59 + 1.60 + # Override buildtype to select the desired build flavor. 1.61 + # Dev - everyday build for development/testing 1.62 + # Official - release build (generally implies additional processing) 1.63 + # TODO(mmoss) Once 'buildtype' is fully supported (e.g. Windows gyp 1.64 + # conversion is done), some of the things which are now controlled by 1.65 + # 'branding', such as symbol generation, will need to be refactored 1.66 + # based on 'buildtype' (i.e. we don't care about saving symbols for 1.67 + # non-Official # builds). 1.68 + 'buildtype%': 'Dev', 1.69 + 1.70 + 'conditions': [ 1.71 + # ChromeOS implies ash. 1.72 + ['chromeos==1', { 1.73 + 'use_ash%': 1, 1.74 + 'use_aura%': 1, 1.75 + }], 1.76 + 1.77 + # For now, Windows builds that |use_aura| should also imply using 1.78 + # ash. This rule should be removed for the future when Windows is 1.79 + # using the aura windows without the ash interface. 1.80 + ['use_aura==1 and OS=="win"', { 1.81 + 'use_ash%': 1, 1.82 + }], 1.83 + ['use_ash==1', { 1.84 + 'use_aura%': 1, 1.85 + }], 1.86 + 1.87 + # A flag for BSD platforms 1.88 + ['OS=="dragonfly" or OS=="freebsd" or OS=="netbsd" or \ 1.89 + OS=="openbsd"', { 1.90 + 'os_bsd%': 1, 1.91 + }, { 1.92 + 'os_bsd%': 0, 1.93 + }], 1.94 + ], 1.95 + }, 1.96 + # Copy conditionally-set variables out one scope. 1.97 + 'chromeos%': '<(chromeos)', 1.98 + 'use_aura%': '<(use_aura)', 1.99 + 'use_ash%': '<(use_ash)', 1.100 + 'os_bsd%': '<(os_bsd)', 1.101 + 'use_openssl%': '<(use_openssl)', 1.102 + 'use_ibus%': '<(use_ibus)', 1.103 + 'enable_viewport%': '<(enable_viewport)', 1.104 + 'enable_hidpi%': '<(enable_hidpi)', 1.105 + 'enable_touch_ui%': '<(enable_touch_ui)', 1.106 + 'android_upstream_bringup%': '<(android_upstream_bringup)', 1.107 + 'buildtype%': '<(buildtype)', 1.108 + 1.109 + # Sets whether we're building with the Android SDK/NDK (and hence with 1.110 + # Ant, value 0), or as part of the Android system (and hence with the 1.111 + # Android build system, value 1). 1.112 + 'android_build_type%': 0, 1.113 + 1.114 + # Compute the architecture that we're building on. 1.115 + 'conditions': [ 1.116 + ['OS=="win" or OS=="ios"', { 1.117 + 'host_arch%': 'ia32', 1.118 + }, { 1.119 + # This handles the Unix platforms for which there is some support. 1.120 + # Anything else gets passed through, which probably won't work very 1.121 + # well; such hosts should pass an explicit target_arch to gyp. 1.122 + 'host_arch%': 1.123 + '<!(uname -m | sed -e "s/i.86/ia32/;s/x86_64/x64/;s/amd64/x64/;s/arm.*/arm/;s/i86pc/ia32/")', 1.124 + }], 1.125 + 1.126 + # Set default value of toolkit_views based on OS. 1.127 + ['OS=="win" or chromeos==1 or use_aura==1', { 1.128 + 'toolkit_views%': 1, 1.129 + }, { 1.130 + 'toolkit_views%': 0, 1.131 + }], 1.132 + 1.133 + # Set toolkit_uses_gtk for the Chromium browser on Linux. 1.134 + ['(OS=="linux" or OS=="solaris" or os_bsd==1) and use_aura==0', { 1.135 + 'toolkit_uses_gtk%': 1, 1.136 + }, { 1.137 + 'toolkit_uses_gtk%': 0, 1.138 + }], 1.139 + 1.140 + # Enable HiDPI on Mac OS and Chrome OS. 1.141 + ['OS=="mac" or chromeos==1', { 1.142 + 'enable_hidpi%': 1, 1.143 + }], 1.144 + 1.145 + # Enable touch UI on Metro. 1.146 + ['OS=="win"', { 1.147 + 'enable_touch_ui%': 1, 1.148 + }], 1.149 + ], 1.150 + }, 1.151 + 1.152 + # Copy conditionally-set variables out one scope. 1.153 + 'chromeos%': '<(chromeos)', 1.154 + 'host_arch%': '<(host_arch)', 1.155 + 'toolkit_views%': '<(toolkit_views)', 1.156 + 'toolkit_uses_gtk%': '<(toolkit_uses_gtk)', 1.157 + 'use_aura%': '<(use_aura)', 1.158 + 'use_ash%': '<(use_ash)', 1.159 + 'os_bsd%': '<(os_bsd)', 1.160 + 'use_openssl%': '<(use_openssl)', 1.161 + 'use_ibus%': '<(use_ibus)', 1.162 + 'enable_viewport%': '<(enable_viewport)', 1.163 + 'enable_hidpi%': '<(enable_hidpi)', 1.164 + 'enable_touch_ui%': '<(enable_touch_ui)', 1.165 + 'android_upstream_bringup%': '<(android_upstream_bringup)', 1.166 + 'android_build_type%': '<(android_build_type)', 1.167 + 1.168 + # We used to provide a variable for changing how libraries were built. 1.169 + # This variable remains until we can clean up all the users. 1.170 + # This needs to be one nested variables dict in so that dependent 1.171 + # gyp files can make use of it in their outer variables. (Yikes!) 1.172 + # http://code.google.com/p/chromium/issues/detail?id=83308 1.173 + 'library%': 'static_library', 1.174 + 1.175 + # Override branding to select the desired branding flavor. 1.176 + 'branding%': 'Chromium', 1.177 + 1.178 + 'buildtype%': '<(buildtype)', 1.179 + 1.180 + # Default architecture we're building for is the architecture we're 1.181 + # building on. 1.182 + 'target_arch%': '<(host_arch)', 1.183 + 1.184 + # This variable tells WebCore.gyp and JavaScriptCore.gyp whether they are 1.185 + # are built under a chromium full build (1) or a webkit.org chromium 1.186 + # build (0). 1.187 + 'inside_chromium_build%': 1, 1.188 + 1.189 + # Set to 1 to enable fast builds. It disables debug info for fastest 1.190 + # compilation. 1.191 + 'fastbuild%': 0, 1.192 + 1.193 + # Set to 1 to enable dcheck in release without having to use the flag. 1.194 + 'dcheck_always_on%': 0, 1.195 + 1.196 + # Disable file manager component extension by default. 1.197 + 'file_manager_extension%': 0, 1.198 + 1.199 + # Python version. 1.200 + 'python_ver%': '2.6', 1.201 + 1.202 + # Set ARM version (for libyuv) 1.203 + 'arm_version%': 6, 1.204 + 1.205 + # Set ARM-v7 compilation flags 1.206 + 'armv7%': 0, 1.207 + 1.208 + # Set Neon compilation flags (only meaningful if armv7==1). 1.209 + 'arm_neon%': 1, 1.210 + 'arm_neon_optional%': 0, 1.211 + 1.212 + # The system root for cross-compiles. Default: none. 1.213 + 'sysroot%': '', 1.214 + 1.215 + # The system libdir used for this ABI. 1.216 + 'system_libdir%': 'lib', 1.217 + 1.218 + # On Linux, we build with sse2 for Chromium builds. 1.219 + 'disable_sse2%': 0, 1.220 + 1.221 + # Use libjpeg-turbo as the JPEG codec used by Chromium. 1.222 + 'use_libjpeg_turbo%': 1, 1.223 + 1.224 + # Use system libjpeg. Note that the system's libjepg will be used even if 1.225 + # use_libjpeg_turbo is set. 1.226 + 'use_system_libjpeg%': 0, 1.227 + 1.228 + # Use system libvpx 1.229 + 'use_system_libvpx%': 0, 1.230 + 1.231 + # Variable 'component' is for cases where we would like to build some 1.232 + # components as dynamic shared libraries but still need variable 1.233 + # 'library' for static libraries. 1.234 + # By default, component is set to whatever library is set to and 1.235 + # it can be overriden by the GYP command line or by ~/.gyp/include.gypi. 1.236 + 'component%': 'static_library', 1.237 + 1.238 + # Set to select the Title Case versions of strings in GRD files. 1.239 + 'use_titlecase_in_grd_files%': 0, 1.240 + 1.241 + # Use translations provided by volunteers at launchpad.net. This 1.242 + # currently only works on Linux. 1.243 + 'use_third_party_translations%': 0, 1.244 + 1.245 + # Remoting compilation is enabled by default. Set to 0 to disable. 1.246 + 'remoting%': 1, 1.247 + 1.248 + # Configuration policy is enabled by default. Set to 0 to disable. 1.249 + 'configuration_policy%': 1, 1.250 + 1.251 + # Safe browsing is compiled in by default. Set to 0 to disable. 1.252 + 'safe_browsing%': 1, 1.253 + 1.254 + # Speech input is compiled in by default. Set to 0 to disable. 1.255 + 'input_speech%': 1, 1.256 + 1.257 + # Notifications are compiled in by default. Set to 0 to disable. 1.258 + 'notifications%' : 1, 1.259 + 1.260 + # If this is set, the clang plugins used on the buildbot will be used. 1.261 + # Run tools/clang/scripts/update.sh to make sure they are compiled. 1.262 + # This causes 'clang_chrome_plugins_flags' to be set. 1.263 + # Has no effect if 'clang' is not set as well. 1.264 + 'clang_use_chrome_plugins%': 1, 1.265 + 1.266 + # Enable building with ASAN (Clang's -faddress-sanitizer option). 1.267 + # -faddress-sanitizer only works with clang, but asan=1 implies clang=1 1.268 + # See https://sites.google.com/a/chromium.org/dev/developers/testing/addresssanitizer 1.269 + 'asan%': 0, 1.270 + 1.271 + # Enable building with TSAN (Clang's -fthread-sanitizer option). 1.272 + # -fthread-sanitizer only works with clang, but tsan=1 implies clang=1 1.273 + # See http://clang.llvm.org/docs/ThreadSanitizer.html 1.274 + 'tsan%': 0, 1.275 + 1.276 + # Use a modified version of Clang to intercept allocated types and sizes 1.277 + # for allocated objects. clang_type_profiler=1 implies clang=1. 1.278 + # See http://dev.chromium.org/developers/deep-memory-profiler/cpp-object-type-identifier 1.279 + # TODO(dmikurube): Support mac. See http://crbug.com/123758#c11 1.280 + 'clang_type_profiler%': 0, 1.281 + 1.282 + # Set to true to instrument the code with function call logger. 1.283 + # See src/third_party/cygprofile/cyg-profile.cc for details. 1.284 + 'order_profiling%': 0, 1.285 + 1.286 + # Use the provided profiled order file to link Chrome image with it. 1.287 + # This makes Chrome faster by better using CPU cache when executing code. 1.288 + # This is known as PGO (profile guided optimization). 1.289 + # See https://sites.google.com/a/google.com/chrome-msk/dev/boot-speed-up-effort 1.290 + 'order_text_section%' : "", 1.291 + 1.292 + # Set to 1 compile with -fPIC cflag on linux. This is a must for shared 1.293 + # libraries on linux x86-64 and arm, plus ASLR. 1.294 + 'linux_fpic%': 1, 1.295 + 1.296 + # Whether one-click signin is enabled or not. 1.297 + 'enable_one_click_signin%': 0, 1.298 + 1.299 + # Enable Web Intents support in WebKit. 1.300 + 'enable_web_intents%': 1, 1.301 + 1.302 + # Enable Chrome browser extensions 1.303 + 'enable_extensions%': 1, 1.304 + 1.305 + # Enable browser automation. 1.306 + 'enable_automation%': 1, 1.307 + 1.308 + # Enable printing support and UI. 1.309 + 'enable_printing%': 1, 1.310 + 1.311 + # Enable Web Intents web content registration via HTML element 1.312 + # and WebUI managing such registrations. 1.313 + 'enable_web_intents_tag%': 0, 1.314 + 1.315 + # Webrtc compilation is enabled by default. Set to 0 to disable. 1.316 + 'enable_webrtc%': 1, 1.317 + 1.318 + # PPAPI by default does not support plugins making calls off the main 1.319 + # thread. Set to 1 to turn on experimental support for out-of-process 1.320 + # plugins to make call of the main thread. 1.321 + 'enable_pepper_threading%': 0, 1.322 + 1.323 + # Enables use of the session service, which is enabled by default. 1.324 + # Support for disabling depends on the platform. 1.325 + 'enable_session_service%': 1, 1.326 + 1.327 + # Enables theme support, which is enabled by default. Support for 1.328 + # disabling depends on the platform. 1.329 + 'enable_themes%': 1, 1.330 + 1.331 + # Uses OEM-specific wallpaper resources on Chrome OS. 1.332 + 'use_oem_wallpaper%': 0, 1.333 + 1.334 + # Enables support for background apps. 1.335 + 'enable_background%': 1, 1.336 + 1.337 + # Enable the task manager by default. 1.338 + 'enable_task_manager%': 1, 1.339 + 1.340 + # Enable FTP support by default. 1.341 + 'disable_ftp_support%': 0, 1.342 + 1.343 + # XInput2 multitouch support is disabled by default (use_xi2_mt=0). 1.344 + # Setting to non-zero value enables XI2 MT. When XI2 MT is enabled, 1.345 + # the input value also defines the required XI2 minor minimum version. 1.346 + # For example, use_xi2_mt=2 means XI2.2 or above version is required. 1.347 + 'use_xi2_mt%': 0, 1.348 + 1.349 + # Use of precompiled headers on Windows. 1.350 + # 1.351 + # This is on by default in VS 2010, but off by default for VS 1.352 + # 2008 because of complications that it can cause with our 1.353 + # trybots etc. 1.354 + # 1.355 + # This variable may be explicitly set to 1 (enabled) or 0 1.356 + # (disabled) in ~/.gyp/include.gypi or via the GYP command line. 1.357 + # This setting will override the default. 1.358 + # 1.359 + # Note that a setting of 1 is probably suitable for most or all 1.360 + # Windows developers using VS 2008, since precompiled headers 1.361 + # provide a build speedup of 20-25%. There are a couple of 1.362 + # small workarounds you may need to use when using VS 2008 (but 1.363 + # not 2010), see 1.364 + # http://code.google.com/p/chromium/wiki/WindowsPrecompiledHeaders 1.365 + # for details. 1.366 + 'chromium_win_pch%': 0, 1.367 + 1.368 + # Set this to true when building with Clang. 1.369 + # See http://code.google.com/p/chromium/wiki/Clang for details. 1.370 + 'clang%': 0, 1.371 + 1.372 + # Enable plug-in installation by default. 1.373 + 'enable_plugin_installation%': 1, 1.374 + 1.375 + # Enable protector service by default. 1.376 + 'enable_protector_service%': 1, 1.377 + 1.378 + # Specifies whether to use canvas_skia.cc in place of platform 1.379 + # specific implementations of gfx::Canvas. Affects text drawing in the 1.380 + # Chrome UI. 1.381 + # TODO(asvitkine): Enable this on all platforms and delete this flag. 1.382 + # http://crbug.com/105550 1.383 + 'use_canvas_skia%': 0, 1.384 + 1.385 + # Set to "tsan", "memcheck", or "drmemory" to configure the build to work 1.386 + # with one of those tools. 1.387 + 'build_for_tool%': '', 1.388 + 1.389 + # Whether tests targets should be run, archived or just have the 1.390 + # dependencies verified. All the tests targets have the '_run' suffix, 1.391 + # e.g. base_unittests_run runs the target base_unittests. The test target 1.392 + # always calls tools/swarm_client/isolate.py. See the script's --help for 1.393 + # more information and the valid --mode values. Meant to be overriden with 1.394 + # GYP_DEFINES. 1.395 + # TODO(maruel): Converted the default from 'check' to 'noop' so work can 1.396 + # be done while the builders are being reconfigured to check out test data 1.397 + # files. 1.398 + 'test_isolation_mode%': 'noop', 1.399 + # It must not be '<(PRODUCT_DIR)' alone, the '/' is necessary otherwise 1.400 + # gyp will remove duplicate flags, causing isolate.py to be confused. 1.401 + 'test_isolation_outdir%': '<(PRODUCT_DIR)/isolate', 1.402 + 1.403 + # Force rlz to use chrome's networking stack. 1.404 + 'force_rlz_use_chrome_net%': 1, 1.405 + 1.406 + 'sas_dll_path%': '<(DEPTH)/third_party/platformsdk_win7/files/redist/x86', 1.407 + 'wix_path%': '<(DEPTH)/third_party/wix', 1.408 + 1.409 + 'conditions': [ 1.410 + # TODO(epoger): Figure out how to set use_skia=1 for Mac outside of 1.411 + # the 'conditions' clause. Initial attempts resulted in chromium and 1.412 + # webkit disagreeing on its setting. 1.413 + ['OS=="mac"', { 1.414 + 'use_skia%': 1, 1.415 + }, { 1.416 + 'use_skia%': 1, 1.417 + }], 1.418 + 1.419 + # A flag for POSIX platforms 1.420 + ['OS=="win"', { 1.421 + 'os_posix%': 0, 1.422 + }, { 1.423 + 'os_posix%': 1, 1.424 + }], 1.425 + 1.426 + # NSS usage. 1.427 + ['(OS=="linux" or OS=="solaris" or os_bsd==1) and use_openssl==0', { 1.428 + 'use_nss%': 1, 1.429 + }, { 1.430 + 'use_nss%': 0, 1.431 + }], 1.432 + 1.433 + # Flags to use X11 on non-Mac POSIX platforms 1.434 + ['OS=="win" or OS=="mac" or OS=="ios" or OS=="android"', { 1.435 + 'use_glib%': 0, 1.436 + 'use_x11%': 0, 1.437 + }, { 1.438 + 'use_glib%': 1, 1.439 + 'use_x11%': 1, 1.440 + }], 1.441 + 1.442 + # We always use skia text rendering in Aura on Windows, since GDI 1.443 + # doesn't agree with our BackingStore. 1.444 + # TODO(beng): remove once skia text rendering is on by default. 1.445 + ['use_aura==1 and OS=="win"', { 1.446 + 'enable_skia_text%': 1, 1.447 + }], 1.448 + 1.449 + # A flag to enable or disable our compile-time dependency 1.450 + # on gnome-keyring. If that dependency is disabled, no gnome-keyring 1.451 + # support will be available. This option is useful 1.452 + # for Linux distributions and for Aura. 1.453 + ['chromeos==1 or use_aura==1', { 1.454 + 'use_gnome_keyring%': 0, 1.455 + }, { 1.456 + 'use_gnome_keyring%': 1, 1.457 + }], 1.458 + 1.459 + ['toolkit_uses_gtk==1 or OS=="mac" or OS=="ios"', { 1.460 + # GTK+, Mac and iOS want Title Case strings 1.461 + 'use_titlecase_in_grd_files%': 1, 1.462 + }], 1.463 + 1.464 + # Enable file manager extension on Chrome OS. 1.465 + ['chromeos==1', { 1.466 + 'file_manager_extension%': 1, 1.467 + }, { 1.468 + 'file_manager_extension%': 0, 1.469 + }], 1.470 + 1.471 + ['OS=="win" or OS=="mac" or (OS=="linux" and use_aura==0)', { 1.472 + 'enable_one_click_signin%': 1, 1.473 + }], 1.474 + 1.475 + ['OS=="android"', { 1.476 + 'enable_extensions%': 0, 1.477 + 'enable_printing%': 0, 1.478 + 'enable_themes%': 0, 1.479 + 'enable_webrtc%': 0, 1.480 + 'proprietary_codecs%': 1, 1.481 + 'remoting%': 0, 1.482 + }], 1.483 + 1.484 + ['OS=="ios"', { 1.485 + 'configuration_policy%': 0, 1.486 + 'disable_ftp_support%': 1, 1.487 + 'enable_automation%': 0, 1.488 + 'enable_extensions%': 0, 1.489 + 'enable_printing%': 0, 1.490 + 'enable_themes%': 0, 1.491 + 'enable_webrtc%': 0, 1.492 + 'notifications%': 0, 1.493 + 'remoting%': 0, 1.494 + }], 1.495 + 1.496 + # Use GPU accelerated cross process image transport by default 1.497 + # on linux builds with the Aura window manager 1.498 + ['use_aura==1 and OS=="linux"', { 1.499 + 'ui_compositor_image_transport%': 1, 1.500 + }, { 1.501 + 'ui_compositor_image_transport%': 0, 1.502 + }], 1.503 + 1.504 + # Turn precompiled headers on by default for VS 2010. 1.505 + ['OS=="win" and MSVS_VERSION=="2010" and buildtype!="Official"', { 1.506 + 'chromium_win_pch%': 1 1.507 + }], 1.508 + 1.509 + ['use_aura==1 or chromeos==1 or OS=="android"', { 1.510 + 'enable_plugin_installation%': 0, 1.511 + }, { 1.512 + 'enable_plugin_installation%': 1, 1.513 + }], 1.514 + 1.515 + ['OS=="android" or OS=="ios"', { 1.516 + 'enable_protector_service%': 0, 1.517 + }, { 1.518 + 'enable_protector_service%': 1, 1.519 + }], 1.520 + 1.521 + # linux_use_gold_binary: whether to use the binary checked into 1.522 + # third_party/gold. 1.523 + ['OS=="linux"', { 1.524 + 'linux_use_gold_binary%': 1, 1.525 + }, { 1.526 + 'linux_use_gold_binary%': 0, 1.527 + }], 1.528 + 1.529 + # linux_use_gold_flags: whether to use build flags that rely on gold. 1.530 + # On by default for x64 Linux. Temporarily off for ChromeOS as 1.531 + # it failed on a buildbot. 1.532 + ['OS=="linux" and chromeos==0', { 1.533 + 'linux_use_gold_flags%': 1, 1.534 + }, { 1.535 + 'linux_use_gold_flags%': 0, 1.536 + }], 1.537 + 1.538 + ['OS=="android"', { 1.539 + 'enable_captive_portal_detection%': 0, 1.540 + }, { 1.541 + 'enable_captive_portal_detection%': 1, 1.542 + }], 1.543 + 1.544 + # Enable Skia UI text drawing incrementally on different platforms. 1.545 + # http://crbug.com/105550 1.546 + # 1.547 + # On Aura, this allows per-tile painting to be used in the browser 1.548 + # compositor. 1.549 + ['OS!="mac" and OS!="android"', { 1.550 + 'use_canvas_skia%': 1, 1.551 + }], 1.552 + 1.553 + ['chromeos==1', { 1.554 + # When building for ChromeOS we dont want Chromium to use libjpeg_turbo. 1.555 + 'use_libjpeg_turbo%': 0, 1.556 + }], 1.557 + 1.558 + ['OS=="android"', { 1.559 + # When building as part of the Android system, use system libraries 1.560 + # where possible to reduce ROM size. 1.561 + 'use_system_libjpeg%': '<(android_build_type)', 1.562 + }], 1.563 + ], 1.564 + 1.565 + # Set this to 1 to use the Google-internal file containing 1.566 + # official API keys for Google Chrome even in a developer build. 1.567 + # Setting this variable explicitly to 1 will cause your build to 1.568 + # fail if the internal file is missing. 1.569 + # 1.570 + # Set this to 0 to not use the internal file, even when it 1.571 + # exists in your checkout. 1.572 + # 1.573 + # Leave set to 2 to have this variable implicitly set to 1 if 1.574 + # you have src/google_apis/internal/google_chrome_api_keys.h in 1.575 + # your checkout, and implicitly set to 0 if not. 1.576 + # 1.577 + # Note that official builds always behave as if this variable 1.578 + # was explicitly set to 1, i.e. they always use official keys, 1.579 + # and will fail to build if the internal file is missing. 1.580 + 'use_official_google_api_keys%': 2, 1.581 + 1.582 + # Set these to bake the specified API keys and OAuth client 1.583 + # IDs/secrets into your build. 1.584 + # 1.585 + # If you create a build without values baked in, you can instead 1.586 + # set environment variables to provide the keys at runtime (see 1.587 + # src/google_apis/google_api_keys.h for details). Features that 1.588 + # require server-side APIs may fail to work if no keys are 1.589 + # provided. 1.590 + # 1.591 + # Note that if you are building an official build or if 1.592 + # use_official_google_api_keys has been set to 1 (explicitly or 1.593 + # implicitly), these values will be ignored and the official 1.594 + # keys will be used instead. 1.595 + 'google_api_key%': '', 1.596 + 'google_default_client_id%': '', 1.597 + 'google_default_client_secret%': '', 1.598 + }, 1.599 + 1.600 + # Copy conditionally-set variables out one scope. 1.601 + 'branding%': '<(branding)', 1.602 + 'buildtype%': '<(buildtype)', 1.603 + 'target_arch%': '<(target_arch)', 1.604 + 'host_arch%': '<(host_arch)', 1.605 + 'library%': 'static_library', 1.606 + 'toolkit_views%': '<(toolkit_views)', 1.607 + 'ui_compositor_image_transport%': '<(ui_compositor_image_transport)', 1.608 + 'use_aura%': '<(use_aura)', 1.609 + 'use_ash%': '<(use_ash)', 1.610 + 'use_openssl%': '<(use_openssl)', 1.611 + 'use_ibus%': '<(use_ibus)', 1.612 + 'use_nss%': '<(use_nss)', 1.613 + 'os_bsd%': '<(os_bsd)', 1.614 + 'os_posix%': '<(os_posix)', 1.615 + 'use_glib%': '<(use_glib)', 1.616 + 'toolkit_uses_gtk%': '<(toolkit_uses_gtk)', 1.617 + 'use_skia%': '<(use_skia)', 1.618 + 'use_x11%': '<(use_x11)', 1.619 + 'use_gnome_keyring%': '<(use_gnome_keyring)', 1.620 + 'linux_fpic%': '<(linux_fpic)', 1.621 + 'enable_pepper_threading%': '<(enable_pepper_threading)', 1.622 + 'chromeos%': '<(chromeos)', 1.623 + 'enable_viewport%': '<(enable_viewport)', 1.624 + 'enable_hidpi%': '<(enable_hidpi)', 1.625 + 'enable_touch_ui%': '<(enable_touch_ui)', 1.626 + 'use_xi2_mt%':'<(use_xi2_mt)', 1.627 + 'file_manager_extension%': '<(file_manager_extension)', 1.628 + 'inside_chromium_build%': '<(inside_chromium_build)', 1.629 + 'fastbuild%': '<(fastbuild)', 1.630 + 'dcheck_always_on%': '<(dcheck_always_on)', 1.631 + 'python_ver%': '<(python_ver)', 1.632 + 'arm_version%': '<(arm_version)', 1.633 + 'armv7%': '<(armv7)', 1.634 + 'arm_neon%': '<(arm_neon)', 1.635 + 'arm_neon_optional%': '<(arm_neon_optional)', 1.636 + 'sysroot%': '<(sysroot)', 1.637 + 'system_libdir%': '<(system_libdir)', 1.638 + 'component%': '<(component)', 1.639 + 'use_titlecase_in_grd_files%': '<(use_titlecase_in_grd_files)', 1.640 + 'use_third_party_translations%': '<(use_third_party_translations)', 1.641 + 'remoting%': '<(remoting)', 1.642 + 'enable_one_click_signin%': '<(enable_one_click_signin)', 1.643 + 'enable_webrtc%': '<(enable_webrtc)', 1.644 + 'chromium_win_pch%': '<(chromium_win_pch)', 1.645 + 'configuration_policy%': '<(configuration_policy)', 1.646 + 'safe_browsing%': '<(safe_browsing)', 1.647 + 'input_speech%': '<(input_speech)', 1.648 + 'notifications%': '<(notifications)', 1.649 + 'clang_use_chrome_plugins%': '<(clang_use_chrome_plugins)', 1.650 + 'asan%': '<(asan)', 1.651 + 'tsan%': '<(tsan)', 1.652 + 'clang_type_profiler%': '<(clang_type_profiler)', 1.653 + 'order_profiling%': '<(order_profiling)', 1.654 + 'order_text_section%': '<(order_text_section)', 1.655 + 'enable_extensions%': '<(enable_extensions)', 1.656 + 'enable_web_intents%': '<(enable_web_intents)', 1.657 + 'enable_web_intents_tag%': '<(enable_web_intents_tag)', 1.658 + 'enable_plugin_installation%': '<(enable_plugin_installation)', 1.659 + 'enable_protector_service%': '<(enable_protector_service)', 1.660 + 'enable_session_service%': '<(enable_session_service)', 1.661 + 'enable_themes%': '<(enable_themes)', 1.662 + 'use_oem_wallpaper%': '<(use_oem_wallpaper)', 1.663 + 'enable_background%': '<(enable_background)', 1.664 + 'linux_use_gold_binary%': '<(linux_use_gold_binary)', 1.665 + 'linux_use_gold_flags%': '<(linux_use_gold_flags)', 1.666 + 'use_canvas_skia%': '<(use_canvas_skia)', 1.667 + 'test_isolation_mode%': '<(test_isolation_mode)', 1.668 + 'test_isolation_outdir%': '<(test_isolation_outdir)', 1.669 + 'enable_automation%': '<(enable_automation)', 1.670 + 'enable_printing%': '<(enable_printing)', 1.671 + 'enable_captive_portal_detection%': '<(enable_captive_portal_detection)', 1.672 + 'disable_ftp_support%': '<(disable_ftp_support)', 1.673 + 'force_rlz_use_chrome_net%': '<(force_rlz_use_chrome_net)', 1.674 + 'enable_task_manager%': '<(enable_task_manager)', 1.675 + 'sas_dll_path%': '<(sas_dll_path)', 1.676 + 'wix_path%': '<(wix_path)', 1.677 + 'android_upstream_bringup%': '<(android_upstream_bringup)', 1.678 + 'use_libjpeg_turbo%': '<(use_libjpeg_turbo)', 1.679 + 'use_system_libjpeg%': '<(use_system_libjpeg)', 1.680 + 'android_build_type%': '<(android_build_type)', 1.681 + 'use_official_google_api_keys%': '<(use_official_google_api_keys)', 1.682 + 'google_api_key%': '<(google_api_key)', 1.683 + 'google_default_client_id%': '<(google_default_client_id)', 1.684 + 'google_default_client_secret%': '<(google_default_client_secret)', 1.685 + 1.686 + # Use system yasm instead of bundled one. 1.687 + 'use_system_yasm%': 0, 1.688 + 1.689 + # Default to enabled PIE; this is important for ASLR but we may need to be 1.690 + # able to turn it off for various reasons. 1.691 + 'linux_disable_pie%': 0, 1.692 + 1.693 + # The release channel that this build targets. This is used to restrict 1.694 + # channel-specific build options, like which installer packages to create. 1.695 + # The default is 'all', which does no channel-specific filtering. 1.696 + 'channel%': 'all', 1.697 + 1.698 + # Override chromium_mac_pch and set it to 0 to suppress the use of 1.699 + # precompiled headers on the Mac. Prefix header injection may still be 1.700 + # used, but prefix headers will not be precompiled. This is useful when 1.701 + # using distcc to distribute a build to compile slaves that don't 1.702 + # share the same compiler executable as the system driving the compilation, 1.703 + # because precompiled headers rely on pointers into a specific compiler 1.704 + # executable's image. Setting this to 0 is needed to use an experimental 1.705 + # Linux-Mac cross compiler distcc farm. 1.706 + 'chromium_mac_pch%': 1, 1.707 + 1.708 + # The default value for mac_strip in target_defaults. This cannot be 1.709 + # set there, per the comment about variable% in a target_defaults. 1.710 + 'mac_strip_release%': 1, 1.711 + 1.712 + # Set to 1 to enable code coverage. In addition to build changes 1.713 + # (e.g. extra CFLAGS), also creates a new target in the src/chrome 1.714 + # project file called "coverage". 1.715 + # Currently ignored on Windows. 1.716 + 'coverage%': 0, 1.717 + 1.718 + # Set to 1 to force Visual C++ to use legacy debug information format /Z7. 1.719 + # This is useful for parallel compilation tools which can't support /Zi. 1.720 + # Only used on Windows. 1.721 + 'win_z7%' : 0, 1.722 + 1.723 + # Although base/allocator lets you select a heap library via an 1.724 + # environment variable, the libcmt shim it uses sometimes gets in 1.725 + # the way. To disable it entirely, and switch to normal msvcrt, do e.g. 1.726 + # 'win_use_allocator_shim': 0, 1.727 + # 'win_release_RuntimeLibrary': 2 1.728 + # to ~/.gyp/include.gypi, gclient runhooks --force, and do a release build. 1.729 + 'win_use_allocator_shim%': 1, # 1 = shim allocator via libcmt; 0 = msvcrt 1.730 + 1.731 + # Whether usage of OpenMAX is enabled. 1.732 + 'enable_openmax%': 0, 1.733 + 1.734 + # Whether proprietary audio/video codecs are assumed to be included with 1.735 + # this build (only meaningful if branding!=Chrome). 1.736 + 'proprietary_codecs%': 0, 1.737 + 1.738 + # TODO(bradnelson): eliminate this when possible. 1.739 + # To allow local gyp files to prevent release.vsprops from being included. 1.740 + # Yes(1) means include release.vsprops. 1.741 + # Once all vsprops settings are migrated into gyp, this can go away. 1.742 + 'msvs_use_common_release%': 1, 1.743 + 1.744 + # TODO(bradnelson): eliminate this when possible. 1.745 + # To allow local gyp files to override additional linker options for msvs. 1.746 + # Yes(1) means set use the common linker options. 1.747 + 'msvs_use_common_linker_extras%': 1, 1.748 + 1.749 + # TODO(sgk): eliminate this if possible. 1.750 + # It would be nicer to support this via a setting in 'target_defaults' 1.751 + # in chrome/app/locales/locales.gypi overriding the setting in the 1.752 + # 'Debug' configuration in the 'target_defaults' dict below, 1.753 + # but that doesn't work as we'd like. 1.754 + 'msvs_debug_link_incremental%': '2', 1.755 + 1.756 + # Needed for some of the largest modules. 1.757 + 'msvs_debug_link_nonincremental%': '1', 1.758 + 1.759 + # Turns on Use Library Dependency Inputs for linking chrome.dll on Windows 1.760 + # to get incremental linking to be faster in debug builds. 1.761 + 'incremental_chrome_dll%': '0', 1.762 + 1.763 + # The default settings for third party code for treating 1.764 + # warnings-as-errors. Ideally, this would not be required, however there 1.765 + # is some third party code that takes a long time to fix/roll. So, this 1.766 + # flag allows us to have warnings as errors in general to prevent 1.767 + # regressions in most modules, while working on the bits that are 1.768 + # remaining. 1.769 + 'win_third_party_warn_as_error%': 'true', 1.770 + 1.771 + # This is the location of the sandbox binary. Chrome looks for this before 1.772 + # running the zygote process. If found, and SUID, it will be used to 1.773 + # sandbox the zygote process and, thus, all renderer processes. 1.774 + 'linux_sandbox_path%': '', 1.775 + 1.776 + # Set this to true to enable SELinux support. 1.777 + 'selinux%': 0, 1.778 + 1.779 + # Clang stuff. 1.780 + 'clang%': '<(clang)', 1.781 + 'make_clang_dir%': 'third_party/llvm-build/Release+Asserts', 1.782 + 1.783 + # These two variables can be set in GYP_DEFINES while running 1.784 + # |gclient runhooks| to let clang run a plugin in every compilation. 1.785 + # Only has an effect if 'clang=1' is in GYP_DEFINES as well. 1.786 + # Example: 1.787 + # GYP_DEFINES='clang=1 clang_load=/abs/path/to/libPrintFunctionNames.dylib clang_add_plugin=print-fns' gclient runhooks 1.788 + 1.789 + 'clang_load%': '', 1.790 + 'clang_add_plugin%': '', 1.791 + 1.792 + # The default type of gtest. 1.793 + 'gtest_target_type%': 'executable', 1.794 + 1.795 + # Enable sampling based profiler. 1.796 + # See http://google-perftools.googlecode.com/svn/trunk/doc/cpuprofile.html 1.797 + 'profiling%': '0', 1.798 + 1.799 + # Enable strict glibc debug mode. 1.800 + 'glibcxx_debug%': 0, 1.801 + 1.802 + # Override whether we should use Breakpad on Linux. I.e. for Chrome bot. 1.803 + 'linux_breakpad%': 0, 1.804 + # And if we want to dump symbols for Breakpad-enabled builds. 1.805 + 'linux_dump_symbols%': 0, 1.806 + # And if we want to strip the binary after dumping symbols. 1.807 + 'linux_strip_binary%': 0, 1.808 + # Strip the test binaries needed for Linux reliability tests. 1.809 + 'linux_strip_reliability_tests%': 0, 1.810 + 1.811 + # Enable TCMalloc. 1.812 + 'linux_use_tcmalloc%': 1, 1.813 + 1.814 + # Disable TCMalloc's debugallocation. 1.815 + 'linux_use_debugallocation%': 0, 1.816 + 1.817 + # Disable TCMalloc's heapchecker. 1.818 + 'linux_use_heapchecker%': 0, 1.819 + 1.820 + # Disable shadow stack keeping used by heapcheck to unwind the stacks 1.821 + # better. 1.822 + 'linux_keep_shadow_stacks%': 0, 1.823 + 1.824 + # Set to 1 to link against libgnome-keyring instead of using dlopen(). 1.825 + 'linux_link_gnome_keyring%': 0, 1.826 + # Set to 1 to link against gsettings APIs instead of using dlopen(). 1.827 + 'linux_link_gsettings%': 0, 1.828 + 1.829 + # Set Thumb compilation flags. 1.830 + 'arm_thumb%': 0, 1.831 + 1.832 + # Set ARM fpu compilation flags (only meaningful if armv7==1 and 1.833 + # arm_neon==0). 1.834 + 'arm_fpu%': 'vfpv3', 1.835 + 1.836 + # Set ARM float abi compilation flag. 1.837 + 'arm_float_abi%': 'softfp', 1.838 + 1.839 + # Enable new NPDevice API. 1.840 + 'enable_new_npdevice_api%': 0, 1.841 + 1.842 + # Enable EGLImage support in OpenMAX 1.843 + 'enable_eglimage%': 1, 1.844 + 1.845 + # Enable a variable used elsewhere throughout the GYP files to determine 1.846 + # whether to compile in the sources for the GPU plugin / process. 1.847 + 'enable_gpu%': 1, 1.848 + 1.849 + # .gyp files or targets should set chromium_code to 1 if they build 1.850 + # Chromium-specific code, as opposed to external code. This variable is 1.851 + # used to control such things as the set of warnings to enable, and 1.852 + # whether warnings are treated as errors. 1.853 + 'chromium_code%': 0, 1.854 + 1.855 + 'release_valgrind_build%': 0, 1.856 + 1.857 + # TODO(thakis): Make this a blacklist instead, http://crbug.com/101600 1.858 + 'enable_wexit_time_destructors%': 0, 1.859 + 1.860 + # Set to 1 to compile with the built in pdf viewer. 1.861 + 'internal_pdf%': 0, 1.862 + 1.863 + # Set to 1 to compile with the OpenGL ES 2.0 conformance tests. 1.864 + 'internal_gles2_conform_tests%': 0, 1.865 + 1.866 + # NOTE: When these end up in the Mac bundle, we need to replace '-' for '_' 1.867 + # so Cocoa is happy (http://crbug.com/20441). 1.868 + 'locales': [ 1.869 + 'am', 'ar', 'bg', 'bn', 'ca', 'cs', 'da', 'de', 'el', 'en-GB', 1.870 + 'en-US', 'es-419', 'es', 'et', 'fa', 'fi', 'fil', 'fr', 'gu', 'he', 1.871 + 'hi', 'hr', 'hu', 'id', 'it', 'ja', 'kn', 'ko', 'lt', 'lv', 1.872 + 'ml', 'mr', 'ms', 'nb', 'nl', 'pl', 'pt-BR', 'pt-PT', 'ro', 'ru', 1.873 + 'sk', 'sl', 'sr', 'sv', 'sw', 'ta', 'te', 'th', 'tr', 'uk', 1.874 + 'vi', 'zh-CN', 'zh-TW', 1.875 + ], 1.876 + 1.877 + # Pseudo locales are special locales which are used for testing and 1.878 + # debugging. They don't get copied to the final app. For more info, 1.879 + # check out https://sites.google.com/a/chromium.org/dev/Home/fake-bidi 1.880 + 'pseudo_locales': [ 1.881 + 'fake-bidi', 1.882 + ], 1.883 + 1.884 + 'grit_defines': [], 1.885 + 1.886 + # If debug_devtools is set to 1, JavaScript files for DevTools are 1.887 + # stored as is and loaded from disk. Otherwise, a concatenated file 1.888 + # is stored in resources.pak. It is still possible to load JS files 1.889 + # from disk by passing --debug-devtools cmdline switch. 1.890 + 'debug_devtools%': 0, 1.891 + 1.892 + # The Java Bridge is not compiled in by default. 1.893 + 'java_bridge%': 0, 1.894 + 1.895 + # Code signing for iOS binaries. The bots need to be able to disable this. 1.896 + 'chromium_ios_signing%': 1, 1.897 + 1.898 + # This flag is only used when disable_nacl==0 and disables all those 1.899 + # subcomponents which would require the installation of a native_client 1.900 + # untrusted toolchain. 1.901 + 'disable_nacl_untrusted%': 0, 1.902 + 1.903 + # Disable Dart by default. 1.904 + 'enable_dart%': 0, 1.905 + 1.906 + # The desired version of Windows SDK can be set in ~/.gyp/include.gypi. 1.907 + 'msbuild_toolset%': '', 1.908 + 1.909 + # Native Client is enabled by default. 1.910 + 'disable_nacl%': 0, 1.911 + 1.912 + # Whether to build full debug version for Debug configuration on Android. 1.913 + # Compared to full debug version, the default Debug configuration on Android 1.914 + # has no full v8 debug, has size optimization and linker gc section, so that 1.915 + # we can build a debug version with acceptable size and performance. 1.916 + 'android_full_debug%': 0, 1.917 + 1.918 + # Sets the default version name and code for Android app, by default we 1.919 + # do a developer build. 1.920 + 'android_app_version_name%': 'Developer Build', 1.921 + 'android_app_version_code%': 0, 1.922 + 1.923 + 'sas_dll_exists': '<!(<(PYTHON) <(DEPTH)/build/dir_exists.py <(sas_dll_path))', 1.924 + 'wix_exists': '<!(<(PYTHON) <(DEPTH)/build/dir_exists.py <(wix_path))', 1.925 + 1.926 + 'windows_sdk_default_path': '<(DEPTH)/third_party/platformsdk_win8/files', 1.927 + 'directx_sdk_default_path': '<(DEPTH)/third_party/directxsdk/files', 1.928 + 1.929 + 'conditions': [ 1.930 + ['"<!(<(PYTHON) <(DEPTH)/build/dir_exists.py <(windows_sdk_default_path))"=="True"', { 1.931 + 'windows_sdk_path%': '<(windows_sdk_default_path)', 1.932 + }, { 1.933 + 'windows_sdk_path%': 'C:/Program Files (x86)/Windows Kits/8.0', 1.934 + }], 1.935 + ['OS=="win" and "<!(<(PYTHON) <(DEPTH)/build/dir_exists.py <(directx_sdk_default_path))"=="True"', { 1.936 + 'directx_sdk_path%': '<(directx_sdk_default_path)', 1.937 + }, { 1.938 + 'directx_sdk_path%': '$(DXSDK_DIR)', 1.939 + }], 1.940 + # If use_official_google_api_keys is already set (to 0 or 1), we 1.941 + # do none of the implicit checking. If it is set to 1 and the 1.942 + # internal keys file is missing, the build will fail at compile 1.943 + # time. If it is set to 0 and keys are not provided by other 1.944 + # means, a warning will be printed at compile time. 1.945 + ['use_official_google_api_keys==2', { 1.946 + 'use_official_google_api_keys%': 1.947 + '<!(<(PYTHON) <(DEPTH)/google_apis/build/check_internal.py <(DEPTH)/google_apis/internal/google_chrome_api_keys.h)', 1.948 + }], 1.949 + ['os_posix==1 and OS!="mac" and OS!="ios"', { 1.950 + # Figure out the python architecture to decide if we build pyauto. 1.951 + # disabled for mozilla because windows != mac and this runs a shell script 1.952 + # 'python_arch%': '<!(<(DEPTH)/build/linux/python_arch.sh <(sysroot)/usr/<(system_libdir)/libpython<(python_ver).so.1.0)', 1.953 + 'conditions': [ 1.954 + # TODO(glider): set clang to 1 earlier for ASan and TSan builds so 1.955 + # that it takes effect here. 1.956 + # disabled for Mozilla since it doesn't use this, and 'msys' messes $(CXX) up 1.957 + ['build_with_mozilla==0 and clang==0 and asan==0 and tsan==0', { 1.958 + # This will set gcc_version to XY if you are running gcc X.Y.*. 1.959 + 'gcc_version%': '<!(<(PYTHON) <(DEPTH)/build/compiler_version.py)', 1.960 + }, { 1.961 + 'gcc_version%': 0, 1.962 + }], 1.963 + ['branding=="Chrome"', { 1.964 + 'linux_breakpad%': 1, 1.965 + }], 1.966 + # All Chrome builds have breakpad symbols, but only process the 1.967 + # symbols from official builds. 1.968 + ['(branding=="Chrome" and buildtype=="Official")', { 1.969 + 'linux_dump_symbols%': 1, 1.970 + }], 1.971 + ], 1.972 + }], # os_posix==1 and OS!="mac" and OS!="ios" 1.973 + ['OS=="ios"', { 1.974 + 'disable_nacl%': 1, 1.975 + 'enable_gpu%': 0, 1.976 + 'icu_use_data_file_flag%': 1, 1.977 + 'use_system_bzip2%': 1, 1.978 + 'use_system_libxml%': 1, 1.979 + 'use_system_sqlite%': 1, 1.980 + 1.981 + # The Mac SDK is set for iOS builds and passed through to Mac 1.982 + # sub-builds. This allows the Mac sub-build SDK in an iOS build to be 1.983 + # overridden from the command line the same way it is for a Mac build. 1.984 + 'mac_sdk%': '<!(<(PYTHON) <(DEPTH)/build/mac/find_sdk.py 10.6)', 1.985 + 1.986 + # iOS SDK and deployment target support. The iOS 5.0 SDK is actually 1.987 + # what is required, but the value is left blank so when it is set in 1.988 + # the project files it will be the "current" iOS SDK. Forcing 5.0 1.989 + # even though it is "current" causes Xcode to spit out a warning for 1.990 + # every single project file for not using the "current" SDK. 1.991 + 'ios_sdk%': '', 1.992 + 'ios_sdk_path%': '', 1.993 + 'ios_deployment_target%': '4.3', 1.994 + 1.995 + 'conditions': [ 1.996 + # ios_product_name is set to the name of the .app bundle as it should 1.997 + # appear on disk. 1.998 + ['branding=="Chrome"', { 1.999 + 'ios_product_name%': 'Chrome', 1.1000 + }, { # else: branding!="Chrome" 1.1001 + 'ios_product_name%': 'Chromium', 1.1002 + }], 1.1003 + ['branding=="Chrome" and buildtype=="Official"', { 1.1004 + 'ios_breakpad%': 1, 1.1005 + }, { # else: branding!="Chrome" or buildtype!="Official" 1.1006 + 'ios_breakpad%': 0, 1.1007 + }], 1.1008 + ], 1.1009 + }], # OS=="ios" 1.1010 + ['OS=="android"', { 1.1011 + # Location of Android NDK. 1.1012 + 'variables': { 1.1013 + 'variables': { 1.1014 + 'variables': { 1.1015 + 'android_ndk_root%': '<!(/bin/echo -n $ANDROID_NDK_ROOT)', 1.1016 + }, 1.1017 + 'android_ndk_root%': '<(android_ndk_root)', 1.1018 + 'conditions': [ 1.1019 + ['target_arch == "ia32"', { 1.1020 + 'android_app_abi%': 'x86', 1.1021 + 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-9/arch-x86', 1.1022 + }], 1.1023 + ['target_arch=="arm"', { 1.1024 + 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-9/arch-arm', 1.1025 + 'conditions': [ 1.1026 + ['armv7==0', { 1.1027 + 'android_app_abi%': 'armeabi', 1.1028 + }, { 1.1029 + 'android_app_abi%': 'armeabi-v7a', 1.1030 + }], 1.1031 + ], 1.1032 + }], 1.1033 + ], 1.1034 + }, 1.1035 + 'android_ndk_root%': '<(android_ndk_root)', 1.1036 + 'android_app_abi%': '<(android_app_abi)', 1.1037 + 'android_ndk_sysroot%': '<(android_ndk_sysroot)', 1.1038 + }, 1.1039 + 'android_ndk_root%': '<(android_ndk_root)', 1.1040 + 'android_ndk_sysroot': '<(android_ndk_sysroot)', 1.1041 + 'android_ndk_include': '<(android_ndk_sysroot)/usr/include', 1.1042 + 'android_ndk_lib': '<(android_ndk_sysroot)/usr/lib', 1.1043 + 'android_app_abi%': '<(android_app_abi)', 1.1044 + 1.1045 + # Location of the "strip" binary, used by both gyp and scripts. 1.1046 + 'android_strip%' : '<!(/bin/echo -n <(android_toolchain)/*-strip)', 1.1047 + 1.1048 + # Provides an absolute path to PRODUCT_DIR (e.g. out/Release). Used 1.1049 + # to specify the output directory for Ant in the Android build. 1.1050 + 'ant_build_out': '`cd <(PRODUCT_DIR) && pwd -P`', 1.1051 + 1.1052 + # Uses Android's crash report system 1.1053 + 'linux_breakpad%': 0, 1.1054 + 1.1055 + # Always uses openssl. 1.1056 + 'use_openssl%': 1, 1.1057 + 1.1058 + 'proprietary_codecs%': '<(proprietary_codecs)', 1.1059 + 'enable_task_manager%': 0, 1.1060 + 'safe_browsing%': 0, 1.1061 + 'configuration_policy%': 0, 1.1062 + 'input_speech%': 0, 1.1063 + 'enable_web_intents%': 0, 1.1064 + 'enable_automation%': 0, 1.1065 + 'java_bridge%': 1, 1.1066 + 'build_ffmpegsumo%': 0, 1.1067 + 'linux_use_tcmalloc%': 0, 1.1068 + 1.1069 + # Disable Native Client. 1.1070 + 'disable_nacl%': 1, 1.1071 + 1.1072 + # Android does not support background apps. 1.1073 + 'enable_background%': 0, 1.1074 + 1.1075 + # Sessions are store separately in the Java side. 1.1076 + 'enable_session_service%': 0, 1.1077 + 1.1078 + # Set to 1 once we have a notification system for Android. 1.1079 + # http://crbug.com/115320 1.1080 + 'notifications%': 0, 1.1081 + 1.1082 + 'p2p_apis%' : 0, 1.1083 + 1.1084 + # TODO(jrg): when 'gtest_target_type'=='shared_library' and 1.1085 + # OS==android, make all gtest_targets depend on 1.1086 + # testing/android/native_test.gyp:native_test_apk. 1.1087 + 'gtest_target_type%': 'shared_library', 1.1088 + 1.1089 + # Uses system APIs for decoding audio and video. 1.1090 + 'use_libffmpeg%': '0', 1.1091 + 1.1092 + # Always use the chromium skia. The use_system_harfbuzz needs to 1.1093 + # match use_system_skia. 1.1094 + 'use_system_skia%': '0', 1.1095 + 'use_system_harfbuzz%': '0', 1.1096 + 1.1097 + # Configure crash reporting and build options based on release type. 1.1098 + 'conditions': [ 1.1099 + ['buildtype=="Official"', { 1.1100 + # Only report crash dumps for Official builds. 1.1101 + 'linux_breakpad%': 1, 1.1102 + }, { 1.1103 + 'linux_breakpad%': 0, 1.1104 + }], 1.1105 + ], 1.1106 + 1.1107 + # When building as part of the Android system, use system libraries 1.1108 + # where possible to reduce ROM size. 1.1109 + # TODO(steveblock): Investigate using the system version of sqlite. 1.1110 + 'use_system_sqlite%': 0, # '<(android_build_type)', 1.1111 + 'use_system_expat%': '<(android_build_type)', 1.1112 + 'use_system_icu%': '<(android_build_type)', 1.1113 + 'use_system_stlport%': '<(android_build_type)', 1.1114 + 1.1115 + # Copy it out one scope. 1.1116 + 'android_build_type%': '<(android_build_type)', 1.1117 + }], # OS=="android" 1.1118 + ['OS=="mac"', { 1.1119 + 'variables': { 1.1120 + # Mac OS X SDK and deployment target support. The SDK identifies 1.1121 + # the version of the system headers that will be used, and 1.1122 + # corresponds to the MAC_OS_X_VERSION_MAX_ALLOWED compile-time 1.1123 + # macro. "Maximum allowed" refers to the operating system version 1.1124 + # whose APIs are available in the headers. The deployment target 1.1125 + # identifies the minimum system version that the built products are 1.1126 + # expected to function on. It corresponds to the 1.1127 + # MAC_OS_X_VERSION_MIN_REQUIRED compile-time macro. To ensure these 1.1128 + # macros are available, #include <AvailabilityMacros.h>. Additional 1.1129 + # documentation on these macros is available at 1.1130 + # http://developer.apple.com/mac/library/technotes/tn2002/tn2064.html#SECTION3 1.1131 + # Chrome normally builds with the Mac OS X 10.6 SDK and sets the 1.1132 + # deployment target to 10.6. Other projects, such as O3D, may 1.1133 + # override these defaults. 1.1134 + 1.1135 + # Normally, mac_sdk_min is used to find an SDK that Xcode knows 1.1136 + # about that is at least the specified version. In official builds, 1.1137 + # the SDK must match mac_sdk_min exactly. If the SDK is installed 1.1138 + # someplace that Xcode doesn't know about, set mac_sdk_path to the 1.1139 + # path to the SDK; when set to a non-empty string, SDK detection 1.1140 + # based on mac_sdk_min will be bypassed entirely. 1.1141 + 'mac_sdk_min%': '10.6', 1.1142 + 'mac_sdk_path%': '', 1.1143 + 1.1144 + 'mac_deployment_target%': '10.6', 1.1145 + }, 1.1146 + 1.1147 + 'mac_sdk_min': '<(mac_sdk_min)', 1.1148 + 'mac_sdk_path': '<(mac_sdk_path)', 1.1149 + 'mac_deployment_target': '<(mac_deployment_target)', 1.1150 + 1.1151 + # Enable clang on mac by default! 1.1152 + 'clang%': 1, 1.1153 + 1.1154 + # Compile in Breakpad support by default so that it can be 1.1155 + # tested, even if it is not enabled by default at runtime. 1.1156 + 'mac_breakpad_compiled_in%': 1, 1.1157 + 'conditions': [ 1.1158 + # mac_product_name is set to the name of the .app bundle as it should 1.1159 + # appear on disk. This duplicates data from 1.1160 + # chrome/app/theme/chromium/BRANDING and 1.1161 + # chrome/app/theme/google_chrome/BRANDING, but is necessary to get 1.1162 + # these names into the build system. 1.1163 + ['branding=="Chrome"', { 1.1164 + 'mac_product_name%': 'Google Chrome', 1.1165 + }, { # else: branding!="Chrome" 1.1166 + 'mac_product_name%': 'Chromium', 1.1167 + }], 1.1168 + 1.1169 + ['branding=="Chrome" and buildtype=="Official"', { 1.1170 + 'mac_sdk%': '<!(<(PYTHON) <(DEPTH)/build/mac/find_sdk.py --verify <(mac_sdk_min) --sdk_path=<(mac_sdk_path))', 1.1171 + # Enable uploading crash dumps. 1.1172 + 'mac_breakpad_uploads%': 1, 1.1173 + # Enable dumping symbols at build time for use by Mac Breakpad. 1.1174 + 'mac_breakpad%': 1, 1.1175 + # Enable Keystone auto-update support. 1.1176 + 'mac_keystone%': 1, 1.1177 + }, { # else: branding!="Chrome" or buildtype!="Official" 1.1178 + 'mac_sdk%': '<!(<(PYTHON) <(DEPTH)/build/mac/find_sdk.py <(mac_sdk_min))', 1.1179 + 'mac_breakpad_uploads%': 0, 1.1180 + 'mac_breakpad%': 0, 1.1181 + 'mac_keystone%': 0, 1.1182 + }], 1.1183 + ], 1.1184 + }], # OS=="mac" 1.1185 + 1.1186 + ['OS=="win"', { 1.1187 + 'conditions': [ 1.1188 + ['component=="shared_library"', { 1.1189 + 'win_use_allocator_shim%': 0, 1.1190 + }], 1.1191 + ['component=="shared_library" and "<(GENERATOR)"=="ninja"', { 1.1192 + # Only enabled by default for ninja because it's buggy in VS. 1.1193 + # Not enabled for component=static_library because some targets 1.1194 + # are too large and the toolchain fails due to the size of the 1.1195 + # .obj files. 1.1196 + 'incremental_chrome_dll%': 1, 1.1197 + }], 1.1198 + # Don't do incremental linking for large modules on 32-bit. 1.1199 + ['MSVS_OS_BITS==32', { 1.1200 + 'msvs_large_module_debug_link_mode%': '1', # No 1.1201 + },{ 1.1202 + 'msvs_large_module_debug_link_mode%': '2', # Yes 1.1203 + }], 1.1204 + ['MSVS_VERSION=="2010e" or MSVS_VERSION=="2008e" or MSVS_VERSION=="2005e"', { 1.1205 + 'msvs_express%': 1, 1.1206 + 'secure_atl%': 0, 1.1207 + },{ 1.1208 + 'msvs_express%': 0, 1.1209 + 'secure_atl%': 1, 1.1210 + }], 1.1211 + ], 1.1212 + 'nacl_win64_defines': [ 1.1213 + # This flag is used to minimize dependencies when building 1.1214 + # Native Client loader for 64-bit Windows. 1.1215 + 'NACL_WIN64', 1.1216 + ], 1.1217 + }], 1.1218 + 1.1219 + ['os_posix==1 and chromeos==0 and OS!="android"', { 1.1220 + 'use_cups%': 1, 1.1221 + }, { 1.1222 + 'use_cups%': 0, 1.1223 + }], 1.1224 + 1.1225 + # Native Client glibc toolchain is enabled by default except on arm. 1.1226 + ['target_arch=="arm"', { 1.1227 + 'disable_glibc%': 1, 1.1228 + }, { 1.1229 + 'disable_glibc%': 0, 1.1230 + }], 1.1231 + 1.1232 + # Disable SSE2 when building for ARM or MIPS. 1.1233 + ['target_arch=="arm" or target_arch=="mipsel"', { 1.1234 + 'disable_sse2%': 1, 1.1235 + }, { 1.1236 + 'disable_sse2%': '<(disable_sse2)', 1.1237 + }], 1.1238 + 1.1239 + # Set the relative path from this file to the GYP file of the JPEG 1.1240 + # library used by Chromium. 1.1241 + ['use_system_libjpeg==1 or use_libjpeg_turbo==0', { 1.1242 + # Configuration for using the system libjeg is here. 1.1243 + 'libjpeg_gyp_path': '../third_party/libjpeg/libjpeg.gyp', 1.1244 + }, { 1.1245 + 'libjpeg_gyp_path': '../third_party/libjpeg_turbo/libjpeg.gyp', 1.1246 + }], 1.1247 + 1.1248 + # Options controlling the use of GConf (the classic GNOME configuration 1.1249 + # system) and GIO, which contains GSettings (the new GNOME config system). 1.1250 + ['chromeos==1', { 1.1251 + 'use_gconf%': 0, 1.1252 + 'use_gio%': 0, 1.1253 + }, { 1.1254 + 'use_gconf%': 1, 1.1255 + 'use_gio%': 1, 1.1256 + }], 1.1257 + 1.1258 + # Set up -D and -E flags passed into grit. 1.1259 + ['branding=="Chrome"', { 1.1260 + # TODO(mmoss) The .grd files look for _google_chrome, but for 1.1261 + # consistency they should look for google_chrome_build like C++. 1.1262 + 'grit_defines': ['-D', '_google_chrome', 1.1263 + '-E', 'CHROMIUM_BUILD=google_chrome'], 1.1264 + }, { 1.1265 + 'grit_defines': ['-D', '_chromium', 1.1266 + '-E', 'CHROMIUM_BUILD=chromium'], 1.1267 + }], 1.1268 + ['chromeos==1', { 1.1269 + 'grit_defines': ['-D', 'chromeos', '-D', 'scale_factors=2x'], 1.1270 + }], 1.1271 + ['toolkit_views==1', { 1.1272 + 'grit_defines': ['-D', 'toolkit_views'], 1.1273 + }], 1.1274 + ['use_aura==1', { 1.1275 + 'grit_defines': ['-D', 'use_aura'], 1.1276 + }], 1.1277 + ['use_ash==1', { 1.1278 + 'grit_defines': ['-D', 'use_ash'], 1.1279 + }], 1.1280 + ['use_nss==1', { 1.1281 + 'grit_defines': ['-D', 'use_nss'], 1.1282 + }], 1.1283 + ['file_manager_extension==1', { 1.1284 + 'grit_defines': ['-D', 'file_manager_extension'], 1.1285 + }], 1.1286 + ['remoting==1', { 1.1287 + 'grit_defines': ['-D', 'remoting'], 1.1288 + }], 1.1289 + ['use_titlecase_in_grd_files==1', { 1.1290 + 'grit_defines': ['-D', 'use_titlecase'], 1.1291 + }], 1.1292 + ['use_third_party_translations==1', { 1.1293 + 'grit_defines': ['-D', 'use_third_party_translations'], 1.1294 + 'locales': [ 1.1295 + 'ast', 'bs', 'ca@valencia', 'en-AU', 'eo', 'eu', 'gl', 'hy', 'ia', 1.1296 + 'ka', 'ku', 'kw', 'ms', 'ug' 1.1297 + ], 1.1298 + }], 1.1299 + ['OS=="android"', { 1.1300 + 'grit_defines': ['-D', 'android'], 1.1301 + }], 1.1302 + ['OS=="mac"', { 1.1303 + 'grit_defines': ['-D', 'scale_factors=2x'], 1.1304 + }], 1.1305 + ['OS == "ios"', { 1.1306 + 'grit_defines': [ 1.1307 + # define for iOS specific resources. 1.1308 + '-D', 'ios', 1.1309 + # iOS uses a whitelist to filter resources. 1.1310 + '-w', '<(DEPTH)/build/ios/grit_whitelist.txt' 1.1311 + ], 1.1312 + }], 1.1313 + ['enable_extensions==1', { 1.1314 + 'grit_defines': ['-D', 'enable_extensions'], 1.1315 + }], 1.1316 + ['enable_printing==1', { 1.1317 + 'grit_defines': ['-D', 'enable_printing'], 1.1318 + }], 1.1319 + ['enable_themes==1', { 1.1320 + 'grit_defines': ['-D', 'enable_themes'], 1.1321 + }], 1.1322 + ['use_oem_wallpaper==1', { 1.1323 + 'grit_defines': ['-D', 'use_oem_wallpaper'], 1.1324 + }], 1.1325 + ['clang_use_chrome_plugins==1 and OS!="win"', { 1.1326 + 'clang_chrome_plugins_flags': [ 1.1327 + '<!@(<(DEPTH)/tools/clang/scripts/plugin_flags.sh)' 1.1328 + ], 1.1329 + }], 1.1330 + 1.1331 + ['enable_web_intents_tag==1', { 1.1332 + 'grit_defines': ['-D', 'enable_web_intents_tag'], 1.1333 + }], 1.1334 + 1.1335 + ['asan==1', { 1.1336 + 'clang%': 1, 1.1337 + }], 1.1338 + ['asan==1 and OS=="mac"', { 1.1339 + # See http://crbug.com/145503. 1.1340 + 'component': "static_library", 1.1341 + }], 1.1342 + ['tsan==1', { 1.1343 + 'clang%': 1, 1.1344 + }], 1.1345 + 1.1346 + ['OS=="linux" and clang_type_profiler==1', { 1.1347 + 'clang%': 1, 1.1348 + 'clang_use_chrome_plugins%': 0, 1.1349 + 'make_clang_dir%': 'third_party/llvm-allocated-type/Linux_x64', 1.1350 + }], 1.1351 + 1.1352 + # On valgrind bots, override the optimizer settings so we don't inline too 1.1353 + # much and make the stacks harder to figure out. 1.1354 + # 1.1355 + # TODO(rnk): Kill off variables that no one else uses and just implement 1.1356 + # them under a build_for_tool== condition. 1.1357 + ['build_for_tool=="memcheck" or build_for_tool=="tsan"', { 1.1358 + # gcc flags 1.1359 + 'mac_debug_optimization': '1', 1.1360 + 'mac_release_optimization': '1', 1.1361 + 'release_optimize': '1', 1.1362 + 'no_gc_sections': 1, 1.1363 + 'debug_extra_cflags': '-g -fno-inline -fno-omit-frame-pointer ' 1.1364 + '-fno-builtin -fno-optimize-sibling-calls', 1.1365 + 'release_extra_cflags': '-g -fno-inline -fno-omit-frame-pointer ' 1.1366 + '-fno-builtin -fno-optimize-sibling-calls', 1.1367 + 1.1368 + # MSVS flags for TSan on Pin and Windows. 1.1369 + 'win_debug_RuntimeChecks': '0', 1.1370 + 'win_debug_disable_iterator_debugging': '1', 1.1371 + 'win_debug_Optimization': '1', 1.1372 + 'win_debug_InlineFunctionExpansion': '0', 1.1373 + 'win_release_InlineFunctionExpansion': '0', 1.1374 + 'win_release_OmitFramePointers': '0', 1.1375 + 1.1376 + 'linux_use_tcmalloc': 1, 1.1377 + 'release_valgrind_build': 1, 1.1378 + 'werror': '', 1.1379 + 'component': 'static_library', 1.1380 + 'use_system_zlib': 0, 1.1381 + }], 1.1382 + 1.1383 + # Build tweaks for DrMemory. 1.1384 + # TODO(rnk): Combine with tsan config to share the builder. 1.1385 + # http://crbug.com/108155 1.1386 + ['build_for_tool=="drmemory"', { 1.1387 + # These runtime checks force initialization of stack vars which blocks 1.1388 + # DrMemory's uninit detection. 1.1389 + 'win_debug_RuntimeChecks': '0', 1.1390 + # Iterator debugging is slow. 1.1391 + 'win_debug_disable_iterator_debugging': '1', 1.1392 + # Try to disable optimizations that mess up stacks in a release build. 1.1393 + 'win_release_InlineFunctionExpansion': '0', 1.1394 + 'win_release_OmitFramePointers': '0', 1.1395 + # Ditto for debug, to support bumping win_debug_Optimization. 1.1396 + 'win_debug_InlineFunctionExpansion': 0, 1.1397 + 'win_debug_OmitFramePointers': 0, 1.1398 + # Keep the code under #ifndef NVALGRIND. 1.1399 + 'release_valgrind_build': 1, 1.1400 + }], 1.1401 + ], 1.1402 + 1.1403 + # List of default apps to install in new profiles. The first list contains 1.1404 + # the source files as found in svn. The second list, used only for linux, 1.1405 + # contains the destination location for each of the files. When a crx 1.1406 + # is added or removed from the list, the chrome/browser/resources/ 1.1407 + # default_apps/external_extensions.json file must also be updated. 1.1408 + 'default_apps_list': [ 1.1409 + 'browser/resources/default_apps/external_extensions.json', 1.1410 + 'browser/resources/default_apps/gmail.crx', 1.1411 + 'browser/resources/default_apps/search.crx', 1.1412 + 'browser/resources/default_apps/youtube.crx', 1.1413 + 'browser/resources/default_apps/drive.crx', 1.1414 + 'browser/resources/default_apps/docs.crx', 1.1415 + ], 1.1416 + 'default_apps_list_linux_dest': [ 1.1417 + '<(PRODUCT_DIR)/default_apps/external_extensions.json', 1.1418 + '<(PRODUCT_DIR)/default_apps/gmail.crx', 1.1419 + '<(PRODUCT_DIR)/default_apps/search.crx', 1.1420 + '<(PRODUCT_DIR)/default_apps/youtube.crx', 1.1421 + '<(PRODUCT_DIR)/default_apps/drive.crx', 1.1422 + '<(PRODUCT_DIR)/default_apps/docs.crx', 1.1423 + ], 1.1424 + }, 1.1425 + 'target_defaults': { 1.1426 + 'variables': { 1.1427 + # The condition that operates on chromium_code is in a target_conditions 1.1428 + # section, and will not have access to the default fallback value of 1.1429 + # chromium_code at the top of this file, or to the chromium_code 1.1430 + # variable placed at the root variables scope of .gyp files, because 1.1431 + # those variables are not set at target scope. As a workaround, 1.1432 + # if chromium_code is not set at target scope, define it in target scope 1.1433 + # to contain whatever value it has during early variable expansion. 1.1434 + # That's enough to make it available during target conditional 1.1435 + # processing. 1.1436 + 'chromium_code%': '<(chromium_code)', 1.1437 + 1.1438 + # See http://msdn.microsoft.com/en-us/library/aa652360(VS.71).aspx 1.1439 + 'win_release_Optimization%': '2', # 2 = /Os 1.1440 + 'win_debug_Optimization%': '0', # 0 = /Od 1.1441 + 1.1442 + # See http://msdn.microsoft.com/en-us/library/2kxx5t2c(v=vs.80).aspx 1.1443 + # Tri-state: blank is default, 1 on, 0 off 1.1444 + 'win_release_OmitFramePointers%': '0', 1.1445 + # Tri-state: blank is default, 1 on, 0 off 1.1446 + 'win_debug_OmitFramePointers%': '', 1.1447 + 1.1448 + # See http://msdn.microsoft.com/en-us/library/8wtf2dfz(VS.71).aspx 1.1449 + 'win_debug_RuntimeChecks%': '3', # 3 = all checks enabled, 0 = off 1.1450 + 1.1451 + # See http://msdn.microsoft.com/en-us/library/47238hez(VS.71).aspx 1.1452 + 'win_debug_InlineFunctionExpansion%': '', # empty = default, 0 = off, 1.1453 + 'win_release_InlineFunctionExpansion%': '2', # 1 = only __inline, 2 = max 1.1454 + 1.1455 + # VS inserts quite a lot of extra checks to algorithms like 1.1456 + # std::partial_sort in Debug build which make them O(N^2) 1.1457 + # instead of O(N*logN). This is particularly slow under memory 1.1458 + # tools like ThreadSanitizer so we want it to be disablable. 1.1459 + # See http://msdn.microsoft.com/en-us/library/aa985982(v=VS.80).aspx 1.1460 + 'win_debug_disable_iterator_debugging%': '0', 1.1461 + 1.1462 + 'release_extra_cflags%': '', 1.1463 + 'debug_extra_cflags%': '', 1.1464 + 1.1465 + 'release_valgrind_build%': '<(release_valgrind_build)', 1.1466 + 1.1467 + # the non-qualified versions are widely assumed to be *nix-only 1.1468 + 'win_release_extra_cflags%': '', 1.1469 + 'win_debug_extra_cflags%': '', 1.1470 + 1.1471 + # TODO(thakis): Make this a blacklist instead, http://crbug.com/101600 1.1472 + 'enable_wexit_time_destructors%': '<(enable_wexit_time_destructors)', 1.1473 + 1.1474 + # Only used by Windows build for now. Can be used to build into a 1.1475 + # differet output directory, e.g., a build_dir_prefix of VS2010_ would 1.1476 + # output files in src/build/VS2010_{Debug,Release}. 1.1477 + 'build_dir_prefix%': '', 1.1478 + 1.1479 + # Targets are by default not nacl untrusted code. 1.1480 + 'nacl_untrusted_build%': 0, 1.1481 + 1.1482 + 'conditions': [ 1.1483 + ['OS=="win" and component=="shared_library"', { 1.1484 + # See http://msdn.microsoft.com/en-us/library/aa652367.aspx 1.1485 + 'win_release_RuntimeLibrary%': '2', # 2 = /MD (nondebug DLL) 1.1486 + 'win_debug_RuntimeLibrary%': '3', # 3 = /MDd (debug DLL) 1.1487 + }, { 1.1488 + # See http://msdn.microsoft.com/en-us/library/aa652367.aspx 1.1489 + 'win_release_RuntimeLibrary%': '0', # 0 = /MT (nondebug static) 1.1490 + 'win_debug_RuntimeLibrary%': '1', # 1 = /MTd (debug static) 1.1491 + }], 1.1492 + ['OS=="ios"', { 1.1493 + # See http://gcc.gnu.org/onlinedocs/gcc-4.4.2/gcc/Optimize-Options.html 1.1494 + 'mac_release_optimization%': 's', # Use -Os unless overridden 1.1495 + 'mac_debug_optimization%': '0', # Use -O0 unless overridden 1.1496 + }, { 1.1497 + # See http://gcc.gnu.org/onlinedocs/gcc-4.4.2/gcc/Optimize-Options.html 1.1498 + 'mac_release_optimization%': '3', # Use -O3 unless overridden 1.1499 + 'mac_debug_optimization%': '0', # Use -O0 unless overridden 1.1500 + }], 1.1501 + ], 1.1502 + }, 1.1503 + 'conditions': [ 1.1504 + ['OS=="linux" and linux_use_tcmalloc==1 and clang_type_profiler==1', { 1.1505 + 'cflags_cc!': ['-fno-rtti'], 1.1506 + 'cflags_cc+': [ 1.1507 + '-frtti', 1.1508 + '-gline-tables-only', 1.1509 + '-fintercept-allocation-functions', 1.1510 + ], 1.1511 + 'defines': ['TYPE_PROFILING'], 1.1512 + 'dependencies': [ 1.1513 + '<(DEPTH)/base/allocator/allocator.gyp:type_profiler', 1.1514 + ], 1.1515 + }], 1.1516 + ['OS=="win" and "<(msbuild_toolset)"!=""', { 1.1517 + 'msbuild_toolset': '<(msbuild_toolset)', 1.1518 + }], 1.1519 + ['branding=="Chrome"', { 1.1520 + 'defines': ['GOOGLE_CHROME_BUILD'], 1.1521 + }, { # else: branding!="Chrome" 1.1522 + 'defines': ['CHROMIUM_BUILD'], 1.1523 + }], 1.1524 + ['OS=="mac" and component=="shared_library"', { 1.1525 + 'xcode_settings': { 1.1526 + 'DYLIB_INSTALL_NAME_BASE': '@rpath', 1.1527 + 'LD_RUNPATH_SEARCH_PATHS': [ 1.1528 + # For unbundled binaries. 1.1529 + '@loader_path/.', 1.1530 + # For bundled binaries, to get back from Binary.app/Contents/MacOS. 1.1531 + '@loader_path/../../..', 1.1532 + ], 1.1533 + }, 1.1534 + }], 1.1535 + ['branding=="Chrome" and (OS=="win" or OS=="mac")', { 1.1536 + 'defines': ['ENABLE_RLZ'], 1.1537 + }], 1.1538 + ['component=="shared_library"', { 1.1539 + 'defines': ['COMPONENT_BUILD'], 1.1540 + }], 1.1541 + ['toolkit_views==1', { 1.1542 + 'defines': ['TOOLKIT_VIEWS=1'], 1.1543 + }], 1.1544 + ['ui_compositor_image_transport==1', { 1.1545 + 'defines': ['UI_COMPOSITOR_IMAGE_TRANSPORT'], 1.1546 + }], 1.1547 + ['use_aura==1', { 1.1548 + 'defines': ['USE_AURA=1'], 1.1549 + }], 1.1550 + ['use_ash==1', { 1.1551 + 'defines': ['USE_ASH=1'], 1.1552 + }], 1.1553 + ['use_libjpeg_turbo==1', { 1.1554 + 'defines': ['USE_LIBJPEG_TURBO=1'], 1.1555 + }], 1.1556 + ['use_nss==1', { 1.1557 + 'defines': ['USE_NSS=1'], 1.1558 + }], 1.1559 + ['enable_one_click_signin==1', { 1.1560 + 'defines': ['ENABLE_ONE_CLICK_SIGNIN'], 1.1561 + }], 1.1562 + ['toolkit_uses_gtk==1 and toolkit_views==0', { 1.1563 + # TODO(erg): We are progressively sealing up use of deprecated features 1.1564 + # in gtk in preparation for an eventual porting to gtk3. 1.1565 + 'defines': ['GTK_DISABLE_SINGLE_INCLUDES=1'], 1.1566 + }], 1.1567 + ['chromeos==1', { 1.1568 + 'defines': ['OS_CHROMEOS=1'], 1.1569 + }], 1.1570 + ['use_xi2_mt!=0', { 1.1571 + 'defines': ['USE_XI2_MT=<(use_xi2_mt)'], 1.1572 + }], 1.1573 + ['file_manager_extension==1', { 1.1574 + 'defines': ['FILE_MANAGER_EXTENSION=1'], 1.1575 + }], 1.1576 + ['profiling==1', { 1.1577 + 'defines': ['ENABLE_PROFILING=1'], 1.1578 + }], 1.1579 + ['OS=="linux" and glibcxx_debug==1', { 1.1580 + 'defines': ['_GLIBCXX_DEBUG=1',], 1.1581 + 'cflags_cc!': ['-fno-rtti'], 1.1582 + 'cflags_cc+': ['-frtti', '-g'], 1.1583 + }], 1.1584 + ['OS=="linux"', { 1.1585 + # we need lrint(), which is ISOC99, and Xcode 1.1586 + # already forces -std=c99 for mac below 1.1587 + 'defines': ['_ISOC99_SOURCE=1'], 1.1588 + }], 1.1589 + ['remoting==1', { 1.1590 + 'defines': ['ENABLE_REMOTING=1'], 1.1591 + }], 1.1592 + ['enable_webrtc==1', { 1.1593 + 'defines': ['ENABLE_WEBRTC=1'], 1.1594 + }], 1.1595 + ['proprietary_codecs==1', { 1.1596 + 'defines': ['USE_PROPRIETARY_CODECS'], 1.1597 + }], 1.1598 + ['enable_pepper_threading==1', { 1.1599 + 'defines': ['ENABLE_PEPPER_THREADING'], 1.1600 + }], 1.1601 + ['enable_viewport==1', { 1.1602 + 'defines': ['ENABLE_VIEWPORT'], 1.1603 + }], 1.1604 + ['configuration_policy==1', { 1.1605 + 'defines': ['ENABLE_CONFIGURATION_POLICY'], 1.1606 + }], 1.1607 + ['input_speech==1', { 1.1608 + 'defines': ['ENABLE_INPUT_SPEECH'], 1.1609 + }], 1.1610 + ['notifications==1', { 1.1611 + 'defines': ['ENABLE_NOTIFICATIONS'], 1.1612 + }], 1.1613 + ['enable_hidpi==1', { 1.1614 + 'defines': ['ENABLE_HIDPI=1'], 1.1615 + }], 1.1616 + ['fastbuild!=0', { 1.1617 + 1.1618 + 'conditions': [ 1.1619 + # For Windows and Mac, we don't genererate debug information. 1.1620 + ['OS=="win" or OS=="mac"', { 1.1621 + 'msvs_settings': { 1.1622 + 'VCLinkerTool': { 1.1623 + 'GenerateDebugInformation': 'false', 1.1624 + }, 1.1625 + 'VCCLCompilerTool': { 1.1626 + 'DebugInformationFormat': '0', 1.1627 + } 1.1628 + }, 1.1629 + 'xcode_settings': { 1.1630 + 'GCC_GENERATE_DEBUGGING_SYMBOLS': 'NO', 1.1631 + }, 1.1632 + }, { # else: OS != "win", generate less debug information. 1.1633 + 'variables': { 1.1634 + 'debug_extra_cflags': '-g1', 1.1635 + }, 1.1636 + }], 1.1637 + # Clang creates chubby debug information, which makes linking very 1.1638 + # slow. For now, don't create debug information with clang. See 1.1639 + # http://crbug.com/70000 1.1640 + ['(OS=="linux" or OS=="android") and clang==1', { 1.1641 + 'variables': { 1.1642 + 'debug_extra_cflags': '-g0', 1.1643 + }, 1.1644 + }], 1.1645 + ], # conditions for fastbuild. 1.1646 + }], # fastbuild!=0 1.1647 + ['dcheck_always_on!=0', { 1.1648 + 'defines': ['DCHECK_ALWAYS_ON=1'], 1.1649 + }], # dcheck_always_on!=0 1.1650 + ['selinux==1', { 1.1651 + 'defines': ['CHROMIUM_SELINUX=1'], 1.1652 + }], 1.1653 + ['win_use_allocator_shim==0', { 1.1654 + 'conditions': [ 1.1655 + ['OS=="win"', { 1.1656 + 'defines': ['NO_TCMALLOC'], 1.1657 + }], 1.1658 + ], 1.1659 + }], 1.1660 + ['enable_gpu==1', { 1.1661 + 'defines': [ 1.1662 + 'ENABLE_GPU=1', 1.1663 + ], 1.1664 + }], 1.1665 + ['use_openssl==1', { 1.1666 + 'defines': [ 1.1667 + 'USE_OPENSSL=1', 1.1668 + ], 1.1669 + }], 1.1670 + ['enable_eglimage==1', { 1.1671 + 'defines': [ 1.1672 + 'ENABLE_EGLIMAGE=1', 1.1673 + ], 1.1674 + }], 1.1675 + ['use_skia==1', { 1.1676 + 'defines': [ 1.1677 + 'USE_SKIA=1', 1.1678 + ], 1.1679 + }], 1.1680 + ['coverage!=0', { 1.1681 + 'conditions': [ 1.1682 + ['OS=="mac" or OS=="ios"', { 1.1683 + 'xcode_settings': { 1.1684 + 'GCC_INSTRUMENT_PROGRAM_FLOW_ARCS': 'YES', # -fprofile-arcs 1.1685 + 'GCC_GENERATE_TEST_COVERAGE_FILES': 'YES', # -ftest-coverage 1.1686 + }, 1.1687 + }], 1.1688 + ['OS=="mac"', { 1.1689 + # Add -lgcov for types executable, shared_library, and 1.1690 + # loadable_module; not for static_library. 1.1691 + # This is a delayed conditional. 1.1692 + 'target_conditions': [ 1.1693 + ['_type!="static_library"', { 1.1694 + 'xcode_settings': { 'OTHER_LDFLAGS': [ '-lgcov' ] }, 1.1695 + }], 1.1696 + ], 1.1697 + }], 1.1698 + ['OS=="linux" or OS=="android"', { 1.1699 + 'cflags': [ '-ftest-coverage', 1.1700 + '-fprofile-arcs' ], 1.1701 + 'link_settings': { 'libraries': [ '-lgcov' ] }, 1.1702 + }], 1.1703 + # Finally, for Windows, we simply turn on profiling. 1.1704 + ['OS=="win"', { 1.1705 + 'msvs_settings': { 1.1706 + 'VCLinkerTool': { 1.1707 + 'Profile': 'true', 1.1708 + }, 1.1709 + 'VCCLCompilerTool': { 1.1710 + # /Z7, not /Zi, so coverage is happyb 1.1711 + 'DebugInformationFormat': '1', 1.1712 + 'AdditionalOptions': ['/Yd'], 1.1713 + } 1.1714 + } 1.1715 + }], # OS==win 1.1716 + ], # conditions for coverage 1.1717 + }], # coverage!=0 1.1718 + ['OS=="win"', { 1.1719 + 'defines': [ 1.1720 + '__STD_C', 1.1721 + '_CRT_SECURE_NO_DEPRECATE', 1.1722 + '_SCL_SECURE_NO_DEPRECATE', 1.1723 + ], 1.1724 + 'include_dirs': [ 1.1725 + '<(DEPTH)/third_party/wtl/include', 1.1726 + ], 1.1727 + 'conditions': [ 1.1728 + ['win_z7!=0', { 1.1729 + 'msvs_settings': { 1.1730 + # Generates debug info when win_z7=1 1.1731 + # even if fastbuild=1 (that makes GenerateDebugInformation false). 1.1732 + 'VCLinkerTool': { 1.1733 + 'GenerateDebugInformation': 'true', 1.1734 + }, 1.1735 + 'VCCLCompilerTool': { 1.1736 + 'DebugInformationFormat': '1', 1.1737 + } 1.1738 + } 1.1739 + }], 1.1740 + ], # win_z7!=0 1.1741 + }], # OS==win 1.1742 + ['enable_task_manager==1', { 1.1743 + 'defines': [ 1.1744 + 'ENABLE_TASK_MANAGER=1', 1.1745 + ], 1.1746 + }], 1.1747 + ['enable_web_intents==1', { 1.1748 + 'defines': [ 1.1749 + 'ENABLE_WEB_INTENTS=1', 1.1750 + ], 1.1751 + }], 1.1752 + ['enable_extensions==1', { 1.1753 + 'defines': [ 1.1754 + 'ENABLE_EXTENSIONS=1', 1.1755 + ], 1.1756 + }], 1.1757 + ['OS=="win" and branding=="Chrome"', { 1.1758 + 'defines': ['ENABLE_SWIFTSHADER'], 1.1759 + }], 1.1760 + ['enable_dart==1', { 1.1761 + 'defines': ['WEBKIT_USING_DART=1'], 1.1762 + }], 1.1763 + ['enable_plugin_installation==1', { 1.1764 + 'defines': ['ENABLE_PLUGIN_INSTALLATION=1'], 1.1765 + }], 1.1766 + ['enable_protector_service==1', { 1.1767 + 'defines': ['ENABLE_PROTECTOR_SERVICE=1'], 1.1768 + }], 1.1769 + ['enable_session_service==1', { 1.1770 + 'defines': ['ENABLE_SESSION_SERVICE=1'], 1.1771 + }], 1.1772 + ['enable_themes==1', { 1.1773 + 'defines': ['ENABLE_THEMES=1'], 1.1774 + }], 1.1775 + ['enable_background==1', { 1.1776 + 'defines': ['ENABLE_BACKGROUND=1'], 1.1777 + }], 1.1778 + ['enable_automation==1', { 1.1779 + 'defines': ['ENABLE_AUTOMATION=1'], 1.1780 + }], 1.1781 + ['enable_printing==1', { 1.1782 + 'defines': ['ENABLE_PRINTING=1'], 1.1783 + }], 1.1784 + ['enable_captive_portal_detection==1', { 1.1785 + 'defines': ['ENABLE_CAPTIVE_PORTAL_DETECTION=1'], 1.1786 + }], 1.1787 + ['disable_ftp_support==1', { 1.1788 + 'defines': ['DISABLE_FTP_SUPPORT=1'], 1.1789 + }], 1.1790 + ], # conditions for 'target_defaults' 1.1791 + 'target_conditions': [ 1.1792 + ['enable_wexit_time_destructors==1', { 1.1793 + 'conditions': [ 1.1794 + [ 'clang==1', { 1.1795 + 'cflags': [ 1.1796 + '-Wexit-time-destructors', 1.1797 + ], 1.1798 + 'xcode_settings': { 1.1799 + 'WARNING_CFLAGS': [ 1.1800 + '-Wexit-time-destructors', 1.1801 + ], 1.1802 + }, 1.1803 + }], 1.1804 + ], 1.1805 + }], 1.1806 + ['chromium_code==0', { 1.1807 + 'conditions': [ 1.1808 + [ 'os_posix==1 and OS!="mac" and OS!="ios"', { 1.1809 + # We don't want to get warnings from third-party code, 1.1810 + # so remove any existing warning-enabling flags like -Wall. 1.1811 + 'cflags!': [ 1.1812 + '-Wall', 1.1813 + '-Wextra', 1.1814 + ], 1.1815 + 'cflags_cc': [ 1.1816 + # Don't warn about hash_map in third-party code. 1.1817 + '-Wno-deprecated', 1.1818 + ], 1.1819 + 'cflags': [ 1.1820 + # Don't warn about printf format problems. 1.1821 + # This is off by default in gcc but on in Ubuntu's gcc(!). 1.1822 + '-Wno-format', 1.1823 + ], 1.1824 + 'cflags_cc!': [ 1.1825 + # TODO(fischman): remove this. 1.1826 + # http://code.google.com/p/chromium/issues/detail?id=90453 1.1827 + '-Wsign-compare', 1.1828 + ] 1.1829 + }], 1.1830 + # TODO: Fix all warnings on chromeos too. 1.1831 + [ 'os_posix==1 and OS!="mac" and OS!="ios" and (clang!=1 or chromeos==1)', { 1.1832 + 'cflags!': [ 1.1833 + '-Werror', 1.1834 + ], 1.1835 + }], 1.1836 + [ 'os_posix==1 and os_bsd!=1 and OS!="mac" and OS!="android"', { 1.1837 + 'cflags': [ 1.1838 + # Don't warn about ignoring the return value from e.g. close(). 1.1839 + # This is off by default in some gccs but on by default in others. 1.1840 + # BSD systems do not support this option, since they are usually 1.1841 + # using gcc 4.2.1, which does not have this flag yet. 1.1842 + '-Wno-unused-result', 1.1843 + ], 1.1844 + }], 1.1845 + [ 'OS=="win"', { 1.1846 + 'defines': [ 1.1847 + '_CRT_SECURE_NO_DEPRECATE', 1.1848 + '_CRT_NONSTDC_NO_WARNINGS', 1.1849 + '_CRT_NONSTDC_NO_DEPRECATE', 1.1850 + '_SCL_SECURE_NO_DEPRECATE', 1.1851 + ], 1.1852 + 'msvs_disabled_warnings': [4800], 1.1853 + 'msvs_settings': { 1.1854 + 'VCCLCompilerTool': { 1.1855 + 'WarningLevel': '3', 1.1856 + 'WarnAsError': '<(win_third_party_warn_as_error)', 1.1857 + 'Detect64BitPortabilityProblems': 'false', 1.1858 + }, 1.1859 + }, 1.1860 + 'conditions': [ 1.1861 + ['buildtype=="Official"', { 1.1862 + 'msvs_settings': { 1.1863 + 'VCCLCompilerTool': { 'WarnAsError': 'false' }, 1.1864 + } 1.1865 + }], 1.1866 + ], 1.1867 + }], 1.1868 + # TODO(darin): Unfortunately, some third_party code depends on base/ 1.1869 + [ 'OS=="win" and component=="shared_library"', { 1.1870 + 'msvs_disabled_warnings': [ 1.1871 + 4251, # class 'std::xx' needs to have dll-interface. 1.1872 + ], 1.1873 + }], 1.1874 + [ 'OS=="mac" or OS=="ios"', { 1.1875 + 'xcode_settings': { 1.1876 + 'WARNING_CFLAGS!': ['-Wall', '-Wextra'], 1.1877 + }, 1.1878 + 'conditions': [ 1.1879 + ['buildtype=="Official"', { 1.1880 + 'xcode_settings': { 1.1881 + 'GCC_TREAT_WARNINGS_AS_ERRORS': 'NO', # -Werror 1.1882 + }, 1.1883 + }], 1.1884 + ], 1.1885 + }], 1.1886 + [ 'OS=="ios"', { 1.1887 + 'xcode_settings': { 1.1888 + # TODO(ios): Fix remaining warnings in third-party code, then 1.1889 + # remove this; the Mac cleanup didn't get everything that's 1.1890 + # flagged in an iOS build. 1.1891 + 'GCC_TREAT_WARNINGS_AS_ERRORS': 'NO', 1.1892 + 'RUN_CLANG_STATIC_ANALYZER': 'NO', 1.1893 + }, 1.1894 + }], 1.1895 + ], 1.1896 + }, { 1.1897 + 'includes': [ 1.1898 + # Rules for excluding e.g. foo_win.cc from the build on non-Windows. 1.1899 + 'filename_rules.gypi', 1.1900 + ], 1.1901 + # In Chromium code, we define __STDC_FORMAT_MACROS in order to get the 1.1902 + # C99 macros on Mac and Linux. 1.1903 + 'defines': [ 1.1904 + '__STDC_FORMAT_MACROS', 1.1905 + ], 1.1906 + 'conditions': [ 1.1907 + ['OS=="win"', { 1.1908 + # turn on warnings for signed/unsigned mismatch on chromium code. 1.1909 + 'msvs_settings': { 1.1910 + 'VCCLCompilerTool': { 1.1911 + 'AdditionalOptions': ['/we4389'], 1.1912 + }, 1.1913 + }, 1.1914 + }], 1.1915 + ['OS=="win" and component=="shared_library"', { 1.1916 + 'msvs_disabled_warnings': [ 1.1917 + 4251, # class 'std::xx' needs to have dll-interface. 1.1918 + ], 1.1919 + }], 1.1920 + ], 1.1921 + }], 1.1922 + ], # target_conditions for 'target_defaults' 1.1923 + 'default_configuration': 'Debug', 1.1924 + 'configurations': { 1.1925 + # VCLinkerTool LinkIncremental values below: 1.1926 + # 0 == default 1.1927 + # 1 == /INCREMENTAL:NO 1.1928 + # 2 == /INCREMENTAL 1.1929 + # Debug links incremental, Release does not. 1.1930 + # 1.1931 + # Abstract base configurations to cover common attributes. 1.1932 + # 1.1933 + 'Common_Base': { 1.1934 + 'abstract': 1, 1.1935 + 'msvs_configuration_attributes': { 1.1936 + 'OutputDirectory': '<(DEPTH)\\build\\<(build_dir_prefix)$(ConfigurationName)', 1.1937 + 'IntermediateDirectory': '$(OutDir)\\obj\\$(ProjectName)', 1.1938 + 'CharacterSet': '1', 1.1939 + }, 1.1940 + }, 1.1941 + 'x86_Base': { 1.1942 + 'abstract': 1, 1.1943 + 'msvs_settings': { 1.1944 + 'VCLinkerTool': { 1.1945 + 'TargetMachine': '1', 1.1946 + }, 1.1947 + }, 1.1948 + 'msvs_configuration_platform': 'Win32', 1.1949 + }, 1.1950 + 'x64_Base': { 1.1951 + 'abstract': 1, 1.1952 + 'msvs_configuration_platform': 'x64', 1.1953 + 'msvs_settings': { 1.1954 + 'VCLinkerTool': { 1.1955 + 'TargetMachine': '17', # x86 - 64 1.1956 + 'AdditionalLibraryDirectories!': 1.1957 + ['<(windows_sdk_path)/Lib/win8/um/x86'], 1.1958 + 'AdditionalLibraryDirectories': 1.1959 + ['<(windows_sdk_path)/Lib/win8/um/x64'], 1.1960 + }, 1.1961 + 'VCLibrarianTool': { 1.1962 + 'AdditionalLibraryDirectories!': 1.1963 + ['<(windows_sdk_path)/Lib/win8/um/x86'], 1.1964 + 'AdditionalLibraryDirectories': 1.1965 + ['<(windows_sdk_path)/Lib/win8/um/x64'], 1.1966 + }, 1.1967 + }, 1.1968 + 'defines': [ 1.1969 + # Not sure if tcmalloc works on 64-bit Windows. 1.1970 + 'NO_TCMALLOC', 1.1971 + ], 1.1972 + }, 1.1973 + 'Debug_Base': { 1.1974 + 'abstract': 1, 1.1975 + 'defines': [ 1.1976 + 'DYNAMIC_ANNOTATIONS_ENABLED=1', 1.1977 + 'WTF_USE_DYNAMIC_ANNOTATIONS=1', 1.1978 + ], 1.1979 + 'xcode_settings': { 1.1980 + 'COPY_PHASE_STRIP': 'NO', 1.1981 + 'GCC_OPTIMIZATION_LEVEL': '<(mac_debug_optimization)', 1.1982 + 'OTHER_CFLAGS': [ 1.1983 + '<@(debug_extra_cflags)', 1.1984 + ], 1.1985 + }, 1.1986 + 'msvs_settings': { 1.1987 + 'VCCLCompilerTool': { 1.1988 + 'Optimization': '<(win_debug_Optimization)', 1.1989 + 'PreprocessorDefinitions': ['_DEBUG'], 1.1990 + 'BasicRuntimeChecks': '<(win_debug_RuntimeChecks)', 1.1991 + 'RuntimeLibrary': '<(win_debug_RuntimeLibrary)', 1.1992 + 'conditions': [ 1.1993 + # According to MSVS, InlineFunctionExpansion=0 means 1.1994 + # "default inlining", not "/Ob0". 1.1995 + # Thus, we have to handle InlineFunctionExpansion==0 separately. 1.1996 + ['win_debug_InlineFunctionExpansion==0', { 1.1997 + 'AdditionalOptions': ['/Ob0'], 1.1998 + }], 1.1999 + ['win_debug_InlineFunctionExpansion!=""', { 1.2000 + 'InlineFunctionExpansion': 1.2001 + '<(win_debug_InlineFunctionExpansion)', 1.2002 + }], 1.2003 + ['win_debug_disable_iterator_debugging==1', { 1.2004 + 'PreprocessorDefinitions': ['_HAS_ITERATOR_DEBUGGING=0'], 1.2005 + }], 1.2006 + 1.2007 + # if win_debug_OmitFramePointers is blank, leave as default 1.2008 + ['win_debug_OmitFramePointers==1', { 1.2009 + 'OmitFramePointers': 'true', 1.2010 + }], 1.2011 + ['win_debug_OmitFramePointers==0', { 1.2012 + 'OmitFramePointers': 'false', 1.2013 + # The above is not sufficient (http://crbug.com/106711): it 1.2014 + # simply eliminates an explicit "/Oy", but both /O2 and /Ox 1.2015 + # perform FPO regardless, so we must explicitly disable. 1.2016 + # We still want the false setting above to avoid having 1.2017 + # "/Oy /Oy-" and warnings about overriding. 1.2018 + 'AdditionalOptions': ['/Oy-'], 1.2019 + }], 1.2020 + ], 1.2021 + 'AdditionalOptions': [ '<@(win_debug_extra_cflags)', ], 1.2022 + }, 1.2023 + 'VCLinkerTool': { 1.2024 + 'LinkIncremental': '<(msvs_debug_link_incremental)', 1.2025 + # ASLR makes debugging with windbg difficult because Chrome.exe and 1.2026 + # Chrome.dll share the same base name. As result, windbg will 1.2027 + # name the Chrome.dll module like chrome_<base address>, where 1.2028 + # <base address> typically changes with each launch. This in turn 1.2029 + # means that breakpoints in Chrome.dll don't stick from one launch 1.2030 + # to the next. For this reason, we turn ASLR off in debug builds. 1.2031 + # Note that this is a three-way bool, where 0 means to pick up 1.2032 + # the default setting, 1 is off and 2 is on. 1.2033 + 'RandomizedBaseAddress': 1, 1.2034 + }, 1.2035 + 'VCResourceCompilerTool': { 1.2036 + 'PreprocessorDefinitions': ['_DEBUG'], 1.2037 + }, 1.2038 + }, 1.2039 + 'conditions': [ 1.2040 + ['OS=="linux" or OS=="android"', { 1.2041 + 'target_conditions': [ 1.2042 + ['_toolset=="target"', { 1.2043 + 'cflags': [ 1.2044 + '<@(debug_extra_cflags)', 1.2045 + ], 1.2046 + }], 1.2047 + ], 1.2048 + }], 1.2049 + # Disabled on iOS because it was causing a crash on startup. 1.2050 + # TODO(michelea): investigate, create a reduced test and possibly 1.2051 + # submit a radar. 1.2052 + ['release_valgrind_build==0 and OS!="ios"', { 1.2053 + 'xcode_settings': { 1.2054 + 'OTHER_CFLAGS': [ 1.2055 + '-fstack-protector-all', # Implies -fstack-protector 1.2056 + ], 1.2057 + }, 1.2058 + }], 1.2059 + ], 1.2060 + }, 1.2061 + 'Release_Base': { 1.2062 + 'abstract': 1, 1.2063 + 'defines': [ 1.2064 + 'NDEBUG', 1.2065 + ], 1.2066 + 'xcode_settings': { 1.2067 + 'DEAD_CODE_STRIPPING': 'YES', # -Wl,-dead_strip 1.2068 + 'GCC_OPTIMIZATION_LEVEL': '<(mac_release_optimization)', 1.2069 + 'OTHER_CFLAGS': [ '<@(release_extra_cflags)', ], 1.2070 + }, 1.2071 + 'msvs_settings': { 1.2072 + 'VCCLCompilerTool': { 1.2073 + 'RuntimeLibrary': '<(win_release_RuntimeLibrary)', 1.2074 + 'conditions': [ 1.2075 + # In official builds, each target will self-select 1.2076 + # an optimization level. 1.2077 + ['buildtype!="Official"', { 1.2078 + 'Optimization': '<(win_release_Optimization)', 1.2079 + }, 1.2080 + ], 1.2081 + # According to MSVS, InlineFunctionExpansion=0 means 1.2082 + # "default inlining", not "/Ob0". 1.2083 + # Thus, we have to handle InlineFunctionExpansion==0 separately. 1.2084 + ['win_release_InlineFunctionExpansion==0', { 1.2085 + 'AdditionalOptions': ['/Ob0'], 1.2086 + }], 1.2087 + ['win_release_InlineFunctionExpansion!=""', { 1.2088 + 'InlineFunctionExpansion': 1.2089 + '<(win_release_InlineFunctionExpansion)', 1.2090 + }], 1.2091 + 1.2092 + # if win_release_OmitFramePointers is blank, leave as default 1.2093 + ['win_release_OmitFramePointers==1', { 1.2094 + 'OmitFramePointers': 'true', 1.2095 + }], 1.2096 + ['win_release_OmitFramePointers==0', { 1.2097 + 'OmitFramePointers': 'false', 1.2098 + # The above is not sufficient (http://crbug.com/106711): it 1.2099 + # simply eliminates an explicit "/Oy", but both /O2 and /Ox 1.2100 + # perform FPO regardless, so we must explicitly disable. 1.2101 + # We still want the false setting above to avoid having 1.2102 + # "/Oy /Oy-" and warnings about overriding. 1.2103 + 'AdditionalOptions': ['/Oy-'], 1.2104 + }], 1.2105 + ], 1.2106 + 'AdditionalOptions': [ '<@(win_release_extra_cflags)', ], 1.2107 + }, 1.2108 + 'VCLinkerTool': { 1.2109 + # LinkIncremental is a tri-state boolean, where 0 means default 1.2110 + # (i.e., inherit from parent solution), 1 means false, and 1.2111 + # 2 means true. 1.2112 + 'LinkIncremental': '1', 1.2113 + # This corresponds to the /PROFILE flag which ensures the PDB 1.2114 + # file contains FIXUP information (growing the PDB file by about 1.2115 + # 5%) but does not otherwise alter the output binary. This 1.2116 + # information is used by the Syzygy optimization tool when 1.2117 + # decomposing the release image. 1.2118 + 'Profile': 'true', 1.2119 + }, 1.2120 + }, 1.2121 + 'conditions': [ 1.2122 + ['msvs_use_common_release', { 1.2123 + 'includes': ['release.gypi'], 1.2124 + }], 1.2125 + ['release_valgrind_build==0', { 1.2126 + 'defines': [ 1.2127 + 'NVALGRIND', 1.2128 + 'DYNAMIC_ANNOTATIONS_ENABLED=0', 1.2129 + ], 1.2130 + }, { 1.2131 + 'defines': [ 1.2132 + 'DYNAMIC_ANNOTATIONS_ENABLED=1', 1.2133 + 'WTF_USE_DYNAMIC_ANNOTATIONS=1', 1.2134 + ], 1.2135 + }], 1.2136 + ['win_use_allocator_shim==0', { 1.2137 + 'defines': ['NO_TCMALLOC'], 1.2138 + }], 1.2139 + ['OS=="linux"', { 1.2140 + 'target_conditions': [ 1.2141 + ['_toolset=="target"', { 1.2142 + 'cflags': [ 1.2143 + '<@(release_extra_cflags)', 1.2144 + ], 1.2145 + }], 1.2146 + ], 1.2147 + }], 1.2148 + ], 1.2149 + }, 1.2150 + # 1.2151 + # Concrete configurations 1.2152 + # 1.2153 + 'Debug': { 1.2154 + 'inherit_from': ['Common_Base', 'x86_Base', 'Debug_Base'], 1.2155 + }, 1.2156 + 'Release': { 1.2157 + 'inherit_from': ['Common_Base', 'x86_Base', 'Release_Base'], 1.2158 + }, 1.2159 + 'conditions': [ 1.2160 + [ 'OS=="win"', { 1.2161 + # TODO(bradnelson): add a gyp mechanism to make this more graceful. 1.2162 + 'Debug_x64': { 1.2163 + 'inherit_from': ['Common_Base', 'x64_Base', 'Debug_Base'], 1.2164 + }, 1.2165 + 'Release_x64': { 1.2166 + 'inherit_from': ['Common_Base', 'x64_Base', 'Release_Base'], 1.2167 + }, 1.2168 + }], 1.2169 + ], 1.2170 + }, 1.2171 + }, 1.2172 + 'conditions': [ 1.2173 + ['os_posix==1 and OS!="mac" and OS!="ios"', { 1.2174 + 'target_defaults': { 1.2175 + # Enable -Werror by default, but put it in a variable so it can 1.2176 + # be disabled in ~/.gyp/include.gypi on the valgrind builders. 1.2177 + 'variables': { 1.2178 + 'werror%': '-Werror', 1.2179 + 'libraries_for_target%': '', 1.2180 + }, 1.2181 + 'defines': [ 1.2182 + '_FILE_OFFSET_BITS=64', 1.2183 + ], 1.2184 + 'cflags': [ 1.2185 + '<(werror)', # See note above about the werror variable. 1.2186 + '-pthread', 1.2187 + '-fno-exceptions', 1.2188 + '-fno-strict-aliasing', # See http://crbug.com/32204 1.2189 + '-Wall', 1.2190 + # TODO(evan): turn this back on once all the builds work. 1.2191 + # '-Wextra', 1.2192 + # Don't warn about unused function params. We use those everywhere. 1.2193 + '-Wno-unused-parameter', 1.2194 + # Don't warn about the "struct foo f = {0};" initialization pattern. 1.2195 + '-Wno-missing-field-initializers', 1.2196 + # Don't export any symbols (for example, to plugins we dlopen()). 1.2197 + # Note: this is *required* to make some plugins work. 1.2198 + '-fvisibility=hidden', 1.2199 + '-pipe', 1.2200 + ], 1.2201 + 'cflags_cc': [ 1.2202 + '-fno-rtti', 1.2203 + '-fno-threadsafe-statics', 1.2204 + # Make inline functions have hidden visiblity by default. 1.2205 + # Surprisingly, not covered by -fvisibility=hidden. 1.2206 + '-fvisibility-inlines-hidden', 1.2207 + # GCC turns on -Wsign-compare for C++ under -Wall, but clang doesn't, 1.2208 + # so we specify it explicitly. 1.2209 + # TODO(fischman): remove this if http://llvm.org/PR10448 obsoletes it. 1.2210 + # http://code.google.com/p/chromium/issues/detail?id=90453 1.2211 + '-Wsign-compare', 1.2212 + ], 1.2213 + 'ldflags': [ 1.2214 + '-pthread', '-Wl,-z,noexecstack', 1.2215 + ], 1.2216 + 'libraries' : [ 1.2217 + '<(libraries_for_target)', 1.2218 + ], 1.2219 + 'configurations': { 1.2220 + 'Debug_Base': { 1.2221 + 'variables': { 1.2222 + 'debug_optimize%': '0', 1.2223 + }, 1.2224 + 'defines': [ 1.2225 + '_DEBUG', 1.2226 + ], 1.2227 + 'cflags': [ 1.2228 + '-O>(debug_optimize)', 1.2229 + '-g', 1.2230 + ], 1.2231 + 'conditions' : [ 1.2232 + ['OS=="android" and android_full_debug==0', { 1.2233 + # Some configurations are copied from Release_Base to reduce 1.2234 + # the binary size. 1.2235 + 'variables': { 1.2236 + 'debug_optimize%': 's', 1.2237 + }, 1.2238 + 'cflags': [ 1.2239 + '-fomit-frame-pointer', 1.2240 + '-fdata-sections', 1.2241 + '-ffunction-sections', 1.2242 + ], 1.2243 + 'ldflags': [ 1.2244 + '-Wl,-O1', 1.2245 + '-Wl,--as-needed', 1.2246 + '-Wl,--gc-sections', 1.2247 + ], 1.2248 + }], 1.2249 + ], 1.2250 + }, 1.2251 + 'Release_Base': { 1.2252 + 'variables': { 1.2253 + 'release_optimize%': '2', 1.2254 + # Binaries become big and gold is unable to perform GC 1.2255 + # and remove unused sections for some of test targets 1.2256 + # on 32 bit platform. 1.2257 + # (This is currently observed only in chromeos valgrind bots) 1.2258 + # The following flag is to disable --gc-sections linker 1.2259 + # option for these bots. 1.2260 + 'no_gc_sections%': 0, 1.2261 + 1.2262 + # TODO(bradnelson): reexamine how this is done if we change the 1.2263 + # expansion of configurations 1.2264 + 'release_valgrind_build%': 0, 1.2265 + }, 1.2266 + 'cflags': [ 1.2267 + '-O<(release_optimize)', 1.2268 + # Don't emit the GCC version ident directives, they just end up 1.2269 + # in the .comment section taking up binary size. 1.2270 + '-fno-ident', 1.2271 + # Put data and code in their own sections, so that unused symbols 1.2272 + # can be removed at link time with --gc-sections. 1.2273 + '-fdata-sections', 1.2274 + '-ffunction-sections', 1.2275 + ], 1.2276 + 'ldflags': [ 1.2277 + # Specifically tell the linker to perform optimizations. 1.2278 + # See http://lwn.net/Articles/192624/ . 1.2279 + '-Wl,-O1', 1.2280 + '-Wl,--as-needed', 1.2281 + ], 1.2282 + 'conditions' : [ 1.2283 + ['no_gc_sections==0', { 1.2284 + 'ldflags': [ 1.2285 + '-Wl,--gc-sections', 1.2286 + ], 1.2287 + }], 1.2288 + ['OS=="android"', { 1.2289 + 'variables': { 1.2290 + 'release_optimize%': 's', 1.2291 + }, 1.2292 + 'cflags': [ 1.2293 + '-fomit-frame-pointer', 1.2294 + ], 1.2295 + }], 1.2296 + ['clang==1', { 1.2297 + 'cflags!': [ 1.2298 + '-fno-ident', 1.2299 + ], 1.2300 + }], 1.2301 + ['profiling==1', { 1.2302 + 'cflags': [ 1.2303 + '-fno-omit-frame-pointer', 1.2304 + '-g', 1.2305 + ], 1.2306 + }], 1.2307 + ], 1.2308 + }, 1.2309 + }, 1.2310 + 'variants': { 1.2311 + 'coverage': { 1.2312 + 'cflags': ['-fprofile-arcs', '-ftest-coverage'], 1.2313 + 'ldflags': ['-fprofile-arcs'], 1.2314 + }, 1.2315 + 'profile': { 1.2316 + 'cflags': ['-pg', '-g'], 1.2317 + 'ldflags': ['-pg'], 1.2318 + }, 1.2319 + 'symbols': { 1.2320 + 'cflags': ['-g'], 1.2321 + }, 1.2322 + }, 1.2323 + 'conditions': [ 1.2324 + ['target_arch=="ia32"', { 1.2325 + 'target_conditions': [ 1.2326 + ['_toolset=="target"', { 1.2327 + 'asflags': [ 1.2328 + # Needed so that libs with .s files (e.g. libicudata.a) 1.2329 + # are compatible with the general 32-bit-ness. 1.2330 + '-32', 1.2331 + ], 1.2332 + # All floating-point computations on x87 happens in 80-bit 1.2333 + # precision. Because the C and C++ language standards allow 1.2334 + # the compiler to keep the floating-point values in higher 1.2335 + # precision than what's specified in the source and doing so 1.2336 + # is more efficient than constantly rounding up to 64-bit or 1.2337 + # 32-bit precision as specified in the source, the compiler, 1.2338 + # especially in the optimized mode, tries very hard to keep 1.2339 + # values in x87 floating-point stack (in 80-bit precision) 1.2340 + # as long as possible. This has important side effects, that 1.2341 + # the real value used in computation may change depending on 1.2342 + # how the compiler did the optimization - that is, the value 1.2343 + # kept in 80-bit is different than the value rounded down to 1.2344 + # 64-bit or 32-bit. There are possible compiler options to 1.2345 + # make this behavior consistent (e.g. -ffloat-store would keep 1.2346 + # all floating-values in the memory, thus force them to be 1.2347 + # rounded to its original precision) but they have significant 1.2348 + # runtime performance penalty. 1.2349 + # 1.2350 + # -mfpmath=sse -msse2 makes the compiler use SSE instructions 1.2351 + # which keep floating-point values in SSE registers in its 1.2352 + # native precision (32-bit for single precision, and 64-bit 1.2353 + # for double precision values). This means the floating-point 1.2354 + # value used during computation does not change depending on 1.2355 + # how the compiler optimized the code, since the value is 1.2356 + # always kept in its specified precision. 1.2357 + 'conditions': [ 1.2358 + ['branding=="Chromium" and disable_sse2==0', { 1.2359 + 'cflags': [ 1.2360 + '-march=pentium4', 1.2361 + '-msse2', 1.2362 + '-mfpmath=sse', 1.2363 + ], 1.2364 + }], 1.2365 + # ChromeOS targets Pinetrail, which is sse3, but most of the 1.2366 + # benefit comes from sse2 so this setting allows ChromeOS 1.2367 + # to build on other CPUs. In the future -march=atom would 1.2368 + # help but requires a newer compiler. 1.2369 + ['chromeos==1 and disable_sse2==0', { 1.2370 + 'cflags': [ 1.2371 + '-msse2', 1.2372 + ], 1.2373 + }], 1.2374 + # Install packages have started cropping up with 1.2375 + # different headers between the 32-bit and 64-bit 1.2376 + # versions, so we have to shadow those differences off 1.2377 + # and make sure a 32-bit-on-64-bit build picks up the 1.2378 + # right files. 1.2379 + # For android build, use NDK headers instead of host headers 1.2380 + ['host_arch!="ia32" and OS!="android"', { 1.2381 + 'include_dirs+': [ 1.2382 + '/usr/include32', 1.2383 + ], 1.2384 + }], 1.2385 + ], 1.2386 + 'target_conditions': [ 1.2387 + ['_toolset=="target" and OS!="android"', { 1.2388 + # -mmmx allows mmintrin.h to be used for mmx intrinsics. 1.2389 + # video playback is mmx and sse2 optimized. 1.2390 + 'cflags': [ 1.2391 + '-m32', 1.2392 + '-mmmx', 1.2393 + ], 1.2394 + 'ldflags': [ 1.2395 + '-m32', 1.2396 + ], 1.2397 + 'cflags_mozilla': [ 1.2398 + '-m32', 1.2399 + '-mmmx', 1.2400 + ], 1.2401 + }], 1.2402 + ], 1.2403 + }], 1.2404 + ], 1.2405 + }], 1.2406 + ['target_arch=="arm"', { 1.2407 + 'target_conditions': [ 1.2408 + ['_toolset=="target"', { 1.2409 + 'cflags_cc': [ 1.2410 + # The codesourcery arm-2009q3 toolchain warns at that the ABI 1.2411 + # has changed whenever it encounters a varargs function. This 1.2412 + # silences those warnings, as they are not helpful and 1.2413 + # clutter legitimate warnings. 1.2414 + '-Wno-abi', 1.2415 + ], 1.2416 + 'conditions': [ 1.2417 + ['arm_thumb==1', { 1.2418 + 'cflags': [ 1.2419 + '-mthumb', 1.2420 + ] 1.2421 + }], 1.2422 + ['armv7==1', { 1.2423 + 'cflags': [ 1.2424 + '-march=armv7-a', 1.2425 + '-mtune=cortex-a8', 1.2426 + '-mfloat-abi=<(arm_float_abi)', 1.2427 + ], 1.2428 + 'conditions': [ 1.2429 + ['arm_neon==1', { 1.2430 + 'cflags': [ '-mfpu=neon', ], 1.2431 + }, { 1.2432 + 'cflags': [ '-mfpu=<(arm_fpu)', ], 1.2433 + }], 1.2434 + ], 1.2435 + }], 1.2436 + ['OS=="android"', { 1.2437 + # Most of the following flags are derived from what Android 1.2438 + # uses by default when building for arm, reference for which 1.2439 + # can be found in the following file in the Android NDK: 1.2440 + # toolchains/arm-linux-androideabi-4.4.3/setup.mk 1.2441 + 'cflags': [ 1.2442 + # The tree-sra optimization (scalar replacement for 1.2443 + # aggregates enabling subsequent optimizations) leads to 1.2444 + # invalid code generation when using the Android NDK's 1.2445 + # compiler (r5-r7). This can be verified using 1.2446 + # TestWebKitAPI's WTF.Checked_int8_t test. 1.2447 + '-fno-tree-sra', 1.2448 + '-fuse-ld=gold', 1.2449 + '-Wno-psabi', 1.2450 + ], 1.2451 + # Android now supports .relro sections properly. 1.2452 + # NOTE: While these flags enable the generation of .relro 1.2453 + # sections, the generated libraries can still be loaded on 1.2454 + # older Android platform versions. 1.2455 + 'ldflags': [ 1.2456 + '-Wl,-z,relro', 1.2457 + '-Wl,-z,now', 1.2458 + '-fuse-ld=gold', 1.2459 + ], 1.2460 + 'conditions': [ 1.2461 + ['arm_thumb == 1', { 1.2462 + # Android toolchain doesn't support -mimplicit-it=thumb 1.2463 + 'cflags!': [ '-Wa,-mimplicit-it=thumb', ], 1.2464 + 'cflags': [ '-mthumb-interwork', ], 1.2465 + }], 1.2466 + ['armv7==0', { 1.2467 + # Flags suitable for Android emulator 1.2468 + 'cflags': [ 1.2469 + '-march=armv5te', 1.2470 + '-mtune=xscale', 1.2471 + '-msoft-float', 1.2472 + ], 1.2473 + 'defines': [ 1.2474 + '__ARM_ARCH_5__', 1.2475 + '__ARM_ARCH_5T__', 1.2476 + '__ARM_ARCH_5E__', 1.2477 + '__ARM_ARCH_5TE__', 1.2478 + ], 1.2479 + }], 1.2480 + ['clang==1', { 1.2481 + 'cflags!': [ 1.2482 + # Clang does not support the following options. 1.2483 + '-mthumb-interwork', 1.2484 + '-finline-limit=64', 1.2485 + '-fno-tree-sra', 1.2486 + '-fuse-ld=gold', 1.2487 + '-Wno-psabi', 1.2488 + ], 1.2489 + }], 1.2490 + ], 1.2491 + }], 1.2492 + ], 1.2493 + }], 1.2494 + ], 1.2495 + }], 1.2496 + ['linux_fpic==1', { 1.2497 + 'cflags': [ 1.2498 + '-fPIC', 1.2499 + ], 1.2500 + 'ldflags': [ 1.2501 + '-fPIC', 1.2502 + ], 1.2503 + }], 1.2504 + ['sysroot!=""', { 1.2505 + 'target_conditions': [ 1.2506 + ['_toolset=="target"', { 1.2507 + 'cflags': [ 1.2508 + '--sysroot=<(sysroot)', 1.2509 + ], 1.2510 + 'ldflags': [ 1.2511 + '--sysroot=<(sysroot)', 1.2512 + ], 1.2513 + }]] 1.2514 + }], 1.2515 + ['clang==1', { 1.2516 + 'cflags': [ 1.2517 + '-Wheader-hygiene', 1.2518 + # Clang spots more unused functions. 1.2519 + '-Wno-unused-function', 1.2520 + # Don't die on dtoa code that uses a char as an array index. 1.2521 + '-Wno-char-subscripts', 1.2522 + # Especially needed for gtest macros using enum values from Mac 1.2523 + # system headers. 1.2524 + # TODO(pkasting): In C++11 this is legal, so this should be 1.2525 + # removed when we change to that. (This is also why we don't 1.2526 + # bother fixing all these cases today.) 1.2527 + '-Wno-unnamed-type-template-args', 1.2528 + # This (rightyfully) complains about 'override', which we use 1.2529 + # heavily. 1.2530 + '-Wno-c++11-extensions', 1.2531 + 1.2532 + # Warns on switches on enums that cover all enum values but 1.2533 + # also contain a default: branch. Chrome is full of that. 1.2534 + '-Wno-covered-switch-default', 1.2535 + 1.2536 + # TODO(thakis): Remove this. 1.2537 + '-Wno-implicit-conversion-floating-point-to-bool', 1.2538 + ], 1.2539 + 'cflags!': [ 1.2540 + # Clang doesn't seem to know know this flag. 1.2541 + '-mfpmath=sse', 1.2542 + ], 1.2543 + }], 1.2544 + ['clang==1 and clang_use_chrome_plugins==1', { 1.2545 + 'cflags': [ 1.2546 + '<@(clang_chrome_plugins_flags)', 1.2547 + ], 1.2548 + }], 1.2549 + ['clang==1 and clang_load!=""', { 1.2550 + 'cflags': [ 1.2551 + '-Xclang', '-load', '-Xclang', '<(clang_load)', 1.2552 + ], 1.2553 + }], 1.2554 + ['clang==1 and clang_add_plugin!=""', { 1.2555 + 'cflags': [ 1.2556 + '-Xclang', '-add-plugin', '-Xclang', '<(clang_add_plugin)', 1.2557 + ], 1.2558 + }], 1.2559 + ['clang==1 and "<(GENERATOR)"=="ninja"', { 1.2560 + 'cflags': [ 1.2561 + # See http://crbug.com/110262 1.2562 + '-fcolor-diagnostics', 1.2563 + ], 1.2564 + }], 1.2565 + ['asan==1', { 1.2566 + 'target_conditions': [ 1.2567 + ['_toolset=="target"', { 1.2568 + 'cflags': [ 1.2569 + '-faddress-sanitizer', 1.2570 + '-fno-omit-frame-pointer', 1.2571 + ], 1.2572 + 'ldflags': [ 1.2573 + '-faddress-sanitizer', 1.2574 + ], 1.2575 + 'defines': [ 1.2576 + 'ADDRESS_SANITIZER', 1.2577 + ], 1.2578 + }], 1.2579 + ], 1.2580 + }], 1.2581 + ['tsan==1', { 1.2582 + 'target_conditions': [ 1.2583 + ['_toolset=="target"', { 1.2584 + 'cflags': [ 1.2585 + '-fthread-sanitizer', 1.2586 + '-fno-omit-frame-pointer', 1.2587 + '-fPIE', 1.2588 + ], 1.2589 + 'ldflags': [ 1.2590 + '-fthread-sanitizer', 1.2591 + ], 1.2592 + 'defines': [ 1.2593 + 'THREAD_SANITIZER', 1.2594 + 'DYNAMIC_ANNOTATIONS_EXTERNAL_IMPL=1', 1.2595 + ], 1.2596 + 'target_conditions': [ 1.2597 + ['_type=="executable"', { 1.2598 + 'ldflags': [ 1.2599 + '-pie', 1.2600 + ], 1.2601 + }], 1.2602 + ], 1.2603 + }], 1.2604 + ], 1.2605 + }], 1.2606 + ['order_profiling!=0 and (chromeos==1 or OS=="linux")', { 1.2607 + 'target_conditions' : [ 1.2608 + ['_toolset=="target"', { 1.2609 + 'cflags': [ 1.2610 + '-finstrument-functions', 1.2611 + # Allow mmx intrinsics to inline, so that the 1.2612 + # compiler can expand the intrinsics. 1.2613 + '-finstrument-functions-exclude-file-list=mmintrin.h', 1.2614 + ], 1.2615 + }], 1.2616 + ], 1.2617 + }], 1.2618 + ['linux_breakpad==1', { 1.2619 + 'cflags': [ '-g' ], 1.2620 + 'defines': ['USE_LINUX_BREAKPAD'], 1.2621 + }], 1.2622 + ['linux_use_heapchecker==1', { 1.2623 + 'variables': {'linux_use_tcmalloc%': 1}, 1.2624 + 'defines': ['USE_HEAPCHECKER'], 1.2625 + }], 1.2626 + ['linux_use_tcmalloc==0', { 1.2627 + 'defines': ['NO_TCMALLOC'], 1.2628 + }], 1.2629 + ['linux_keep_shadow_stacks==1', { 1.2630 + 'defines': ['KEEP_SHADOW_STACKS'], 1.2631 + 'cflags': [ 1.2632 + '-finstrument-functions', 1.2633 + # Allow mmx intrinsics to inline, so that the compiler can expand 1.2634 + # the intrinsics. 1.2635 + '-finstrument-functions-exclude-file-list=mmintrin.h', 1.2636 + ], 1.2637 + }], 1.2638 + ['linux_use_gold_flags==1', { 1.2639 + 'ldflags': [ 1.2640 + # Experimentation found that using four linking threads 1.2641 + # saved ~20% of link time. 1.2642 + # https://groups.google.com/a/chromium.org/group/chromium-dev/browse_thread/thread/281527606915bb36 1.2643 + '-Wl,--threads', 1.2644 + '-Wl,--thread-count=4', 1.2645 + ], 1.2646 + 'conditions': [ 1.2647 + ['release_valgrind_build==0', { 1.2648 + 'target_conditions': [ 1.2649 + ['_toolset=="target"', { 1.2650 + 'ldflags': [ 1.2651 + # There seems to be a conflict of --icf and -pie 1.2652 + # in gold which can generate crashy binaries. As 1.2653 + # a security measure, -pie takes precendence for 1.2654 + # now. 1.2655 + #'-Wl,--icf=safe', 1.2656 + '-Wl,--icf=none', 1.2657 + ], 1.2658 + }], 1.2659 + ], 1.2660 + }], 1.2661 + ], 1.2662 + }], 1.2663 + ['linux_use_gold_binary==1', { 1.2664 + 'variables': { 1.2665 + 'conditions': [ 1.2666 + ['inside_chromium_build==1', { 1.2667 + # We pass the path to gold to the compiler. gyp leaves 1.2668 + # unspecified what the cwd is when running the compiler, 1.2669 + # so the normal gyp path-munging fails us. This hack 1.2670 + # gets the right path. 1.2671 + 'gold_path': '<(PRODUCT_DIR)/../../third_party/gold', 1.2672 + }, { 1.2673 + 'gold_path': '<(PRODUCT_DIR)/../../Source/WebKit/chromium/third_party/gold', 1.2674 + }] 1.2675 + ] 1.2676 + }, 1.2677 + 'ldflags': [ 1.2678 + # Put our gold binary in the search path for the linker. 1.2679 + '-B<(gold_path)', 1.2680 + ], 1.2681 + }], 1.2682 + ], 1.2683 + }, 1.2684 + }], 1.2685 + # FreeBSD-specific options; note that most FreeBSD options are set above, 1.2686 + # with Linux. 1.2687 + ['OS=="freebsd"', { 1.2688 + 'target_defaults': { 1.2689 + 'ldflags': [ 1.2690 + '-Wl,--no-keep-memory', 1.2691 + ], 1.2692 + }, 1.2693 + }], 1.2694 + # Android-specific options; note that most are set above with Linux. 1.2695 + ['OS=="android"', { 1.2696 + 'variables': { 1.2697 + # This is the id for the archived chrome symbols. Each build that 1.2698 + # archives symbols is assigned an id which is then added to GYP_DEFINES. 1.2699 + # This is written to the device log on crashes just prior to dropping a 1.2700 + # tombstone. Tools can determine the location of the archived symbols 1.2701 + # from the id. 1.2702 + 'chrome_symbols_id%': '', 1.2703 + 'conditions': [ 1.2704 + # Use shared stlport library when system one used. 1.2705 + # Figure this out early since it needs symbols from libgcc.a, so it 1.2706 + # has to be before that in the set of libraries. 1.2707 + ['use_system_stlport==1', { 1.2708 + 'android_stlport_library': 'stlport', 1.2709 + }, { 1.2710 + 'android_stlport_library': 'stlport_static', 1.2711 + }], 1.2712 + ], 1.2713 + 1.2714 + # Placing this variable here prevents from forking libvpx, used 1.2715 + # by remoting. Remoting is off, so it needn't built, 1.2716 + # so forking it's deps seems like overkill. 1.2717 + # But this variable need defined to properly run gyp. 1.2718 + # A proper solution is to have an OS==android conditional 1.2719 + # in third_party/libvpx/libvpx.gyp to define it. 1.2720 + 'libvpx_path': 'lib/linux/arm', 1.2721 + }, 1.2722 + 'target_defaults': { 1.2723 + 'variables': { 1.2724 + 'release_extra_cflags%': '', 1.2725 + }, 1.2726 + 1.2727 + 'target_conditions': [ 1.2728 + # Settings for building device targets using Android's toolchain. 1.2729 + # These are based on the setup.mk file from the Android NDK. 1.2730 + # 1.2731 + # The NDK Android executable link step looks as follows: 1.2732 + # $LDFLAGS 1.2733 + # $(TARGET_CRTBEGIN_DYNAMIC_O) <-- crtbegin.o 1.2734 + # $(PRIVATE_OBJECTS) <-- The .o that we built 1.2735 + # $(PRIVATE_STATIC_LIBRARIES) <-- The .a that we built 1.2736 + # $(TARGET_LIBGCC) <-- libgcc.a 1.2737 + # $(PRIVATE_SHARED_LIBRARIES) <-- The .so that we built 1.2738 + # $(PRIVATE_LDLIBS) <-- System .so 1.2739 + # $(TARGET_CRTEND_O) <-- crtend.o 1.2740 + # 1.2741 + # For now the above are approximated for executables by adding 1.2742 + # crtbegin.o to the end of the ldflags and 'crtend.o' to the end 1.2743 + # of 'libraries'. 1.2744 + # 1.2745 + # The NDK Android shared library link step looks as follows: 1.2746 + # $LDFLAGS 1.2747 + # $(PRIVATE_OBJECTS) <-- The .o that we built 1.2748 + # -l,--whole-archive 1.2749 + # $(PRIVATE_WHOLE_STATIC_LIBRARIES) 1.2750 + # -l,--no-whole-archive 1.2751 + # $(PRIVATE_STATIC_LIBRARIES) <-- The .a that we built 1.2752 + # $(TARGET_LIBGCC) <-- libgcc.a 1.2753 + # $(PRIVATE_SHARED_LIBRARIES) <-- The .so that we built 1.2754 + # $(PRIVATE_LDLIBS) <-- System .so 1.2755 + # 1.2756 + # For now, assume that whole static libraries are not needed. 1.2757 + # 1.2758 + # For both executables and shared libraries, add the proper 1.2759 + # libgcc.a to the start of libraries which puts it in the 1.2760 + # proper spot after .o and .a files get linked in. 1.2761 + # 1.2762 + # TODO: The proper thing to do longer-tem would be proper gyp 1.2763 + # support for a custom link command line. 1.2764 + ['_toolset=="target"', { 1.2765 + 'conditions': [ 1.2766 + ['build_with_mozilla==0', { 1.2767 + 'cflags!': [ 1.2768 + '-pthread', # Not supported by Android toolchain. 1.2769 + ], 1.2770 + 'cflags': [ 1.2771 + '-ffunction-sections', 1.2772 + '-funwind-tables', 1.2773 + '-g', 1.2774 + '-fstack-protector', 1.2775 + '-fno-short-enums', 1.2776 + '-finline-limit=64', 1.2777 + '-Wa,--noexecstack', 1.2778 + '<@(release_extra_cflags)', 1.2779 + ], 1.2780 + 'ldflags!': [ 1.2781 + '-pthread', # Not supported by Android toolchain. 1.2782 + ], 1.2783 + 'ldflags': [ 1.2784 + '-nostdlib', 1.2785 + '-Wl,--no-undefined', 1.2786 + # Don't export symbols from statically linked libraries. 1.2787 + '-Wl,--exclude-libs=ALL', 1.2788 + ], 1.2789 + 'libraries': [ 1.2790 + '-l<(android_stlport_library)', 1.2791 + # Manually link the libgcc.a that the cross compiler uses. 1.2792 + '<!(<(android_toolchain)/*-gcc -print-libgcc-file-name)', 1.2793 + '-lc', 1.2794 + '-ldl', 1.2795 + '-lstdc++', 1.2796 + '-lm', 1.2797 + ], 1.2798 + 'conditions': [ 1.2799 + ['android_upstream_bringup==1', { 1.2800 + 'defines': ['ANDROID_UPSTREAM_BRINGUP=1',], 1.2801 + }], 1.2802 + ['clang==1', { 1.2803 + 'cflags': [ 1.2804 + # Work around incompatibilities between bionic and clang 1.2805 + # headers. 1.2806 + '-D__compiler_offsetof=__builtin_offsetof', 1.2807 + '-Dnan=__builtin_nan', 1.2808 + ], 1.2809 + 'conditions': [ 1.2810 + ['target_arch=="arm"', { 1.2811 + 'cflags': [ 1.2812 + '-target arm-linux-androideabi', 1.2813 + '-mllvm -arm-enable-ehabi', 1.2814 + ], 1.2815 + 'ldflags': [ 1.2816 + '-target arm-linux-androideabi', 1.2817 + ], 1.2818 + }], 1.2819 + ['target_arch=="ia32"', { 1.2820 + 'cflags': [ 1.2821 + '-target x86-linux-androideabi', 1.2822 + ], 1.2823 + 'ldflags': [ 1.2824 + '-target x86-linux-androideabi', 1.2825 + ], 1.2826 + }], 1.2827 + ], 1.2828 + }], 1.2829 + ['android_build_type==0', { 1.2830 + 'defines': [ 1.2831 + # The NDK has these things, but doesn't define the constants 1.2832 + # to say that it does. Define them here instead. 1.2833 + 'HAVE_SYS_UIO_H', 1.2834 + ], 1.2835 + 'cflags': [ 1.2836 + '--sysroot=<(android_ndk_sysroot)', 1.2837 + ], 1.2838 + 'ldflags': [ 1.2839 + '--sysroot=<(android_ndk_sysroot)', 1.2840 + ], 1.2841 + }], 1.2842 + ['android_build_type==1', { 1.2843 + 'include_dirs': [ 1.2844 + # OpenAL headers from the Android tree. 1.2845 + '<(android_src)/frameworks/wilhelm/include', 1.2846 + ], 1.2847 + 'cflags': [ 1.2848 + # Chromium builds its own (non-third-party) code with 1.2849 + # -Werror to make all warnings into errors. However, Android 1.2850 + # enables warnings that Chromium doesn't, so some of these 1.2851 + # extra warnings trip and break things. 1.2852 + # For now, we leave these warnings enabled but prevent them 1.2853 + # from being treated as errors. 1.2854 + # 1.2855 + # Things that are part of -Wextra: 1.2856 + '-Wno-error=extra', # Enabled by -Wextra, but no specific flag 1.2857 + '-Wno-error=ignored-qualifiers', 1.2858 + '-Wno-error=type-limits', 1.2859 + # Other things unrelated to -Wextra: 1.2860 + '-Wno-error=non-virtual-dtor', 1.2861 + '-Wno-error=sign-promo', 1.2862 + ], 1.2863 + 'cflags_cc': [ 1.2864 + # Disabling c++0x-compat should be handled in WebKit, but 1.2865 + # this currently doesn't work because gcc_version is not set 1.2866 + # correctly when building with the Android build system. 1.2867 + # TODO(torne): Fix this in WebKit. 1.2868 + '-Wno-error=c++0x-compat', 1.2869 + ], 1.2870 + }], 1.2871 + ['android_build_type==1 and chromium_code==0', { 1.2872 + 'cflags': [ 1.2873 + # There is a class of warning which: 1.2874 + # 1) Android always enables and also treats as errors 1.2875 + # 2) Chromium ignores in third party code 1.2876 + # For now, I am leaving these warnings enabled but preventing 1.2877 + # them from being treated as errors here. 1.2878 + '-Wno-error=address', 1.2879 + '-Wno-error=format-security', 1.2880 + '-Wno-error=non-virtual-dtor', 1.2881 + '-Wno-error=return-type', 1.2882 + '-Wno-error=sequence-point', 1.2883 + ], 1.2884 + }], 1.2885 + ['target_arch == "arm"', { 1.2886 + 'ldflags': [ 1.2887 + # Enable identical code folding to reduce size. 1.2888 + '-Wl,--icf=safe', 1.2889 + ], 1.2890 + }], 1.2891 + # NOTE: The stlport header include paths below are specified in 1.2892 + # cflags rather than include_dirs because they need to come 1.2893 + # after include_dirs. Think of them like system headers, but 1.2894 + # don't use '-isystem' because the arm-linux-androideabi-4.4.3 1.2895 + # toolchain (circa Gingerbread) will exhibit strange errors. 1.2896 + # The include ordering here is important; change with caution. 1.2897 + ['use_system_stlport==1', { 1.2898 + 'cflags': [ 1.2899 + # For libstdc++/include, which is used by stlport. 1.2900 + '-I<(android_src)/bionic', 1.2901 + '-I<(android_src)/external/stlport/stlport', 1.2902 + ], 1.2903 + }, { # else: use_system_stlport!=1 1.2904 + 'cflags': [ 1.2905 + '-I<(android_ndk_root)/sources/cxx-stl/stlport/stlport', 1.2906 + ], 1.2907 + 'conditions': [ 1.2908 + ['target_arch=="arm" and armv7==1', { 1.2909 + 'ldflags': [ 1.2910 + '-L<(android_ndk_root)/sources/cxx-stl/stlport/libs/armeabi-v7a', 1.2911 + ], 1.2912 + }], 1.2913 + ['target_arch=="arm" and armv7==0', { 1.2914 + 'ldflags': [ 1.2915 + '-L<(android_ndk_root)/sources/cxx-stl/stlport/libs/armeabi', 1.2916 + ], 1.2917 + }], 1.2918 + ['target_arch=="ia32"', { 1.2919 + 'ldflags': [ 1.2920 + '-L<(android_ndk_root)/sources/cxx-stl/stlport/libs/x86', 1.2921 + ], 1.2922 + }], 1.2923 + ], 1.2924 + }], 1.2925 + ['target_arch=="ia32"', { 1.2926 + # The x86 toolchain currently has problems with stack-protector. 1.2927 + 'cflags!': [ 1.2928 + '-fstack-protector', 1.2929 + ], 1.2930 + 'cflags': [ 1.2931 + '-fno-stack-protector', 1.2932 + ], 1.2933 + }], 1.2934 + ], 1.2935 + 'target_conditions': [ 1.2936 + ['_type=="executable"', { 1.2937 + 'ldflags': [ 1.2938 + '-Bdynamic', 1.2939 + '-Wl,-dynamic-linker,/system/bin/linker', 1.2940 + '-Wl,--gc-sections', 1.2941 + '-Wl,-z,nocopyreloc', 1.2942 + # crtbegin_dynamic.o should be the last item in ldflags. 1.2943 + '<(android_ndk_lib)/crtbegin_dynamic.o', 1.2944 + ], 1.2945 + 'libraries': [ 1.2946 + # crtend_android.o needs to be the last item in libraries. 1.2947 + # Do not add any libraries after this! 1.2948 + '<(android_ndk_lib)/crtend_android.o', 1.2949 + ], 1.2950 + }], 1.2951 + ['_type=="shared_library" or _type=="loadable_module"', { 1.2952 + 'ldflags': [ 1.2953 + '-Wl,-shared,-Bsymbolic', 1.2954 + # crtbegin_so.o should be the last item in ldflags. 1.2955 + '<(android_ndk_lib)/crtbegin_so.o', 1.2956 + ], 1.2957 + 'libraries': [ 1.2958 + # crtend_so.o needs to be the last item in libraries. 1.2959 + # Do not add any libraries after this! 1.2960 + '<(android_ndk_lib)/crtend_so.o', 1.2961 + ], 1.2962 + }], 1.2963 + ], 1.2964 + 1.2965 + }], # build_with_mozilla== 0 1.2966 + 1.2967 + ], 1.2968 + 'defines': [ 1.2969 + 'ANDROID', 1.2970 + '__GNU_SOURCE=1', # Necessary for clone() 1.2971 + 'USE_STLPORT=1', 1.2972 + '_STLP_USE_PTR_SPECIALIZATIONS=1', 1.2973 + 'CHROME_SYMBOLS_ID="<(chrome_symbols_id)"', 1.2974 + ], 1.2975 + }], 1.2976 + # Settings for building host targets using the system toolchain. 1.2977 + ['_toolset=="host"', { 1.2978 + 'cflags!': [ 1.2979 + # Due to issues in Clang build system, using ASan on 32-bit 1.2980 + # binaries on x86_64 host is problematic. 1.2981 + # TODO(eugenis): re-enable. 1.2982 + '-faddress-sanitizer', 1.2983 + ], 1.2984 + 'ldflags!': [ 1.2985 + '-faddress-sanitizer', 1.2986 + '-Wl,-z,noexecstack', 1.2987 + '-Wl,--gc-sections', 1.2988 + '-Wl,-O1', 1.2989 + '-Wl,--as-needed', 1.2990 + ], 1.2991 + 'sources/': [ 1.2992 + ['exclude', '_android(_unittest)?\\.cc$'], 1.2993 + ['exclude', '(^|/)android/'] 1.2994 + ], 1.2995 + }], 1.2996 + ], 1.2997 + }, 1.2998 + }], 1.2999 + ['OS=="solaris"', { 1.3000 + 'cflags!': ['-fvisibility=hidden'], 1.3001 + 'cflags_cc!': ['-fvisibility-inlines-hidden'], 1.3002 + }], 1.3003 + ['OS=="mac" or OS=="ios"', { 1.3004 + 'target_defaults': { 1.3005 + 'mac_bundle': 0, 1.3006 + 'xcode_settings': { 1.3007 + 'ALWAYS_SEARCH_USER_PATHS': 'NO', 1.3008 + 'GCC_C_LANGUAGE_STANDARD': 'c99', # -std=c99 1.3009 + 'GCC_CW_ASM_SYNTAX': 'NO', # No -fasm-blocks 1.3010 + 'GCC_ENABLE_CPP_EXCEPTIONS': 'NO', # -fno-exceptions 1.3011 + 'GCC_ENABLE_CPP_RTTI': 'NO', # -fno-rtti 1.3012 + 'GCC_ENABLE_PASCAL_STRINGS': 'NO', # No -mpascal-strings 1.3013 + # GCC_INLINES_ARE_PRIVATE_EXTERN maps to -fvisibility-inlines-hidden 1.3014 + 'GCC_INLINES_ARE_PRIVATE_EXTERN': 'YES', 1.3015 + 'GCC_OBJC_CALL_CXX_CDTORS': 'YES', # -fobjc-call-cxx-cdtors 1.3016 + 'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES', # -fvisibility=hidden 1.3017 + 'GCC_THREADSAFE_STATICS': 'NO', # -fno-threadsafe-statics 1.3018 + 'GCC_TREAT_WARNINGS_AS_ERRORS': 'YES', # -Werror 1.3019 + 'GCC_VERSION': '4.2', 1.3020 + 'GCC_WARN_ABOUT_MISSING_NEWLINE': 'YES', # -Wnewline-eof 1.3021 + 'USE_HEADERMAP': 'NO', 1.3022 + 'WARNING_CFLAGS': [ 1.3023 + '-Wall', 1.3024 + '-Wendif-labels', 1.3025 + '-Wextra', 1.3026 + # Don't warn about unused function parameters. 1.3027 + '-Wno-unused-parameter', 1.3028 + # Don't warn about the "struct foo f = {0};" initialization 1.3029 + # pattern. 1.3030 + '-Wno-missing-field-initializers', 1.3031 + ], 1.3032 + 'conditions': [ 1.3033 + ['chromium_mac_pch', {'GCC_PRECOMPILE_PREFIX_HEADER': 'YES'}, 1.3034 + {'GCC_PRECOMPILE_PREFIX_HEADER': 'NO'} 1.3035 + ], 1.3036 + ], 1.3037 + }, 1.3038 + 'target_conditions': [ 1.3039 + ['_type!="static_library"', { 1.3040 + 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-search_paths_first']}, 1.3041 + }], 1.3042 + ['_mac_bundle', { 1.3043 + 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-ObjC']}, 1.3044 + }], 1.3045 + ], # target_conditions 1.3046 + }, # target_defaults 1.3047 + }], # OS=="mac" or OS=="ios" 1.3048 + ['OS=="mac"', { 1.3049 + 'target_defaults': { 1.3050 + 'variables': { 1.3051 + # These should end with %, but there seems to be a bug with % in 1.3052 + # variables that are intended to be set to different values in 1.3053 + # different targets, like these. 1.3054 + 'mac_pie': 1, # Most executables can be position-independent. 1.3055 + 'mac_real_dsym': 0, # Fake .dSYMs are fine in most cases. 1.3056 + # Strip debugging symbols from the target. 1.3057 + 'mac_strip': '<(mac_strip_release)', 1.3058 + }, 1.3059 + 'xcode_settings': { 1.3060 + 'GCC_DYNAMIC_NO_PIC': 'NO', # No -mdynamic-no-pic 1.3061 + # (Equivalent to -fPIC) 1.3062 + # MACOSX_DEPLOYMENT_TARGET maps to -mmacosx-version-min 1.3063 + 'MACOSX_DEPLOYMENT_TARGET': '<(mac_deployment_target)', 1.3064 + # Keep pch files below xcodebuild/. 1.3065 + 'SHARED_PRECOMPS_DIR': '$(CONFIGURATION_BUILD_DIR)/SharedPrecompiledHeaders', 1.3066 + 'OTHER_CFLAGS': [ 1.3067 + '-fno-strict-aliasing', # See http://crbug.com/32204 1.3068 + ], 1.3069 + 'conditions': [ 1.3070 + ['clang==1', { 1.3071 + 'CC': '$(SOURCE_ROOT)/<(clang_dir)/clang', 1.3072 + 'LDPLUSPLUS': '$(SOURCE_ROOT)/<(clang_dir)/clang++', 1.3073 + 1.3074 + # Don't use -Wc++0x-extensions, which Xcode 4 enables by default 1.3075 + # when buliding with clang. This warning is triggered when the 1.3076 + # override keyword is used via the OVERRIDE macro from 1.3077 + # base/compiler_specific.h. 1.3078 + 'CLANG_WARN_CXX0X_EXTENSIONS': 'NO', 1.3079 + 1.3080 + 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0', 1.3081 + 'WARNING_CFLAGS': [ 1.3082 + '-Wheader-hygiene', 1.3083 + # Don't die on dtoa code that uses a char as an array index. 1.3084 + # This is required solely for base/third_party/dmg_fp/dtoa.cc. 1.3085 + '-Wno-char-subscripts', 1.3086 + # Clang spots more unused functions. 1.3087 + '-Wno-unused-function', 1.3088 + # See comments on this flag higher up in this file. 1.3089 + '-Wno-unnamed-type-template-args', 1.3090 + # This (rightyfully) complains about 'override', which we use 1.3091 + # heavily. 1.3092 + '-Wno-c++11-extensions', 1.3093 + 1.3094 + # Warns on switches on enums that cover all enum values but 1.3095 + # also contain a default: branch. Chrome is full of that. 1.3096 + '-Wno-covered-switch-default', 1.3097 + 1.3098 + # TODO(thakis): Remove this. 1.3099 + '-Wno-implicit-conversion-floating-point-to-bool', 1.3100 + ], 1.3101 + }], 1.3102 + ['clang==1 and clang_use_chrome_plugins==1', { 1.3103 + 'OTHER_CFLAGS': [ 1.3104 + '<@(clang_chrome_plugins_flags)', 1.3105 + ], 1.3106 + }], 1.3107 + ['clang==1 and clang_load!=""', { 1.3108 + 'OTHER_CFLAGS': [ 1.3109 + '-Xclang', '-load', '-Xclang', '<(clang_load)', 1.3110 + ], 1.3111 + }], 1.3112 + ['clang==1 and clang_add_plugin!=""', { 1.3113 + 'OTHER_CFLAGS': [ 1.3114 + '-Xclang', '-add-plugin', '-Xclang', '<(clang_add_plugin)', 1.3115 + ], 1.3116 + }], 1.3117 + ['clang==1 and "<(GENERATOR)"=="ninja"', { 1.3118 + 'OTHER_CFLAGS': [ 1.3119 + # See http://crbug.com/110262 1.3120 + '-fcolor-diagnostics', 1.3121 + ], 1.3122 + }], 1.3123 + ], 1.3124 + }, 1.3125 + 'conditions': [ 1.3126 + ['clang==1', { 1.3127 + 'variables': { 1.3128 + 'clang_dir': '../third_party/llvm-build/Release+Asserts/bin', 1.3129 + }, 1.3130 + }], 1.3131 + ['asan==1', { 1.3132 + 'xcode_settings': { 1.3133 + 'OTHER_CFLAGS': [ 1.3134 + '-faddress-sanitizer', 1.3135 + ], 1.3136 + }, 1.3137 + 'defines': [ 1.3138 + 'ADDRESS_SANITIZER', 1.3139 + ], 1.3140 + }], 1.3141 + ], 1.3142 + 'target_conditions': [ 1.3143 + ['_type!="static_library"', { 1.3144 + 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-search_paths_first']}, 1.3145 + 'conditions': [ 1.3146 + ['asan==1', { 1.3147 + 'xcode_settings': { 1.3148 + 'OTHER_LDFLAGS': [ 1.3149 + '-faddress-sanitizer', 1.3150 + ], 1.3151 + }, 1.3152 + }], 1.3153 + ], 1.3154 + }], 1.3155 + ['_mac_bundle', { 1.3156 + 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-ObjC']}, 1.3157 + }], 1.3158 + ['_type=="executable"', { 1.3159 + 'postbuilds': [ 1.3160 + { 1.3161 + # Arranges for data (heap) pages to be protected against 1.3162 + # code execution when running on Mac OS X 10.7 ("Lion"), and 1.3163 + # ensures that the position-independent executable (PIE) bit 1.3164 + # is set for ASLR when running on Mac OS X 10.5 ("Leopard"). 1.3165 + 'variables': { 1.3166 + # Define change_mach_o_flags in a variable ending in _path 1.3167 + # so that GYP understands it's a path and performs proper 1.3168 + # relativization during dict merging. 1.3169 + 'change_mach_o_flags': 1.3170 + 'mac/change_mach_o_flags_from_xcode.sh', 1.3171 + 'change_mach_o_flags_options%': [ 1.3172 + ], 1.3173 + 'target_conditions': [ 1.3174 + ['mac_pie==0 or release_valgrind_build==1', { 1.3175 + # Don't enable PIE if it's unwanted. It's unwanted if 1.3176 + # the target specifies mac_pie=0 or if building for 1.3177 + # Valgrind, because Valgrind doesn't understand slide. 1.3178 + # See the similar mac_pie/release_valgrind_build check 1.3179 + # below. 1.3180 + 'change_mach_o_flags_options': [ 1.3181 + '--no-pie', 1.3182 + ], 1.3183 + }], 1.3184 + ], 1.3185 + }, 1.3186 + 'postbuild_name': 'Change Mach-O Flags', 1.3187 + 'action': [ 1.3188 + '$(srcdir)$(os_sep)build$(os_sep)<(change_mach_o_flags)', 1.3189 + '>@(change_mach_o_flags_options)', 1.3190 + ], 1.3191 + }, 1.3192 + ], 1.3193 + 'conditions': [ 1.3194 + ['asan==1', { 1.3195 + 'variables': { 1.3196 + 'asan_saves_file': 'asan.saves', 1.3197 + }, 1.3198 + 'xcode_settings': { 1.3199 + 'CHROMIUM_STRIP_SAVE_FILE': '<(asan_saves_file)', 1.3200 + }, 1.3201 + }], 1.3202 + ], 1.3203 + 'target_conditions': [ 1.3204 + ['mac_pie==1 and release_valgrind_build==0', { 1.3205 + # Turn on position-independence (ASLR) for executables. When 1.3206 + # PIE is on for the Chrome executables, the framework will 1.3207 + # also be subject to ASLR. 1.3208 + # Don't do this when building for Valgrind, because Valgrind 1.3209 + # doesn't understand slide. TODO: Make Valgrind on Mac OS X 1.3210 + # understand slide, and get rid of the Valgrind check. 1.3211 + 'xcode_settings': { 1.3212 + 'OTHER_LDFLAGS': [ 1.3213 + '-Wl,-pie', # Position-independent executable (MH_PIE) 1.3214 + ], 1.3215 + }, 1.3216 + }], 1.3217 + ], 1.3218 + }], 1.3219 + ['(_type=="executable" or _type=="shared_library" or \ 1.3220 + _type=="loadable_module") and mac_strip!=0', { 1.3221 + 'target_conditions': [ 1.3222 + ['mac_real_dsym == 1', { 1.3223 + # To get a real .dSYM bundle produced by dsymutil, set the 1.3224 + # debug information format to dwarf-with-dsym. Since 1.3225 + # strip_from_xcode will not be used, set Xcode to do the 1.3226 + # stripping as well. 1.3227 + 'configurations': { 1.3228 + 'Release_Base': { 1.3229 + 'xcode_settings': { 1.3230 + 'DEBUG_INFORMATION_FORMAT': 'dwarf-with-dsym', 1.3231 + 'DEPLOYMENT_POSTPROCESSING': 'YES', 1.3232 + 'STRIP_INSTALLED_PRODUCT': 'YES', 1.3233 + 'target_conditions': [ 1.3234 + ['_type=="shared_library" or _type=="loadable_module"', { 1.3235 + # The Xcode default is to strip debugging symbols 1.3236 + # only (-S). Local symbols should be stripped as 1.3237 + # well, which will be handled by -x. Xcode will 1.3238 + # continue to insert -S when stripping even when 1.3239 + # additional flags are added with STRIPFLAGS. 1.3240 + 'STRIPFLAGS': '-x', 1.3241 + }], # _type=="shared_library" or _type=="loadable_module"' 1.3242 + ], # target_conditions 1.3243 + }, # xcode_settings 1.3244 + }, # configuration "Release" 1.3245 + }, # configurations 1.3246 + }, { # mac_real_dsym != 1 1.3247 + # To get a fast fake .dSYM bundle, use a post-build step to 1.3248 + # produce the .dSYM and strip the executable. strip_from_xcode 1.3249 + # only operates in the Release configuration. 1.3250 + 'postbuilds': [ 1.3251 + { 1.3252 + 'variables': { 1.3253 + # Define strip_from_xcode in a variable ending in _path 1.3254 + # so that gyp understands it's a path and performs proper 1.3255 + # relativization during dict merging. 1.3256 + 'strip_from_xcode': 'mac/strip_from_xcode', 1.3257 + }, 1.3258 + 'postbuild_name': 'Strip If Needed', 1.3259 + 'action': ['$(srcdir)$(os_sep)build$(os_sep)<(strip_from_xcode)'], 1.3260 + }, 1.3261 + ], # postbuilds 1.3262 + }], # mac_real_dsym 1.3263 + ], # target_conditions 1.3264 + }], # (_type=="executable" or _type=="shared_library" or 1.3265 + # _type=="loadable_module") and mac_strip!=0 1.3266 + ], # target_conditions 1.3267 + }, # target_defaults 1.3268 + }], # OS=="mac" 1.3269 + ['OS=="ios"', { 1.3270 + 'target_defaults': { 1.3271 + 'xcode_settings' : { 1.3272 + 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0', 1.3273 + 1.3274 + # This next block is mostly common with the 'mac' section above, 1.3275 + # but keying off (or setting) 'clang' isn't valid for iOS as it 1.3276 + # also seems to mean using the custom build of clang. 1.3277 + 1.3278 + # Don't use -Wc++0x-extensions, which Xcode 4 enables by default 1.3279 + # when buliding with clang. This warning is triggered when the 1.3280 + # override keyword is used via the OVERRIDE macro from 1.3281 + # base/compiler_specific.h. 1.3282 + 'CLANG_WARN_CXX0X_EXTENSIONS': 'NO', 1.3283 + 'WARNING_CFLAGS': [ 1.3284 + '-Wheader-hygiene', 1.3285 + # Don't die on dtoa code that uses a char as an array index. 1.3286 + # This is required solely for base/third_party/dmg_fp/dtoa.cc. 1.3287 + '-Wno-char-subscripts', 1.3288 + # Clang spots more unused functions. 1.3289 + '-Wno-unused-function', 1.3290 + # See comments on this flag higher up in this file. 1.3291 + '-Wno-unnamed-type-template-args', 1.3292 + # This (rightyfully) complains about 'override', which we use 1.3293 + # heavily. 1.3294 + '-Wno-c++11-extensions', 1.3295 + ], 1.3296 + }, 1.3297 + 'target_conditions': [ 1.3298 + ['_type=="executable"', { 1.3299 + 'configurations': { 1.3300 + 'Release_Base': { 1.3301 + 'xcode_settings': { 1.3302 + 'DEPLOYMENT_POSTPROCESSING': 'YES', 1.3303 + 'STRIP_INSTALLED_PRODUCT': 'YES', 1.3304 + }, 1.3305 + }, 1.3306 + }, 1.3307 + 'xcode_settings': { 1.3308 + 'conditions': [ 1.3309 + ['chromium_ios_signing', { 1.3310 + # iOS SDK wants everything for device signed. 1.3311 + 'CODE_SIGN_IDENTITY[sdk=iphoneos*]': 'iPhone Developer', 1.3312 + }, { 1.3313 + 'CODE_SIGNING_REQUIRED': 'NO', 1.3314 + 'CODE_SIGN_IDENTITY[sdk=iphoneos*]': '', 1.3315 + }], 1.3316 + ], 1.3317 + }, 1.3318 + }], 1.3319 + ], # target_conditions 1.3320 + }, # target_defaults 1.3321 + }], # OS=="ios" 1.3322 + ['OS=="win"', { 1.3323 + 'target_defaults': { 1.3324 + 'defines': [ 1.3325 + '_WIN32_WINNT=0x0602', 1.3326 + 'WINVER=0x0602', 1.3327 + 'WIN32', 1.3328 + '_WINDOWS', 1.3329 + 'NOMINMAX', 1.3330 + 'PSAPI_VERSION=1', 1.3331 + '_CRT_RAND_S', 1.3332 + 'CERT_CHAIN_PARA_HAS_EXTRA_FIELDS', 1.3333 + 'WIN32_LEAN_AND_MEAN', 1.3334 + '_ATL_NO_OPENGL', 1.3335 + ], 1.3336 + 'conditions': [ 1.3337 + ['buildtype=="Official"', { 1.3338 + # In official builds, targets can self-select an optimization 1.3339 + # level by defining a variable named 'optimize', and setting it 1.3340 + # to one of 1.3341 + # - "size", optimizes for minimal code size - the default. 1.3342 + # - "speed", optimizes for speed over code size. 1.3343 + # - "max", whole program optimization and link-time code 1.3344 + # generation. This is very expensive and should be used 1.3345 + # sparingly. 1.3346 + 'variables': { 1.3347 + 'optimize%': 'size', 1.3348 + }, 1.3349 + 'target_conditions': [ 1.3350 + ['optimize=="size"', { 1.3351 + 'msvs_settings': { 1.3352 + 'VCCLCompilerTool': { 1.3353 + # 1, optimizeMinSpace, Minimize Size (/O1) 1.3354 + 'Optimization': '1', 1.3355 + # 2, favorSize - Favor small code (/Os) 1.3356 + 'FavorSizeOrSpeed': '2', 1.3357 + }, 1.3358 + }, 1.3359 + }, 1.3360 + ], 1.3361 + ['optimize=="speed"', { 1.3362 + 'msvs_settings': { 1.3363 + 'VCCLCompilerTool': { 1.3364 + # 2, optimizeMaxSpeed, Maximize Speed (/O2) 1.3365 + 'Optimization': '2', 1.3366 + # 1, favorSpeed - Favor fast code (/Ot) 1.3367 + 'FavorSizeOrSpeed': '1', 1.3368 + }, 1.3369 + }, 1.3370 + }, 1.3371 + ], 1.3372 + ['optimize=="max"', { 1.3373 + 'msvs_settings': { 1.3374 + 'VCCLCompilerTool': { 1.3375 + # 2, optimizeMaxSpeed, Maximize Speed (/O2) 1.3376 + 'Optimization': '2', 1.3377 + # 1, favorSpeed - Favor fast code (/Ot) 1.3378 + 'FavorSizeOrSpeed': '1', 1.3379 + # This implies link time code generation. 1.3380 + 'WholeProgramOptimization': 'true', 1.3381 + }, 1.3382 + }, 1.3383 + }, 1.3384 + ], 1.3385 + ], 1.3386 + }, 1.3387 + ], 1.3388 + ['component=="static_library"', { 1.3389 + 'defines': [ 1.3390 + '_HAS_EXCEPTIONS=0', 1.3391 + ], 1.3392 + }], 1.3393 + ['MSVS_VERSION=="2008"', { 1.3394 + 'defines': [ 1.3395 + '_HAS_TR1=0', 1.3396 + ], 1.3397 + }], 1.3398 + ['secure_atl', { 1.3399 + 'defines': [ 1.3400 + '_SECURE_ATL', 1.3401 + ], 1.3402 + }], 1.3403 + ], 1.3404 + 'msvs_system_include_dirs': [ 1.3405 + '<(windows_sdk_path)/Include/shared', 1.3406 + '<(windows_sdk_path)/Include/um', 1.3407 + '<(windows_sdk_path)/Include/winrt', 1.3408 + '<(directx_sdk_path)/Include', 1.3409 + '$(VSInstallDir)/VC/atlmfc/include', 1.3410 + ], 1.3411 + 'msvs_cygwin_dirs': ['<(DEPTH)/third_party/cygwin'], 1.3412 + 'msvs_disabled_warnings': [4351, 4396, 4503, 4819, 1.3413 + # TODO(maruel): These warnings are level 4. They will be slowly 1.3414 + # removed as code is fixed. 1.3415 + 4100, 4121, 4125, 4127, 4130, 4131, 4189, 4201, 4238, 4244, 4245, 1.3416 + 4310, 4355, 4428, 4481, 4505, 4510, 4512, 4530, 4610, 4611, 4701, 1.3417 + 4702, 4706, 1.3418 + ], 1.3419 + 'msvs_settings': { 1.3420 + 'VCCLCompilerTool': { 1.3421 + 'AdditionalOptions': ['/MP'], 1.3422 + 'MinimalRebuild': 'false', 1.3423 + 'BufferSecurityCheck': 'true', 1.3424 + 'EnableFunctionLevelLinking': 'true', 1.3425 + 'RuntimeTypeInfo': 'false', 1.3426 + 'WarningLevel': '4', 1.3427 + 'WarnAsError': 'true', 1.3428 + 'DebugInformationFormat': '3', 1.3429 + 'conditions': [ 1.3430 + ['component=="shared_library"', { 1.3431 + 'ExceptionHandling': '1', # /EHsc 1.3432 + }, { 1.3433 + 'ExceptionHandling': '0', 1.3434 + }], 1.3435 + ], 1.3436 + }, 1.3437 + 'VCLibrarianTool': { 1.3438 + 'AdditionalOptions': ['/ignore:4221'], 1.3439 + 'AdditionalLibraryDirectories': [ 1.3440 + '<(directx_sdk_path)/Lib/x86', 1.3441 + '<(windows_sdk_path)/Lib/win8/um/x86', 1.3442 + ], 1.3443 + }, 1.3444 + 'VCLinkerTool': { 1.3445 + 'AdditionalDependencies': [ 1.3446 + 'wininet.lib', 1.3447 + 'dnsapi.lib', 1.3448 + 'version.lib', 1.3449 + 'msimg32.lib', 1.3450 + 'ws2_32.lib', 1.3451 + 'usp10.lib', 1.3452 + 'psapi.lib', 1.3453 + 'dbghelp.lib', 1.3454 + 'winmm.lib', 1.3455 + 'shlwapi.lib', 1.3456 + ], 1.3457 + 1.3458 + 'conditions': [ 1.3459 + ['msvs_express', { 1.3460 + # Explicitly required when using the ATL with express 1.3461 + 'AdditionalDependencies': [ 1.3462 + 'atlthunk.lib', 1.3463 + ], 1.3464 + 1.3465 + # ATL 8.0 included in WDK 7.1 makes the linker to generate 1.3466 + # almost eight hundred LNK4254 and LNK4078 warnings: 1.3467 + # - warning LNK4254: section 'ATL' (50000040) merged into 1.3468 + # '.rdata' (40000040) with different attributes 1.3469 + # - warning LNK4078: multiple 'ATL' sections found with 1.3470 + # different attributes 1.3471 + 'AdditionalOptions': ['/ignore:4254', '/ignore:4078'], 1.3472 + }], 1.3473 + ['MSVS_VERSION=="2005e"', { 1.3474 + # Non-express versions link automatically to these 1.3475 + 'AdditionalDependencies': [ 1.3476 + 'advapi32.lib', 1.3477 + 'comdlg32.lib', 1.3478 + 'ole32.lib', 1.3479 + 'shell32.lib', 1.3480 + 'user32.lib', 1.3481 + 'winspool.lib', 1.3482 + ], 1.3483 + }], 1.3484 + ], 1.3485 + 'AdditionalLibraryDirectories': [ 1.3486 + '<(directx_sdk_path)/Lib/x86', 1.3487 + '<(windows_sdk_path)/Lib/win8/um/x86', 1.3488 + ], 1.3489 + 'GenerateDebugInformation': 'true', 1.3490 + 'MapFileName': '$(OutDir)\\$(TargetName).map', 1.3491 + 'ImportLibrary': '$(OutDir)\\lib\\$(TargetName).lib', 1.3492 + 'FixedBaseAddress': '1', 1.3493 + # SubSystem values: 1.3494 + # 0 == not set 1.3495 + # 1 == /SUBSYSTEM:CONSOLE 1.3496 + # 2 == /SUBSYSTEM:WINDOWS 1.3497 + # Most of the executables we'll ever create are tests 1.3498 + # and utilities with console output. 1.3499 + 'SubSystem': '1', 1.3500 + }, 1.3501 + 'VCMIDLTool': { 1.3502 + 'GenerateStublessProxies': 'true', 1.3503 + 'TypeLibraryName': '$(InputName).tlb', 1.3504 + 'OutputDirectory': '$(IntDir)', 1.3505 + 'HeaderFileName': '$(InputName).h', 1.3506 + 'DLLDataFileName': '$(InputName).dlldata.c', 1.3507 + 'InterfaceIdentifierFileName': '$(InputName)_i.c', 1.3508 + 'ProxyFileName': '$(InputName)_p.c', 1.3509 + }, 1.3510 + 'VCResourceCompilerTool': { 1.3511 + 'Culture' : '1033', 1.3512 + 'AdditionalIncludeDirectories': [ 1.3513 + '<(DEPTH)', 1.3514 + '<(SHARED_INTERMEDIATE_DIR)', 1.3515 + ], 1.3516 + }, 1.3517 + }, 1.3518 + }, 1.3519 + }], 1.3520 + ['disable_nacl==1', { 1.3521 + 'target_defaults': { 1.3522 + 'defines': [ 1.3523 + 'DISABLE_NACL', 1.3524 + ], 1.3525 + }, 1.3526 + }], 1.3527 + ['OS=="win" and msvs_use_common_linker_extras', { 1.3528 + 'target_defaults': { 1.3529 + 'msvs_settings': { 1.3530 + 'VCLinkerTool': { 1.3531 + 'DelayLoadDLLs': [ 1.3532 + 'dbghelp.dll', 1.3533 + 'dwmapi.dll', 1.3534 + 'shell32.dll', 1.3535 + 'uxtheme.dll', 1.3536 + ], 1.3537 + }, 1.3538 + }, 1.3539 + 'configurations': { 1.3540 + 'x86_Base': { 1.3541 + 'msvs_settings': { 1.3542 + 'VCLinkerTool': { 1.3543 + 'AdditionalOptions': [ 1.3544 + '/safeseh', 1.3545 + '/dynamicbase', 1.3546 + '/ignore:4199', 1.3547 + '/ignore:4221', 1.3548 + '/nxcompat', 1.3549 + ], 1.3550 + }, 1.3551 + }, 1.3552 + }, 1.3553 + 'x64_Base': { 1.3554 + 'msvs_settings': { 1.3555 + 'VCLinkerTool': { 1.3556 + 'AdditionalOptions': [ 1.3557 + # safeseh is not compatible with x64 1.3558 + '/dynamicbase', 1.3559 + '/ignore:4199', 1.3560 + '/ignore:4221', 1.3561 + '/nxcompat', 1.3562 + ], 1.3563 + }, 1.3564 + }, 1.3565 + }, 1.3566 + }, 1.3567 + }, 1.3568 + }], 1.3569 + ['enable_new_npdevice_api==1', { 1.3570 + 'target_defaults': { 1.3571 + 'defines': [ 1.3572 + 'ENABLE_NEW_NPDEVICE_API', 1.3573 + ], 1.3574 + }, 1.3575 + }], 1.3576 + ['clang==1', { 1.3577 + 'conditions': [ 1.3578 + ['OS=="android"', { 1.3579 + # Android could use the goma with clang. 1.3580 + 'make_global_settings': [ 1.3581 + ['CC', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} ${CHROME_SRC}/<(make_clang_dir)/bin/clang)'], 1.3582 + ['CXX', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} ${CHROME_SRC}/<(make_clang_dir)/bin/clang++)'], 1.3583 + ['LINK', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} ${CHROME_SRC}/<(make_clang_dir)/bin/clang++)'], 1.3584 + ['CC.host', '$(CC)'], 1.3585 + ['CXX.host', '$(CXX)'], 1.3586 + ['LINK.host', '$(LINK)'], 1.3587 + ], 1.3588 + }, { 1.3589 + 'make_global_settings': [ 1.3590 + ['CC', '<(make_clang_dir)/bin/clang'], 1.3591 + ['CXX', '<(make_clang_dir)/bin/clang++'], 1.3592 + ['LINK', '$(CXX)'], 1.3593 + ['CC.host', '$(CC)'], 1.3594 + ['CXX.host', '$(CXX)'], 1.3595 + ['LINK.host', '$(LINK)'], 1.3596 + ], 1.3597 + }], 1.3598 + ], 1.3599 + }], 1.3600 + ['OS=="android" and clang==0', { 1.3601 + # Hardcode the compiler names in the Makefile so that 1.3602 + # it won't depend on the environment at make time. 1.3603 + 'make_global_settings': [ 1.3604 + ['CC', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} <(android_toolchain)/*-gcc)'], 1.3605 + ['CXX', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} <(android_toolchain)/*-g++)'], 1.3606 + ['LINK', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} <(android_toolchain)/*-gcc)'], 1.3607 + ['CC.host', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} <!(which gcc))'], 1.3608 + ['CXX.host', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} <!(which g++))'], 1.3609 + ['LINK.host', '<!(/bin/echo -n ${ANDROID_GOMA_WRAPPER} <!(which g++))'], 1.3610 + ], 1.3611 + }], 1.3612 + ], 1.3613 + 'xcode_settings': { 1.3614 + # DON'T ADD ANYTHING NEW TO THIS BLOCK UNLESS YOU REALLY REALLY NEED IT! 1.3615 + # This block adds *project-wide* configuration settings to each project 1.3616 + # file. It's almost always wrong to put things here. Specify your 1.3617 + # custom xcode_settings in target_defaults to add them to targets instead. 1.3618 + 1.3619 + 'conditions': [ 1.3620 + # In an Xcode Project Info window, the "Base SDK for All Configurations" 1.3621 + # setting sets the SDK on a project-wide basis. In order to get the 1.3622 + # configured SDK to show properly in the Xcode UI, SDKROOT must be set 1.3623 + # here at the project level. 1.3624 + ['OS=="mac"', { 1.3625 + 'conditions': [ 1.3626 + ['mac_sdk_path==""', { 1.3627 + 'SDKROOT': 'macosx<(mac_sdk)', # -isysroot 1.3628 + }, { 1.3629 + 'SDKROOT': '<(mac_sdk_path)', # -isysroot 1.3630 + }], 1.3631 + ], 1.3632 + }], 1.3633 + ['OS=="ios"', { 1.3634 + 'conditions': [ 1.3635 + ['ios_sdk_path==""', { 1.3636 + 'SDKROOT': 'iphoneos<(ios_sdk)', # -isysroot 1.3637 + }, { 1.3638 + 'SDKROOT': '<(ios_sdk_path)', # -isysroot 1.3639 + }], 1.3640 + ], 1.3641 + }], 1.3642 + ['OS=="ios"', { 1.3643 + # Just build armv7 since iOS 4.3+ only supports armv7. 1.3644 + 'ARCHS': '$(ARCHS_UNIVERSAL_IPHONE_OS)', 1.3645 + 'IPHONEOS_DEPLOYMENT_TARGET': '<(ios_deployment_target)', 1.3646 + # Target both iPhone and iPad. 1.3647 + 'TARGETED_DEVICE_FAMILY': '1,2', 1.3648 + }], 1.3649 + ], 1.3650 + 1.3651 + # The Xcode generator will look for an xcode_settings section at the root 1.3652 + # of each dict and use it to apply settings on a file-wide basis. Most 1.3653 + # settings should not be here, they should be in target-specific 1.3654 + # xcode_settings sections, or better yet, should use non-Xcode-specific 1.3655 + # settings in target dicts. SYMROOT is a special case, because many other 1.3656 + # Xcode variables depend on it, including variables such as 1.3657 + # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something 1.3658 + # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the 1.3659 + # files to appear (when present) in the UI as actual files and not red 1.3660 + # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR, 1.3661 + # and therefore SYMROOT, needs to be set at the project level. 1.3662 + 'SYMROOT': '<(DEPTH)/xcodebuild', 1.3663 + }, 1.3664 +}