common.gypi revision 5f1c94371a64b3196d4be9466099bb892df9b88e
1# Copyright (c) 2012 The Chromium Authors. All rights reserved. 2# Use of this source code is governed by a BSD-style license that can be 3# found in the LICENSE file. 4 5# IMPORTANT: 6# Please don't directly include this file if you are building via gyp_chromium, 7# since gyp_chromium is automatically forcing its inclusion. 8{ 9 # Variables expected to be overriden on the GYP command line (-D) or by 10 # ~/.gyp/include.gypi. 11 'variables': { 12 # Putting a variables dict inside another variables dict looks kind of 13 # weird. This is done so that 'host_arch', 'chromeos', etc are defined as 14 # variables within the outer variables dict here. This is necessary 15 # to get these variables defined for the conditions within this variables 16 # dict that operate on these variables. 17 'variables': { 18 'variables': { 19 'variables': { 20 'variables': { 21 # Whether we're building a ChromeOS build. 22 'chromeos%': 0, 23 24 # Whether we're building the cast (chromecast) shell 25 'chromecast%': 0, 26 27 # Whether or not we are using the Aura windowing framework. 28 'use_aura%': 0, 29 30 # Whether or not we are building the Ash shell. 31 'use_ash%': 0, 32 33 # Whether or not we are using CRAS, the ChromeOS Audio Server. 34 'use_cras%': 0, 35 36 # Use a raw surface abstraction. 37 'use_ozone%': 0, 38 39 # Configure the build for small devices. See crbug.com/318413 40 'embedded%': 0, 41 42 'conditions': [ 43 # Compute the architecture that we're building on. 44 ['OS=="win" or OS=="mac" or OS=="ios"', { 45 'host_arch%': 'ia32', 46 }, { 47 'host_arch%': '<!pymod_do_main(detect_host_arch)', 48 }], 49 ], 50 }, 51 # Copy conditionally-set variables out one scope. 52 'chromeos%': '<(chromeos)', 53 'chromecast%': '<(chromecast)', 54 'use_aura%': '<(use_aura)', 55 'use_ash%': '<(use_ash)', 56 'use_cras%': '<(use_cras)', 57 'use_ozone%': '<(use_ozone)', 58 'embedded%': '<(embedded)', 59 'host_arch%': '<(host_arch)', 60 61 # Whether we are using Views Toolkit 62 'toolkit_views%': 0, 63 64 # Use OpenSSL instead of NSS as the underlying SSL and crypto 65 # implementation. Certificate verification will in most cases be 66 # handled by the OS. If OpenSSL's struct X509 is used to represent 67 # certificates, use_openssl_certs must be set. 68 'use_openssl%': 0, 69 70 # Typedef X509Certificate::OSCertHandle to OpenSSL's struct X509*. 71 'use_openssl_certs%': 0, 72 73 # Disable viewport meta tag by default. 74 'enable_viewport%': 0, 75 76 # Enable HiDPI support. 77 'enable_hidpi%': 0, 78 79 # Override buildtype to select the desired build flavor. 80 # Dev - everyday build for development/testing 81 # Official - release build (generally implies additional processing) 82 # TODO(mmoss) Once 'buildtype' is fully supported (e.g. Windows gyp 83 # conversion is done), some of the things which are now controlled by 84 # 'branding', such as symbol generation, will need to be refactored 85 # based on 'buildtype' (i.e. we don't care about saving symbols for 86 # non-Official # builds). 87 'buildtype%': 'Dev', 88 89 # Override branding to select the desired branding flavor. 90 'branding%': 'Chromium', 91 92 'conditions': [ 93 # ChromeOS and Windows use Aura and Ash. 94 ['chromeos==1 or OS=="win" or OS=="linux"', { 95 'use_ash%': 1, 96 'use_aura%': 1, 97 }], 98 99 ['chromecast==1', { 100 'embedded%': 1, 101 'use_ozone%': 1, 102 }], 103 104 # Ozone uses Aura. 105 ['use_ozone==1', { 106 'use_aura%': 1, 107 }], 108 109 # Whether we're a traditional desktop unix. 110 ['(OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris") and chromeos==0', { 111 'desktop_linux%': 1, 112 }, { 113 'desktop_linux%': 0, 114 }], 115 116 # Embedded implies ozone. 117 ['embedded==1', { 118 'use_ozone%': 1, 119 }], 120 121 ['OS=="android"', { 122 'target_arch%': 'arm', 123 }, { 124 # Default architecture we're building for is the architecture we're 125 # building on, and possibly sub-architecture (for iOS builds). 126 'target_arch%': '<(host_arch)', 127 }], 128 ], 129 }, 130 # Copy conditionally-set variables out one scope. 131 'chromeos%': '<(chromeos)', 132 'chromecast%': '<(chromecast)', 133 'desktop_linux%': '<(desktop_linux)', 134 'use_aura%': '<(use_aura)', 135 'use_ash%': '<(use_ash)', 136 'use_cras%': '<(use_cras)', 137 'use_ozone%': '<(use_ozone)', 138 'embedded%': '<(embedded)', 139 'use_openssl%': '<(use_openssl)', 140 'use_openssl_certs%': '<(use_openssl_certs)', 141 'enable_viewport%': '<(enable_viewport)', 142 'enable_hidpi%': '<(enable_hidpi)', 143 'buildtype%': '<(buildtype)', 144 'branding%': '<(branding)', 145 'host_arch%': '<(host_arch)', 146 'target_arch%': '<(target_arch)', 147 148 'target_subarch%': '', 149 150 # This is set when building the Android WebView inside the Android 151 # build system, using the 'android' gyp backend. The WebView code is 152 # still built when this is unset, but builds using the normal chromium 153 # build system. 154 'android_webview_build%': 0, 155 156 # This is set when building the Android WebView in ninja for the 157 # telemetry bot. 158 'android_webview_telemetry_build%': 0, 159 160 # Set ARM architecture version. 161 'arm_version%': 7, 162 163 # Use aurax11 for clipboard implementation. This is true on linux_aura. 164 'use_clipboard_aurax11%': 0, 165 166 # goma settings. 167 # 1 to use goma. 168 # If no gomadir is set, it uses the default gomadir. 169 'use_goma%': 0, 170 'gomadir%': '', 171 172 # The system root for cross-compiles. Default: none. 173 'sysroot%': '', 174 'chroot_cmd%': '', 175 176 # The system libdir used for this ABI. 177 'system_libdir%': 'lib', 178 179 'conditions': [ 180 # Ash needs Aura. 181 ['use_aura==0', { 182 'use_ash%': 0, 183 }], 184 185 # Set default value of toolkit_views based on OS. 186 ['OS=="win" or chromeos==1 or use_aura==1', { 187 'toolkit_views%': 1, 188 }, { 189 'toolkit_views%': 0, 190 }], 191 192 # Embedded builds use aura without ash or views. 193 ['embedded==1', { 194 'use_aura%': 1, 195 'use_ash%': 0, 196 'toolkit_views%': 0, 197 }], 198 199 # Enable HiDPI on Mac OS, Chrome OS and Windows. 200 ['OS=="mac" or chromeos==1 or OS=="win"', { 201 'enable_hidpi%': 1, 202 }], 203 204 # Enable App Launcher everywhere but mobile. 205 ['OS!="ios" and OS!="android"', { 206 'enable_app_list%': 1, 207 }, { 208 'enable_app_list%': 0, 209 }], 210 211 ['use_aura==1 or (OS!="win" and OS!="mac" and OS!="ios" and OS!="android")', { 212 'use_default_render_theme%': 1, 213 }, { 214 'use_default_render_theme%': 0, 215 }], 216 217 ['use_ozone==1', { 218 'use_ozone_evdev%': 1, 219 }, { 220 'use_ozone_evdev%': 0, 221 }], 222 223 # Set default gomadir. 224 ['OS=="win"', { 225 'gomadir': 'c:\\goma\\goma-win', 226 }, { 227 'gomadir': '<!(/bin/echo -n ${HOME}/goma)', 228 }], 229 230 # Set the default "target_subarch" on iOS. Valid values are "arm32", 231 # "arm64" and "both" (meaning a fat binary). 232 # 233 # TODO(sdefresne): change the default from "arm32" to "both" for 234 # "target_subarch" once http://crbug.com/339477 is fixed. 235 # 236 # TODO(sdefresne): set the "target_arch" to "arm" once compilation 237 # of skia has been fixed for simulator. http://crbug.com/342377 238 ['OS=="ios"', { 239 'target_subarch%': 'arm32', 240 }], 241 ], 242 }, 243 244 # Copy conditionally-set variables out one scope. 245 'chromeos%': '<(chromeos)', 246 'chromecast%': '<(chromecast)', 247 'host_arch%': '<(host_arch)', 248 'target_arch%': '<(target_arch)', 249 'target_subarch%': '<(target_subarch)', 250 'toolkit_views%': '<(toolkit_views)', 251 'desktop_linux%': '<(desktop_linux)', 252 'use_aura%': '<(use_aura)', 253 'use_ash%': '<(use_ash)', 254 'use_cras%': '<(use_cras)', 255 'use_ozone%': '<(use_ozone)', 256 'use_ozone_evdev%': '<(use_ozone_evdev)', 257 'use_clipboard_aurax11%': '<(use_clipboard_aurax11)', 258 'embedded%': '<(embedded)', 259 'use_openssl%': '<(use_openssl)', 260 'use_openssl_certs%': '<(use_openssl_certs)', 261 'enable_viewport%': '<(enable_viewport)', 262 'enable_hidpi%': '<(enable_hidpi)', 263 'android_webview_build%': '<(android_webview_build)', 264 'android_webview_telemetry_build%': '<(android_webview_telemetry_build)', 265 'use_goma%': '<(use_goma)', 266 'gomadir%': '<(gomadir)', 267 'enable_app_list%': '<(enable_app_list)', 268 'use_default_render_theme%': '<(use_default_render_theme)', 269 'buildtype%': '<(buildtype)', 270 'branding%': '<(branding)', 271 'arm_version%': '<(arm_version)', 272 'sysroot%': '<(sysroot)', 273 'chroot_cmd%': '<(chroot_cmd)', 274 'system_libdir%': '<(system_libdir)', 275 276 # Set to 1 to enable fast builds. Set to 2 for even faster builds 277 # (it disables debug info for fastest compilation - only for use 278 # on compile-only bots). 279 'fastbuild%': 0, 280 281 # Set to 1 to not store any build metadata (this isn't working yet but 282 # this flag will help us to get there). See http://crbug.com/314403. 283 # TODO(sebmarchand): Update this comment once this flag guarantee that 284 # there's no build metadata in the build artifacts. 285 'dont_embed_build_metadata%': 0, 286 287 # Set to 1 to force Visual C++ to use legacy debug information format /Z7. 288 # This is useful for parallel compilation tools which can't support /Zi. 289 # Only used on Windows. 290 'win_z7%' : 0, 291 292 # Set to 1 to enable dcheck in release. 293 'dcheck_always_on%': 0, 294 295 # Set to 1 to make a build that disables unshipped tracing events. 296 # Note: this setting is ignored if buildtype=="Official". 297 'tracing_like_official_build%': 0, 298 299 # Disable image loader component extension by default. 300 'image_loader_extension%': 0, 301 302 # Set NEON compilation flags. 303 'arm_neon%': 1, 304 305 # Detect NEON support at run-time. 306 'arm_neon_optional%': 0, 307 308 # Use libjpeg-turbo as the JPEG codec used by Chromium. 309 'use_libjpeg_turbo%': 1, 310 311 # Use system libjpeg. Note that the system's libjepg will be used even if 312 # use_libjpeg_turbo is set. 313 'use_system_libjpeg%': 0, 314 315 # By default, component is set to static_library and it can be overriden 316 # by the GYP command line or by ~/.gyp/include.gypi. 317 'component%': 'static_library', 318 319 # Set to select the Title Case versions of strings in GRD files. 320 'use_titlecase_in_grd_files%': 0, 321 322 # Use translations provided by volunteers at launchpad.net. This 323 # currently only works on Linux. 324 'use_third_party_translations%': 0, 325 326 # Remoting compilation is enabled by default. Set to 0 to disable. 327 'remoting%': 1, 328 329 # Configuration policy is enabled by default. Set to 0 to disable. 330 'configuration_policy%': 1, 331 332 # Variable safe_browsing is used to control the build time configuration 333 # for safe browsing feature. Safe browsing can be compiled in 3 different 334 # levels: 0 disables it, 1 enables it fully, and 2 enables only UI and 335 # reporting features without enabling phishing and malware detection. This 336 # is useful to integrate a third party phishing/malware detection to 337 # existing safe browsing logic. 338 'safe_browsing%': 1, 339 340 # Web speech is enabled by default. Set to 0 to disable. 341 'enable_web_speech%': 1, 342 343 # Notifications are compiled in by default. Set to 0 to disable. 344 'notifications%' : 1, 345 346 # Use dsymutil to generate real .dSYM files on Mac. The default is 0 for 347 # regular builds and 1 for ASan builds. 348 'mac_want_real_dsym%': 'default', 349 350 # If this is set, the clang plugins used on the buildbot will be used. 351 # Run tools/clang/scripts/update.sh to make sure they are compiled. 352 # This causes 'clang_chrome_plugins_flags' to be set. 353 # Has no effect if 'clang' is not set as well. 354 'clang_use_chrome_plugins%': 1, 355 356 # Enable building with ASAN (Clang's -fsanitize=address option). 357 # -fsanitize=address only works with clang, but asan=1 implies clang=1 358 # See https://sites.google.com/a/chromium.org/dev/developers/testing/addresssanitizer 359 'asan%': 0, 360 # Enable coverage gathering instrumentation in ASan. This flag also 361 # controls coverage granularity (1 for function-level coverage, 2 for 362 # block-level coverage). 363 'asan_coverage%': 0, 364 365 # Enable Chromium overrides of the default configurations for various 366 # dynamic tools (like ASan). 367 'use_sanitizer_options%': 1, 368 369 # Enable building with SyzyAsan. 370 # See https://code.google.com/p/sawbuck/wiki/SyzyASanHowTo 371 'syzyasan%': 0, 372 373 # Enable building with LSan (Clang's -fsanitize=leak option). 374 # -fsanitize=leak only works with clang, but lsan=1 implies clang=1 375 # See https://sites.google.com/a/chromium.org/dev/developers/testing/leaksanitizer 376 'lsan%': 0, 377 378 # Enable building with TSan (Clang's -fsanitize=thread option). 379 # -fsanitize=thread only works with clang, but tsan=1 implies clang=1 380 # See http://clang.llvm.org/docs/ThreadSanitizer.html 381 'tsan%': 0, 382 'tsan_blacklist%': '<(PRODUCT_DIR)/../../tools/memory/tsan_v2/ignores.txt', 383 384 # Enable building with MSan (Clang's -fsanitize=memory option). 385 # MemorySanitizer only works with clang, but msan=1 implies clang=1 386 # See http://clang.llvm.org/docs/MemorySanitizer.html 387 'msan%': 0, 388 'msan_blacklist%': '<(PRODUCT_DIR)/../../tools/msan/blacklist.txt', 389 # Track where uninitialized memory originates from. From fastest to 390 # slowest: 0 - no tracking, 1 - track only the initial allocation site, 2 391 # - track the chain of stores leading from allocation site to use site. 392 'msan_track_origins%': 1, 393 394 # Enable building with UBSan (Clang's -fsanitize=undefined option). 395 # -fsanitize=undefined only works with clang, but ubsan=1 implies clang=1 396 # See http://clang.llvm.org/docs/UsersManual.html 397 'ubsan%': 0, 398 399 # Enable building with UBsan's vptr (Clang's -fsanitize=vptr option). 400 # -fsanitize=vptr only works with clang, but ubsan_vptr=1 implies clang=1 401 'ubsan_vptr%': 0, 402 'ubsan_vptr_blacklist%': '<(PRODUCT_DIR)/../../tools/ubsan_vptr/blacklist.txt', 403 404 # Use the dynamic libraries instrumented by one of the sanitizers 405 # instead of the standard system libraries. 406 'use_instrumented_libraries%': 0, 407 408 # Use libc++ (third_party/libc++ and third_party/libc++abi) instead of 409 # stdlibc++ as standard library. This is intended to use for instrumented 410 # builds. 411 'use_custom_libcxx%': 0, 412 413 # Use system libc++ instead of the default C++ library, usually libstdc++. 414 # This is intended for iOS builds only. 415 'use_system_libcxx%': 0, 416 417 # Use a modified version of Clang to intercept allocated types and sizes 418 # for allocated objects. clang_type_profiler=1 implies clang=1. 419 # See http://dev.chromium.org/developers/deep-memory-profiler/cpp-object-type-identifier 420 # TODO(dmikurube): Support mac. See http://crbug.com/123758#c11 421 'clang_type_profiler%': 0, 422 423 # Set to true to instrument the code with function call logger. 424 # See src/third_party/cygprofile/cyg-profile.cc for details. 425 'order_profiling%': 0, 426 427 # Use the provided profiled order file to link Chrome image with it. 428 # This makes Chrome faster by better using CPU cache when executing code. 429 # This is known as PGO (profile guided optimization). 430 # See https://sites.google.com/a/google.com/chrome-msk/dev/boot-speed-up-effort 431 'order_text_section%' : "", 432 433 # Set to 1 compile with -fPIC cflag on linux. This is a must for shared 434 # libraries on linux x86-64 and arm, plus ASLR. 435 'linux_fpic%': 1, 436 437 # Whether one-click signin is enabled or not. 438 'enable_one_click_signin%': 0, 439 440 # Whether to back up data before sync. 441 'enable_pre_sync_backup%': 0, 442 443 # Enable Chrome browser extensions 444 'enable_extensions%': 1, 445 446 # Enable Google Now. 447 'enable_google_now%': 1, 448 449 # Enable printing support and UI. This variable is used to configure 450 # which parts of printing will be built. 0 disables printing completely, 451 # 1 enables it fully, and 2 enables only the codepath to generate a 452 # Metafile (e.g. usually a PDF or EMF) and disables print preview, cloud 453 # print, UI, etc. 454 'enable_printing%': 1, 455 456 # Windows prints using a PDF as the metafile from the renderer. 457 'win_pdf_metafile_for_printing%': 1, 458 459 # Set the version of CLD. 460 # 0: Don't specify the version. This option is for the Finch testing. 461 # 1: Use only CLD1. 462 # 2: Use only CLD2. 463 'cld_version%': 2, 464 465 # For CLD2, the size of the tables that should be included in the build 466 # Only evaluated if cld_version == 2 or if building the CLD2 dynamic data 467 # tool explicitly. 468 # See third_party/cld_2/cld_2.gyp for more information. 469 # 0: Small tables, lower accuracy 470 # 1: Medium tables, medium accuracy 471 # 2: Large tables, high accuracy 472 'cld2_table_size%': 2, 473 474 # The data acquisition mode for CLD2. Possible values are: 475 # static: CLD2 data is statically linked to the executable. 476 # standalone: CLD2 data is provided in a standalone file that is 477 # bundled with the executable. 478 # component: CLD2 data is provided as a Chrome "component" and is 479 # downloaded via the component updater. 480 # 481 # For more information on switching the CLD2 data source, see: 482 # https://sites.google.com/a/chromium.org/dev/developers/how-tos/compact-language-detector-cld-data-source-configuration 483 # 484 # This string will be exposed in chrome://translate-internals under the 485 # heading "CLD Data Source". This allows easy determination of which 486 # data source the browser was built with. 487 'cld2_data_source%': 'static', 488 489 # Enable spell checker. 490 'enable_spellcheck%': 1, 491 492 # Webrtc compilation is enabled by default. Set to 0 to disable. 493 'enable_webrtc%': 1, 494 495 # Enables use of the session service, which is enabled by default. 496 # Support for disabling depends on the platform. 497 'enable_session_service%': 1, 498 499 # Enables theme support, which is enabled by default. Support for 500 # disabling depends on the platform. 501 'enable_themes%': 1, 502 503 # Enables autofill dialog and associated features; disabled by default. 504 'enable_autofill_dialog%' : 0, 505 506 # Defaults Wallet integration in Autofill dialog to use production 507 # servers. Unofficial builds won't have the proper API keys. 508 'enable_prod_wallet_service%': 0, 509 510 # Enables support for background apps. 511 'enable_background%': 1, 512 513 # Enable the task manager by default. 514 'enable_task_manager%': 1, 515 516 # Enables used resource whitelist generation; disabled by default. 517 'enable_resource_whitelist_generation%': 0, 518 519 # Enable FILE support by default. 520 'disable_file_support%': 0, 521 522 # Enable FTP support by default. 523 'disable_ftp_support%': 0, 524 525 # Use native android functions in place of ICU. Not supported by most 526 # components. 527 'use_icu_alternatives_on_android%': 0, 528 529 # XInput2 multitouch support is enabled by default (use_xi2_mt=2). 530 # Setting to zero value disables XI2 MT. When XI2 MT is enabled, 531 # the input value also defines the required XI2 minor minimum version. 532 # For example, use_xi2_mt=2 means XI2.2 or above version is required. 533 'use_xi2_mt%': 2, 534 535 # Use of precompiled headers on Windows. 536 # 537 # This variable may be explicitly set to 1 (enabled) or 0 538 # (disabled) in ~/.gyp/include.gypi or via the GYP command line. 539 # This setting will override the default. 540 # 541 # See 542 # http://code.google.com/p/chromium/wiki/WindowsPrecompiledHeaders 543 # for details. 544 'chromium_win_pch%': 0, 545 546 # Clang stuff. 547 'make_clang_dir%': 'third_party/llvm-build/Release+Asserts', 548 # Set this to true when building with Clang. 549 # See http://code.google.com/p/chromium/wiki/Clang for details. 550 # If this is set, clang is used as both host and target compiler in 551 # cross-compile builds. 552 'clang%': 0, 553 554 # Enable plug-in installation by default. 555 'enable_plugin_installation%': 1, 556 557 # Specifies whether to use canvas_skia.cc in place of platform 558 # specific implementations of gfx::Canvas. Affects text drawing in the 559 # Chrome UI. 560 # TODO(asvitkine): Enable this on all platforms and delete this flag. 561 # http://crbug.com/105550 562 'use_canvas_skia%': 0, 563 564 # Set to "tsan", "memcheck", or "drmemory" to configure the build to work 565 # with one of those tools. 566 'build_for_tool%': '', 567 568 # If no directory is specified then a temporary directory will be used. 569 'test_isolation_outdir%': '', 570 # True if isolate should fail if the isolate files refer to files 571 # that are missing. 572 'test_isolation_fail_on_missing': 0, 573 574 'wix_path%': '<(DEPTH)/third_party/wix', 575 576 # Managed users are enabled by default. 577 'enable_managed_users%': 1, 578 579 # Platform natively supports discardable memory. 580 'native_discardable_memory%': 0, 581 582 # Platform sends memory pressure signals natively. 583 'native_memory_pressure_signals%': 0, 584 585 'data_reduction_fallback_host%' : '', 586 'data_reduction_dev_host%' : '', 587 'spdy_proxy_auth_origin%' : '', 588 'spdy_proxy_auth_property%' : '', 589 'spdy_proxy_auth_value%' : '', 590 'data_reduction_proxy_probe_url%' : '', 591 'data_reduction_proxy_warmup_url%' : '', 592 'data_reduction_proxy_ssl_origin%' : '', 593 'data_reduction_proxy_alt_origin%' : '', 594 'data_reduction_proxy_alt_fallback_origin%' : '', 595 'enable_mdns%' : 0, 596 'enable_service_discovery%': 0, 597 'enable_wifi_bootstrapping%': 0, 598 'enable_hangout_services_extension%': 0, 599 600 # Enable the Syzygy optimization step. 601 'syzygy_optimize%': 0, 602 603 # Enable hole punching for the protected video. 604 'video_hole%': 0, 605 606 # Automatically select platforms under ozone. Turn this off to 607 # build only explicitly selected platforms. 608 'ozone_auto_platforms%': 1, 609 610 'conditions': [ 611 ['android_webview_build==0', { 612 # If this is set clang is used as host compiler, but not as target 613 # compiler. Always do this by default, except when building for AOSP. 614 'host_clang%': 1, 615 }, { 616 # See http://crbug.com/377684 617 'host_clang%': 0, 618 }], 619 # A flag for POSIX platforms 620 ['OS=="win"', { 621 'os_posix%': 0, 622 }, { 623 'os_posix%': 1, 624 }], 625 626 # A flag for BSD platforms 627 ['OS=="freebsd" or OS=="openbsd"', { 628 'os_bsd%': 1, 629 }, { 630 'os_bsd%': 0, 631 }], 632 633 # NSS usage. 634 ['(OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris") and use_openssl==0', { 635 'use_nss%': 1, 636 }, { 637 'use_nss%': 0, 638 }], 639 640 # When OpenSSL is used for SSL and crypto on Unix-like systems, use 641 # OpenSSL's certificate definition. 642 ['(OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris") and use_openssl==1', { 643 'use_openssl_certs%': 1, 644 }, { 645 'use_openssl_certs%': 0, 646 }], 647 648 # libudev usage. This currently only affects the content layer. 649 ['OS=="linux" and embedded==0', { 650 'use_udev%': 1, 651 }, { 652 'use_udev%': 0, 653 }], 654 655 # Flags to use X11 on non-Mac POSIX platforms. 656 ['OS=="win" or OS=="mac" or OS=="ios" or OS=="android" or use_ozone==1', { 657 'use_x11%': 0, 658 }, { 659 'use_x11%': 1, 660 }], 661 662 # Flags to use glib. 663 ['OS=="win" or OS=="mac" or OS=="ios" or OS=="android" or use_ozone==1', { 664 'use_glib%': 0, 665 }, { 666 'use_glib%': 1, 667 }], 668 669 # Flags to use pango and cairo. 670 ['OS=="win" or OS=="mac" or OS=="ios" or OS=="android" or embedded==1', { 671 'use_pango%': 0, 672 'use_cairo%': 0, 673 }, { 674 'use_pango%': 1, 675 'use_cairo%': 1, 676 }], 677 678 # DBus usage. 679 ['OS=="linux" and embedded==0', { 680 'use_dbus%': 1, 681 }, { 682 'use_dbus%': 0, 683 }], 684 685 # We always use skia text rendering in Aura on Windows, since GDI 686 # doesn't agree with our BackingStore. 687 # TODO(beng): remove once skia text rendering is on by default. 688 ['use_aura==1 and OS=="win"', { 689 'enable_skia_text%': 1, 690 }], 691 692 # A flag to enable or disable our compile-time dependency 693 # on gnome-keyring. If that dependency is disabled, no gnome-keyring 694 # support will be available. This option is useful 695 # for Linux distributions and for Aura. 696 ['OS!="linux" or chromeos==1', { 697 'use_gnome_keyring%': 0, 698 }, { 699 'use_gnome_keyring%': 1, 700 }], 701 702 ['OS=="mac" or OS=="ios"', { 703 # Mac and iOS want Title Case strings 704 'use_titlecase_in_grd_files%': 1, 705 }], 706 707 # Enable loader extensions on Chrome OS. 708 ['chromeos==1', { 709 'image_loader_extension%': 1, 710 }, { 711 'image_loader_extension%': 0, 712 }], 713 714 ['OS=="win" or OS=="mac" or (OS=="linux" and chromeos==0)', { 715 'enable_one_click_signin%': 1, 716 'enable_pre_sync_backup%': 1, 717 }], 718 719 ['OS=="android"', { 720 'enable_extensions%': 0, 721 'enable_google_now%': 0, 722 'cld_version%': 1, 723 'enable_spellcheck%': 0, 724 'enable_themes%': 0, 725 'remoting%': 0, 726 'arm_neon%': 0, 727 'arm_neon_optional%': 1, 728 'native_discardable_memory%': 1, 729 'native_memory_pressure_signals%': 1, 730 'enable_printing%': 2, 731 'enable_task_manager%':0, 732 # Set to 1 once we have a notification system for Android. 733 # http://crbug.com/115320 734 'notifications%': 0, 735 'video_hole%': 1, 736 }], 737 738 # Android OS includes support for proprietary codecs regardless of 739 # building Chromium or Google Chrome. We also ship Google Chrome and 740 # Chromecast with proprietary codecs. 741 ['OS=="android" or branding=="Chrome" or chromecast==1', { 742 'proprietary_codecs%': 1, 743 }, { 744 'proprietary_codecs%': 0, 745 }], 746 747 ['OS=="mac" or OS=="ios"', { 748 'native_discardable_memory%': 1, 749 'native_memory_pressure_signals%': 1, 750 }], 751 752 # Enable autofill dialog for Android, Mac and Views-enabled platforms. 753 ['toolkit_views==1 or (OS=="android" and android_webview_build==0) or OS=="mac"', { 754 'enable_autofill_dialog%': 1, 755 756 'conditions': [ 757 ['buildtype=="Official"', { 758 'enable_prod_wallet_service%': 1, 759 }], 760 ] 761 }], 762 763 ['OS=="android"', { 764 'enable_webrtc%': 1, 765 }], 766 767 ['OS=="ios"', { 768 'disable_ftp_support%': 1, 769 'enable_extensions%': 0, 770 'enable_google_now%': 0, 771 'cld_version%': 1, 772 'enable_printing%': 0, 773 'enable_session_service%': 0, 774 'enable_themes%': 0, 775 'enable_webrtc%': 0, 776 'notifications%': 0, 777 'remoting%': 0, 778 'safe_browsing%': 0, 779 'enable_managed_users%': 0, 780 'enable_task_manager%': 0, 781 }], 782 783 # Use GPU accelerated cross process image transport by default 784 # on linux builds with the Aura window manager 785 ['use_aura==1 and OS=="linux"', { 786 'ui_compositor_image_transport%': 1, 787 }, { 788 'ui_compositor_image_transport%': 0, 789 }], 790 791 # Turn precompiled headers on by default. 792 ['OS=="win" and buildtype!="Official"', { 793 'chromium_win_pch%': 1 794 }], 795 796 ['chromeos==1 or OS=="android" or OS=="ios" or desktop_linux==1', { 797 'enable_plugin_installation%': 0, 798 }, { 799 'enable_plugin_installation%': 1, 800 }], 801 802 # Whether PPAPI is enabled. 803 ['OS=="android" or OS=="ios" or embedded==1', { 804 'enable_plugins%': 0, 805 }, { 806 'enable_plugins%': 1, 807 }], 808 809 # linux_use_bundled_gold: whether to use the gold linker binary checked 810 # into third_party/binutils. Force this off via GYP_DEFINES when you 811 # are using a custom toolchain and need to control -B in ldflags. 812 # Do not use 32-bit gold on 32-bit hosts as it runs out address space 813 # for component=static_library builds. 814 ['OS=="linux" and (target_arch=="x64" or target_arch=="arm")', { 815 'linux_use_bundled_gold%': 1, 816 }, { 817 'linux_use_bundled_gold%': 0, 818 }], 819 820 # linux_use_bundled_binutils: whether to use the binary binutils 821 # checked into third_party/binutils. These are not multi-arch so cannot 822 # be used except on x86 and x86-64 (the only two architectures which 823 # are currently checke in). Force this off via GYP_DEFINES when you 824 # are using a custom toolchain and need to control -B in cflags. 825 ['OS=="linux" and (target_arch=="x64")', { 826 'linux_use_bundled_binutils%': 1, 827 }, { 828 'linux_use_bundled_binutils%': 0, 829 }], 830 831 # linux_use_gold_flags: whether to use build flags that rely on gold. 832 # On by default for x64 Linux. 833 ['OS=="linux" and target_arch=="x64"', { 834 'linux_use_gold_flags%': 1, 835 }, { 836 'linux_use_gold_flags%': 0, 837 }], 838 839 # linux_use_debug_fission: whether to use split DWARF debug info 840 # files. This can reduce link time significantly, but is incompatible 841 # with some utilities such as icecc and ccache. Requires gold and 842 # gcc >= 4.8 or clang. 843 # http://gcc.gnu.org/wiki/DebugFission 844 ['OS=="linux" and target_arch=="x64"', { 845 'linux_use_debug_fission%': 1, 846 }, { 847 'linux_use_debug_fission%': 0, 848 }], 849 850 ['OS=="android" or OS=="ios"', { 851 'enable_captive_portal_detection%': 0, 852 }, { 853 'enable_captive_portal_detection%': 1, 854 }], 855 856 # Enable Skia UI text drawing incrementally on different platforms. 857 # http://crbug.com/105550 858 # 859 # On Aura, this allows per-tile painting to be used in the browser 860 # compositor. 861 ['OS!="android"', { 862 'use_canvas_skia%': 1, 863 }], 864 865 ['chromeos==1', { 866 # When building for ChromeOS we dont want Chromium to use libjpeg_turbo. 867 'use_libjpeg_turbo%': 0, 868 }], 869 870 ['OS=="android"', { 871 # When building as part of the Android system, use system libraries 872 # where possible to reduce ROM size. 873 'use_system_libjpeg%': '<(android_webview_build)', 874 }], 875 876 # Do not enable the Settings App on ChromeOS. 877 ['enable_app_list==1 and chromeos==0', { 878 'enable_settings_app%': 1, 879 }, { 880 'enable_settings_app%': 0, 881 }], 882 883 ['OS=="linux" and target_arch=="arm" and chromeos==0', { 884 # Set some defaults for arm/linux chrome builds 885 'use_allocator%': 'none', 886 # sysroot needs to be an absolute path otherwise it generates 887 # incorrect results when passed to pkg-config 888 'sysroot%': '<!(cd <(DEPTH) && pwd -P)/arm-sysroot', 889 }], # OS=="linux" and target_arch=="arm" and chromeos==0 890 891 ['OS=="linux" and branding=="Chrome" and buildtype=="Official" and chromeos==0', { 892 'conditions': [ 893 ['target_arch=="x64"', { 894 'sysroot%': '<!(cd <(DEPTH) && pwd -P)/chrome/installer/linux/debian_wheezy_amd64-sysroot', 895 }], 896 ['target_arch=="ia32"', { 897 'sysroot%': '<!(cd <(DEPTH) && pwd -P)/chrome/installer/linux/debian_wheezy_i386-sysroot', 898 }], 899 ], 900 }], # OS=="linux" and branding=="Chrome" and buildtype=="Official" and chromeos==0 901 902 ['OS=="linux" and target_arch=="mipsel"', { 903 'sysroot%': '<!(cd <(DEPTH) && pwd -P)/mipsel-sysroot/sysroot', 904 'CXX%': '<!(cd <(DEPTH) && pwd -P)/mipsel-sysroot/bin/mipsel-linux-gnu-gcc', 905 }], 906 907 # Whether tests targets should be run, archived or just have the 908 # dependencies verified. All the tests targets have the '_run' suffix, 909 # e.g. base_unittests_run runs the target base_unittests. The test 910 # target always calls tools/swarming_client/isolate.py. See the script's 911 # --help for more information and the valid --mode values. Meant to be 912 # overriden with GYP_DEFINES. 913 # TODO(maruel): Remove the conditions as more configurations are 914 # supported. 915 # NOTE: The check for disable_nacl==0 and component=="static_library" 916 # can't be used here because these variables are not defined yet, but it 917 # is still not supported. 918 ['OS!="ios" and OS!="android" and chromeos==0', { 919 'test_isolation_mode%': 'check', 920 }, { 921 'test_isolation_mode%': 'noop', 922 }], 923 # Whether Android build uses OpenMAX DL FFT. 924 ['OS=="android" and ((target_arch=="arm" and arm_version >= 7) or target_arch=="ia32" or target_arch=="x64" or target_arch=="arm64" or target_arch=="mipsel")', { 925 # Currently only supported on Android ARMv7+, ARM64, ia32, x64 and mipsel. 926 # When enabled, this will also enable WebAudio support on 927 # Android for these architectures. Default is enabled. Whether 928 # WebAudio is actually available depends on runtime settings 929 # and flags. 930 'use_openmax_dl_fft%': 1, 931 }, { 932 'use_openmax_dl_fft%': 0, 933 }], 934 ['OS=="win" or OS=="linux"', { 935 'enable_mdns%' : 1, 936 }], 937 938 # Turns on compiler optimizations in V8 in Debug build, except 939 # on android_clang, where we're hitting a weird linker error. 940 # TODO(dpranke): http://crbug.com/266155 . 941 ['OS=="android"', { 942 'v8_optimized_debug%': 1, 943 }, { 944 'v8_optimized_debug%': 2, 945 }], 946 947 # Disable various features by default on embedded. 948 ['embedded==1', { 949 'remoting%': 0, 950 'enable_printing%': 0, 951 }], 952 953 # By default, use ICU data file (icudtl.dat) on all platforms 954 # except when building Android WebView or Chromecast. 955 # TODO(jshin): Handle 'use_system_icu' on Linux (Chromium). 956 # Set the data reduction proxy origin for Android Webview. 957 ['android_webview_build==0 and android_webview_telemetry_build==0 and chromecast==0', { 958 'icu_use_data_file_flag%' : 1, 959 'spdy_proxy_auth_origin%': '', 960 'data_reduction_proxy_probe_url%': '', 961 'data_reduction_proxy_warmup_url%': '', 962 'data_reduction_dev_host%': '', 963 'data_reduction_fallback_host%': '', 964 }, { 965 'icu_use_data_file_flag%' : 0, 966 'spdy_proxy_auth_origin%': 'https://proxy.googlezip.net:443/', 967 'data_reduction_proxy_probe_url%': 'http://check.googlezip.net/connect', 968 'data_reduction_proxy_warmup_url%': 'http://www.gstatic.com/generate_204', 969 'data_reduction_dev_host%': 'http://proxy-dev.googlezip.net:80/', 970 'data_reduction_fallback_host%': 'http://compress.googlezip.net:80/', 971 }], 972 ['OS=="win" or OS=="mac"', { 973 'enable_wifi_bootstrapping%' : 1, 974 }], 975 976 # Path to sas.dll, which provides the SendSAS function. 977 # http://msdn.microsoft.com/en-us/library/windows/desktop/dd979761(v=vs.85).aspx 978 ['target_arch=="x64"', { 979 'sas_dll_path%': '<(DEPTH)/third_party/platformsdk_win7/files/redist/amd64', 980 }, { 981 'sas_dll_path%': '<(DEPTH)/third_party/platformsdk_win7/files/redist/x86', 982 }], 983 ], 984 985 # Set this to 1 to enable use of concatenated impulse responses 986 # for the HRTF panner in WebAudio. 987 'use_concatenated_impulse_responses': 1, 988 989 # You can set the variable 'use_official_google_api_keys' to 1 990 # to use the Google-internal file containing official API keys 991 # for Google Chrome even in a developer build. Setting this 992 # variable explicitly to 1 will cause your build to fail if the 993 # internal file is missing. 994 # 995 # The variable is documented here, but not handled in this file; 996 # see //google_apis/determine_use_official_keys.gypi for the 997 # implementation. 998 # 999 # Set the variable to 0 to not use the internal file, even when 1000 # it exists in your checkout. 1001 # 1002 # Leave it unset in your include.gypi to have the variable 1003 # implicitly set to 1 if you have 1004 # src/google_apis/internal/google_chrome_api_keys.h in your 1005 # checkout, and implicitly set to 0 if not. 1006 # 1007 # Note that official builds always behave as if the variable 1008 # was explicitly set to 1, i.e. they always use official keys, 1009 # and will fail to build if the internal file is missing. 1010 # 1011 # NOTE: You MUST NOT explicitly set the variable to 2 in your 1012 # include.gypi or by other means. Due to subtleties of GYP, this 1013 # is not the same as leaving the variable unset, even though its 1014 # default value in 1015 # //google_apis/determine_use_official_keys.gypi is 2. 1016 1017 # Set these to bake the specified API keys and OAuth client 1018 # IDs/secrets into your build. 1019 # 1020 # If you create a build without values baked in, you can instead 1021 # set environment variables to provide the keys at runtime (see 1022 # src/google_apis/google_api_keys.h for details). Features that 1023 # require server-side APIs may fail to work if no keys are 1024 # provided. 1025 # 1026 # Note that if you are building an official build or if 1027 # use_official_google_api_keys has been set to 1 (explicitly or 1028 # implicitly), these values will be ignored and the official 1029 # keys will be used instead. 1030 'google_api_key%': '', 1031 'google_default_client_id%': '', 1032 'google_default_client_secret%': '', 1033 # Native Client is enabled by default. 1034 'disable_nacl%': '0', 1035 }, 1036 1037 # Copy conditionally-set variables out one scope. 1038 'branding%': '<(branding)', 1039 'buildtype%': '<(buildtype)', 1040 'target_arch%': '<(target_arch)', 1041 'target_subarch%': '<(target_subarch)', 1042 'host_arch%': '<(host_arch)', 1043 'toolkit_views%': '<(toolkit_views)', 1044 'ui_compositor_image_transport%': '<(ui_compositor_image_transport)', 1045 'use_aura%': '<(use_aura)', 1046 'use_ash%': '<(use_ash)', 1047 'use_cras%': '<(use_cras)', 1048 'use_openssl%': '<(use_openssl)', 1049 'use_openssl_certs%': '<(use_openssl_certs)', 1050 'use_nss%': '<(use_nss)', 1051 'use_udev%': '<(use_udev)', 1052 'os_bsd%': '<(os_bsd)', 1053 'os_posix%': '<(os_posix)', 1054 'use_dbus%': '<(use_dbus)', 1055 'use_glib%': '<(use_glib)', 1056 'use_pango%': '<(use_pango)', 1057 'use_cairo%': '<(use_cairo)', 1058 'use_ozone%': '<(use_ozone)', 1059 'use_ozone_evdev%': '<(use_ozone_evdev)', 1060 'use_clipboard_aurax11%': '<(use_clipboard_aurax11)', 1061 'desktop_linux%': '<(desktop_linux)', 1062 'use_x11%': '<(use_x11)', 1063 'use_gnome_keyring%': '<(use_gnome_keyring)', 1064 'linux_fpic%': '<(linux_fpic)', 1065 'chromeos%': '<(chromeos)', 1066 'chromecast%': '<(chromecast)', 1067 'enable_viewport%': '<(enable_viewport)', 1068 'enable_hidpi%': '<(enable_hidpi)', 1069 'use_xi2_mt%':'<(use_xi2_mt)', 1070 'image_loader_extension%': '<(image_loader_extension)', 1071 'fastbuild%': '<(fastbuild)', 1072 'dont_embed_build_metadata%': '<(dont_embed_build_metadata)', 1073 'win_z7%': '<(win_z7)', 1074 'dcheck_always_on%': '<(dcheck_always_on)', 1075 'tracing_like_official_build%': '<(tracing_like_official_build)', 1076 'arm_version%': '<(arm_version)', 1077 'arm_neon%': '<(arm_neon)', 1078 'arm_neon_optional%': '<(arm_neon_optional)', 1079 'sysroot%': '<(sysroot)', 1080 'chroot_cmd%': '<(chroot_cmd)', 1081 'system_libdir%': '<(system_libdir)', 1082 'component%': '<(component)', 1083 'enable_resource_whitelist_generation%': '<(enable_resource_whitelist_generation)', 1084 'use_titlecase_in_grd_files%': '<(use_titlecase_in_grd_files)', 1085 'use_third_party_translations%': '<(use_third_party_translations)', 1086 'remoting%': '<(remoting)', 1087 'enable_one_click_signin%': '<(enable_one_click_signin)', 1088 'enable_pre_sync_backup%': '<(enable_pre_sync_backup)', 1089 'enable_webrtc%': '<(enable_webrtc)', 1090 'chromium_win_pch%': '<(chromium_win_pch)', 1091 'configuration_policy%': '<(configuration_policy)', 1092 'safe_browsing%': '<(safe_browsing)', 1093 'enable_web_speech%': '<(enable_web_speech)', 1094 'notifications%': '<(notifications)', 1095 'clang_use_chrome_plugins%': '<(clang_use_chrome_plugins)', 1096 'mac_want_real_dsym%': '<(mac_want_real_dsym)', 1097 'asan%': '<(asan)', 1098 'asan_coverage%': '<(asan_coverage)', 1099 'use_sanitizer_options%': '<(use_sanitizer_options)', 1100 'syzyasan%': '<(syzyasan)', 1101 'syzygy_optimize%': '<(syzygy_optimize)', 1102 'lsan%': '<(lsan)', 1103 'msan%': '<(msan)', 1104 'msan_blacklist%': '<(msan_blacklist)', 1105 'msan_track_origins%': '<(msan_track_origins)', 1106 'tsan%': '<(tsan)', 1107 'tsan_blacklist%': '<(tsan_blacklist)', 1108 'ubsan%': '<(ubsan)', 1109 'ubsan_vptr%': '<(ubsan_vptr)', 1110 'ubsan_vptr_blacklist%': '<(ubsan_vptr_blacklist)', 1111 'use_instrumented_libraries%': '<(use_instrumented_libraries)', 1112 'use_custom_libcxx%': '<(use_custom_libcxx)', 1113 'use_system_libcxx%': '<(use_system_libcxx)', 1114 'clang_type_profiler%': '<(clang_type_profiler)', 1115 'order_profiling%': '<(order_profiling)', 1116 'order_text_section%': '<(order_text_section)', 1117 'enable_extensions%': '<(enable_extensions)', 1118 'enable_plugin_installation%': '<(enable_plugin_installation)', 1119 'enable_plugins%': '<(enable_plugins)', 1120 'enable_session_service%': '<(enable_session_service)', 1121 'enable_themes%': '<(enable_themes)', 1122 'enable_autofill_dialog%': '<(enable_autofill_dialog)', 1123 'enable_prod_wallet_service%': '<(enable_prod_wallet_service)', 1124 'enable_background%': '<(enable_background)', 1125 'linux_use_bundled_gold%': '<(linux_use_bundled_gold)', 1126 'linux_use_bundled_binutils%': '<(linux_use_bundled_binutils)', 1127 'linux_use_gold_flags%': '<(linux_use_gold_flags)', 1128 'linux_use_debug_fission%': '<(linux_use_debug_fission)', 1129 'use_canvas_skia%': '<(use_canvas_skia)', 1130 'test_isolation_mode%': '<(test_isolation_mode)', 1131 'test_isolation_outdir%': '<(test_isolation_outdir)', 1132 'test_isolation_fail_on_missing': '<(test_isolation_fail_on_missing)', 1133 'enable_printing%': '<(enable_printing)', 1134 'win_pdf_metafile_for_printing%': '<(win_pdf_metafile_for_printing)', 1135 'enable_spellcheck%': '<(enable_spellcheck)', 1136 'enable_google_now%': '<(enable_google_now)', 1137 'cld_version%': '<(cld_version)', 1138 'cld2_table_size%': '<(cld2_table_size)', 1139 'cld2_data_source%': '<(cld2_data_source)', 1140 'enable_captive_portal_detection%': '<(enable_captive_portal_detection)', 1141 'disable_file_support%': '<(disable_file_support)', 1142 'disable_ftp_support%': '<(disable_ftp_support)', 1143 'use_icu_alternatives_on_android%': '<(use_icu_alternatives_on_android)', 1144 'enable_task_manager%': '<(enable_task_manager)', 1145 'sas_dll_path%': '<(sas_dll_path)', 1146 'wix_path%': '<(wix_path)', 1147 'use_libjpeg_turbo%': '<(use_libjpeg_turbo)', 1148 'use_system_libjpeg%': '<(use_system_libjpeg)', 1149 'android_webview_build%': '<(android_webview_build)', 1150 'android_webview_telemetry_build%': '<(android_webview_telemetry_build)', 1151 'icu_use_data_file_flag%': '<(icu_use_data_file_flag)', 1152 'gyp_managed_install%': 0, 1153 'create_standalone_apk%': 1, 1154 'enable_app_list%': '<(enable_app_list)', 1155 'use_default_render_theme%': '<(use_default_render_theme)', 1156 'enable_settings_app%': '<(enable_settings_app)', 1157 'google_api_key%': '<(google_api_key)', 1158 'google_default_client_id%': '<(google_default_client_id)', 1159 'google_default_client_secret%': '<(google_default_client_secret)', 1160 'enable_managed_users%': '<(enable_managed_users)', 1161 'native_discardable_memory%': '<(native_discardable_memory)', 1162 'native_memory_pressure_signals%': '<(native_memory_pressure_signals)', 1163 'data_reduction_fallback_host%': '<(data_reduction_fallback_host)', 1164 'data_reduction_dev_host%': '<(data_reduction_dev_host)', 1165 'spdy_proxy_auth_origin%': '<(spdy_proxy_auth_origin)', 1166 'spdy_proxy_auth_property%': '<(spdy_proxy_auth_property)', 1167 'spdy_proxy_auth_value%': '<(spdy_proxy_auth_value)', 1168 'data_reduction_proxy_probe_url%': '<(data_reduction_proxy_probe_url)', 1169 'data_reduction_proxy_warmup_url%': '<(data_reduction_proxy_warmup_url)', 1170 'data_reduction_proxy_ssl_origin%' : '<(data_reduction_proxy_ssl_origin)', 1171 'data_reduction_proxy_alt_origin%' : '<(data_reduction_proxy_alt_origin)', 1172 'data_reduction_proxy_alt_fallback_origin%' : '<(data_reduction_proxy_alt_fallback_origin)', 1173 'enable_mdns%' : '<(enable_mdns)', 1174 'enable_service_discovery%' : '<(enable_service_discovery)', 1175 'enable_wifi_bootstrapping%': '<(enable_wifi_bootstrapping)', 1176 'enable_hangout_services_extension%' : '<(enable_hangout_services_extension)', 1177 'v8_optimized_debug%': '<(v8_optimized_debug)', 1178 'proprietary_codecs%': '<(proprietary_codecs)', 1179 'use_goma%': '<(use_goma)', 1180 'gomadir%': '<(gomadir)', 1181 'video_hole%': '<(video_hole)', 1182 1183 # Use system protobuf instead of bundled one. 1184 'use_system_protobuf%': 0, 1185 1186 # Use system yasm instead of bundled one. 1187 'use_system_yasm%': 0, 1188 1189 # Use system ICU instead of bundled one. 1190 'use_system_icu%' : 0, 1191 1192 # Default to enabled PIE; this is important for ASLR but we may need to be 1193 # able to turn it off for various reasons. 1194 'linux_disable_pie%': 0, 1195 1196 # The release channel that this build targets. This is used to restrict 1197 # channel-specific build options, like which installer packages to create. 1198 # The default is 'all', which does no channel-specific filtering. 1199 'channel%': 'all', 1200 1201 # Override chromium_mac_pch and set it to 0 to suppress the use of 1202 # precompiled headers on the Mac. Prefix header injection may still be 1203 # used, but prefix headers will not be precompiled. This is useful when 1204 # using distcc to distribute a build to compile slaves that don't 1205 # share the same compiler executable as the system driving the compilation, 1206 # because precompiled headers rely on pointers into a specific compiler 1207 # executable's image. Setting this to 0 is needed to use an experimental 1208 # Linux-Mac cross compiler distcc farm. 1209 'chromium_mac_pch%': 1, 1210 1211 # The default value for mac_strip in target_defaults. This cannot be 1212 # set there, per the comment about variable% in a target_defaults. 1213 'mac_strip_release%': 0, 1214 1215 # Set to 1 to enable java code coverage. Instruments classes during build 1216 # to produce .ec files during runtime. 1217 'emma_coverage%': 0, 1218 1219 # EMMA filter string consisting of a list of inclusion/exclusion patterns 1220 # separated with whitespace and/or comma. Only has effect if 1221 # 'emma_coverage=1'. 1222 'emma_filter%': '', 1223 1224 # Set to 1 to enable running Android lint on java/class files. 1225 'android_lint%': 1, 1226 1227 # Although base/allocator lets you select a heap library via an 1228 # environment variable, the libcmt shim it uses sometimes gets in 1229 # the way. To disable it entirely, and switch to normal msvcrt, do e.g. 1230 # 'win_use_allocator_shim': 0, 1231 # 'win_release_RuntimeLibrary': 2 1232 # to ~/.gyp/include.gypi, gclient runhooks --force, and do a release build. 1233 'win_use_allocator_shim%': 1, # 1 = shim allocator via libcmt; 0 = msvcrt 1234 1235 # TODO(bradnelson): eliminate this when possible. 1236 # To allow local gyp files to prevent release.vsprops from being included. 1237 # Yes(1) means include release.vsprops. 1238 # Once all vsprops settings are migrated into gyp, this can go away. 1239 'msvs_use_common_release%': 1, 1240 1241 # TODO(bradnelson): eliminate this when possible. 1242 # To allow local gyp files to override additional linker options for msvs. 1243 # Yes(1) means set use the common linker options. 1244 'msvs_use_common_linker_extras%': 1, 1245 1246 # TODO(sgk): eliminate this if possible. 1247 # It would be nicer to support this via a setting in 'target_defaults' 1248 # in chrome/app/locales/locales.gypi overriding the setting in the 1249 # 'Debug' configuration in the 'target_defaults' dict below, 1250 # but that doesn't work as we'd like. 1251 'msvs_debug_link_incremental%': '2', 1252 1253 # Needed for some of the largest modules. 1254 'msvs_debug_link_nonincremental%': '1', 1255 1256 # Turns on Use Library Dependency Inputs for linking chrome.dll on Windows 1257 # to get incremental linking to be faster in debug builds. 1258 'incremental_chrome_dll%': '0', 1259 1260 # Experimental setting to break chrome.dll into multiple pieces based on 1261 # process type. 1262 'chrome_multiple_dll%': '0', 1263 1264 # Experimental setting to optimize Chrome's DLLs with PGO. 1265 'chrome_pgo_phase%': '0', 1266 1267 # Clang stuff. 1268 'clang%': '<(clang)', 1269 'host_clang%': '<(host_clang)', 1270 'make_clang_dir%': '<(make_clang_dir)', 1271 1272 # Control which version of clang to use when building for iOS. If set to 1273 # '1', uses the version of clang that ships with Xcode. If set to '0', uses 1274 # the version of clang that ships with the Chromium source. This variable 1275 # is automatically set to '1' when using the Xcode generator. 1276 'clang_xcode%': 0, 1277 1278 # These two variables can be set in GYP_DEFINES while running 1279 # |gclient runhooks| to let clang run a plugin in every compilation. 1280 # Only has an effect if 'clang=1' is in GYP_DEFINES as well. 1281 # Example: 1282 # GYP_DEFINES='clang=1 clang_load=/abs/path/to/libPrintFunctionNames.dylib clang_add_plugin=print-fns' gclient runhooks 1283 1284 'clang_load%': '', 1285 'clang_add_plugin%': '', 1286 1287 # Tell ld64 to write map files describing binary layout. Useful 1288 # for looking at what contributes to binary size, e.g. with 1289 # https://github.com/nico/bloat 1290 'mac_write_linker_maps%': 0, 1291 1292 # The default type of gtest. 1293 'gtest_target_type%': 'executable', 1294 1295 # Enable sampling based profiler. 1296 # See http://google-perftools.googlecode.com/svn/trunk/doc/cpuprofile.html 1297 'profiling%': '0', 1298 # Profile without optimizing out stack frames when profiling==1. 1299 'profiling_full_stack_frames%': '0', 1300 1301 # And if we want to dump symbols for Breakpad-enabled builds. 1302 'linux_dump_symbols%': 0, 1303 # And if we want to strip the binary after dumping symbols. 1304 'linux_strip_binary%': 0, 1305 # If we want stack unwind support for backtrace(). 1306 'debug_unwind_tables%': 1, 1307 'release_unwind_tables%': 1, 1308 1309 # Override where to find binutils 1310 'binutils_version%': 0, 1311 'binutils_dir%': '', 1312 1313 # Enable TCMalloc. 1314 # Default of 'use_allocator' is set to 'none' if OS=='android' later. 1315 'use_allocator%': 'tcmalloc', 1316 1317 # Set to 1 to link against libgnome-keyring instead of using dlopen(). 1318 'linux_link_gnome_keyring%': 0, 1319 # Set to 1 to link against gsettings APIs instead of using dlopen(). 1320 'linux_link_gsettings%': 0, 1321 1322 # Default arch variant for MIPS. 1323 'mips_arch_variant%': 'mips32r1', 1324 1325 # Enable use of OpenMAX DL FFT routines. 1326 'use_openmax_dl_fft%': '<(use_openmax_dl_fft)', 1327 1328 # Enable new NPDevice API. 1329 'enable_new_npdevice_api%': 0, 1330 1331 # Enable EGLImage support in OpenMAX 1332 'enable_eglimage%': 1, 1333 1334 # .gyp files or targets should set chromium_code to 1 if they build 1335 # Chromium-specific code, as opposed to external code. This variable is 1336 # used to control such things as the set of warnings to enable, and 1337 # whether warnings are treated as errors. 1338 'chromium_code%': 0, 1339 1340 # Disable fatal linker warnings, similarly to how we make it possible 1341 # to disable -Werror (e.g. for different toolchain versions). 1342 'disable_fatal_linker_warnings%': 0, 1343 1344 'release_valgrind_build%': 0, 1345 1346 # TODO(thakis): Make this a blacklist instead, http://crbug.com/101600 1347 'enable_wexit_time_destructors%': 0, 1348 1349 # Build libpeerconnection as a static library by default. 1350 'libpeer_target_type%': 'static_library', 1351 1352 # Set to 1 to compile with the OpenGL ES 2.0 conformance tests. 1353 'internal_gles2_conform_tests%': 0, 1354 1355 # Set to 1 to compile the filter fuzzer. 1356 'internal_filter_fuzzer%': 0, 1357 1358 # NOTE: When these end up in the Mac bundle, we need to replace '-' for '_' 1359 # so Cocoa is happy (http://crbug.com/20441). 1360 'locales': [ 1361 'am', 'ar', 'bg', 'bn', 'ca', 'cs', 'da', 'de', 'el', 'en-GB', 1362 'en-US', 'es-419', 'es', 'et', 'fa', 'fi', 'fil', 'fr', 'gu', 'he', 1363 'hi', 'hr', 'hu', 'id', 'it', 'ja', 'kn', 'ko', 'lt', 'lv', 1364 'ml', 'mr', 'ms', 'nb', 'nl', 'pl', 'pt-BR', 'pt-PT', 'ro', 'ru', 1365 'sk', 'sl', 'sr', 'sv', 'sw', 'ta', 'te', 'th', 'tr', 'uk', 1366 'vi', 'zh-CN', 'zh-TW', 1367 ], 1368 1369 # Pseudo locales are special locales which are used for testing and 1370 # debugging. They don't get copied to the final app. For more info, 1371 # check out https://sites.google.com/a/chromium.org/dev/Home/fake-bidi 1372 'pseudo_locales': [ 1373 'fake-bidi', 1374 ], 1375 1376 'grit_defines': [], 1377 1378 # If debug_devtools is set to 1, JavaScript files for DevTools are 1379 # stored as is and loaded from disk. Otherwise, a concatenated file 1380 # is stored in resources.pak. It is still possible to load JS files 1381 # from disk by passing --debug-devtools cmdline switch. 1382 'debug_devtools%': 0, 1383 1384 # The Java Bridge is not compiled in by default. 1385 'java_bridge%': 0, 1386 1387 # Code signing for iOS binaries. The bots need to be able to disable this. 1388 'chromium_ios_signing%': 1, 1389 1390 # This flag is only used when disable_nacl==0 and disables all those 1391 # subcomponents which would require the installation of a native_client 1392 # untrusted toolchain. 1393 'disable_nacl_untrusted%': 0, 1394 1395 # Disable Dart by default. 1396 'enable_dart%': 0, 1397 1398 # Copy out the setting of disable_nacl. 1399 'disable_nacl%': '<(disable_nacl)', 1400 1401 # Portable Native Client is enabled by default. 1402 'disable_pnacl%': 0, 1403 1404 # Whether to build full debug version for Debug configuration on Android. 1405 # Compared to full debug version, the default Debug configuration on Android 1406 # has no full v8 debug, has size optimization and linker gc section, so that 1407 # we can build a debug version with acceptable size and performance. 1408 'android_full_debug%': 0, 1409 1410 # Sets the default version name and code for Android app, by default we 1411 # do a developer build. 1412 'android_app_version_name%': 'Developer Build', 1413 'android_app_version_code%': 0, 1414 1415 # Contains data about the attached devices for gyp_managed_install. 1416 'build_device_config_path': '<(PRODUCT_DIR)/build_devices.cfg', 1417 1418 'sas_dll_exists': '<!pymod_do_main(dir_exists "<(sas_dll_path)")', 1419 'wix_exists': '<!pymod_do_main(dir_exists "<(wix_path)")', 1420 1421 'windows_sdk_default_path': '<(DEPTH)/third_party/platformsdk_win8/files', 1422 'directx_sdk_default_path': '<(DEPTH)/third_party/directxsdk/files', 1423 1424 # Whether we are using the rlz library or not. Platforms like Android send 1425 # rlz codes for searches but do not use the library. 1426 'enable_rlz%': 0, 1427 1428 # Turns on the i18n support in V8. 1429 'v8_enable_i18n_support': 1, 1430 1431 # Compile d8 for the host toolset. 1432 'v8_toolset_for_d8': 'host', 1433 1434 # Use the chromium skia by default. 1435 'use_system_skia%': '0', 1436 1437 # Use brlapi from brltty for braille display support. 1438 'use_brlapi%': 0, 1439 1440 # Relative path to icu.gyp from this file. 1441 'icu_gyp_path': '../third_party/icu/icu.gyp', 1442 1443 # IPC fuzzer is disabled by default. 1444 'enable_ipc_fuzzer%': 0, 1445 1446 1447 # Force disable libstdc++ debug mode. 1448 'disable_glibcxx_debug%': 0, 1449 1450 # Set to 1 to compile with MSE support for MPEG2 TS 1451 'enable_mpeg2ts_stream_parser%': 0, 1452 1453 # Support ChromeOS touchpad gestures with ozone. 1454 'use_evdev_gestures%': 0, 1455 1456 # Default ozone platform (if no --ozone-platform flag). 1457 'ozone_platform%': "", 1458 1459 # Ozone platforms to include in the build. 1460 'ozone_platform_caca%': 0, 1461 'ozone_platform_dri%': 0, 1462 'ozone_platform_egltest%': 0, 1463 'ozone_platform_gbm%': 0, 1464 'ozone_platform_ozonex%': 0, 1465 'ozone_platform_test%': 0, 1466 1467 # Chrome OS: whether to build ChromeVox from sources in the Chromium 1468 # repository rather than using precompiled JavaScript in 1469 # chrome/third_party/chromevox. This is still experimental. 1470 'use_migrated_chromevox%': 1, 1471 1472 # Chrome OS: whether to also build the upcoming version of 1473 # ChromeVox, which can then be enabled via a command-line switch. 1474 'use_chromevox_next%': 0, 1475 1476 'conditions': [ 1477 # The version of clang shipped upstream does not find C++ headers when 1478 # using -stdlib=libc++ so we instead need to use the version of clang 1479 # coming with Xcode. 1480 ['OS=="ios" and use_system_libcxx==1', { 1481 'clang_xcode%': 1, 1482 }], 1483 # Enable the Syzygy optimization step for the official builds. 1484 ['OS=="win" and buildtype=="Official" and syzyasan!=1', { 1485 'syzygy_optimize%': 1, 1486 }, { 1487 'syzygy_optimize%': 0, 1488 }], 1489 # Get binutils version so we can enable debug fission if we can. 1490 ['os_posix==1 and OS!="mac" and OS!="ios"', { 1491 'conditions': [ 1492 # compiler_version doesn't work with clang 1493 # TODO(mithro): Land https://codereview.chromium.org/199793014/ so 1494 # compiler_version works with clang. 1495 # TODO(glider): set clang to 1 earlier for ASan and TSan builds so 1496 # that it takes effect here. 1497 ['clang==0 and asan==0 and lsan==0 and tsan==0 and msan==0 and ubsan==0 and ubsan_vptr==0', { 1498 'binutils_version%': '<!pymod_do_main(compiler_version target assembler)', 1499 }], 1500 # On Android we know the binutils version in the toolchain. 1501 ['OS=="android"', { 1502 'binutils_version%': 222, 1503 }], 1504 ['host_arch=="x64"', { 1505 'binutils_dir%': 'third_party/binutils/Linux_x64/Release/bin', 1506 }], 1507 ['host_arch=="ia32"', { 1508 'binutils_dir%': 'third_party/binutils/Linux_ia32/Release/bin', 1509 }], 1510 # Our version of binutils in third_party/binutils 1511 ['linux_use_bundled_binutils==1', { 1512 'binutils_version%': 224, 1513 }], 1514 ], 1515 }, { 1516 'binutils_version%': 0, 1517 }], 1518 # The version of GCC in use, set later in platforms that use GCC and have 1519 # not explicitly chosen to build with clang. Currently, this means all 1520 # platforms except Windows, Mac and iOS. 1521 # TODO(glider): set clang to 1 earlier for ASan and TSan builds so that 1522 # it takes effect here. 1523 ['os_posix==1 and OS!="mac" and OS!="ios" and clang==0 and asan==0 and lsan==0 and tsan==0 and msan==0 and ubsan_vptr==0', { 1524 'conditions': [ 1525 ['OS=="android"', { 1526 # We directly set the gcc versions since we know what we use. 1527 'gcc_version%': 48, 1528 }, { 1529 'gcc_version%': '<!pymod_do_main(compiler_version target compiler)', 1530 }], 1531 ['android_webview_build==1', { 1532 # Android WebView uses a hermetic toolchain even for host, so set it 1533 # manually here. 1534 'conditions': [ 1535 ['host_os=="mac"', { 1536 'host_gcc_version%': 42, 1537 }, { # linux 1538 'host_gcc_version%': 46, 1539 }], 1540 ], 1541 }, { # android_webview_build!=1 1542 'host_gcc_version%': '<!pymod_do_main(compiler_version host compiler)', 1543 }], 1544 ], 1545 }, { 1546 'host_gcc_version%': 0, 1547 'gcc_version%': 0, 1548 }], 1549 ['OS=="win" and "<!pymod_do_main(dir_exists <(windows_sdk_default_path))"=="True"', { 1550 'windows_sdk_path%': '<(windows_sdk_default_path)', 1551 }, { 1552 'windows_sdk_path%': 'C:/Program Files (x86)/Windows Kits/8.0', 1553 }], 1554 ['OS=="win" and "<!pymod_do_main(dir_exists <(directx_sdk_default_path))"=="True"', { 1555 'directx_sdk_path%': '<(directx_sdk_default_path)', 1556 }, { 1557 'directx_sdk_path%': '$(DXSDK_DIR)', 1558 }], 1559 ['OS=="win"', { 1560 'windows_driver_kit_path%': '$(WDK_DIR)', 1561 }], 1562 ['os_posix==1 and OS!="mac" and OS!="ios"', { 1563 'conditions': [ 1564 ['target_arch=="mipsel"', { 1565 'werror%': '', 1566 'disable_nacl%': 1, 1567 'nacl_untrusted_build%': 0, 1568 'use_allocator%': 'none', 1569 }], 1570 ['OS=="linux" and target_arch=="mipsel"', { 1571 'sysroot%': '<(sysroot)', 1572 'CXX%': '<(CXX)', 1573 }], 1574 # All Chrome builds have breakpad symbols, but only process the 1575 # symbols from official builds. 1576 ['(branding=="Chrome" and buildtype=="Official")', { 1577 'linux_dump_symbols%': 1, 1578 1579 # Omit unwind support in official release builds to save space. We 1580 # can use breakpad for these builds. 1581 'release_unwind_tables%': 0, 1582 1583 'conditions': [ 1584 # For official builds, use a 64-bit linker to avoid running out 1585 # of address space. The buildbots should have a 64-bit kernel 1586 # and a 64-bit libc installed. 1587 ['host_arch=="ia32" and target_arch=="ia32"', { 1588 'linux_use_bundled_gold%': '1', 1589 'binutils_dir%': 'third_party/binutils/Linux_x64/Release/bin', 1590 }], 1591 ], 1592 }], 1593 ], 1594 }], # os_posix==1 and OS!="mac" and OS!="ios" 1595 ['OS=="ios"', { 1596 'disable_nacl%': 1, 1597 'enable_background%': 0, 1598 'icu_use_data_file_flag%': 1, 1599 'enable_web_speech%': 0, 1600 'use_system_libxml%': 1, 1601 'use_system_sqlite%': 1, 1602 'locales==': [ 1603 'ar', 'ca', 'cs', 'da', 'de', 'el', 'en-GB', 'en-US', 'es', 'es-MX', 1604 'fi', 'fr', 'he', 'hi', 'hr', 'hu', 'id', 'it', 'ja', 'ko', 'ms', 1605 'nb', 'nl', 'pl', 'pt', 'pt-PT', 'ro', 'ru', 'sk', 'sv', 'th', 'tr', 1606 'uk', 'vi', 'zh-CN', 'zh-TW', 1607 ], 1608 1609 # The Mac SDK is set for iOS builds and passed through to Mac 1610 # sub-builds. This allows the Mac sub-build SDK in an iOS build to be 1611 # overridden from the command line the same way it is for a Mac build. 1612 'mac_sdk%': '<!(python <(DEPTH)/build/mac/find_sdk.py 10.6)', 1613 1614 # iOS SDK and deployment target support. The |ios_sdk| value is left 1615 # blank so that when it is set in the project files it will be the 1616 # "current" iOS SDK. Forcing a specific SDK even if it is "current" 1617 # causes Xcode to spit out a warning for every single project file for 1618 # not using the "current" SDK. 1619 'ios_sdk%': '', 1620 'ios_sdk_path%': '', 1621 'ios_deployment_target%': '6.0', 1622 1623 'conditions': [ 1624 # ios_product_name is set to the name of the .app bundle as it should 1625 # appear on disk. 1626 ['branding=="Chrome"', { 1627 'ios_product_name%': 'Chrome', 1628 }, { # else: branding!="Chrome" 1629 'ios_product_name%': 'Chromium', 1630 }], 1631 ['branding=="Chrome" and buildtype=="Official"', { 1632 'ios_breakpad%': 1, 1633 }, { # else: branding!="Chrome" or buildtype!="Official" 1634 'ios_breakpad%': 0, 1635 }], 1636 ], 1637 }], # OS=="ios" 1638 ['OS=="android"', { 1639 # Location of Android NDK. 1640 'variables': { 1641 'variables': { 1642 # Unfortunately we have to use absolute paths to the SDK/NDK because 1643 # they're passed to ant which uses a different relative path from 1644 # gyp. 1645 'android_ndk_root%': '<!(cd <(DEPTH) && pwd -P)/third_party/android_tools/ndk/', 1646 'android_sdk_root%': '<!(cd <(DEPTH) && pwd -P)/third_party/android_tools/sdk/', 1647 'android_host_arch%': '<!(uname -m)', 1648 # Android API-level of the SDK used for compilation. 1649 'android_sdk_version%': '20', 1650 'android_sdk_build_tools_version%': '20.0.0', 1651 'host_os%': "<!(uname -s | sed -e 's/Linux/linux/;s/Darwin/mac/')", 1652 }, 1653 # Copy conditionally-set variables out one scope. 1654 'android_ndk_root%': '<(android_ndk_root)', 1655 'android_sdk_root%': '<(android_sdk_root)', 1656 'android_sdk_version%': '<(android_sdk_version)', 1657 'android_stlport_root': '<(android_ndk_root)/sources/cxx-stl/stlport', 1658 'host_os%': '<(host_os)', 1659 1660 'android_sdk%': '<(android_sdk_root)/platforms/android-<(android_sdk_version)', 1661 # Android SDK build tools (e.g. dx, aapt, aidl) 1662 'android_sdk_tools%': '<(android_sdk_root)/build-tools/<(android_sdk_build_tools_version)', 1663 1664 # Android API level 14 is ICS (Android 4.0) which is the minimum 1665 # platform requirement for Chrome on Android, we use it for native 1666 # code compilation. 1667 'conditions': [ 1668 ['target_arch == "ia32"', { 1669 'android_app_abi%': 'x86', 1670 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-x86/gdbserver/gdbserver', 1671 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-14/arch-x86', 1672 'android_ndk_lib_dir%': 'usr/lib', 1673 'android_toolchain%': '<(android_ndk_root)/toolchains/x86-4.8/prebuilt/<(host_os)-<(android_host_arch)/bin', 1674 }], 1675 ['target_arch == "x64"', { 1676 'android_app_abi%': 'x86_64', 1677 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-x86_64/gdbserver/gdbserver', 1678 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-L/arch-x86_64', 1679 'android_ndk_lib_dir%': 'usr/lib64', 1680 'android_toolchain%': '<(android_ndk_root)/toolchains/x86_64-4.9/prebuilt/<(host_os)-<(android_host_arch)/bin', 1681 }], 1682 ['target_arch=="arm"', { 1683 'conditions': [ 1684 ['arm_version<7', { 1685 'android_app_abi%': 'armeabi', 1686 }, { 1687 'android_app_abi%': 'armeabi-v7a', 1688 }], 1689 ], 1690 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-arm/gdbserver/gdbserver', 1691 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-14/arch-arm', 1692 'android_ndk_lib_dir%': 'usr/lib', 1693 'android_toolchain%': '<(android_ndk_root)/toolchains/arm-linux-androideabi-4.8/prebuilt/<(host_os)-<(android_host_arch)/bin', 1694 }], 1695 ['target_arch == "arm64"', { 1696 'android_app_abi%': 'arm64-v8a', 1697 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-arm64/gdbserver/gdbserver', 1698 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-L/arch-arm64', 1699 'android_ndk_lib_dir%': 'usr/lib', 1700 'android_toolchain%': '<(android_ndk_root)/toolchains/aarch64-linux-android-4.9/prebuilt/<(host_os)-<(android_host_arch)/bin', 1701 }], 1702 ['target_arch == "mipsel"', { 1703 'android_app_abi%': 'mips', 1704 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-mips/gdbserver/gdbserver', 1705 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-14/arch-mips', 1706 'android_ndk_lib_dir%': 'usr/lib', 1707 'android_toolchain%': '<(android_ndk_root)/toolchains/mipsel-linux-android-4.8/prebuilt/<(host_os)-<(android_host_arch)/bin', 1708 }], 1709 ], 1710 }, 1711 # Copy conditionally-set variables out one scope. 1712 'android_app_abi%': '<(android_app_abi)', 1713 'android_gdbserver%': '<(android_gdbserver)', 1714 'android_ndk_root%': '<(android_ndk_root)', 1715 'android_ndk_sysroot%': '<(android_ndk_sysroot)', 1716 'android_sdk_root%': '<(android_sdk_root)', 1717 'android_sdk_version%': '<(android_sdk_version)', 1718 'android_toolchain%': '<(android_toolchain)', 1719 1720 'android_ndk_include': '<(android_ndk_sysroot)/usr/include', 1721 'android_ndk_lib': '<(android_ndk_sysroot)/<(android_ndk_lib_dir)', 1722 'android_sdk_tools%': '<(android_sdk_tools)', 1723 'android_sdk%': '<(android_sdk)', 1724 'android_sdk_jar%': '<(android_sdk)/android.jar', 1725 1726 'android_stlport_root': '<(android_stlport_root)', 1727 'android_stlport_include': '<(android_stlport_root)/stlport', 1728 'android_stlport_libs_dir': '<(android_stlport_root)/libs/<(android_app_abi)', 1729 'host_os%': '<(host_os)', 1730 1731 # Location of the "objcopy" binary, used by both gyp and scripts. 1732 'android_objcopy%' : '<!(/bin/echo -n <(android_toolchain)/*-objcopy)', 1733 1734 # Location of the "strip" binary, used by both gyp and scripts. 1735 'android_strip%' : '<!(/bin/echo -n <(android_toolchain)/*-strip)', 1736 1737 # Location of the "readelf" binary. 1738 'android_readelf%' : '<!(/bin/echo -n <(android_toolchain)/*-readelf)', 1739 1740 # Determines whether we should optimize JNI generation at the cost of 1741 # breaking assumptions in the build system that when inputs have changed 1742 # the outputs should always change as well. This is meant purely for 1743 # developer builds, to avoid spurious re-linking of native files. 1744 'optimize_jni_generation%': 0, 1745 1746 # Always uses openssl. 1747 'use_openssl%': 1, 1748 'use_openssl_certs%': 1, 1749 1750 'proprietary_codecs%': '<(proprietary_codecs)', 1751 'safe_browsing%': 1, 1752 'enable_web_speech%': 0, 1753 'java_bridge%': 1, 1754 'build_ffmpegsumo%': 0, 1755 'use_allocator%': 'none', 1756 1757 # Disable Native Client. 1758 'disable_nacl%': 1, 1759 1760 # Android does not support background apps. 1761 'enable_background%': 0, 1762 1763 # Sessions are store separately in the Java side. 1764 'enable_session_service%': 0, 1765 1766 'p2p_apis%' : 0, 1767 1768 'gtest_target_type%': 'shared_library', 1769 1770 # Uses system APIs for decoding audio and video. 1771 'use_libffmpeg%': '0', 1772 1773 # When building as part of the Android system, use system libraries 1774 # where possible to reduce ROM size. 1775 # TODO(steveblock): Investigate using the system version of sqlite. 1776 'use_system_sqlite%': 0, # '<(android_webview_build)', 1777 'use_system_expat%': '<(android_webview_build)', 1778 'use_system_icu%': '<(android_webview_build)', 1779 'use_system_stlport%': '<(android_webview_build)', 1780 1781 # Copy it out one scope. 1782 'android_webview_build%': '<(android_webview_build)', 1783 }], # OS=="android" 1784 ['embedded==1', { 1785 'use_system_fontconfig%': 0, 1786 }, { 1787 'use_system_fontconfig%': 1, 1788 }], 1789 ['chromecast==1', { 1790 'ffmpeg_branding%': 'Chrome', 1791 'ozone_platform_ozonex%': 1, 1792 'conditions': [ 1793 ['target_arch=="arm"', { 1794 'arm_arch%': '', 1795 'arm_tune%': 'cortex-a9', 1796 'arm_thumb%': 1, 1797 'enable_mpeg2ts_stream_parser%': 1, 1798 'video_hole%': 1, 1799 }], 1800 ], 1801 }], 1802 ['android_webview_build==1 or android_webview_telemetry_build==1', { 1803 # When building the WebView in the Android tree, jarjar will remap all 1804 # the class names, so the JNI generator needs to know this. 1805 'jni_generator_jarjar_file': '../android_webview/build/jarjar-rules.txt', 1806 }], 1807 ['OS=="linux" and target_arch!="mipsel"', { 1808 # TODO(thakis): This is here to measure perf for a while. 1809 'clang%': 1, 1810 }], # OS=="mac" 1811 ['OS=="mac"', { 1812 'conditions': [ 1813 # All Chrome builds have breakpad symbols, but only process the 1814 # symbols from official builds. 1815 ['(branding=="Chrome" and buildtype=="Official")', { 1816 'mac_strip_release%': 1, 1817 }], 1818 ], 1819 }], # OS=="mac" 1820 ['OS=="mac" or OS=="ios"', { 1821 'clang%': 1, 1822 1823 'variables': { 1824 # Mac OS X SDK and deployment target support. The SDK identifies 1825 # the version of the system headers that will be used, and 1826 # corresponds to the MAC_OS_X_VERSION_MAX_ALLOWED compile-time 1827 # macro. "Maximum allowed" refers to the operating system version 1828 # whose APIs are available in the headers. The deployment target 1829 # identifies the minimum system version that the built products are 1830 # expected to function on. It corresponds to the 1831 # MAC_OS_X_VERSION_MIN_REQUIRED compile-time macro. To ensure these 1832 # macros are available, #include <AvailabilityMacros.h>. Additional 1833 # documentation on these macros is available at 1834 # http://developer.apple.com/mac/library/technotes/tn2002/tn2064.html#SECTION3 1835 # Chrome normally builds with the Mac OS X 10.6 SDK and sets the 1836 # deployment target to 10.6. Other projects, such as O3D, may 1837 # override these defaults. 1838 1839 # Normally, mac_sdk_min is used to find an SDK that Xcode knows 1840 # about that is at least the specified version. In official builds, 1841 # the SDK must match mac_sdk_min exactly. If the SDK is installed 1842 # someplace that Xcode doesn't know about, set mac_sdk_path to the 1843 # path to the SDK; when set to a non-empty string, SDK detection 1844 # based on mac_sdk_min will be bypassed entirely. 1845 'mac_sdk_min%': '10.6', 1846 'mac_sdk_path%': '', 1847 1848 'mac_deployment_target%': '10.6', 1849 }, 1850 1851 'mac_sdk_min': '<(mac_sdk_min)', 1852 'mac_sdk_path': '<(mac_sdk_path)', 1853 'mac_deployment_target': '<(mac_deployment_target)', 1854 1855 # Compile in Breakpad support by default so that it can be 1856 # tested, even if it is not enabled by default at runtime. 1857 'mac_breakpad_compiled_in%': 1, 1858 'conditions': [ 1859 # mac_product_name is set to the name of the .app bundle as it should 1860 # appear on disk. This duplicates data from 1861 # chrome/app/theme/chromium/BRANDING and 1862 # chrome/app/theme/google_chrome/BRANDING, but is necessary to get 1863 # these names into the build system. 1864 ['branding=="Chrome"', { 1865 'mac_product_name%': 'Google Chrome', 1866 }, { # else: branding!="Chrome" 1867 'mac_product_name%': 'Chromium', 1868 }], 1869 1870 ['branding=="Chrome" and buildtype=="Official"', { 1871 'mac_sdk%': '<!(python <(DEPTH)/build/mac/find_sdk.py --verify <(mac_sdk_min) --sdk_path=<(mac_sdk_path))', 1872 # Enable uploading crash dumps. 1873 'mac_breakpad_uploads%': 1, 1874 # Enable dumping symbols at build time for use by Mac Breakpad. 1875 'mac_breakpad%': 1, 1876 # Enable Keystone auto-update support. 1877 'mac_keystone%': 1, 1878 }, { # else: branding!="Chrome" or buildtype!="Official" 1879 'mac_sdk%': '<!(python <(DEPTH)/build/mac/find_sdk.py <(mac_sdk_min))', 1880 'mac_breakpad_uploads%': 0, 1881 'mac_breakpad%': 0, 1882 'mac_keystone%': 0, 1883 }], 1884 ], 1885 }], # OS=="mac" or OS=="ios" 1886 ['OS=="win"', { 1887 'conditions': [ 1888 # This is the architecture convention used in WinSDK paths. 1889 ['target_arch=="ia32"', { 1890 'winsdk_arch%': 'x86', 1891 },{ 1892 'winsdk_arch%': '<(target_arch)', 1893 }], 1894 ['component=="shared_library"', { 1895 'win_use_allocator_shim%': 0, 1896 },{ 1897 # Turn on multiple dll by default on Windows when in static_library. 1898 'chrome_multiple_dll%': 1, 1899 }], 1900 ['asan==1', { 1901 'win_use_allocator_shim%': 0, 1902 }], 1903 ['component=="shared_library" and "<(GENERATOR)"=="ninja"', { 1904 # Only enabled by default for ninja because it's buggy in VS. 1905 # Not enabled for component=static_library because some targets 1906 # are too large and the toolchain fails due to the size of the 1907 # .obj files. 1908 'incremental_chrome_dll%': 1, 1909 }], 1910 # Don't do incremental linking for large modules on 32-bit or when 1911 # component=static_library as the toolchain fails due to the size of 1912 # the .ilk files. 1913 ['MSVS_OS_BITS==32 or component=="static_library"', { 1914 'msvs_large_module_debug_link_mode%': '1', # No 1915 },{ 1916 'msvs_large_module_debug_link_mode%': '2', # Yes 1917 }], 1918 ['MSVS_VERSION=="2013e"', { 1919 'msvs_express%': 1, 1920 'secure_atl%': 0, 1921 },{ 1922 'msvs_express%': 0, 1923 'secure_atl%': 1, 1924 }], 1925 ], 1926 'nacl_win64_defines': [ 1927 # This flag is used to minimize dependencies when building 1928 # Native Client loader for 64-bit Windows. 1929 'NACL_WIN64', 1930 ], 1931 }], 1932 1933 ['os_posix==1 and chromeos==0 and OS!="android" and OS!="ios" and embedded==0', { 1934 'use_cups%': 1, 1935 }, { 1936 'use_cups%': 0, 1937 }], 1938 1939 ['enable_plugins==1 and (OS=="linux" or OS=="mac" or OS=="win")', { 1940 'enable_pepper_cdms%': 1, 1941 }, { 1942 'enable_pepper_cdms%': 0, 1943 }], 1944 1945 ['OS=="android"', { 1946 'enable_browser_cdms%': 1, 1947 }, { 1948 'enable_browser_cdms%': 0, 1949 }], 1950 1951 # Native Client glibc toolchain is enabled 1952 # by default except on arm and mips. 1953 ['target_arch=="arm" or target_arch=="mipsel"', { 1954 'disable_glibc%': 1, 1955 }, { 1956 'disable_glibc%': 0, 1957 }], 1958 1959 # Set the relative path from this file to the GYP file of the JPEG 1960 # library used by Chromium. 1961 ['use_system_libjpeg==1 or use_libjpeg_turbo==0', { 1962 # Configuration for using the system libjeg is here. 1963 'libjpeg_gyp_path': '../third_party/libjpeg/libjpeg.gyp', 1964 }, { 1965 'libjpeg_gyp_path': '../third_party/libjpeg_turbo/libjpeg.gyp', 1966 }], 1967 1968 # Options controlling the use of GConf (the classic GNOME configuration 1969 # system) and GIO, which contains GSettings (the new GNOME config system). 1970 ['chromeos==1 or embedded==1', { 1971 'use_gconf%': 0, 1972 'use_gio%': 0, 1973 }, { 1974 'use_gconf%': 1, 1975 'use_gio%': 1, 1976 }], 1977 1978 # Set up -D and -E flags passed into grit. 1979 ['branding=="Chrome"', { 1980 # TODO(mmoss) The .grd files look for _google_chrome, but for 1981 # consistency they should look for google_chrome_build like C++. 1982 'grit_defines': ['-D', '_google_chrome', 1983 '-E', 'CHROMIUM_BUILD=google_chrome'], 1984 }, { 1985 'grit_defines': ['-D', '_chromium', 1986 '-E', 'CHROMIUM_BUILD=chromium'], 1987 }], 1988 ['chromeos==1', { 1989 'grit_defines': ['-D', 'chromeos', '-D', 'scale_factors=2x'], 1990 }], 1991 ['desktop_linux==1', { 1992 'grit_defines': ['-D', 'desktop_linux'], 1993 }], 1994 ['toolkit_views==1', { 1995 'grit_defines': ['-D', 'toolkit_views'], 1996 }], 1997 ['use_aura==1', { 1998 'grit_defines': ['-D', 'use_aura'], 1999 }], 2000 ['use_ash==1', { 2001 'grit_defines': ['-D', 'use_ash'], 2002 }], 2003 ['use_nss==1', { 2004 'grit_defines': ['-D', 'use_nss'], 2005 }], 2006 ['use_ozone==1', { 2007 'grit_defines': ['-D', 'use_ozone'], 2008 }], 2009 ['image_loader_extension==1', { 2010 'grit_defines': ['-D', 'image_loader_extension'], 2011 }], 2012 ['remoting==1', { 2013 'grit_defines': ['-D', 'remoting'], 2014 }], 2015 ['use_titlecase_in_grd_files==1', { 2016 'grit_defines': ['-D', 'use_titlecase'], 2017 }], 2018 ['use_third_party_translations==1', { 2019 'grit_defines': ['-D', 'use_third_party_translations'], 2020 'locales': [ 2021 'ast', 'bs', 'ca@valencia', 'en-AU', 'eo', 'eu', 'gl', 'hy', 'ia', 2022 'ka', 'ku', 'kw', 'ms', 'ug' 2023 ], 2024 }], 2025 ['OS=="android"', { 2026 'grit_defines': ['-t', 'android', 2027 '-E', 'ANDROID_JAVA_TAGGED_ONLY=true'], 2028 }], 2029 ['OS=="mac" or OS=="ios"', { 2030 'grit_defines': ['-D', 'scale_factors=2x'], 2031 }], 2032 ['OS == "ios"', { 2033 'grit_defines': [ 2034 '-t', 'ios', 2035 # iOS uses a whitelist to filter resources. 2036 '-w', '<(DEPTH)/build/ios/grit_whitelist.txt' 2037 ], 2038 2039 # Enable host builds when generating with ninja-ios. 2040 'conditions': [ 2041 ['"<(GENERATOR)"=="ninja"', { 2042 'host_os%': "mac", 2043 }], 2044 2045 # TODO(sdefresne): Remove the target_subarch check once Apple has 2046 # upstreamed the support for "arm64". http://crbug.com/341453 2047 ['target_subarch!="arm32" or "<(GENERATOR)"=="xcode"', { 2048 'clang_xcode%': 1, 2049 }], 2050 ], 2051 }], 2052 ['enable_extensions==1', { 2053 'grit_defines': ['-D', 'enable_extensions'], 2054 }], 2055 ['enable_plugins!=0', { 2056 'grit_defines': ['-D', 'enable_plugins'], 2057 }], 2058 ['enable_printing!=0', { 2059 'grit_defines': ['-D', 'enable_printing'], 2060 }], 2061 ['enable_printing==1', { 2062 'grit_defines': ['-D', 'enable_full_printing'], 2063 }], 2064 ['enable_themes==1', { 2065 'grit_defines': ['-D', 'enable_themes'], 2066 }], 2067 ['enable_app_list==1', { 2068 'grit_defines': ['-D', 'enable_app_list'], 2069 }], 2070 ['enable_settings_app==1', { 2071 'grit_defines': ['-D', 'enable_settings_app'], 2072 }], 2073 ['enable_google_now==1', { 2074 'grit_defines': ['-D', 'enable_google_now'], 2075 }], 2076 ['use_concatenated_impulse_responses==1', { 2077 'grit_defines': ['-D', 'use_concatenated_impulse_responses'], 2078 }], 2079 ['enable_webrtc==1', { 2080 'grit_defines': ['-D', 'enable_webrtc'], 2081 }], 2082 ['enable_hangout_services_extension==1', { 2083 'grit_defines': ['-D', 'enable_hangout_services_extension'], 2084 }], 2085 ['enable_task_manager==1', { 2086 'grit_defines': ['-D', 'enable_task_manager'], 2087 }], 2088 ['notifications==1', { 2089 'grit_defines': ['-D', 'enable_notifications'], 2090 }], 2091 ['enable_wifi_bootstrapping==1', { 2092 'grit_defines': ['-D', 'enable_wifi_bootstrapping'], 2093 }], 2094 ['enable_resource_whitelist_generation==1 and OS!="win"', { 2095 'grit_rc_header_format': ['-h', '#define {textual_id} _Pragma("whitelisted_resource_{numeric_id}") {numeric_id}'], 2096 }], 2097 ['enable_resource_whitelist_generation==1 and OS=="win"', { 2098 'grit_rc_header_format': ['-h', '#define {textual_id} __pragma(message("whitelisted_resource_{numeric_id}")) {numeric_id}'], 2099 }], 2100 ['enable_mdns==1 or OS=="mac"', { 2101 'grit_defines': ['-D', 'enable_service_discovery'], 2102 'enable_service_discovery%': 1 2103 }], 2104 ['clang_use_chrome_plugins==1 and OS!="win"', { 2105 'clang_chrome_plugins_flags': [ 2106 '<!@(<(DEPTH)/tools/clang/scripts/plugin_flags.sh)' 2107 ], 2108 }], 2109 ['asan==1 or msan==1 or lsan==1 or tsan==1', { 2110 'clang%': 1, 2111 'use_allocator%': 'none', 2112 }], 2113 ['asan==1 and OS=="linux" and chromeos==0', { 2114 'use_custom_libcxx%': 1, 2115 }], 2116 ['ubsan==1', { 2117 'clang%': 1, 2118 }], 2119 ['ubsan_vptr==1', { 2120 'clang%': 1, 2121 }], 2122 ['asan==1 and OS=="mac"', { 2123 # TODO(glider): we do not strip ASan binaries until the dynamic ASan 2124 # runtime is fully adopted. See http://crbug.com/242503. 2125 'mac_strip_release': 0, 2126 }], 2127 ['tsan==1', { 2128 'use_custom_libcxx%': 1, 2129 }], 2130 ['msan==1', { 2131 # Use a just-built, MSan-instrumented libc++ instead of the system-wide 2132 # libstdc++. This is required to avoid false positive reports whenever 2133 # the C++ standard library is used. 2134 'use_custom_libcxx%': 1, 2135 # Running the V8-generated code on an ARM simulator is a powerful hack 2136 # that allows the tool to see the memory accesses from JITted code. 2137 # Without this flag, JS code causes false positive reports from MSan. 2138 'v8_target_arch': 'arm64', 2139 }], 2140 2141 ['OS=="linux" and clang_type_profiler==1', { 2142 'clang%': 1, 2143 'clang_use_chrome_plugins%': 0, 2144 'conditions': [ 2145 ['host_arch=="x64"', { 2146 'make_clang_dir%': 'third_party/llvm-allocated-type/Linux_x64', 2147 }], 2148 ['host_arch=="ia32"', { 2149 # 32-bit Clang is unsupported. It may not build. Put your 32-bit 2150 # Clang in this directory at your own risk if needed for some 2151 # purpose (e.g. to compare 32-bit and 64-bit behavior like memory 2152 # usage). Any failure by this compiler should not close the tree. 2153 'make_clang_dir%': 'third_party/llvm-allocated-type/Linux_ia32', 2154 }], 2155 ], 2156 }], 2157 2158 ['OS=="win"', { 2159 # The Clang plugins don't currently work on Windows. 2160 # TODO(hans): One day, this will work. (crbug.com/82385) 2161 'clang_use_chrome_plugins%': 0, 2162 }], 2163 2164 # On valgrind bots, override the optimizer settings so we don't inline too 2165 # much and make the stacks harder to figure out. 2166 # 2167 # TODO(rnk): Kill off variables that no one else uses and just implement 2168 # them under a build_for_tool== condition. 2169 ['build_for_tool=="memcheck" or build_for_tool=="tsan"', { 2170 # gcc flags 2171 'mac_debug_optimization': '1', 2172 'mac_release_optimization': '1', 2173 'release_optimize': '1', 2174 'no_gc_sections': 1, 2175 'debug_extra_cflags': '-g -fno-inline -fno-omit-frame-pointer ' 2176 '-fno-builtin -fno-optimize-sibling-calls', 2177 'release_extra_cflags': '-g -fno-inline -fno-omit-frame-pointer ' 2178 '-fno-builtin -fno-optimize-sibling-calls', 2179 2180 # MSVS flags for TSan on Pin and Windows. 2181 'win_debug_RuntimeChecks': '0', 2182 'win_debug_disable_iterator_debugging': '1', 2183 'win_debug_Optimization': '1', 2184 'win_debug_InlineFunctionExpansion': '0', 2185 'win_release_InlineFunctionExpansion': '0', 2186 'win_release_OmitFramePointers': '0', 2187 2188 'use_allocator': 'tcmalloc', 2189 'release_valgrind_build': 1, 2190 'werror': '', 2191 'component': 'static_library', 2192 'use_system_zlib': 0, 2193 }], 2194 2195 # Build tweaks for DrMemory. 2196 # TODO(rnk): Combine with tsan config to share the builder. 2197 # http://crbug.com/108155 2198 ['build_for_tool=="drmemory"', { 2199 # These runtime checks force initialization of stack vars which blocks 2200 # DrMemory's uninit detection. 2201 'win_debug_RuntimeChecks': '0', 2202 # Iterator debugging is slow. 2203 'win_debug_disable_iterator_debugging': '1', 2204 # Try to disable optimizations that mess up stacks in a release build. 2205 # DrM-i#1054 (http://code.google.com/p/drmemory/issues/detail?id=1054) 2206 # /O2 and /Ob0 (disable inline) cannot be used together because of a 2207 # compiler bug, so we use /Ob1 instead. 2208 'win_release_InlineFunctionExpansion': '1', 2209 'win_release_OmitFramePointers': '0', 2210 # Ditto for debug, to support bumping win_debug_Optimization. 2211 'win_debug_InlineFunctionExpansion': 0, 2212 'win_debug_OmitFramePointers': 0, 2213 # Keep the code under #ifndef NVALGRIND. 2214 'release_valgrind_build': 1, 2215 }], 2216 2217 # Enable RLZ on Win, Mac, iOS and ChromeOS. 2218 ['branding=="Chrome" and (OS=="win" or OS=="mac" or OS=="ios" or chromeos==1)', { 2219 'enable_rlz%': 1, 2220 }], 2221 2222 # Set default compiler flags depending on ARM version. 2223 ['arm_version==6 and android_webview_build==0', { 2224 'arm_arch%': 'armv6', 2225 'arm_tune%': '', 2226 'arm_fpu%': 'vfp', 2227 'arm_float_abi%': 'softfp', 2228 'arm_thumb%': 0, 2229 }], 2230 ['arm_version==7 and android_webview_build==0', { 2231 'arm_arch%': 'armv7-a', 2232 'arm_tune%': 'generic-armv7-a', 2233 'conditions': [ 2234 ['arm_neon==1', { 2235 'arm_fpu%': 'neon', 2236 }, { 2237 'arm_fpu%': 'vfpv3-d16', 2238 }], 2239 ], 2240 # Change the default to hard once the armhf transition is complete. 2241 'arm_float_abi%': 'softfp', 2242 'arm_thumb%': 1, 2243 }], 2244 2245 ['android_webview_build==1', { 2246 # The WebView build gets its cpu-specific flags from the Android build system. 2247 'arm_arch%': '', 2248 'arm_tune%': '', 2249 'arm_fpu%': '', 2250 'arm_float_abi%': '', 2251 'arm_thumb%': 0, 2252 }], 2253 2254 # Enable brlapi by default for chromeos. 2255 [ 'chromeos==1', { 2256 'use_brlapi%': 1, 2257 }], 2258 2259 ['use_ozone==1 and ozone_auto_platforms==1', { 2260 # Use test as the default platform. 2261 'ozone_platform%': 'test', 2262 2263 # Build all platforms whose deps are in install-build-deps.sh. 2264 # Only these platforms will be compile tested by buildbots. 2265 'ozone_platform_dri%': 1, 2266 'ozone_platform_test%': 1, 2267 'ozone_platform_egltest%': 1, 2268 }], 2269 2270 ['desktop_linux==1 and use_aura==1 and use_x11==1', { 2271 'use_clipboard_aurax11%': 1, 2272 }], 2273 2274 ['OS=="win" and use_goma==1', { 2275 # goma doesn't support pch yet. 2276 'chromium_win_pch': 0, 2277 # goma doesn't support PDB yet, so win_z7=1 or fastbuild=1. 2278 'conditions': [ 2279 ['win_z7==0', { 2280 'fastbuild': 1, 2281 }], 2282 ], 2283 }], 2284 2285 ['OS=="win" and (clang==1 or asan==1)', { 2286 'chromium_win_pch': 0, 2287 }], 2288 2289 ['host_clang==1', { 2290 'host_cc': '<(make_clang_dir)/bin/clang', 2291 'host_cxx': '<(make_clang_dir)/bin/clang++', 2292 }, { 2293 'host_cc': '<!(which gcc)', 2294 'host_cxx': '<!(which g++)', 2295 }], 2296 2297 # The seccomp-bpf sandbox is only supported on four architectures 2298 # currently. 2299 # Do not disable seccomp_bpf anywhere without talking to 2300 # security@chromium.org! 2301 ['((OS=="linux" or OS=="android") and ' 2302 '(target_arch=="ia32" or target_arch=="x64" or ' 2303 'target_arch=="arm" or target_arch=="mipsel"))', { 2304 'use_seccomp_bpf%': 1, 2305 }, { 2306 'use_seccomp_bpf%': 0, 2307 }], 2308 ], 2309 2310 # The path to the ANGLE library. 2311 'angle_path': '<(DEPTH)/third_party/angle', 2312 2313 # List of default apps to install in new profiles. The first list contains 2314 # the source files as found in svn. The second list, used only for linux, 2315 # contains the destination location for each of the files. When a crx 2316 # is added or removed from the list, the chrome/browser/resources/ 2317 # default_apps/external_extensions.json file must also be updated. 2318 'default_apps_list': [ 2319 'browser/resources/default_apps/external_extensions.json', 2320 'browser/resources/default_apps/gmail.crx', 2321 'browser/resources/default_apps/search.crx', 2322 'browser/resources/default_apps/youtube.crx', 2323 'browser/resources/default_apps/drive.crx', 2324 'browser/resources/default_apps/docs.crx', 2325 ], 2326 'default_apps_list_linux_dest': [ 2327 '<(PRODUCT_DIR)/default_apps/external_extensions.json', 2328 '<(PRODUCT_DIR)/default_apps/gmail.crx', 2329 '<(PRODUCT_DIR)/default_apps/search.crx', 2330 '<(PRODUCT_DIR)/default_apps/youtube.crx', 2331 '<(PRODUCT_DIR)/default_apps/drive.crx', 2332 '<(PRODUCT_DIR)/default_apps/docs.crx', 2333 ], 2334 }, 2335 'target_defaults': { 2336 'variables': { 2337 # The condition that operates on chromium_code is in a target_conditions 2338 # section, and will not have access to the default fallback value of 2339 # chromium_code at the top of this file, or to the chromium_code 2340 # variable placed at the root variables scope of .gyp files, because 2341 # those variables are not set at target scope. As a workaround, 2342 # if chromium_code is not set at target scope, define it in target scope 2343 # to contain whatever value it has during early variable expansion. 2344 # That's enough to make it available during target conditional 2345 # processing. 2346 'chromium_code%': '<(chromium_code)', 2347 2348 'component%': '<(component)', 2349 2350 'chromecast%': '<(chromecast)', 2351 2352 # See http://msdn.microsoft.com/en-us/library/aa652360(VS.71).aspx 2353 'win_release_Optimization%': '2', # 2 = /Os 2354 'win_debug_Optimization%': '0', # 0 = /Od 2355 2356 # See http://msdn.microsoft.com/en-us/library/2kxx5t2c(v=vs.80).aspx 2357 # Tri-state: blank is default, 1 on, 0 off 2358 'win_release_OmitFramePointers%': '0', 2359 # Tri-state: blank is default, 1 on, 0 off 2360 'win_debug_OmitFramePointers%': '', 2361 2362 # See http://msdn.microsoft.com/en-us/library/8wtf2dfz(VS.71).aspx 2363 'win_debug_RuntimeChecks%': '3', # 3 = all checks enabled, 0 = off 2364 2365 # See http://msdn.microsoft.com/en-us/library/47238hez(VS.71).aspx 2366 'win_debug_InlineFunctionExpansion%': '', # empty = default, 0 = off, 2367 'win_release_InlineFunctionExpansion%': '2', # 1 = only __inline, 2 = max 2368 2369 # VS inserts quite a lot of extra checks to algorithms like 2370 # std::partial_sort in Debug build which make them O(N^2) 2371 # instead of O(N*logN). This is particularly slow under memory 2372 # tools like ThreadSanitizer so we want it to be disablable. 2373 # See http://msdn.microsoft.com/en-us/library/aa985982(v=VS.80).aspx 2374 'win_debug_disable_iterator_debugging%': '0', 2375 2376 # An application manifest fragment to declare compatibility settings for 2377 # 'executable' targets. Ignored in other target type. 2378 'win_exe_compatibility_manifest%': 2379 '<(DEPTH)\\build\\win\\compatibility.manifest', 2380 2381 'release_extra_cflags%': '', 2382 'debug_extra_cflags%': '', 2383 2384 'release_valgrind_build%': '<(release_valgrind_build)', 2385 2386 # the non-qualified versions are widely assumed to be *nix-only 2387 'win_release_extra_cflags%': '', 2388 'win_debug_extra_cflags%': '', 2389 2390 # TODO(thakis): Make this a blacklist instead, http://crbug.com/101600 2391 'enable_wexit_time_destructors%': '<(enable_wexit_time_destructors)', 2392 2393 # Only used by Windows build for now. Can be used to build into a 2394 # differet output directory, e.g., a build_dir_prefix of VS2010_ would 2395 # output files in src/build/VS2010_{Debug,Release}. 2396 'build_dir_prefix%': '', 2397 2398 # Targets are by default not nacl untrusted code. 2399 'nacl_untrusted_build%': 0, 2400 2401 'pnacl_compile_flags': [ 2402 # pnacl uses the clang compiler so we need to suppress all the 2403 # same warnings as we do for clang. 2404 # TODO(sbc): Remove these if/when they are removed from the clang 2405 # build. 2406 '-Wno-unused-function', 2407 '-Wno-char-subscripts', 2408 '-Wno-c++11-extensions', 2409 '-Wno-unnamed-type-template-args', 2410 ], 2411 2412 'conditions': [ 2413 ['OS=="win" and component=="shared_library"', { 2414 # See http://msdn.microsoft.com/en-us/library/aa652367.aspx 2415 'win_release_RuntimeLibrary%': '2', # 2 = /MD (nondebug DLL) 2416 'win_debug_RuntimeLibrary%': '3', # 3 = /MDd (debug DLL) 2417 }, { 2418 # See http://msdn.microsoft.com/en-us/library/aa652367.aspx 2419 'win_release_RuntimeLibrary%': '0', # 0 = /MT (nondebug static) 2420 'win_debug_RuntimeLibrary%': '1', # 1 = /MTd (debug static) 2421 }], 2422 ['OS=="ios"', { 2423 # See http://gcc.gnu.org/onlinedocs/gcc-4.4.2/gcc/Optimize-Options.html 2424 'mac_release_optimization%': 's', # Use -Os unless overridden 2425 'mac_debug_optimization%': '0', # Use -O0 unless overridden 2426 }, { 2427 # See http://gcc.gnu.org/onlinedocs/gcc-4.4.2/gcc/Optimize-Options.html 2428 'mac_release_optimization%': '3', # Use -O3 unless overridden 2429 'mac_debug_optimization%': '0', # Use -O0 unless overridden 2430 }], 2431 ['OS=="android"', { 2432 'host_os%': '<(host_os)', # See comment above chromium_code. 2433 }], 2434 ], 2435 'clang_warning_flags': [ 2436 '-Wheader-hygiene', 2437 2438 # Don't die on dtoa code that uses a char as an array index. 2439 # This is required solely for base/third_party/dmg_fp/dtoa.cc. 2440 '-Wno-char-subscripts', 2441 2442 # TODO(thakis): This used to be implied by -Wno-unused-function, 2443 # which we no longer use. Check if it makes sense to remove 2444 # this as well. http://crbug.com/316352 2445 '-Wno-unneeded-internal-declaration', 2446 2447 # Warns on switches on enums that cover all enum values but 2448 # also contain a default: branch. Chrome is full of that. 2449 '-Wno-covered-switch-default', 2450 2451 # Warns when a const char[] is converted to bool. 2452 '-Wstring-conversion', 2453 2454 # C++11-related flags: 2455 2456 # This warns on using ints as initializers for floats in 2457 # initializer lists (e.g. |int a = f(); CGSize s = { a, a };|), 2458 # which happens in several places in chrome code. Not sure if 2459 # this is worth fixing. 2460 '-Wno-c++11-narrowing', 2461 2462 # Clang considers the `register` keyword as deprecated, but e.g. 2463 # code generated by flex (used in angle) contains that keyword. 2464 # http://crbug.com/255186 2465 '-Wno-deprecated-register', 2466 ], 2467 }, 2468 'includes': [ 'set_clang_warning_flags.gypi', ], 2469 'defines': [ 2470 # Don't use deprecated V8 APIs anywhere. 2471 'V8_DEPRECATION_WARNINGS', 2472 # Temporary suppression until Blink code can be removed. 2473 'BLINK_SCALE_FILTERS_AT_RECORD_TIME', 2474 ], 2475 'include_dirs': [ 2476 '<(SHARED_INTERMEDIATE_DIR)', 2477 ], 2478 'conditions': [ 2479 ['(OS=="mac" or OS=="ios") and asan==1', { 2480 'dependencies': [ 2481 '<(DEPTH)/build/mac/asan.gyp:asan_dynamic_runtime', 2482 ], 2483 }], 2484 ['OS=="linux" and use_allocator!="none" and clang_type_profiler==1', { 2485 'cflags_cc!': ['-fno-rtti'], 2486 'cflags_cc+': [ 2487 '-frtti', 2488 '-gline-tables-only', 2489 '-fintercept-allocation-functions', 2490 ], 2491 'defines': ['TYPE_PROFILING'], 2492 'dependencies': [ 2493 '<(DEPTH)/base/allocator/allocator.gyp:type_profiler', 2494 ], 2495 }], 2496 ['branding=="Chrome"', { 2497 'defines': ['GOOGLE_CHROME_BUILD'], 2498 }, { # else: branding!="Chrome" 2499 'defines': ['CHROMIUM_BUILD'], 2500 }], 2501 ['OS=="mac" and component=="shared_library"', { 2502 'xcode_settings': { 2503 'DYLIB_INSTALL_NAME_BASE': '@rpath', 2504 'LD_RUNPATH_SEARCH_PATHS': [ 2505 # For unbundled binaries. 2506 '@loader_path/.', 2507 # For bundled binaries, to get back from Binary.app/Contents/MacOS. 2508 '@loader_path/../../..', 2509 ], 2510 }, 2511 }], 2512 ['clang==1 and OS!="win"', { 2513 # This is here so that all files get recompiled after a clang roll and 2514 # when turning clang on or off. 2515 # (defines are passed via the command line, and build systems rebuild 2516 # things when their commandline changes). Nothing should ever read this 2517 # define. 2518 'defines': ['CR_CLANG_REVISION=<!(<(DEPTH)/tools/clang/scripts/update.sh --print-revision)'], 2519 }], 2520 ['enable_rlz==1', { 2521 'defines': ['ENABLE_RLZ'], 2522 }], 2523 ['component=="shared_library"', { 2524 'defines': ['COMPONENT_BUILD'], 2525 }], 2526 ['toolkit_views==1', { 2527 'defines': ['TOOLKIT_VIEWS=1'], 2528 }], 2529 ['ui_compositor_image_transport==1', { 2530 'defines': ['UI_COMPOSITOR_IMAGE_TRANSPORT'], 2531 }], 2532 ['use_aura==1', { 2533 'defines': ['USE_AURA=1'], 2534 }], 2535 ['use_ash==1', { 2536 'defines': ['USE_ASH=1'], 2537 }], 2538 ['use_pango==1', { 2539 'defines': ['USE_PANGO=1'], 2540 }], 2541 ['use_cairo==1', { 2542 'defines': ['USE_CAIRO=1'], 2543 }], 2544 ['use_cras==1', { 2545 'defines': ['USE_CRAS=1'], 2546 }], 2547 ['use_glib==1', { 2548 'defines': ['USE_GLIB=1'], 2549 }], 2550 ['use_ozone==1', { 2551 'defines': ['USE_OZONE=1'], 2552 }], 2553 ['use_default_render_theme==1', { 2554 'defines': ['USE_DEFAULT_RENDER_THEME=1'], 2555 }], 2556 ['use_libjpeg_turbo==1', { 2557 'defines': ['USE_LIBJPEG_TURBO=1'], 2558 }], 2559 ['use_x11==1', { 2560 'defines': ['USE_X11=1'], 2561 }], 2562 ['use_clipboard_aurax11==1', { 2563 'defines': ['USE_CLIPBOARD_AURAX11=1'], 2564 }], 2565 ['enable_one_click_signin==1', { 2566 'defines': ['ENABLE_ONE_CLICK_SIGNIN'], 2567 }], 2568 ['enable_pre_sync_backup==1', { 2569 'defines': ['ENABLE_PRE_SYNC_BACKUP'], 2570 }], 2571 ['use_xi2_mt!=0 and use_x11==1', { 2572 'defines': ['USE_XI2_MT=<(use_xi2_mt)'], 2573 }], 2574 ['image_loader_extension==1', { 2575 'defines': ['IMAGE_LOADER_EXTENSION=1'], 2576 }], 2577 ['profiling==1', { 2578 'defines': ['ENABLE_PROFILING=1'], 2579 }], 2580 ['remoting==1', { 2581 'defines': ['ENABLE_REMOTING=1'], 2582 }], 2583 ['enable_webrtc==1', { 2584 'defines': ['ENABLE_WEBRTC=1'], 2585 }], 2586 ['proprietary_codecs==1', { 2587 'defines': ['USE_PROPRIETARY_CODECS'], 2588 }], 2589 ['enable_viewport==1', { 2590 'defines': ['ENABLE_VIEWPORT'], 2591 }], 2592 ['enable_pepper_cdms==1', { 2593 'defines': ['ENABLE_PEPPER_CDMS'], 2594 }], 2595 ['enable_browser_cdms==1', { 2596 'defines': ['ENABLE_BROWSER_CDMS'], 2597 }], 2598 ['configuration_policy==1', { 2599 'defines': ['ENABLE_CONFIGURATION_POLICY'], 2600 }], 2601 ['notifications==1', { 2602 'defines': ['ENABLE_NOTIFICATIONS'], 2603 }], 2604 ['enable_hidpi==1', { 2605 'defines': ['ENABLE_HIDPI=1'], 2606 }], 2607 ['native_discardable_memory==1', { 2608 'defines': ['DISCARDABLE_MEMORY_ALWAYS_SUPPORTED_NATIVELY'], 2609 }], 2610 ['native_memory_pressure_signals==1', { 2611 'defines': ['SYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE'], 2612 }], 2613 ['use_udev==1', { 2614 'defines': ['USE_UDEV'], 2615 }], 2616 ['fastbuild!=0', { 2617 'xcode_settings': { 2618 'GCC_GENERATE_DEBUGGING_SYMBOLS': 'NO', 2619 }, 2620 'conditions': [ 2621 ['clang==1 and asan==0 and msan==0 and tsan==0 and ubsan_vptr==0', { 2622 # Clang creates chubby debug information, which makes linking very 2623 # slow. For now, don't create debug information with clang. See 2624 # http://crbug.com/70000 2625 'conditions': [ 2626 ['OS=="linux"', { 2627 'variables': { 2628 'debug_extra_cflags': '-g0', 2629 }, 2630 }], 2631 # Android builds symbols on release by default, disable them. 2632 ['OS=="android"', { 2633 'variables': { 2634 'debug_extra_cflags': '-g0', 2635 'release_extra_cflags': '-g0', 2636 }, 2637 }], 2638 ], 2639 }, { # else clang!=1 2640 'conditions': [ 2641 ['OS=="win" and fastbuild==2', { 2642 # Completely disable debug information. 2643 'msvs_settings': { 2644 'VCLinkerTool': { 2645 'GenerateDebugInformation': 'false', 2646 }, 2647 'VCCLCompilerTool': { 2648 'DebugInformationFormat': '0', 2649 }, 2650 }, 2651 }], 2652 ['OS=="win" and fastbuild==1', { 2653 'msvs_settings': { 2654 'VCLinkerTool': { 2655 # This tells the linker to generate .pdbs, so that 2656 # we can get meaningful stack traces. 2657 'GenerateDebugInformation': 'true', 2658 }, 2659 'VCCLCompilerTool': { 2660 # No debug info to be generated by compiler. 2661 'DebugInformationFormat': '0', 2662 }, 2663 }, 2664 }], 2665 ['OS=="linux" and fastbuild==2', { 2666 'variables': { 2667 'debug_extra_cflags': '-g0', 2668 }, 2669 }], 2670 ['OS=="linux" and fastbuild==1', { 2671 'variables': { 2672 'debug_extra_cflags': '-g1', 2673 }, 2674 }], 2675 ['OS=="android" and fastbuild==2', { 2676 'variables': { 2677 'debug_extra_cflags': '-g0', 2678 'release_extra_cflags': '-g0', 2679 }, 2680 }], 2681 ['OS=="android" and fastbuild==1', { 2682 'variables': { 2683 'debug_extra_cflags': '-g1', 2684 'release_extra_cflags': '-g1', 2685 }, 2686 }], 2687 ], 2688 }], # clang!=1 2689 ], 2690 }], # fastbuild!=0 2691 ['dont_embed_build_metadata==1', { 2692 'defines': [ 2693 'DONT_EMBED_BUILD_METADATA', 2694 ], 2695 }], # dont_embed_build_metadata==1 2696 ['dcheck_always_on!=0', { 2697 'defines': ['DCHECK_ALWAYS_ON=1'], 2698 }], # dcheck_always_on!=0 2699 ['tracing_like_official_build!=0', { 2700 'defines': ['TRACING_IS_OFFICIAL_BUILD=1'], 2701 }], # tracing_like_official_build!=0 2702 ['win_use_allocator_shim==0', { 2703 'conditions': [ 2704 ['OS=="win"', { 2705 'defines': ['NO_TCMALLOC'], 2706 }], 2707 ], 2708 }], 2709 ['enable_eglimage==1', { 2710 'defines': [ 2711 'ENABLE_EGLIMAGE=1', 2712 ], 2713 }], 2714 ['asan==1', { 2715 'defines': [ 2716 'ADDRESS_SANITIZER', 2717 'MEMORY_TOOL_REPLACES_ALLOCATOR', 2718 'MEMORY_SANITIZER_INITIAL_SIZE', 2719 ], 2720 }], 2721 ['syzyasan==1', { 2722 # SyzyAsan needs /PROFILE turned on to produce appropriate pdbs. 2723 'msvs_settings': { 2724 'VCLinkerTool': { 2725 'Profile': 'true', 2726 }, 2727 }, 2728 'defines': [ 2729 'SYZYASAN', 2730 'MEMORY_TOOL_REPLACES_ALLOCATOR', 2731 'MEMORY_SANITIZER_INITIAL_SIZE', 2732 ], 2733 }], 2734 ['OS=="win"', { 2735 'defines': [ 2736 '__STD_C', 2737 '_CRT_SECURE_NO_DEPRECATE', 2738 '_SCL_SECURE_NO_DEPRECATE', 2739 # This define is required to pull in the new Win8 interfaces from 2740 # system headers like ShObjIdl.h. 2741 'NTDDI_VERSION=0x06020000', 2742 # This is required for ATL to use XP-safe versions of its functions. 2743 '_USING_V110_SDK71_', 2744 ], 2745 'include_dirs': [ 2746 '<(DEPTH)/third_party/wtl/include', 2747 ], 2748 'conditions': [ 2749 ['win_z7!=0', { 2750 'msvs_settings': { 2751 # Generates debug info when win_z7=1 2752 # even if fastbuild=1 (that makes GenerateDebugInformation false). 2753 'VCLinkerTool': { 2754 'GenerateDebugInformation': 'true', 2755 }, 2756 'VCCLCompilerTool': { 2757 'DebugInformationFormat': '1', 2758 } 2759 } 2760 }], 2761 ], # win_z7!=0 2762 }], # OS==win 2763 ['chromecast==1', { 2764 'defines': [ 2765 'LOG_DISABLED=0', 2766 ], 2767 'conditions': [ 2768 ['target_arch=="arm"', { 2769 'defines': [ 2770 # TODO(lcwu): Work around an error when building Chromium 2771 # with gcc-4.5.3 (e.g. v8/src/platform-linux.cc). Remove 2772 # this define once the toolchain is updated. 2773 # See crbug.com/388933. 2774 '__SOFTFP', 2775 ], 2776 }], 2777 ], 2778 }], 2779 ['enable_task_manager==1', { 2780 'defines': [ 2781 'ENABLE_TASK_MANAGER=1', 2782 ], 2783 }], 2784 ['enable_extensions==1', { 2785 'defines': [ 2786 'ENABLE_EXTENSIONS=1', 2787 ], 2788 }], 2789 ['OS=="win" and branding=="Chrome"', { 2790 'defines': ['ENABLE_SWIFTSHADER'], 2791 }], 2792 ['enable_dart==1', { 2793 'defines': ['WEBKIT_USING_DART=1'], 2794 }], 2795 ['enable_plugin_installation==1', { 2796 'defines': ['ENABLE_PLUGIN_INSTALLATION=1'], 2797 }], 2798 ['enable_plugins==1', { 2799 'defines': ['ENABLE_PLUGINS=1'], 2800 }], 2801 ['enable_session_service==1', { 2802 'defines': ['ENABLE_SESSION_SERVICE=1'], 2803 }], 2804 ['enable_themes==1', { 2805 'defines': ['ENABLE_THEMES=1'], 2806 }], 2807 ['enable_autofill_dialog==1', { 2808 'defines': ['ENABLE_AUTOFILL_DIALOG=1'], 2809 }], 2810 ['enable_prod_wallet_service==1', { 2811 'defines': ['ENABLE_PROD_WALLET_SERVICE=1'], 2812 }], 2813 ['enable_background==1', { 2814 'defines': ['ENABLE_BACKGROUND=1'], 2815 }], 2816 ['enable_google_now==1', { 2817 'defines': ['ENABLE_GOOGLE_NOW=1'], 2818 }], 2819 ['cld_version!=0', { 2820 'defines': ['CLD_VERSION=<(cld_version)'], 2821 }], 2822 ['cld_version==2', { 2823 # This is used to populate the "CLD Data Source" field in: 2824 # chrome://translate-internals 2825 'defines': ['CLD2_DATA_SOURCE=<(cld2_data_source)'], 2826 }], 2827 ['enable_printing==1', { 2828 'defines': ['ENABLE_FULL_PRINTING=1', 'ENABLE_PRINTING=1'], 2829 }], 2830 ['enable_printing==2', { 2831 'defines': ['ENABLE_PRINTING=1'], 2832 }], 2833 ['OS=="win" and win_pdf_metafile_for_printing==1', { 2834 'defines': ['WIN_PDF_METAFILE_FOR_PRINTING=1'], 2835 }], 2836 ['enable_spellcheck==1', { 2837 'defines': ['ENABLE_SPELLCHECK=1'], 2838 }], 2839 ['enable_captive_portal_detection==1', { 2840 'defines': ['ENABLE_CAPTIVE_PORTAL_DETECTION=1'], 2841 }], 2842 ['enable_app_list==1', { 2843 'defines': ['ENABLE_APP_LIST=1'], 2844 }], 2845 ['enable_settings_app==1', { 2846 'defines': ['ENABLE_SETTINGS_APP=1'], 2847 }], 2848 ['disable_file_support==1', { 2849 'defines': ['DISABLE_FILE_SUPPORT=1'], 2850 }], 2851 ['disable_ftp_support==1', { 2852 'defines': ['DISABLE_FTP_SUPPORT=1'], 2853 }], 2854 ['use_icu_alternatives_on_android==1', { 2855 'defines': ['USE_ICU_ALTERNATIVES_ON_ANDROID=1'], 2856 }], 2857 ['enable_managed_users==1', { 2858 'defines': ['ENABLE_MANAGED_USERS=1'], 2859 }], 2860 ['data_reduction_fallback_host != ""', { 2861 'defines': [ 2862 'DATA_REDUCTION_FALLBACK_HOST="<(data_reduction_fallback_host)"'], 2863 }], 2864 ['data_reduction_dev_host != ""', { 2865 'defines': [ 2866 'DATA_REDUCTION_DEV_HOST="<(data_reduction_dev_host)"'], 2867 }], 2868 ['spdy_proxy_auth_origin != ""', { 2869 'defines': ['SPDY_PROXY_AUTH_ORIGIN="<(spdy_proxy_auth_origin)"'], 2870 }], 2871 ['spdy_proxy_auth_property != ""', { 2872 'defines': ['SPDY_PROXY_AUTH_PROPERTY="<(spdy_proxy_auth_property)"'], 2873 }], 2874 ['spdy_proxy_auth_value != ""', { 2875 'defines': ['SPDY_PROXY_AUTH_VALUE="<(spdy_proxy_auth_value)"'], 2876 }], 2877 ['data_reduction_proxy_probe_url != ""', { 2878 'defines': [ 2879 'DATA_REDUCTION_PROXY_PROBE_URL="<(data_reduction_proxy_probe_url)"'], 2880 }], 2881 ['data_reduction_proxy_warmup_url != ""', { 2882 'defines': [ 2883 'DATA_REDUCTION_PROXY_WARMUP_URL="<(data_reduction_proxy_warmup_url)"'], 2884 }], 2885 ['data_reduction_proxy_ssl_origin != ""', { 2886 'defines': [ 2887 'DATA_REDUCTION_PROXY_SSL_ORIGIN="<(data_reduction_proxy_ssl_origin)"'], 2888 }], 2889 ['data_reduction_proxy_alt_origin != ""', { 2890 'defines': [ 2891 'DATA_REDUCTION_PROXY_ALT_ORIGIN="<(data_reduction_proxy_alt_origin)"'], 2892 }], 2893 ['data_reduction_proxy_alt_fallback_origin != ""', { 2894 'defines': [ 2895 'DATA_REDUCTION_PROXY_ALT_FALLBACK_ORIGIN="<(data_reduction_proxy_alt_fallback_origin)"'], 2896 }], 2897 ['enable_mdns==1', { 2898 'defines': ['ENABLE_MDNS=1'], 2899 }], 2900 ['enable_service_discovery==1', { 2901 'defines' : [ 'ENABLE_SERVICE_DISCOVERY=1' ], 2902 }], 2903 ['enable_wifi_bootstrapping==1', { 2904 'defines' : [ 'ENABLE_WIFI_BOOTSTRAPPING=1' ], 2905 }], 2906 ['enable_hangout_services_extension==1', { 2907 'defines': ['ENABLE_HANGOUT_SERVICES_EXTENSION=1'], 2908 }], 2909 ['enable_ipc_fuzzer==1', { 2910 'defines': ['ENABLE_IPC_FUZZER=1'], 2911 }], 2912 ['video_hole==1', { 2913 'defines': ['VIDEO_HOLE=1'], 2914 }], 2915 ], # conditions for 'target_defaults' 2916 'target_conditions': [ 2917 ['<(use_openssl)==1', { 2918 'defines': ['USE_OPENSSL=1'], 2919 }], 2920 ['<(use_openssl_certs)==1', { 2921 'defines': ['USE_OPENSSL_CERTS=1'], 2922 }], 2923 ['>(nacl_untrusted_build)==1', { 2924 'defines': [ 2925 'USE_OPENSSL=1', 2926 'USE_OPENSSL_CERTS=1', 2927 ], 2928 }], 2929 ['<(use_nss)==1 and >(nacl_untrusted_build)==0', { 2930 'defines': ['USE_NSS=1'], 2931 }], 2932 ['<(chromeos)==1 and >(nacl_untrusted_build)==0', { 2933 'defines': ['OS_CHROMEOS=1'], 2934 }], 2935 ['enable_wexit_time_destructors==1', { 2936 'variables': { 'clang_warning_flags': ['-Wexit-time-destructors']}, 2937 }], 2938 ['chromium_code==0', { 2939 'conditions': [ 2940 [ 'os_posix==1 and OS!="mac" and OS!="ios"', { 2941 # We don't want to get warnings from third-party code, 2942 # so remove any existing warning-enabling flags like -Wall. 2943 'cflags!': [ 2944 '-Wall', 2945 '-Wextra', 2946 ], 2947 'cflags_cc': [ 2948 # Don't warn about hash_map in third-party code. 2949 '-Wno-deprecated', 2950 ], 2951 'cflags': [ 2952 # Don't warn about printf format problems. 2953 # This is off by default in gcc but on in Ubuntu's gcc(!). 2954 '-Wno-format', 2955 ], 2956 'cflags_cc!': [ 2957 # Necessary because llvm.org/PR10448 is WONTFIX (crbug.com/90453). 2958 '-Wsign-compare', 2959 ] 2960 }], 2961 # TODO: Fix all warnings on chromeos too. 2962 [ 'os_posix==1 and OS!="mac" and OS!="ios" and (clang!=1 or chromeos==1)', { 2963 'cflags!': [ 2964 '-Werror', 2965 ], 2966 }], 2967 [ 'os_posix==1 and os_bsd!=1 and OS!="mac" and OS!="android"', { 2968 'cflags': [ 2969 # Don't warn about ignoring the return value from e.g. close(). 2970 # This is off by default in some gccs but on by default in others. 2971 # BSD systems do not support this option, since they are usually 2972 # using gcc 4.2.1, which does not have this flag yet. 2973 '-Wno-unused-result', 2974 ], 2975 }], 2976 [ 'OS=="win"', { 2977 'defines': [ 2978 '_CRT_SECURE_NO_DEPRECATE', 2979 '_CRT_NONSTDC_NO_WARNINGS', 2980 '_CRT_NONSTDC_NO_DEPRECATE', 2981 '_SCL_SECURE_NO_DEPRECATE', 2982 ], 2983 'msvs_disabled_warnings': [4800], 2984 'msvs_settings': { 2985 'VCCLCompilerTool': { 2986 'WarningLevel': '3', 2987 'WarnAsError': 'true', 2988 'Detect64BitPortabilityProblems': 'false', 2989 }, 2990 }, 2991 'conditions': [ 2992 ['buildtype=="Official"', { 2993 'msvs_settings': { 2994 'VCCLCompilerTool': { 'WarnAsError': 'false' }, 2995 } 2996 }], 2997 ['clang==1', { 2998 'msvs_settings': { 2999 'VCCLCompilerTool': { 'WarnAsError': 'false' }, 3000 } 3001 }], 3002 ], 3003 }], 3004 # TODO(darin): Unfortunately, some third_party code depends on base. 3005 [ 'OS=="win" and component=="shared_library"', { 3006 'msvs_disabled_warnings': [ 3007 4251, # class 'std::xx' needs to have dll-interface. 3008 ], 3009 }], 3010 [ 'OS=="mac" or OS=="ios"', { 3011 'xcode_settings': { 3012 'WARNING_CFLAGS!': ['-Wall', '-Wextra'], 3013 }, 3014 'conditions': [ 3015 ['buildtype=="Official"', { 3016 'xcode_settings': { 3017 'GCC_TREAT_WARNINGS_AS_ERRORS': 'NO', # -Werror 3018 }, 3019 }], 3020 ], 3021 }], 3022 [ 'OS=="ios"', { 3023 'xcode_settings': { 3024 # TODO(ios): Fix remaining warnings in third-party code, then 3025 # remove this; the Mac cleanup didn't get everything that's 3026 # flagged in an iOS build. 3027 'GCC_TREAT_WARNINGS_AS_ERRORS': 'NO', 3028 'RUN_CLANG_STATIC_ANALYZER': 'NO', 3029 # Several internal ios directories generate numerous warnings for 3030 # -Wobjc-missing-property-synthesis. 3031 'CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS': 'NO', 3032 }, 3033 }], 3034 ], 3035 }, { 3036 'includes': [ 3037 # Rules for excluding e.g. foo_win.cc from the build on non-Windows. 3038 'filename_rules.gypi', 3039 ], 3040 # In Chromium code, we define __STDC_foo_MACROS in order to get the 3041 # C99 macros on Mac and Linux. 3042 'defines': [ 3043 '__STDC_CONSTANT_MACROS', 3044 '__STDC_FORMAT_MACROS', 3045 ], 3046 'conditions': [ 3047 ['OS=="win"', { 3048 # turn on warnings for signed/unsigned mismatch on chromium code. 3049 'msvs_settings': { 3050 'VCCLCompilerTool': { 3051 'AdditionalOptions': ['/we4389'], 3052 }, 3053 }, 3054 }], 3055 ['OS=="win" and component=="shared_library"', { 3056 'msvs_disabled_warnings': [ 3057 4251, # class 'std::xx' needs to have dll-interface. 3058 ], 3059 }], 3060 ], 3061 }], 3062 ], # target_conditions for 'target_defaults' 3063 'default_configuration': 'Debug', 3064 'configurations': { 3065 # VCLinkerTool LinkIncremental values below: 3066 # 0 == default 3067 # 1 == /INCREMENTAL:NO 3068 # 2 == /INCREMENTAL 3069 # Debug links incremental, Release does not. 3070 # 3071 # Abstract base configurations to cover common attributes. 3072 # 3073 'Common_Base': { 3074 'abstract': 1, 3075 'msvs_configuration_attributes': { 3076 'OutputDirectory': '<(DEPTH)\\build\\<(build_dir_prefix)$(ConfigurationName)', 3077 'IntermediateDirectory': '$(OutDir)\\obj\\$(ProjectName)', 3078 'CharacterSet': '1', 3079 }, 3080 # Add the default import libs. 3081 'msvs_settings':{ 3082 'VCLinkerTool': { 3083 'AdditionalDependencies': [ 3084 'kernel32.lib', 3085 'gdi32.lib', 3086 'winspool.lib', 3087 'comdlg32.lib', 3088 'advapi32.lib', 3089 'shell32.lib', 3090 'ole32.lib', 3091 'oleaut32.lib', 3092 'user32.lib', 3093 'uuid.lib', 3094 'odbc32.lib', 3095 'odbccp32.lib', 3096 'delayimp.lib', 3097 'credui.lib', 3098 'netapi32.lib', 3099 ], 3100 }, 3101 }, 3102 }, 3103 'x86_Base': { 3104 'abstract': 1, 3105 'msvs_settings': { 3106 'VCLinkerTool': { 3107 'MinimumRequiredVersion': '5.01', # XP. 3108 'TargetMachine': '1', 3109 }, 3110 'VCLibrarianTool': { 3111 'TargetMachine': '1', 3112 }, 3113 }, 3114 'msvs_configuration_platform': 'Win32', 3115 }, 3116 'x64_Base': { 3117 'abstract': 1, 3118 'msvs_configuration_platform': 'x64', 3119 'msvs_settings': { 3120 'VCLinkerTool': { 3121 # Make sure to understand http://crbug.com/361720 if you want to 3122 # increase this. 3123 'MinimumRequiredVersion': '5.02', # Server 2003. 3124 'TargetMachine': '17', # x86 - 64 3125 'AdditionalLibraryDirectories!': 3126 ['<(windows_sdk_path)/Lib/win8/um/x86'], 3127 'AdditionalLibraryDirectories': 3128 ['<(windows_sdk_path)/Lib/win8/um/x64'], 3129 # Doesn't exist x64 SDK. Should use oleaut32 in any case. 3130 'IgnoreDefaultLibraryNames': [ 'olepro32.lib' ], 3131 }, 3132 'VCLibrarianTool': { 3133 'AdditionalLibraryDirectories!': 3134 ['<(windows_sdk_path)/Lib/win8/um/x86'], 3135 'AdditionalLibraryDirectories': 3136 ['<(windows_sdk_path)/Lib/win8/um/x64'], 3137 'TargetMachine': '17', # x64 3138 }, 3139 }, 3140 }, 3141 'Debug_Base': { 3142 'abstract': 1, 3143 'defines': [ 3144 'DYNAMIC_ANNOTATIONS_ENABLED=1', 3145 'WTF_USE_DYNAMIC_ANNOTATIONS=1', 3146 ], 3147 'xcode_settings': { 3148 'GCC_OPTIMIZATION_LEVEL': '<(mac_debug_optimization)', 3149 'OTHER_CFLAGS': [ 3150 '<@(debug_extra_cflags)', 3151 ], 3152 }, 3153 'msvs_settings': { 3154 'VCCLCompilerTool': { 3155 'Optimization': '<(win_debug_Optimization)', 3156 'PreprocessorDefinitions': ['_DEBUG'], 3157 'BasicRuntimeChecks': '<(win_debug_RuntimeChecks)', 3158 'RuntimeLibrary': '<(win_debug_RuntimeLibrary)', 3159 'conditions': [ 3160 # According to MSVS, InlineFunctionExpansion=0 means 3161 # "default inlining", not "/Ob0". 3162 # Thus, we have to handle InlineFunctionExpansion==0 separately. 3163 ['win_debug_InlineFunctionExpansion==0', { 3164 'AdditionalOptions': ['/Ob0'], 3165 }], 3166 ['win_debug_InlineFunctionExpansion!=""', { 3167 'InlineFunctionExpansion': 3168 '<(win_debug_InlineFunctionExpansion)', 3169 }], 3170 ['win_debug_disable_iterator_debugging==1', { 3171 'PreprocessorDefinitions': ['_HAS_ITERATOR_DEBUGGING=0'], 3172 }], 3173 3174 # if win_debug_OmitFramePointers is blank, leave as default 3175 ['win_debug_OmitFramePointers==1', { 3176 'OmitFramePointers': 'true', 3177 }], 3178 ['win_debug_OmitFramePointers==0', { 3179 'OmitFramePointers': 'false', 3180 # The above is not sufficient (http://crbug.com/106711): it 3181 # simply eliminates an explicit "/Oy", but both /O2 and /Ox 3182 # perform FPO regardless, so we must explicitly disable. 3183 # We still want the false setting above to avoid having 3184 # "/Oy /Oy-" and warnings about overriding. 3185 'AdditionalOptions': ['/Oy-'], 3186 }], 3187 ], 3188 'AdditionalOptions': [ '<@(win_debug_extra_cflags)', ], 3189 }, 3190 'VCLinkerTool': { 3191 'LinkIncremental': '<(msvs_debug_link_incremental)', 3192 # ASLR makes debugging with windbg difficult because Chrome.exe and 3193 # Chrome.dll share the same base name. As result, windbg will 3194 # name the Chrome.dll module like chrome_<base address>, where 3195 # <base address> typically changes with each launch. This in turn 3196 # means that breakpoints in Chrome.dll don't stick from one launch 3197 # to the next. For this reason, we turn ASLR off in debug builds. 3198 # Note that this is a three-way bool, where 0 means to pick up 3199 # the default setting, 1 is off and 2 is on. 3200 'RandomizedBaseAddress': 1, 3201 }, 3202 'VCResourceCompilerTool': { 3203 'PreprocessorDefinitions': ['_DEBUG'], 3204 }, 3205 }, 3206 'conditions': [ 3207 ['OS=="linux" or OS=="android"', { 3208 'target_conditions': [ 3209 ['_toolset=="target"', { 3210 'cflags': [ 3211 '<@(debug_extra_cflags)', 3212 ], 3213 }], 3214 ], 3215 }], 3216 ['OS=="linux" and target_arch!="ia32" and disable_glibcxx_debug==0', { 3217 # Enable libstdc++ debugging facilities to help catch problems 3218 # early, see http://crbug.com/65151 . 3219 # TODO(phajdan.jr): Should we enable this for all of POSIX? 3220 'defines': ['_GLIBCXX_DEBUG=1',], 3221 }], 3222 ['release_valgrind_build==0', { 3223 'xcode_settings': { 3224 'OTHER_CFLAGS': [ 3225 '-fstack-protector-all', # Implies -fstack-protector 3226 ], 3227 }, 3228 }], 3229 ], 3230 }, 3231 'Release_Base': { 3232 'abstract': 1, 3233 'defines': [ 3234 'NDEBUG', 3235 ], 3236 'xcode_settings': { 3237 'DEAD_CODE_STRIPPING': 'YES', # -Wl,-dead_strip 3238 'GCC_OPTIMIZATION_LEVEL': '<(mac_release_optimization)', 3239 'OTHER_CFLAGS': [ '<@(release_extra_cflags)', ], 3240 }, 3241 'msvs_settings': { 3242 'VCCLCompilerTool': { 3243 'RuntimeLibrary': '<(win_release_RuntimeLibrary)', 3244 'conditions': [ 3245 # In official builds, each target will self-select 3246 # an optimization level. 3247 ['buildtype!="Official"', { 3248 'Optimization': '<(win_release_Optimization)', 3249 }, 3250 ], 3251 # According to MSVS, InlineFunctionExpansion=0 means 3252 # "default inlining", not "/Ob0". 3253 # Thus, we have to handle InlineFunctionExpansion==0 separately. 3254 ['win_release_InlineFunctionExpansion==0', { 3255 'AdditionalOptions': ['/Ob0'], 3256 }], 3257 ['win_release_InlineFunctionExpansion!=""', { 3258 'InlineFunctionExpansion': 3259 '<(win_release_InlineFunctionExpansion)', 3260 }], 3261 3262 # if win_release_OmitFramePointers is blank, leave as default 3263 ['win_release_OmitFramePointers==1', { 3264 'OmitFramePointers': 'true', 3265 }], 3266 ['win_release_OmitFramePointers==0', { 3267 'OmitFramePointers': 'false', 3268 # The above is not sufficient (http://crbug.com/106711): it 3269 # simply eliminates an explicit "/Oy", but both /O2 and /Ox 3270 # perform FPO regardless, so we must explicitly disable. 3271 # We still want the false setting above to avoid having 3272 # "/Oy /Oy-" and warnings about overriding. 3273 'AdditionalOptions': ['/Oy-'], 3274 }], 3275 ], 3276 'AdditionalOptions': [ 3277 '/d2Zi+', # Improve debugging of Release builds. 3278 '<@(win_release_extra_cflags)', 3279 ], 3280 }, 3281 'VCLinkerTool': { 3282 # LinkIncremental is a tri-state boolean, where 0 means default 3283 # (i.e., inherit from parent solution), 1 means false, and 3284 # 2 means true. 3285 'LinkIncremental': '1', 3286 # This corresponds to the /PROFILE flag which ensures the PDB 3287 # file contains FIXUP information (growing the PDB file by about 3288 # 5%) but does not otherwise alter the output binary. This 3289 # information is used by the Syzygy optimization tool when 3290 # decomposing the release image. 3291 'Profile': 'true', 3292 }, 3293 }, 3294 'conditions': [ 3295 ['msvs_use_common_release', { 3296 'includes': ['release.gypi'], 3297 }], 3298 ['release_valgrind_build==0 and tsan==0', { 3299 'defines': [ 3300 'NVALGRIND', 3301 'DYNAMIC_ANNOTATIONS_ENABLED=0', 3302 ], 3303 }, { 3304 'defines': [ 3305 'MEMORY_TOOL_REPLACES_ALLOCATOR', 3306 'MEMORY_SANITIZER_INITIAL_SIZE', 3307 'DYNAMIC_ANNOTATIONS_ENABLED=1', 3308 'WTF_USE_DYNAMIC_ANNOTATIONS=1', 3309 ], 3310 }], 3311 ['win_use_allocator_shim==0', { 3312 'defines': ['NO_TCMALLOC'], 3313 }], 3314 # _FORTIFY_SOURCE isn't really supported by Clang now, see 3315 # http://llvm.org/bugs/show_bug.cgi?id=16821. 3316 # It seems to work fine with Ubuntu 12 headers though, so use it 3317 # in official builds. 3318 ['os_posix==1 and (asan!=1 and msan!=1 and tsan!=1 and lsan!=1 and ubsan!=1) and (OS!="linux" or clang!=1 or buildtype=="Official")', { 3319 'target_conditions': [ 3320 ['chromium_code==1', { 3321 # Non-chromium code is not guaranteed to compile cleanly 3322 # with _FORTIFY_SOURCE. Also, fortified build may fail 3323 # when optimizations are disabled, so only do that for Release 3324 # build. 3325 'defines': [ 3326 '_FORTIFY_SOURCE=2', 3327 ], 3328 }], 3329 ], 3330 }], 3331 ['OS=="linux" or OS=="android"', { 3332 'target_conditions': [ 3333 ['_toolset=="target"', { 3334 'cflags': [ 3335 '<@(release_extra_cflags)', 3336 ], 3337 'conditions': [ 3338 ['enable_resource_whitelist_generation==1', { 3339 'cflags': [ 3340 '-Wunknown-pragmas -Wno-error=unknown-pragmas', 3341 ], 3342 }], 3343 ], 3344 }], 3345 ], 3346 }], 3347 ['OS=="ios"', { 3348 'defines': [ 3349 'NS_BLOCK_ASSERTIONS=1', 3350 ], 3351 }], 3352 ], 3353 }, 3354 # 3355 # Concrete configurations 3356 # 3357 'Debug': { 3358 'inherit_from': ['Common_Base', 'x86_Base', 'Debug_Base'], 3359 }, 3360 'Release': { 3361 'inherit_from': ['Common_Base', 'x86_Base', 'Release_Base'], 3362 }, 3363 'conditions': [ 3364 [ 'OS=="ios"', { 3365 'Profile': { 3366 'inherit_from': ['Common_Base', 'x86_Base', 'Release_Base'], 3367 'target_conditions': [ 3368 [ '_type=="executable"', { 3369 # To get a real .dSYM bundle produced by dsymutil, set the 3370 # debug information format to dwarf-with-dsym. Since 3371 # strip_from_xcode will not be used, set Xcode to do the 3372 # stripping as well. 3373 'xcode_settings': { 3374 'DEBUG_INFORMATION_FORMAT': 'dwarf-with-dsym', 3375 'DEPLOYMENT_POSTPROCESSING': 'YES', 3376 'STRIP_INSTALLED_PRODUCT': 'YES', 3377 }, 3378 }], 3379 ], 3380 }, 3381 }], 3382 [ 'OS=="win"', { 3383 # TODO(bradnelson): add a gyp mechanism to make this more graceful. 3384 'Debug_x64': { 3385 'inherit_from': ['Common_Base', 'x64_Base', 'Debug_Base'], 3386 }, 3387 'Release_x64': { 3388 'inherit_from': ['Common_Base', 'x64_Base', 'Release_Base'], 3389 }, 3390 }], 3391 ], 3392 }, 3393 }, 3394 'conditions': [ 3395 ['os_posix==1', { 3396 'target_defaults': { 3397 'ldflags': [ 3398 '-Wl,-z,now', 3399 '-Wl,-z,relro', 3400 ], 3401 }, 3402 }], 3403 # TODO(jochen): Enable this on chromeos on arm. http://crbug.com/356580 3404 ['os_posix==1 and disable_fatal_linker_warnings==0 and use_evdev_gestures==0 and (chromeos==0 or target_arch!="arm")', { 3405 'target_defaults': { 3406 'ldflags': [ 3407 '-Wl,--fatal-warnings', 3408 ], 3409 }, 3410 }], 3411 ['os_posix==1 and chromeos==0', { 3412 # Chrome OS enables -fstack-protector-strong via its build wrapper, 3413 # and we want to avoid overriding this, so stack-protector is only 3414 # enabled when not building on Chrome OS. 3415 # TODO(phajdan.jr): Use -fstack-protector-strong when our gcc 3416 # supports it. 3417 'target_defaults': { 3418 'cflags': [ 3419 '-fstack-protector', 3420 '--param=ssp-buffer-size=4', 3421 ], 3422 }, 3423 }], 3424 ['os_posix==1 and OS!="mac" and OS!="ios"', { 3425 'target_defaults': { 3426 # Enable -Werror by default, but put it in a variable so it can 3427 # be disabled in ~/.gyp/include.gypi on the valgrind builders. 3428 'variables': { 3429 'werror%': '-Werror', 3430 'libraries_for_target%': '', 3431 }, 3432 'defines': [ 3433 '_FILE_OFFSET_BITS=64', 3434 ], 3435 'cflags': [ 3436 '<(werror)', # See note above about the werror variable. 3437 '-pthread', 3438 '-fno-exceptions', 3439 '-fno-strict-aliasing', # See http://crbug.com/32204 3440 '-Wall', 3441 # TODO(evan): turn this back on once all the builds work. 3442 # '-Wextra', 3443 # Don't warn about unused function params. We use those everywhere. 3444 '-Wno-unused-parameter', 3445 # Don't warn about the "struct foo f = {0};" initialization pattern. 3446 '-Wno-missing-field-initializers', 3447 # Don't export any symbols (for example, to plugins we dlopen()). 3448 # Note: this is *required* to make some plugins work. 3449 '-fvisibility=hidden', 3450 '-pipe', 3451 ], 3452 'cflags_cc': [ 3453 '-fno-rtti', 3454 '-fno-threadsafe-statics', 3455 # Make inline functions have hidden visiblity by default. 3456 # Surprisingly, not covered by -fvisibility=hidden. 3457 '-fvisibility-inlines-hidden', 3458 # GCC turns on -Wsign-compare for C++ under -Wall, but clang doesn't, 3459 # so we specify it explicitly. (llvm.org/PR10448, crbug.com/90453) 3460 '-Wsign-compare', 3461 ], 3462 'ldflags': [ 3463 '-pthread', '-Wl,-z,noexecstack', 3464 ], 3465 'libraries' : [ 3466 '<(libraries_for_target)', 3467 ], 3468 'configurations': { 3469 'Debug_Base': { 3470 'variables': { 3471 'debug_optimize%': '0', 3472 }, 3473 'defines': [ 3474 '_DEBUG', 3475 ], 3476 'cflags': [ 3477 '-O>(debug_optimize)', 3478 '-g', 3479 ], 3480 'conditions' : [ 3481 ['OS=="android"', { 3482 'ldflags': [ 3483 # Warn in case of text relocations. 3484 '-Wl,--warn-shared-textrel', 3485 ], 3486 }], 3487 ['OS=="android" and android_full_debug==0', { 3488 # Some configurations are copied from Release_Base to reduce 3489 # the binary size. 3490 'variables': { 3491 'debug_optimize%': 's', 3492 }, 3493 'cflags': [ 3494 '-fdata-sections', 3495 '-ffunction-sections', 3496 ], 3497 'ldflags': [ 3498 '-Wl,-O1', 3499 '-Wl,--as-needed', 3500 ], 3501 }], 3502 ['OS=="android" and android_full_debug==0 and target_arch!="arm64"', { 3503 # We don't omit frame pointers on arm64 since they are required 3504 # to correctly unwind stackframes which contain system library 3505 # function frames (crbug.com/391706). 3506 'cflags': [ 3507 '-fomit-frame-pointer', 3508 ], 3509 }], 3510 ['OS=="linux" and target_arch=="ia32"', { 3511 'ldflags': [ 3512 '-Wl,--no-as-needed', 3513 ], 3514 }], 3515 ['debug_unwind_tables==1', { 3516 'cflags': ['-funwind-tables'], 3517 }, { 3518 'cflags': ['-fno-unwind-tables', '-fno-asynchronous-unwind-tables'], 3519 }], 3520 # TODO(mostynb): shuffle clang/gcc_version/binutils_version 3521 # definitions in to the right scope to use them when setting 3522 # linux_use_debug_fission, so it can be used here alone. 3523 ['linux_use_debug_fission==1 and linux_use_gold_flags==1 and (clang==1 or gcc_version>=48) and binutils_version>=223', { 3524 'cflags': ['-gsplit-dwarf'], 3525 }], 3526 ], 3527 }, 3528 'Release_Base': { 3529 'variables': { 3530 'release_optimize%': '2', 3531 # Binaries become big and gold is unable to perform GC 3532 # and remove unused sections for some of test targets 3533 # on 32 bit platform. 3534 # (This is currently observed only in chromeos valgrind bots) 3535 # The following flag is to disable --gc-sections linker 3536 # option for these bots. 3537 'no_gc_sections%': 0, 3538 3539 # TODO(bradnelson): reexamine how this is done if we change the 3540 # expansion of configurations 3541 'release_valgrind_build%': 0, 3542 }, 3543 'cflags': [ 3544 '-O<(release_optimize)', 3545 # Don't emit the GCC version ident directives, they just end up 3546 # in the .comment section taking up binary size. 3547 '-fno-ident', 3548 # Put data and code in their own sections, so that unused symbols 3549 # can be removed at link time with --gc-sections. 3550 '-fdata-sections', 3551 '-ffunction-sections', 3552 ], 3553 'ldflags': [ 3554 # Specifically tell the linker to perform optimizations. 3555 # See http://lwn.net/Articles/192624/ . 3556 '-Wl,-O1', 3557 '-Wl,--as-needed', 3558 ], 3559 'conditions' : [ 3560 ['no_gc_sections==0', { 3561 'ldflags': [ 3562 '-Wl,--gc-sections', 3563 ], 3564 }], 3565 ['OS=="android" and target_arch!="arm64"', { 3566 # We don't omit frame pointers on arm64 since they are required 3567 # to correctly unwind stackframes which contain system library 3568 # function frames (crbug.com/391706). 3569 'cflags': [ 3570 '-fomit-frame-pointer', 3571 ] 3572 }], 3573 ['OS=="android"', { 3574 'variables': { 3575 'release_optimize%': 's', 3576 }, 3577 'ldflags': [ 3578 # Warn in case of text relocations. 3579 '-Wl,--warn-shared-textrel', 3580 ], 3581 }], 3582 ['clang==1', { 3583 'cflags!': [ 3584 '-fno-ident', 3585 ], 3586 # TODO(thakis): Remove once http://llvm.org/PR20354 is fixed 3587 # and the fix is in chromium. 3588 'cflags': [ '-fno-slp-vectorize', ], 3589 }], 3590 ['profiling==1', { 3591 'cflags': [ 3592 '-fno-omit-frame-pointer', 3593 '-g', 3594 ], 3595 'conditions' : [ 3596 ['profiling_full_stack_frames==1', { 3597 'cflags': [ 3598 '-fno-inline', 3599 '-fno-optimize-sibling-calls', 3600 ], 3601 }], 3602 ], 3603 }], 3604 ['release_unwind_tables==1', { 3605 'cflags': ['-funwind-tables'], 3606 }, { 3607 'cflags': ['-fno-unwind-tables', '-fno-asynchronous-unwind-tables'], 3608 }], 3609 ], 3610 }, 3611 }, 3612 'conditions': [ 3613 ['target_arch=="ia32"', { 3614 'target_conditions': [ 3615 ['_toolset=="target"', { 3616 'asflags': [ 3617 # Needed so that libs with .s files (e.g. libicudata.a) 3618 # are compatible with the general 32-bit-ness. 3619 '-32', 3620 ], 3621 # All floating-point computations on x87 happens in 80-bit 3622 # precision. Because the C and C++ language standards allow 3623 # the compiler to keep the floating-point values in higher 3624 # precision than what's specified in the source and doing so 3625 # is more efficient than constantly rounding up to 64-bit or 3626 # 32-bit precision as specified in the source, the compiler, 3627 # especially in the optimized mode, tries very hard to keep 3628 # values in x87 floating-point stack (in 80-bit precision) 3629 # as long as possible. This has important side effects, that 3630 # the real value used in computation may change depending on 3631 # how the compiler did the optimization - that is, the value 3632 # kept in 80-bit is different than the value rounded down to 3633 # 64-bit or 32-bit. There are possible compiler options to 3634 # make this behavior consistent (e.g. -ffloat-store would keep 3635 # all floating-values in the memory, thus force them to be 3636 # rounded to its original precision) but they have significant 3637 # runtime performance penalty. 3638 # 3639 # -mfpmath=sse -msse2 makes the compiler use SSE instructions 3640 # which keep floating-point values in SSE registers in its 3641 # native precision (32-bit for single precision, and 64-bit 3642 # for double precision values). This means the floating-point 3643 # value used during computation does not change depending on 3644 # how the compiler optimized the code, since the value is 3645 # always kept in its specified precision. 3646 # 3647 # Refer to http://crbug.com/348761 for rationale behind SSE2 3648 # being a minimum requirement for 32-bit Linux builds and 3649 # http://crbug.com/313032 for an example where this has "bit" 3650 # us in the past. 3651 'cflags': [ 3652 '-msse2', 3653 '-mfpmath=sse', 3654 '-mmmx', # Allows mmintrin.h for MMX intrinsics. 3655 '-m32', 3656 ], 3657 'ldflags': [ 3658 '-m32', 3659 ], 3660 'conditions': [ 3661 # Use gold linker for Android ia32 target. 3662 ['OS=="android"', { 3663 'ldflags': [ 3664 '-fuse-ld=gold', 3665 ], 3666 }], 3667 # Install packages have started cropping up with 3668 # different headers between the 32-bit and 64-bit 3669 # versions, so we have to shadow those differences off 3670 # and make sure a 32-bit-on-64-bit build picks up the 3671 # right files. 3672 # For android build, use NDK headers instead of host headers 3673 ['host_arch!="ia32" and OS!="android"', { 3674 'include_dirs+': [ 3675 '/usr/include32', 3676 ], 3677 }], 3678 ], 3679 }], 3680 ], 3681 }], 3682 ['target_arch=="x64"', { 3683 'target_conditions': [ 3684 ['_toolset=="target"', { 3685 'conditions': [ 3686 # Use gold linker for Android x64 target. 3687 ['OS=="android"', { 3688 'ldflags': [ 3689 '-fuse-ld=gold', 3690 ], 3691 }], 3692 ], 3693 'cflags': [ 3694 '-m64', 3695 '-march=x86-64', 3696 ], 3697 'ldflags': [ 3698 '-m64', 3699 ], 3700 }], 3701 ], 3702 }], 3703 ['target_arch=="arm"', { 3704 'target_conditions': [ 3705 ['_toolset=="target"', { 3706 'cflags_cc': [ 3707 # The codesourcery arm-2009q3 toolchain warns at that the ABI 3708 # has changed whenever it encounters a varargs function. This 3709 # silences those warnings, as they are not helpful and 3710 # clutter legitimate warnings. 3711 '-Wno-abi', 3712 ], 3713 'conditions': [ 3714 ['arm_arch!=""', { 3715 'cflags': [ 3716 '-march=<(arm_arch)', 3717 ], 3718 }], 3719 ['arm_tune!=""', { 3720 'cflags': [ 3721 '-mtune=<(arm_tune)', 3722 ], 3723 }], 3724 ['arm_fpu!=""', { 3725 'cflags': [ 3726 '-mfpu=<(arm_fpu)', 3727 ], 3728 }], 3729 ['arm_float_abi!=""', { 3730 'cflags': [ 3731 '-mfloat-abi=<(arm_float_abi)', 3732 ], 3733 }], 3734 ['arm_thumb==1', { 3735 'cflags': [ 3736 '-mthumb', 3737 ] 3738 }], 3739 ['OS=="android"', { 3740 # Most of the following flags are derived from what Android 3741 # uses by default when building for arm, reference for which 3742 # can be found in the following file in the Android NDK: 3743 # toolchains/arm-linux-androideabi-4.8/setup.mk 3744 'cflags': [ 3745 # The tree-sra optimization (scalar replacement for 3746 # aggregates enabling subsequent optimizations) leads to 3747 # invalid code generation when using the Android NDK's 3748 # compiler (r5-r7). This can be verified using 3749 # webkit_unit_tests' WTF.Checked_int8_t test. 3750 '-fno-tree-sra', 3751 # The following 6 options are disabled to save on 3752 # binary size in gcc 4.8. 3753 # TODO(fdegans) Reevaluate when we upgrade GCC. 3754 '-fno-partial-inlining', 3755 '-fno-early-inlining', 3756 '-fno-tree-copy-prop', 3757 '-fno-tree-loop-optimize', 3758 '-fno-move-loop-invariants', 3759 '-fno-caller-saves', 3760 '-Wno-psabi', 3761 ], 3762 # Android now supports .relro sections properly. 3763 # NOTE: While these flags enable the generation of .relro 3764 # sections, the generated libraries can still be loaded on 3765 # older Android platform versions. 3766 'ldflags': [ 3767 '-Wl,-z,relro', 3768 '-Wl,-z,now', 3769 '-fuse-ld=gold', 3770 ], 3771 'conditions': [ 3772 ['arm_thumb==1', { 3773 'cflags': [ '-mthumb-interwork' ], 3774 }], 3775 ['profiling==1', { 3776 'cflags': [ 3777 # Thumb code with frame pointer makes chrome crash 3778 # early. 3779 '-marm', 3780 '-mapcs-frame', # Required by -fno-omit-frame-pointer. 3781 # The perf report sometimes incorrectly attributes 3782 # code from tail calls. 3783 '-fno-optimize-sibling-calls', 3784 ], 3785 'cflags!': [ 3786 '-fomit-frame-pointer', 3787 ], 3788 }], 3789 ['clang==1', { 3790 'cflags!': [ 3791 # Clang does not support the following options. 3792 '-mthumb-interwork', 3793 '-finline-limit=64', 3794 '-fno-tree-sra', 3795 '-fno-partial-inlining', 3796 '-fno-early-inlining', 3797 '-fno-tree-copy-prop', 3798 '-fno-tree-loop-optimize', 3799 '-fno-move-loop-invariants', 3800 '-fno-caller-saves', 3801 '-Wno-psabi', 3802 ], 3803 'cflags': [ 3804 # TODO(hans) Enable integrated-as (crbug.com/124610). 3805 '-no-integrated-as', 3806 '-B<(android_toolchain)', # Else /usr/bin/as gets picked up. 3807 ], 3808 3809 'ldflags!': [ 3810 # Clang does not support the following options. 3811 '-fuse-ld=gold', 3812 ], 3813 'ldflags': [ 3814 # As long as -fuse-ld=gold doesn't work, add a dummy directory 3815 # with an 'ld' that redirects to gold, so that clang uses gold. 3816 '-B<!(cd <(DEPTH) && pwd -P)/build/android/arm-linux-androideabi-gold', 3817 ], 3818 }], 3819 ['asan==1', { 3820 'cflags': [ 3821 '-marm', # Required for frame pointer based stack traces. 3822 ], 3823 }], 3824 ], 3825 }], 3826 ['chromecast==1', { 3827 'cflags': [ 3828 # We set arm_arch to "" so that -march compiler option 3829 # is not set. Otherwise a gcc bug that would complain 3830 # about it conflicting with '-mcpu=cortex-a9'. The flag 3831 # '-march=armv7-a' is actually redundant anyway because 3832 # it is enabled by default when we built the toolchain. 3833 # And using '-mcpu=cortex-a9' should be sufficient. 3834 '-mcpu=cortex-a9', 3835 '-funwind-tables', 3836 # Breakpad requires symbols with debugging information 3837 '-g', 3838 ], 3839 'ldflags': [ 3840 # We want to statically link libstdc++/libgcc_s. 3841 '-static-libstdc++', 3842 '-static-libgcc', 3843 ], 3844 'cflags!': [ 3845 # Some components in Chromium (e.g. v8, skia, ffmpeg) 3846 # define their own cflags for arm builds that could 3847 # conflict with the flags we set here (e.g. 3848 # '-mcpu=cortex-a9'). Remove these flags explicitly. 3849 '-march=armv7-a', 3850 '-mtune=cortex-a8', 3851 ], 3852 }], 3853 ], 3854 }], 3855 ], 3856 }], 3857 ['target_arch=="arm64"', { 3858 'target_conditions': [ 3859 ['_toolset=="target"', { 3860 'conditions': [ 3861 ['OS=="android"', { 3862 'cflags!': [ 3863 '-fstack-protector', # stack protector is always enabled on arm64. 3864 ], 3865 }], 3866 ], 3867 }], 3868 ], 3869 }], 3870 ['target_arch=="mipsel"', { 3871 'target_conditions': [ 3872 ['_toolset=="target"', { 3873 'conditions': [ 3874 ['android_webview_build==0 and mips_arch_variant=="mips32r2"', { 3875 'cflags': ['-mips32r2', '-Wa,-mips32r2'], 3876 }], 3877 ['android_webview_build==0 and mips_arch_variant!="mips32r2"', { 3878 'cflags': ['-mips32', '-Wa,-mips32'], 3879 }], 3880 ], 3881 'cflags': [ 3882 '-EL', 3883 '-mhard-float', 3884 ], 3885 'ldflags': [ 3886 '-EL', 3887 '-Wl,--no-keep-memory' 3888 ], 3889 'cflags_cc': [ 3890 '-Wno-uninitialized', 3891 ], 3892 }], 3893 ], 3894 }], 3895 ['linux_fpic==1', { 3896 'cflags': [ 3897 '-fPIC', 3898 ], 3899 'ldflags': [ 3900 '-fPIC', 3901 ], 3902 }], 3903 ['sysroot!=""', { 3904 'target_conditions': [ 3905 ['_toolset=="target"', { 3906 'cflags': [ 3907 '--sysroot=<(sysroot)', 3908 ], 3909 'ldflags': [ 3910 '--sysroot=<(sysroot)', 3911 '<!(<(DEPTH)/build/linux/sysroot_ld_path.sh <(sysroot))', 3912 ], 3913 }]] 3914 }], 3915 ['clang==1', { 3916 'cflags': [ 3917 # TODO(thakis): Remove, http://crbug.com/263960 3918 '-Wno-reserved-user-defined-literal', 3919 ], 3920 'cflags_cc': [ 3921 # See the comment in the Mac section for what it takes to move 3922 # this to -std=c++11. 3923 '-std=gnu++11', 3924 ], 3925 }], 3926 ['clang==0 and host_clang==1', { 3927 'target_conditions': [ 3928 ['_toolset=="host"', { 3929 'cflags_cc': [ '-std=gnu++11', ], 3930 }], 3931 ], 3932 }], 3933 ['clang==1 and clang_use_chrome_plugins==1', { 3934 'cflags': [ 3935 '<@(clang_chrome_plugins_flags)', 3936 ], 3937 }], 3938 ['clang==1 and clang_load!=""', { 3939 'cflags': [ 3940 '-Xclang', '-load', '-Xclang', '<(clang_load)', 3941 ], 3942 }], 3943 ['clang==1 and clang_add_plugin!=""', { 3944 'cflags': [ 3945 '-Xclang', '-add-plugin', '-Xclang', '<(clang_add_plugin)', 3946 ], 3947 }], 3948 ['clang==1 and target_arch=="ia32"', { 3949 'cflags': [ 3950 # Else building libyuv gives clang's register allocator issues, 3951 # see llvm.org/PR15798 / crbug.com/233709 3952 '-momit-leaf-frame-pointer', 3953 ], 3954 }], 3955 ['clang==1 and "<(GENERATOR)"=="ninja"', { 3956 'cflags': [ 3957 # See http://crbug.com/110262 3958 '-fcolor-diagnostics', 3959 ], 3960 }], 3961 # Common options for AddressSanitizer, LeakSanitizer, 3962 # ThreadSanitizer and MemorySanitizer. 3963 ['asan==1 or lsan==1 or tsan==1 or msan==1 or ubsan==1 or ubsan_vptr==1', { 3964 'target_conditions': [ 3965 ['_toolset=="target"', { 3966 'cflags': [ 3967 '-fno-omit-frame-pointer', 3968 '-gline-tables-only', 3969 ], 3970 'cflags!': [ 3971 '-fomit-frame-pointer', 3972 ], 3973 }], 3974 ], 3975 }], 3976 ['asan==1 or lsan==1 or tsan==1 or msan==1', { 3977 'target_conditions': [ 3978 ['_toolset=="target"', { 3979 'ldflags!': [ 3980 # Functions interposed by the sanitizers can make ld think 3981 # that some libraries aren't needed when they actually are, 3982 # http://crbug.com/234010. As workaround, disable --as-needed. 3983 '-Wl,--as-needed', 3984 ], 3985 'defines': [ 3986 'MEMORY_TOOL_REPLACES_ALLOCATOR', 3987 'MEMORY_SANITIZER_INITIAL_SIZE', 3988 ], 3989 }], 3990 ], 3991 # TODO(glider): enable the default options on other systems. 3992 'conditions': [ 3993 ['use_sanitizer_options==1 and OS=="linux" and (chromeos==0 or target_arch!="ia32")', { 3994 'dependencies': [ 3995 '<(DEPTH)/base/base.gyp:sanitizer_options', 3996 ], 3997 }], 3998 ], 3999 }], 4000 ['asan==1', { 4001 'target_conditions': [ 4002 ['_toolset=="target"', { 4003 'cflags': [ 4004 '-fsanitize=address', 4005 ], 4006 'ldflags': [ 4007 '-fsanitize=address', 4008 ], 4009 }], 4010 ], 4011 'conditions': [ 4012 ['OS=="mac"', { 4013 'cflags': [ 4014 '-mllvm -asan-globals=0', # http://crbug.com/352073 4015 ], 4016 }], 4017 ], 4018 }], 4019 ['ubsan==1', { 4020 'target_conditions': [ 4021 ['_toolset=="target"', { 4022 'cflags': [ 4023 '-fsanitize=undefined', 4024 # -fsanitize=vptr is incompatible with -fno-rtti. 4025 '-fno-sanitize=vptr', 4026 ], 4027 'ldflags': [ 4028 '-fsanitize=undefined', 4029 # -fsanitize=vptr is incompatible with -fno-rtti. 4030 '-fno-sanitize=vptr', 4031 ], 4032 }], 4033 ], 4034 }], 4035 ['ubsan_vptr==1', { 4036 'target_conditions': [ 4037 ['_toolset=="target"', { 4038 'cflags': [ 4039 '-fsanitize=vptr', 4040 '-fsanitize-blacklist=<(ubsan_vptr_blacklist)', 4041 ], 4042 'cflags_cc!': [ 4043 '-fno-rtti', 4044 ], 4045 'cflags!': [ 4046 '-fno-rtti', 4047 ], 4048 'ldflags': [ 4049 '-fsanitize=vptr', 4050 ], 4051 'defines': [ 4052 'UNDEFINED_SANITIZER', 4053 ], 4054 }], 4055 ], 4056 }], 4057 ['asan_coverage!=0', { 4058 'target_conditions': [ 4059 ['_toolset=="target"', { 4060 'cflags': [ 4061 '-mllvm -asan-coverage=<(asan_coverage)', 4062 ], 4063 }], 4064 ], 4065 }], 4066 ['lsan==1', { 4067 'target_conditions': [ 4068 ['_toolset=="target"', { 4069 'cflags': [ 4070 '-fsanitize=leak', 4071 ], 4072 'ldflags': [ 4073 '-fsanitize=leak', 4074 ], 4075 'defines': [ 4076 'LEAK_SANITIZER', 4077 'WTF_USE_LEAK_SANITIZER=1', 4078 ], 4079 }], 4080 ], 4081 }], 4082 ['tsan==1', { 4083 'target_conditions': [ 4084 ['_toolset=="target"', { 4085 'cflags': [ 4086 '-fsanitize=thread', 4087 '-fPIC', 4088 '-fsanitize-blacklist=<(tsan_blacklist)', 4089 ], 4090 'ldflags': [ 4091 '-fsanitize=thread', 4092 ], 4093 'defines': [ 4094 'THREAD_SANITIZER', 4095 'DYNAMIC_ANNOTATIONS_EXTERNAL_IMPL=1', 4096 'WTF_USE_DYNAMIC_ANNOTATIONS_NOIMPL=1', 4097 ], 4098 'target_conditions': [ 4099 ['_type=="executable"', { 4100 'ldflags': [ 4101 '-pie', 4102 ], 4103 }], 4104 ], 4105 }], 4106 ], 4107 }], 4108 ['msan==1', { 4109 'target_conditions': [ 4110 ['_toolset=="target"', { 4111 'cflags': [ 4112 '-fsanitize=memory', 4113 '-fsanitize-memory-track-origins=<(msan_track_origins)', 4114 '-fPIC', 4115 '-fsanitize-blacklist=<(msan_blacklist)', 4116 ], 4117 'ldflags': [ 4118 '-fsanitize=memory', 4119 ], 4120 'defines': [ 4121 'MEMORY_SANITIZER', 4122 ], 4123 'target_conditions': [ 4124 ['_type=="executable"', { 4125 'ldflags': [ 4126 '-pie', 4127 ], 4128 }], 4129 ], 4130 }], 4131 ], 4132 }], 4133 ['use_instrumented_libraries==1', { 4134 'dependencies': [ 4135 '<(DEPTH)/third_party/instrumented_libraries/instrumented_libraries.gyp:instrumented_libraries', 4136 ], 4137 }], 4138 ['use_custom_libcxx==1', { 4139 'dependencies': [ 4140 '<(DEPTH)/third_party/libc++/libc++.gyp:libcxx_proxy', 4141 ], 4142 }], 4143 ['order_profiling!=0 and (chromeos==1 or OS=="linux" or OS=="android")', { 4144 'target_conditions' : [ 4145 # crazy_linker has an upstream gyp file we can't edit, and we 4146 # don't want to instrument it. 4147 ['_toolset=="target" and _target_name!="crazy_linker"', { 4148 'cflags': [ 4149 '-finstrument-functions', 4150 # Allow mmx intrinsics to inline, so that the 4151 #0 compiler can expand the intrinsics. 4152 '-finstrument-functions-exclude-file-list=mmintrin.h', 4153 ], 4154 }], 4155 ['_toolset=="target" and OS=="android"', { 4156 'cflags': [ 4157 # Avoids errors with current NDK: 4158 # "third_party/android_tools/ndk/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/include/arm_neon.h:3426:3: error: argument must be a constant" 4159 '-finstrument-functions-exclude-file-list=arm_neon.h,SaturatedArithmeticARM.h', 4160 ], 4161 }], 4162 ], 4163 }], 4164 ['linux_dump_symbols==1', { 4165 'cflags': [ '-g' ], 4166 'conditions': [ 4167 ['OS=="linux" and host_arch=="ia32" and linux_use_bundled_gold==0', { 4168 'target_conditions': [ 4169 ['_toolset=="target"', { 4170 'ldflags': [ 4171 # Attempt to use less memory to prevent the linker from 4172 # running out of address space. Considering installing a 4173 # 64-bit kernel and switching to a 64-bit linker. 4174 '-Wl,--no-keep-memory', 4175 ], 4176 }], 4177 ], 4178 }], 4179 ], 4180 }], 4181 ['use_allocator!="tcmalloc"', { 4182 'defines': ['NO_TCMALLOC'], 4183 }], 4184 ['linux_use_gold_flags==1', { 4185 'target_conditions': [ 4186 ['_toolset=="target"', { 4187 'ldflags': [ 4188 # Experimentation found that using four linking threads 4189 # saved ~20% of link time. 4190 # https://groups.google.com/a/chromium.org/group/chromium-dev/browse_thread/thread/281527606915bb36 4191 # Only apply this to the target linker, since the host 4192 # linker might not be gold, but isn't used much anyway. 4193 # TODO(raymes): Disable threading because gold is frequently 4194 # crashing on the bots: crbug.com/161942. 4195 # '-Wl,--threads', 4196 # '-Wl,--thread-count=4', 4197 ], 4198 }], 4199 ], 4200 'conditions': [ 4201 ['release_valgrind_build==0', { 4202 'target_conditions': [ 4203 ['_toolset=="target"', { 4204 'ldflags': [ 4205 # There seems to be a conflict of --icf and -pie 4206 # in gold which can generate crashy binaries. As 4207 # a security measure, -pie takes precedence for 4208 # now. 4209 #'-Wl,--icf=safe', 4210 '-Wl,--icf=none', 4211 ], 4212 }], 4213 ], 4214 }], 4215 # Newer gcc's support -fuse-ld, use the flag to force gold 4216 # selection. 4217 # gcc -- http://gcc.gnu.org/onlinedocs/gcc-4.8.0/gcc/Optimize-Options.html 4218 # TODO(mithro): Watch for clang support at following thread: 4219 # http://clang-developers.42468.n3.nabble.com/Adding-fuse-ld-support-to-clang-td4032180.html 4220 ['gcc_version>=48 and clang==0', { 4221 'target_conditions': [ 4222 ['_toolset=="target"', { 4223 'ldflags': [ 4224 '-fuse-ld=gold', 4225 ], 4226 }], 4227 ], 4228 }], 4229 ['host_gcc_version>=48 and clang==0', { 4230 'target_conditions': [ 4231 ['_toolset=="host"', { 4232 'ldflags': [ 4233 '-fuse-ld=gold', 4234 ], 4235 }], 4236 ], 4237 }], 4238 ], 4239 }], 4240 ['linux_use_bundled_binutils==1', { 4241 'cflags': [ 4242 '-B<!(cd <(DEPTH) && pwd -P)/<(binutils_dir)', 4243 ], 4244 }], 4245 ['linux_use_bundled_gold==1', { 4246 # Put our binutils, which contains gold in the search path. We pass 4247 # the path to gold to the compiler. gyp leaves unspecified what the 4248 # cwd is when running the compiler, so the normal gyp path-munging 4249 # fails us. This hack gets the right path. 4250 'ldflags': [ 4251 '-B<!(cd <(DEPTH) && pwd -P)/<(binutils_dir)', 4252 ], 4253 }], 4254 # Some binutils 2.23 releases may or may not have new dtags enabled, 4255 # but they are all compatible with --disable-new-dtags, 4256 # because the new dynamic tags are not created by default. 4257 ['binutils_version>=223', { 4258 # Newer binutils don't set DT_RPATH unless you disable "new" dtags 4259 # and the new DT_RUNPATH doesn't work without --no-as-needed flag. 4260 # FIXME(mithro): Figure out the --as-needed/--no-as-needed flags 4261 # inside this file to allow usage of --no-as-needed and removal of 4262 # this flag. 4263 'ldflags': [ 4264 '-Wl,--disable-new-dtags', 4265 ], 4266 }], 4267 ['gcc_version>=47 and clang==0', { 4268 'target_conditions': [ 4269 ['_toolset=="target"', { 4270 'cflags_cc': [ 4271 '-std=gnu++11', 4272 # See comment for -Wno-c++11-narrowing. 4273 '-Wno-narrowing', 4274 # TODO(thakis): Remove, http://crbug.com/263960 4275 '-Wno-literal-suffix', 4276 ], 4277 }], 4278 ], 4279 }], 4280 ['host_gcc_version>=47 and clang==0 and host_clang==0', { 4281 'target_conditions': [ 4282 ['_toolset=="host"', { 4283 'cflags_cc': [ 4284 '-std=gnu++11', 4285 # See comment for -Wno-c++11-narrowing. 4286 '-Wno-narrowing', 4287 # TODO(thakis): Remove, http://crbug.com/263960 4288 '-Wno-literal-suffix', 4289 ], 4290 }], 4291 ], 4292 }], 4293 ], 4294 }, 4295 }], 4296 # FreeBSD-specific options; note that most FreeBSD options are set above, 4297 # with Linux. 4298 ['OS=="freebsd"', { 4299 'target_defaults': { 4300 'ldflags': [ 4301 '-Wl,--no-keep-memory', 4302 ], 4303 }, 4304 }], 4305 # Android-specific options; note that most are set above with Linux. 4306 ['OS=="android"', { 4307 'variables': { 4308 # This is a unique identifier for a given build. It's used for 4309 # identifying various build artifacts corresponding to a particular 4310 # build of chrome (e.g. where to find archived symbols). 4311 'chrome_build_id%': '', 4312 'conditions': [ 4313 # Use shared stlport library when system one used. 4314 # Figure this out early since it needs symbols from libgcc.a, so it 4315 # has to be before that in the set of libraries. 4316 ['use_system_stlport==1', { 4317 'android_stlport_library': 'stlport', 4318 }, { 4319 'conditions': [ 4320 ['component=="shared_library"', { 4321 'android_stlport_library': 'stlport_shared', 4322 }, { 4323 'android_stlport_library': 'stlport_static', 4324 }], 4325 ], 4326 }], 4327 ], 4328 4329 # Placing this variable here prevents from forking libvpx, used 4330 # by remoting. Remoting is off, so it needn't built, 4331 # so forking it's deps seems like overkill. 4332 # But this variable need defined to properly run gyp. 4333 # A proper solution is to have an OS==android conditional 4334 # in third_party/libvpx/libvpx.gyp to define it. 4335 'libvpx_path': 'lib/linux/arm', 4336 }, 4337 'target_defaults': { 4338 'variables': { 4339 'release_extra_cflags%': '', 4340 'conditions': [ 4341 # If we're using the components build, append "cr" to all shared 4342 # libraries to avoid naming collisions with android system library 4343 # versions with the same name (e.g. skia, icu). 4344 ['component=="shared_library"', { 4345 'android_product_extension': 'cr.so', 4346 }, { 4347 'android_product_extension': 'so', 4348 } ], 4349 ], 4350 }, 4351 'target_conditions': [ 4352 ['_type=="shared_library"', { 4353 'product_extension': '<(android_product_extension)', 4354 }], 4355 4356 # Settings for building device targets using Android's toolchain. 4357 # These are based on the setup.mk file from the Android NDK. 4358 # 4359 # The NDK Android executable link step looks as follows: 4360 # $LDFLAGS 4361 # $(TARGET_CRTBEGIN_DYNAMIC_O) <-- crtbegin.o 4362 # $(PRIVATE_OBJECTS) <-- The .o that we built 4363 # $(PRIVATE_STATIC_LIBRARIES) <-- The .a that we built 4364 # $(TARGET_LIBGCC) <-- libgcc.a 4365 # $(PRIVATE_SHARED_LIBRARIES) <-- The .so that we built 4366 # $(PRIVATE_LDLIBS) <-- System .so 4367 # $(TARGET_CRTEND_O) <-- crtend.o 4368 # 4369 # For now the above are approximated for executables by adding 4370 # crtbegin.o to the end of the ldflags and 'crtend.o' to the end 4371 # of 'libraries'. 4372 # 4373 # The NDK Android shared library link step looks as follows: 4374 # $LDFLAGS 4375 # $(PRIVATE_OBJECTS) <-- The .o that we built 4376 # -l,--whole-archive 4377 # $(PRIVATE_WHOLE_STATIC_LIBRARIES) 4378 # -l,--no-whole-archive 4379 # $(PRIVATE_STATIC_LIBRARIES) <-- The .a that we built 4380 # $(TARGET_LIBGCC) <-- libgcc.a 4381 # $(PRIVATE_SHARED_LIBRARIES) <-- The .so that we built 4382 # $(PRIVATE_LDLIBS) <-- System .so 4383 # 4384 # For now, assume that whole static libraries are not needed. 4385 # 4386 # For both executables and shared libraries, add the proper 4387 # libgcc.a to the start of libraries which puts it in the 4388 # proper spot after .o and .a files get linked in. 4389 # 4390 # TODO: The proper thing to do longer-tem would be proper gyp 4391 # support for a custom link command line. 4392 ['_toolset=="target"', { 4393 'cflags!': [ 4394 '-pthread', # Not supported by Android toolchain. 4395 ], 4396 'cflags': [ 4397 '-ffunction-sections', 4398 '-funwind-tables', 4399 '-g', 4400 '-fstack-protector', 4401 '-fno-short-enums', 4402 '-finline-limit=64', 4403 '-Wa,--noexecstack', 4404 '<@(release_extra_cflags)', 4405 ], 4406 'defines': [ 4407 'ANDROID', 4408 '__GNU_SOURCE=1', # Necessary for clone() 4409 'USE_STLPORT=1', 4410 '_STLP_USE_PTR_SPECIALIZATIONS=1', 4411 'CHROME_BUILD_ID="<(chrome_build_id)"', 4412 ], 4413 'ldflags!': [ 4414 '-pthread', # Not supported by Android toolchain. 4415 ], 4416 'ldflags': [ 4417 '-nostdlib', 4418 '-Wl,--no-undefined', 4419 # Don't export symbols from statically linked libraries. 4420 '-Wl,--exclude-libs=ALL', 4421 ], 4422 'libraries': [ 4423 '-l<(android_stlport_library)', 4424 # Manually link the libgcc.a that the cross compiler uses. 4425 '<!(<(android_toolchain)/*-gcc -print-libgcc-file-name)', 4426 '-lc', 4427 '-ldl', 4428 '-lm', 4429 ], 4430 'conditions': [ 4431 ['component=="shared_library"', { 4432 'ldflags!': [ 4433 '-Wl,--exclude-libs=ALL', 4434 ], 4435 }], 4436 ['clang==1', { 4437 'cflags': [ 4438 # Work around incompatibilities between bionic and clang 4439 # headers. 4440 '-D__compiler_offsetof=__builtin_offsetof', 4441 '-Dnan=__builtin_nan', 4442 ], 4443 'conditions': [ 4444 ['target_arch=="arm"', { 4445 'cflags': [ 4446 '-target arm-linux-androideabi', 4447 ], 4448 'ldflags': [ 4449 '-target arm-linux-androideabi', 4450 ], 4451 }], 4452 ['target_arch=="ia32"', { 4453 'cflags': [ 4454 '-target x86-linux-androideabi', 4455 ], 4456 'ldflags': [ 4457 '-target x86-linux-androideabi', 4458 ], 4459 }], 4460 # Place holder for x64 support, not tested. 4461 # TODO: Enable clang support for Android x64. http://crbug.com/346626 4462 ['target_arch=="x64"', { 4463 'cflags': [ 4464 '-target x86_64-linux-androideabi', 4465 ], 4466 'ldflags': [ 4467 '-target x86_64-linux-androideabi', 4468 ], 4469 }], 4470 ], 4471 }], 4472 ['asan==1', { 4473 'cflags': [ 4474 # Android build relies on -Wl,--gc-sections removing 4475 # unreachable code. ASan instrumentation for globals inhibits 4476 # this and results in a library with unresolvable relocations. 4477 # TODO(eugenis): find a way to reenable this. 4478 '-mllvm -asan-globals=0', 4479 ], 4480 }], 4481 ['android_webview_build==0', { 4482 'defines': [ 4483 # The NDK has these things, but doesn't define the constants 4484 # to say that it does. Define them here instead. 4485 'HAVE_SYS_UIO_H', 4486 ], 4487 'cflags': [ 4488 '--sysroot=<(android_ndk_sysroot)', 4489 ], 4490 'ldflags': [ 4491 '--sysroot=<(android_ndk_sysroot)', 4492 ], 4493 }], 4494 ['android_webview_build==1', { 4495 'include_dirs': [ 4496 # OpenAL headers from the Android tree. 4497 '<(android_src)/frameworks/wilhelm/include', 4498 ], 4499 'cflags': [ 4500 # Android predefines this as 1; undefine it here so Chromium 4501 # can redefine it later to be 2 for chromium code and unset 4502 # for third party code. This works because cflags are added 4503 # before defines. 4504 '-U_FORTIFY_SOURCE', 4505 # Disable any additional warnings enabled by the Android build system but which 4506 # chromium does not build cleanly with (when treating warning as errors). 4507 # Things that are part of -Wextra: 4508 '-Wno-extra', # Enabled by -Wextra, but no specific flag 4509 '-Wno-ignored-qualifiers', 4510 '-Wno-type-limits', 4511 '-Wno-unused-but-set-variable', 4512 ], 4513 'cflags_cc': [ 4514 # Other things unrelated to -Wextra: 4515 '-Wno-non-virtual-dtor', 4516 '-Wno-sign-promo', 4517 ], 4518 }], 4519 ['android_webview_build==1', { 4520 'target_conditions': [ 4521 ['chromium_code==0', { 4522 'cflags': [ 4523 # There is a class of warning which: 4524 # 1) Android always enables and also treats as errors 4525 # 2) Chromium ignores in third party code 4526 # So we re-enable those warnings when building Android. 4527 '-Wno-address', 4528 '-Wno-format-security', 4529 '-Wno-return-type', 4530 '-Wno-sequence-point', 4531 ], 4532 'cflags_cc': [ 4533 '-Wno-non-virtual-dtor', 4534 ], 4535 }], 4536 ], 4537 }], 4538 ['target_arch == "arm"', { 4539 'ldflags': [ 4540 # Enable identical code folding to reduce size. 4541 '-Wl,--icf=safe', 4542 ], 4543 }], 4544 # NOTE: The stlport header include paths below are specified in 4545 # cflags rather than include_dirs because they need to come 4546 # after include_dirs. Think of them like system headers, but 4547 # don't use '-isystem' because the arm-linux-androideabi-4.4.3 4548 # toolchain (circa Gingerbread) will exhibit strange errors. 4549 # The include ordering here is important; change with caution. 4550 ['use_system_stlport==1', { 4551 'cflags': [ 4552 # For libstdc++/include, which is used by stlport. 4553 '-I<(android_src)/bionic', 4554 '-I<(android_src)/external/stlport/stlport', 4555 ], 4556 }, { # else: use_system_stlport!=1 4557 'cflags': [ 4558 '-isystem<(android_stlport_include)', 4559 ], 4560 'ldflags': [ 4561 '-L<(android_stlport_libs_dir)', 4562 ], 4563 }], 4564 ['target_arch=="ia32"', { 4565 # The x86 toolchain currently has problems with stack-protector. 4566 'cflags!': [ 4567 '-fstack-protector', 4568 ], 4569 'cflags': [ 4570 '-fno-stack-protector', 4571 ], 4572 }], 4573 ], 4574 'target_conditions': [ 4575 ['_type=="executable"', { 4576 # Force android tools to export the "main" symbol so they can be 4577 # loaded on ICS using the run_pie wrapper. See crbug.com/373219. 4578 # TODO(primiano): remove -fvisibility and -rdynamic flags below 4579 # when ICS support will be dropped. 4580 'cflags': [ 4581 '-fPIE', 4582 '-fvisibility=default', 4583 ], 4584 'ldflags': [ 4585 '-Bdynamic', 4586 '-Wl,--gc-sections', 4587 '-Wl,-z,nocopyreloc', 4588 '-pie', 4589 '-rdynamic', 4590 # crtbegin_dynamic.o should be the last item in ldflags. 4591 '<(android_ndk_lib)/crtbegin_dynamic.o', 4592 ], 4593 'libraries': [ 4594 # crtend_android.o needs to be the last item in libraries. 4595 # Do not add any libraries after this! 4596 '<(android_ndk_lib)/crtend_android.o', 4597 ], 4598 }], 4599 ['_type=="shared_library" or _type=="loadable_module"', { 4600 'ldflags!': [ 4601 '-Wl,--exclude-libs=ALL', 4602 ], 4603 'ldflags': [ 4604 '-Wl,-shared,-Bsymbolic', 4605 ], 4606 'conditions': [ 4607 ['android_webview_build==0', { 4608 'ldflags': [ 4609 # crtbegin_so.o should be the last item in ldflags. 4610 '<(android_ndk_lib)/crtbegin_so.o', 4611 ], 4612 'libraries': [ 4613 # crtend_so.o needs to be the last item in libraries. 4614 # Do not add any libraries after this! 4615 '<(android_ndk_lib)/crtend_so.o', 4616 ], 4617 }], 4618 ], 4619 }], 4620 ], 4621 }], 4622 # Settings for building host targets using the system toolchain. 4623 ['_toolset=="host"', { 4624 'cflags!': [ 4625 # Due to issues in Clang build system, using ASan on 32-bit 4626 # binaries on x86_64 host is problematic. 4627 # TODO(eugenis): re-enable. 4628 '-fsanitize=address', 4629 ], 4630 'ldflags!': [ 4631 '-fsanitize=address', 4632 '-Wl,-z,noexecstack', 4633 '-Wl,--gc-sections', 4634 '-Wl,-O1', 4635 '-Wl,--as-needed', 4636 '-Wl,--warn-shared-textrel', 4637 '-Wl,--fatal-warnings', 4638 ], 4639 }], 4640 # Settings for building host targets on mac. 4641 ['_toolset=="host" and host_os=="mac"', { 4642 'ldflags!': [ 4643 '-Wl,-z,now', 4644 '-Wl,-z,relro', 4645 ], 4646 }], 4647 ], 4648 }, 4649 }], 4650 ['OS=="solaris"', { 4651 'cflags!': ['-fvisibility=hidden'], 4652 'cflags_cc!': ['-fvisibility-inlines-hidden'], 4653 }], 4654 ['OS=="mac" or OS=="ios"', { 4655 'target_defaults': { 4656 'mac_bundle': 0, 4657 'xcode_settings': { 4658 'ALWAYS_SEARCH_USER_PATHS': 'NO', 4659 # Don't link in libarclite_macosx.a, see http://crbug.com/156530. 4660 'CLANG_LINK_OBJC_RUNTIME': 'NO', # -fno-objc-link-runtime 4661 'COPY_PHASE_STRIP': 'NO', 4662 'GCC_C_LANGUAGE_STANDARD': 'c99', # -std=c99 4663 'GCC_CW_ASM_SYNTAX': 'NO', # No -fasm-blocks 4664 'GCC_ENABLE_CPP_EXCEPTIONS': 'NO', # -fno-exceptions 4665 'GCC_ENABLE_CPP_RTTI': 'NO', # -fno-rtti 4666 'GCC_ENABLE_PASCAL_STRINGS': 'NO', # No -mpascal-strings 4667 # GCC_INLINES_ARE_PRIVATE_EXTERN maps to -fvisibility-inlines-hidden 4668 'GCC_INLINES_ARE_PRIVATE_EXTERN': 'YES', 4669 'GCC_OBJC_CALL_CXX_CDTORS': 'YES', # -fobjc-call-cxx-cdtors 4670 'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES', # -fvisibility=hidden 4671 'GCC_THREADSAFE_STATICS': 'NO', # -fno-threadsafe-statics 4672 'GCC_TREAT_WARNINGS_AS_ERRORS': 'YES', # -Werror 4673 'GCC_VERSION': '4.2', 4674 'GCC_WARN_ABOUT_MISSING_NEWLINE': 'YES', # -Wnewline-eof 4675 'USE_HEADERMAP': 'NO', 4676 'WARNING_CFLAGS': [ 4677 '-Wall', 4678 '-Wendif-labels', 4679 '-Wextra', 4680 # Don't warn about unused function parameters. 4681 '-Wno-unused-parameter', 4682 # Don't warn about the "struct foo f = {0};" initialization 4683 # pattern. 4684 '-Wno-missing-field-initializers', 4685 ], 4686 'conditions': [ 4687 ['chromium_mac_pch', {'GCC_PRECOMPILE_PREFIX_HEADER': 'YES'}, 4688 {'GCC_PRECOMPILE_PREFIX_HEADER': 'NO'} 4689 ], 4690 # Note that the prebuilt Clang binaries should not be used for iOS 4691 # development except for ASan builds. 4692 ['clang==1', { 4693 # gnu++11 instead of c++11 is needed because some code uses 4694 # typeof() (a GNU extension). 4695 # TODO(thakis): Eventually switch this to c++11 instead of 4696 # gnu++11 (once typeof can be removed, which is blocked on c++11 4697 # being available everywhere). 4698 'CLANG_CXX_LANGUAGE_STANDARD': 'gnu++11', # -std=gnu++11 4699 # Warn if automatic synthesis is triggered with 4700 # the -Wobjc-missing-property-synthesis flag. 4701 'CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS': 'YES', 4702 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0', 4703 'WARNING_CFLAGS': [ 4704 # This warns on selectors from Cocoa headers (-length, -set). 4705 # cfe-dev is currently discussing the merits of this warning. 4706 # TODO(thakis): Reevaluate what to do with this, based one 4707 # cfe-dev discussion. 4708 '-Wno-selector-type-mismatch', 4709 ], 4710 'OTHER_CFLAGS': [ 4711 # TODO(thakis): Remove once http://llvm.org/PR20354 is fixed 4712 # and the fix is in chromium. 4713 '-fno-slp-vectorize', 4714 ], 4715 4716 'conditions': [ 4717 ['clang_xcode==0', { 4718 'CC': '$(SOURCE_ROOT)/<(clang_dir)/clang', 4719 'LDPLUSPLUS': '$(SOURCE_ROOT)/<(clang_dir)/clang++', 4720 }], 4721 ], 4722 }], 4723 ['clang==1 and clang_xcode==0 and clang_use_chrome_plugins==1', { 4724 'OTHER_CFLAGS': [ 4725 '<@(clang_chrome_plugins_flags)', 4726 ], 4727 }], 4728 ['clang==1 and clang_xcode==0 and clang_load!=""', { 4729 'OTHER_CFLAGS': [ 4730 '-Xclang', '-load', '-Xclang', '<(clang_load)', 4731 ], 4732 }], 4733 ['clang==1 and clang_xcode==0 and clang_add_plugin!=""', { 4734 'OTHER_CFLAGS': [ 4735 '-Xclang', '-add-plugin', '-Xclang', '<(clang_add_plugin)', 4736 ], 4737 }], 4738 ['clang==1 and "<(GENERATOR)"=="ninja"', { 4739 'OTHER_CFLAGS': [ 4740 # See http://crbug.com/110262 4741 '-fcolor-diagnostics', 4742 ], 4743 }], 4744 ['OS=="ios" and target_subarch!="arm32" and \ 4745 "<(GENERATOR)"=="xcode"', { 4746 'OTHER_CFLAGS': [ 4747 # TODO(ios): when building Chrome for iOS on 64-bit platform 4748 # with Xcode, the -Wshorted-64-to-32 warning is automatically 4749 # enabled. This cause failures when compiling protobuf code, 4750 # so disable the warning. http://crbug.com/359107 4751 '-Wno-shorten-64-to-32', 4752 ], 4753 }], 4754 ], 4755 }, 4756 'conditions': [ 4757 ['clang==1', { 4758 'variables': { 4759 'clang_dir': '../third_party/llvm-build/Release+Asserts/bin', 4760 }, 4761 }], 4762 ['asan==1', { 4763 'xcode_settings': { 4764 'OTHER_CFLAGS': [ 4765 '-fsanitize=address', 4766 '-mllvm -asan-globals=0', # http://crbug.com/352073 4767 '-gline-tables-only', 4768 ], 4769 }, 4770 }], 4771 ['asan_coverage!=0', { 4772 'target_conditions': [ 4773 ['_toolset=="target"', { 4774 'cflags': [ 4775 '-mllvm -asan-coverage=<(asan_coverage)', 4776 ], 4777 }], 4778 ], 4779 }], 4780 ], 4781 'target_conditions': [ 4782 ['_type!="static_library"', { 4783 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-search_paths_first']}, 4784 'conditions': [ 4785 ['asan==1', { 4786 'xcode_settings': { 4787 'OTHER_LDFLAGS': [ 4788 '-fsanitize=address', 4789 ], 4790 }, 4791 }], 4792 ['mac_write_linker_maps==1', { 4793 'xcode_settings': { 4794 'OTHER_LDFLAGS': [ 4795 '-Wl,-map,>(_target_name).map', 4796 ], 4797 }, 4798 }], 4799 ], 4800 }], 4801 ['_mac_bundle', { 4802 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-ObjC']}, 4803 'target_conditions': [ 4804 ['_type=="executable"', { 4805 'conditions': [ 4806 ['asan==1', { 4807 'postbuilds': [ 4808 { 4809 'variables': { 4810 # Define copy_asan_dylib_path in a variable ending in 4811 # _path so that gyp understands it's a path and 4812 # performs proper relativization during dict merging. 4813 'copy_asan_dylib_path': 4814 'mac/copy_asan_runtime_dylib.sh', 4815 }, 4816 'postbuild_name': 'Copy ASan runtime dylib', 4817 'action': [ 4818 '<(copy_asan_dylib_path)', 4819 ], 4820 }, 4821 ], 4822 }], 4823 ], 4824 }], 4825 ], 4826 }], 4827 ], # target_conditions 4828 }, # target_defaults 4829 }], # OS=="mac" or OS=="ios" 4830 ['OS=="mac"', { 4831 'target_defaults': { 4832 'defines': [ 4833 # Prevent Mac OS X AssertMacros.h from defining macros that collide 4834 # with common names, like 'check', 'require', and 'verify'. 4835 # (Included by system header. Also exists on iOS but not included.) 4836 # http://opensource.apple.com/source/CarbonHeaders/CarbonHeaders-18.1/AssertMacros.h 4837 '__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORE=0', 4838 ], 4839 'variables': { 4840 # These should end with %, but there seems to be a bug with % in 4841 # variables that are intended to be set to different values in 4842 # different targets, like these. 4843 'mac_pie': 1, # Most executables can be position-independent. 4844 # Strip debugging symbols from the target. 4845 'mac_strip': '<(mac_strip_release)', 4846 'conditions': [ 4847 ['asan==1', { 4848 'conditions': [ 4849 ['mac_want_real_dsym=="default"', { 4850 'mac_real_dsym': 1, 4851 }, { 4852 'mac_real_dsym': '<(mac_want_real_dsym)' 4853 }], 4854 ], 4855 }, { 4856 'conditions': [ 4857 ['mac_want_real_dsym=="default"', { 4858 'mac_real_dsym': 0, # Fake .dSYMs are fine in most cases. 4859 }, { 4860 'mac_real_dsym': '<(mac_want_real_dsym)' 4861 }], 4862 ], 4863 }], 4864 ], 4865 }, 4866 'xcode_settings': { 4867 'GCC_DYNAMIC_NO_PIC': 'NO', # No -mdynamic-no-pic 4868 # (Equivalent to -fPIC) 4869 # MACOSX_DEPLOYMENT_TARGET maps to -mmacosx-version-min 4870 'MACOSX_DEPLOYMENT_TARGET': '<(mac_deployment_target)', 4871 # Keep pch files below xcodebuild/. 4872 'SHARED_PRECOMPS_DIR': '$(CONFIGURATION_BUILD_DIR)/SharedPrecompiledHeaders', 4873 'OTHER_CFLAGS': [ 4874 # Someday this can be replaced by an 'GCC_STRICT_ALIASING': 'NO' 4875 # xcode_setting, but not until all downstream projects' mac bots are 4876 # using xcode >= 4.6, because that's when the default value of the 4877 # flag in the compiler switched. Pre-4.6, the value 'NO' for that 4878 # setting is a no-op as far as xcode is concerned, but the compiler 4879 # behaves differently based on whether -fno-strict-aliasing is 4880 # specified or not. 4881 '-fno-strict-aliasing', # See http://crbug.com/32204. 4882 ], 4883 }, 4884 'target_conditions': [ 4885 ['_type=="executable"', { 4886 'postbuilds': [ 4887 { 4888 # Arranges for data (heap) pages to be protected against 4889 # code execution when running on Mac OS X 10.7 ("Lion"), and 4890 # ensures that the position-independent executable (PIE) bit 4891 # is set for ASLR when running on Mac OS X 10.5 ("Leopard"). 4892 'variables': { 4893 # Define change_mach_o_flags in a variable ending in _path 4894 # so that GYP understands it's a path and performs proper 4895 # relativization during dict merging. 4896 'change_mach_o_flags_path': 4897 'mac/change_mach_o_flags_from_xcode.sh', 4898 'change_mach_o_flags_options%': [ 4899 ], 4900 'target_conditions': [ 4901 ['mac_pie==0 or release_valgrind_build==1', { 4902 # Don't enable PIE if it's unwanted. It's unwanted if 4903 # the target specifies mac_pie=0 or if building for 4904 # Valgrind, because Valgrind doesn't understand slide. 4905 # See the similar mac_pie/release_valgrind_build check 4906 # below. 4907 'change_mach_o_flags_options': [ 4908 '--no-pie', 4909 ], 4910 }], 4911 ], 4912 }, 4913 'postbuild_name': 'Change Mach-O Flags', 4914 'action': [ 4915 '<(change_mach_o_flags_path)', 4916 '>@(change_mach_o_flags_options)', 4917 ], 4918 }, 4919 ], 4920 'conditions': [ 4921 ['asan==1', { 4922 'variables': { 4923 'asan_saves_file': 'asan.saves', 4924 }, 4925 'xcode_settings': { 4926 'CHROMIUM_STRIP_SAVE_FILE': '<(asan_saves_file)', 4927 }, 4928 }], 4929 ], 4930 'target_conditions': [ 4931 ['mac_pie==1 and release_valgrind_build==0', { 4932 # Turn on position-independence (ASLR) for executables. When 4933 # PIE is on for the Chrome executables, the framework will 4934 # also be subject to ASLR. 4935 # Don't do this when building for Valgrind, because Valgrind 4936 # doesn't understand slide. TODO: Make Valgrind on Mac OS X 4937 # understand slide, and get rid of the Valgrind check. 4938 'xcode_settings': { 4939 'OTHER_LDFLAGS': [ 4940 '-Wl,-pie', # Position-independent executable (MH_PIE) 4941 ], 4942 }, 4943 }], 4944 ], 4945 }], 4946 ['(_type=="executable" or _type=="shared_library" or \ 4947 _type=="loadable_module") and mac_strip!=0', { 4948 'target_conditions': [ 4949 ['mac_real_dsym == 1', { 4950 # To get a real .dSYM bundle produced by dsymutil, set the 4951 # debug information format to dwarf-with-dsym. Since 4952 # strip_from_xcode will not be used, set Xcode to do the 4953 # stripping as well. 4954 'configurations': { 4955 'Release_Base': { 4956 'xcode_settings': { 4957 'DEBUG_INFORMATION_FORMAT': 'dwarf-with-dsym', 4958 'DEPLOYMENT_POSTPROCESSING': 'YES', 4959 'STRIP_INSTALLED_PRODUCT': 'YES', 4960 'target_conditions': [ 4961 ['_type=="shared_library" or _type=="loadable_module"', { 4962 # The Xcode default is to strip debugging symbols 4963 # only (-S). Local symbols should be stripped as 4964 # well, which will be handled by -x. Xcode will 4965 # continue to insert -S when stripping even when 4966 # additional flags are added with STRIPFLAGS. 4967 'STRIPFLAGS': '-x', 4968 }], # _type=="shared_library" or _type=="loadable_module" 4969 ['_type=="executable"', { 4970 'conditions': [ 4971 ['asan==1', { 4972 'STRIPFLAGS': '-s $(CHROMIUM_STRIP_SAVE_FILE)', 4973 }] 4974 ], 4975 }], # _type=="executable" and asan==1 4976 ], # target_conditions 4977 }, # xcode_settings 4978 }, # configuration "Release" 4979 }, # configurations 4980 }, { # mac_real_dsym != 1 4981 # To get a fast fake .dSYM bundle, use a post-build step to 4982 # produce the .dSYM and strip the executable. strip_from_xcode 4983 # only operates in the Release configuration. 4984 'postbuilds': [ 4985 { 4986 'variables': { 4987 # Define strip_from_xcode in a variable ending in _path 4988 # so that gyp understands it's a path and performs proper 4989 # relativization during dict merging. 4990 'strip_from_xcode_path': 'mac/strip_from_xcode', 4991 }, 4992 'postbuild_name': 'Strip If Needed', 4993 'action': ['<(strip_from_xcode_path)'], 4994 }, 4995 ], # postbuilds 4996 }], # mac_real_dsym 4997 ], # target_conditions 4998 }], # (_type=="executable" or _type=="shared_library" or 4999 # _type=="loadable_module") and mac_strip!=0 5000 ], # target_conditions 5001 }, # target_defaults 5002 }], # OS=="mac" 5003 ['OS=="ios"', { 5004 'target_defaults': { 5005 'xcode_settings' : { 5006 # TODO(stuartmorgan): switch to c++0x (see TODOs in the clang 5007 # section above). 5008 'CLANG_CXX_LANGUAGE_STANDARD': 'gnu++0x', 5009 5010 'conditions': [ 5011 # Older Xcodes do not support -Wno-deprecated-register, so pass an 5012 # additional flag to suppress the "unknown compiler option" error. 5013 # Restrict this flag to builds that are either compiling with Xcode 5014 # or compiling with Xcode's Clang. This will allow Ninja builds to 5015 # continue failing on unknown compiler options. 5016 # TODO(rohitrao): This flag is temporary and should be removed as 5017 # soon as the iOS bots are updated to use Xcode 5.1. 5018 ['clang_xcode==1', { 5019 'WARNING_CFLAGS': [ 5020 '-Wno-unknown-warning-option', 5021 ], 5022 }], 5023 5024 # Limit the valid architectures depending on "target_subarch". 5025 # This need to include the "arm" architectures but also the "x86" 5026 # ones (they are used when building for the simulator). 5027 ['target_subarch=="arm32"', { 5028 'VALID_ARCHS': ['armv7', 'i386'], 5029 }], 5030 ['target_subarch=="arm64"', { 5031 'VALID_ARCHS': ['arm64', 'x86_64'], 5032 }], 5033 ['target_subarch=="both"', { 5034 'VALID_ARCHS': ['arm64', 'armv7', 'x86_64', 'i386'], 5035 }], 5036 ['use_system_libcxx==1', { 5037 'target_conditions': [ 5038 # Only use libc++ when building target for iOS not when building 5039 # tools for the host (OS X) as Mac targets OS X SDK 10.6 which 5040 # does not support libc++. 5041 ['_toolset=="target"', { 5042 'CLANG_CXX_LIBRARY': 'libc++', # -stdlib=libc++ 5043 }] 5044 ], 5045 }], 5046 ], 5047 }, 5048 'target_conditions': [ 5049 ['_toolset=="host"', { 5050 'xcode_settings': { 5051 'SDKROOT': 'macosx<(mac_sdk)', # -isysroot 5052 'MACOSX_DEPLOYMENT_TARGET': '<(mac_deployment_target)', 5053 'VALID_ARCHS': [ 5054 'x86_64', 5055 ], 5056 'ARCHS': [ 5057 'x86_64', 5058 ], 5059 }, 5060 }], 5061 ['_toolset=="target"', { 5062 'xcode_settings': { 5063 # This section should be for overriding host settings. But, 5064 # since we can't negate the iphone deployment target above, we 5065 # instead set it here for target only. 5066 'IPHONEOS_DEPLOYMENT_TARGET': '<(ios_deployment_target)', 5067 'ARCHS': ['$(ARCHS_STANDARD_INCLUDING_64_BIT)'], 5068 }, 5069 }], 5070 ['_type=="executable"', { 5071 'configurations': { 5072 'Release_Base': { 5073 'xcode_settings': { 5074 'DEPLOYMENT_POSTPROCESSING': 'YES', 5075 'STRIP_INSTALLED_PRODUCT': 'YES', 5076 }, 5077 }, 5078 'Debug_Base': { 5079 'xcode_settings': { 5080 # Remove dSYM to reduce build time. 5081 'DEBUG_INFORMATION_FORMAT': 'dwarf', 5082 }, 5083 }, 5084 }, 5085 'xcode_settings': { 5086 'conditions': [ 5087 ['chromium_ios_signing', { 5088 # iOS SDK wants everything for device signed. 5089 'CODE_SIGN_IDENTITY[sdk=iphoneos*]': 'iPhone Developer', 5090 }, { 5091 'CODE_SIGNING_REQUIRED': 'NO', 5092 'CODE_SIGN_IDENTITY[sdk=iphoneos*]': '', 5093 }], 5094 ], 5095 }, 5096 }], 5097 ], # target_conditions 5098 }, # target_defaults 5099 }], # OS=="ios" 5100 ['OS=="win"', { 5101 'target_defaults': { 5102 'defines': [ 5103 '_WIN32_WINNT=0x0602', 5104 'WINVER=0x0602', 5105 'WIN32', 5106 '_WINDOWS', 5107 'NOMINMAX', 5108 'PSAPI_VERSION=1', 5109 '_CRT_RAND_S', 5110 'CERT_CHAIN_PARA_HAS_EXTRA_FIELDS', 5111 'WIN32_LEAN_AND_MEAN', 5112 '_ATL_NO_OPENGL', 5113 # _HAS_EXCEPTIONS must match ExceptionHandling in msvs_settings. 5114 '_HAS_EXCEPTIONS=0', 5115 ], 5116 'conditions': [ 5117 ['buildtype=="Official"', { 5118 # In official builds, targets can self-select an optimization 5119 # level by defining a variable named 'optimize', and setting it 5120 # to one of 5121 # - "size", optimizes for minimal code size - the default. 5122 # - "speed", optimizes for speed over code size. 5123 # - "max", whole program optimization and link-time code 5124 # generation. This is very expensive and should be used 5125 # sparingly. 5126 'variables': { 5127 'optimize%': 'size', 5128 }, 5129 'msvs_settings': { 5130 'VCLinkerTool': { 5131 # Set /LTCG for the official builds. 5132 'LinkTimeCodeGeneration': '1', 5133 }, 5134 }, 5135 'target_conditions': [ 5136 ['optimize=="size"', { 5137 'msvs_settings': { 5138 'VCCLCompilerTool': { 5139 # 1, optimizeMinSpace, Minimize Size (/O1) 5140 'Optimization': '1', 5141 # 2, favorSize - Favor small code (/Os) 5142 'FavorSizeOrSpeed': '2', 5143 }, 5144 }, 5145 }, 5146 ], 5147 ['optimize=="speed"', { 5148 'msvs_settings': { 5149 'VCCLCompilerTool': { 5150 # 2, optimizeMaxSpeed, Maximize Speed (/O2) 5151 'Optimization': '2', 5152 # 1, favorSpeed - Favor fast code (/Ot) 5153 'FavorSizeOrSpeed': '1', 5154 }, 5155 }, 5156 }, 5157 ], 5158 ['optimize=="max"', { 5159 # Disable Warning 4702 ("Unreachable code") for the WPO/PGO 5160 # builds. Probably anything that this would catch that 5161 # wouldn't be caught in a normal build isn't going to 5162 # actually be a bug, so the incremental value of C4702 for 5163 # PGO builds is likely very small. 5164 'msvs_disabled_warnings': [ 5165 4702 5166 ], 5167 'msvs_settings': { 5168 'VCCLCompilerTool': { 5169 # 2, optimizeMaxSpeed, Maximize Speed (/O2) 5170 'Optimization': '2', 5171 # 1, favorSpeed - Favor fast code (/Ot) 5172 'FavorSizeOrSpeed': '1', 5173 # This implies link time code generation. 5174 'WholeProgramOptimization': 'true', 5175 }, 5176 }, 5177 }, 5178 ], 5179 ], 5180 }, 5181 ], 5182 ['secure_atl', { 5183 'defines': [ 5184 '_SECURE_ATL', 5185 ], 5186 }], 5187 ['msvs_express', { 5188 'configurations': { 5189 'x86_Base': { 5190 'msvs_settings': { 5191 'VCLinkerTool': { 5192 'AdditionalLibraryDirectories': 5193 ['<(windows_driver_kit_path)/lib/ATL/i386'], 5194 }, 5195 'VCLibrarianTool': { 5196 'AdditionalLibraryDirectories': 5197 ['<(windows_driver_kit_path)/lib/ATL/i386'], 5198 }, 5199 }, 5200 }, 5201 'x64_Base': { 5202 'msvs_settings': { 5203 'VCLibrarianTool': { 5204 'AdditionalLibraryDirectories': 5205 ['<(windows_driver_kit_path)/lib/ATL/amd64'], 5206 }, 5207 'VCLinkerTool': { 5208 'AdditionalLibraryDirectories': 5209 ['<(windows_driver_kit_path)/lib/ATL/amd64'], 5210 }, 5211 }, 5212 }, 5213 }, 5214 # https://code.google.com/p/chromium/issues/detail?id=372451#c20 5215 # Warning 4702 ("Unreachable code") should be re-enabled once 5216 # Express users are updated to VS2013 Update 2. 5217 'msvs_disabled_warnings': [ 5218 4702 5219 ], 5220 'msvs_settings': { 5221 'VCLinkerTool': { 5222 # Explicitly required when using the ATL with express 5223 'AdditionalDependencies': ['atlthunk.lib'], 5224 5225 # ATL 8.0 included in WDK 7.1 makes the linker to generate 5226 # almost eight hundred LNK4254 and LNK4078 warnings: 5227 # - warning LNK4254: section 'ATL' (50000040) merged into 5228 # '.rdata' (40000040) with different attributes 5229 # - warning LNK4078: multiple 'ATL' sections found with 5230 # different attributes 5231 'AdditionalOptions': ['/ignore:4254', '/ignore:4078'], 5232 }, 5233 }, 5234 'msvs_system_include_dirs': [ 5235 '<(windows_driver_kit_path)/inc/atl71', 5236 '<(windows_driver_kit_path)/inc/mfc42', 5237 ], 5238 }], 5239 ], 5240 'msvs_system_include_dirs': [ 5241 '<(windows_sdk_path)/Include/shared', 5242 '<(windows_sdk_path)/Include/um', 5243 '<(windows_sdk_path)/Include/winrt', 5244 '$(VSInstallDir)/VC/atlmfc/include', 5245 ], 5246 'msvs_cygwin_shell': 0, 5247 'msvs_disabled_warnings': [ 5248 # C4127: conditional expression is constant 5249 # This warning can in theory catch dead code and other problems, but 5250 # triggers in far too many desirable cases where the conditional 5251 # expression is either set by macros or corresponds some legitimate 5252 # compile-time constant expression (due to constant template args, 5253 # conditionals comparing the sizes of different types, etc.). Some of 5254 # these can be worked around, but it's not worth it. 5255 4127, 5256 5257 # C4351: new behavior: elements of array 'array' will be default 5258 # initialized 5259 # This is a silly "warning" that basically just alerts you that the 5260 # compiler is going to actually follow the language spec like it's 5261 # supposed to, instead of not following it like old buggy versions 5262 # did. There's absolutely no reason to turn this on. 5263 4351, 5264 5265 # C4355: 'this': used in base member initializer list 5266 # It's commonly useful to pass |this| to objects in a class' 5267 # initializer list. While this warning can catch real bugs, most of 5268 # the time the constructors in question don't attempt to call methods 5269 # on the passed-in pointer (until later), and annotating every legit 5270 # usage of this is simply more hassle than the warning is worth. 5271 4355, 5272 5273 # C4503: 'identifier': decorated name length exceeded, name was 5274 # truncated 5275 # This only means that some long error messages might have truncated 5276 # identifiers in the presence of lots of templates. It has no effect 5277 # on program correctness and there's no real reason to waste time 5278 # trying to prevent it. 5279 4503, 5280 5281 # C4611: interaction between 'function' and C++ object destruction is 5282 # non-portable 5283 # This warning is unavoidable when using e.g. setjmp/longjmp. MSDN 5284 # suggests using exceptions instead of setjmp/longjmp for C++, but 5285 # Chromium code compiles without exception support. We therefore have 5286 # to use setjmp/longjmp for e.g. JPEG decode error handling, which 5287 # means we have to turn off this warning (and be careful about how 5288 # object destruction happens in such cases). 5289 4611, 5290 5291 # TODO(maruel): These warnings are level 4. They will be slowly 5292 # removed as code is fixed. 5293 4100, # Unreferenced formal parameter 5294 4121, # Alignment of a member was sensitive to packing 5295 4189, # Local variable is initialized but not referenced 5296 4244, # Conversion from 'type1' to 'type2', possible loss of data 5297 4481, # Nonstandard extension used: override specifier 'keyword' 5298 4505, # Unreferenced local function has been removed 5299 4510, # Default constructor could not be generated 5300 4512, # Assignment operator could not be generated 5301 4610, # Object can never be instantiated 5302 ], 5303 'msvs_settings': { 5304 'VCCLCompilerTool': { 5305 'AdditionalOptions': ['/MP'], 5306 'MinimalRebuild': 'false', 5307 'BufferSecurityCheck': 'true', 5308 'EnableFunctionLevelLinking': 'true', 5309 'RuntimeTypeInfo': 'false', 5310 'WarningLevel': '4', 5311 'WarnAsError': 'true', 5312 'DebugInformationFormat': '3', 5313 # ExceptionHandling must match _HAS_EXCEPTIONS above. 5314 'ExceptionHandling': '0', 5315 }, 5316 'VCLibrarianTool': { 5317 'AdditionalOptions': ['/ignore:4221'], 5318 'AdditionalLibraryDirectories': [ 5319 '<(windows_sdk_path)/Lib/win8/um/x86', 5320 ], 5321 }, 5322 'VCLinkerTool': { 5323 'AdditionalDependencies': [ 5324 'wininet.lib', 5325 'dnsapi.lib', 5326 'version.lib', 5327 'msimg32.lib', 5328 'ws2_32.lib', 5329 'usp10.lib', 5330 'psapi.lib', 5331 'dbghelp.lib', 5332 'winmm.lib', 5333 'shlwapi.lib', 5334 ], 5335 'AdditionalLibraryDirectories': [ 5336 '<(windows_sdk_path)/Lib/win8/um/x86', 5337 ], 5338 'GenerateDebugInformation': 'true', 5339 'MapFileName': '$(OutDir)\\$(TargetName).map', 5340 'ImportLibrary': '$(OutDir)\\lib\\$(TargetName).lib', 5341 'FixedBaseAddress': '1', 5342 # SubSystem values: 5343 # 0 == not set 5344 # 1 == /SUBSYSTEM:CONSOLE 5345 # 2 == /SUBSYSTEM:WINDOWS 5346 # Most of the executables we'll ever create are tests 5347 # and utilities with console output. 5348 'SubSystem': '1', 5349 }, 5350 'VCMIDLTool': { 5351 'GenerateStublessProxies': 'true', 5352 'TypeLibraryName': '$(InputName).tlb', 5353 'OutputDirectory': '$(IntDir)', 5354 'HeaderFileName': '$(InputName).h', 5355 'DLLDataFileName': '$(InputName).dlldata.c', 5356 'InterfaceIdentifierFileName': '$(InputName)_i.c', 5357 'ProxyFileName': '$(InputName)_p.c', 5358 }, 5359 'VCResourceCompilerTool': { 5360 'Culture' : '1033', 5361 'AdditionalIncludeDirectories': [ 5362 '<(DEPTH)', 5363 '<(SHARED_INTERMEDIATE_DIR)', 5364 ], 5365 }, 5366 'target_conditions': [ 5367 ['_type=="executable"', { 5368 'VCManifestTool': { 5369 'EmbedManifest': 'true', 5370 }, 5371 }], 5372 ['_type=="executable" and ">(win_exe_compatibility_manifest)"!=""', { 5373 'VCManifestTool': { 5374 'AdditionalManifestFiles': [ 5375 '>(win_exe_compatibility_manifest)', 5376 ], 5377 }, 5378 }], 5379 ], 5380 'conditions': [ 5381 ['clang==1', { 5382 # Building with Clang on Windows is a work in progress and very 5383 # experimental. See crbug.com/82385. 5384 'VCCLCompilerTool': { 5385 'WarnAsError': 'false', 5386 'RuntimeTypeInfo': 'false', 5387 'AdditionalOptions': [ 5388 '-fmsc-version=1800', 5389 '/fallback', 5390 5391 # Many files use intrinsics without including this header. 5392 # TODO(hans): Fix those files, or move this to sub-GYPs. 5393 '/FIIntrin.h', 5394 5395 # TODO(hans): Make this list shorter eventually. 5396 '-Qunused-arguments', 5397 '-Wno-c++11-compat-deprecated-writable-strings', 5398 '-Wno-deprecated-declarations', 5399 '-Wno-empty-body', 5400 '-Wno-enum-conversion', 5401 '-Wno-extra-tokens', 5402 '-Wno-ignored-attributes', 5403 '-Wno-incompatible-pointer-types', 5404 '-Wno-int-to-void-pointer-cast', 5405 '-Wno-invalid-noreturn', 5406 '-Wno-logical-op-parentheses', 5407 '-Wno-microsoft', 5408 '-Wno-missing-braces', 5409 '-Wno-missing-declarations', 5410 '-Wno-msvc-include', 5411 '-Wno-null-dereference', 5412 '-Wno-overloaded-virtual', 5413 '-Wno-parentheses', 5414 '-Wno-pointer-sign', 5415 '-Wno-reorder', 5416 '-Wno-return-type-c-linkage', 5417 '-Wno-self-assign', 5418 '-Wno-sometimes-uninitialized', 5419 '-Wno-switch', 5420 '-Wno-tautological-compare', 5421 '-Wno-unknown-pragmas', 5422 '-Wno-unsequenced', 5423 '-Wno-unused-function', 5424 '-Wno-unused-private-field', 5425 '-Wno-unused-value', 5426 '-Wno-unused-variable', 5427 '-ferror-limit=1', 5428 ], 5429 }, 5430 }], 5431 ['asan==1', { 5432 # ASan on Windows is a work in progress and very experimental. 5433 # See crbug.com/345874. 5434 'VCCLCompilerTool': { 5435 'AdditionalOptions': [ 5436 '-fsanitize=address', 5437 ], 5438 'AdditionalIncludeDirectories': [ 5439 # MSVC needs to be able to find the sanitizer headers when 5440 # invoked via /fallback. This is critical for using macros 5441 # like ASAN_UNPOISON_MEMORY_REGION in files where we fall 5442 # back. 5443 '<(DEPTH)/<(make_clang_dir)/lib/clang/3.6.0/include_sanitizer', 5444 ], 5445 }, 5446 'VCLinkerTool': { 5447 'AdditionalLibraryDirectories': [ 5448 # TODO(hans): If make_clang_dir is absolute, this breaks. 5449 '<(DEPTH)/<(make_clang_dir)/lib/clang/3.6.0/lib/windows', 5450 ], 5451 }, 5452 'target_conditions': [ 5453 ['_type=="executable"', { 5454 'VCLinkerTool': { 5455 'AdditionalDependencies': [ 5456 'clang_rt.asan-i386.lib', 5457 ], 5458 }, 5459 }], 5460 ['_type=="shared_library" or _type=="loadable_module"', { 5461 'VCLinkerTool': { 5462 'AdditionalDependencies': [ 5463 'clang_rt.asan_dll_thunk-i386.lib', 5464 ], 5465 }, 5466 }], 5467 ], 5468 }], 5469 ], 5470 }, 5471 }, 5472 }], 5473 ['disable_nacl==1', { 5474 'target_defaults': { 5475 'defines': [ 5476 'DISABLE_NACL', 5477 ], 5478 }, 5479 }], 5480 ['OS=="win" and msvs_use_common_linker_extras', { 5481 'target_defaults': { 5482 'msvs_settings': { 5483 'VCLinkerTool': { 5484 'DelayLoadDLLs': [ 5485 'dbghelp.dll', 5486 'dwmapi.dll', 5487 'shell32.dll', 5488 'uxtheme.dll', 5489 ], 5490 }, 5491 }, 5492 'configurations': { 5493 'x86_Base': { 5494 'msvs_settings': { 5495 'VCLinkerTool': { 5496 'AdditionalOptions': [ 5497 '/safeseh', 5498 '/dynamicbase', 5499 '/ignore:4199', 5500 '/ignore:4221', 5501 '/nxcompat', 5502 ], 5503 'conditions': [ 5504 ['syzyasan==0', { 5505 'AdditionalOptions': ['/largeaddressaware'], 5506 }], 5507 ], 5508 }, 5509 }, 5510 }, 5511 'x64_Base': { 5512 'msvs_settings': { 5513 'VCLinkerTool': { 5514 'AdditionalOptions': [ 5515 # safeseh is not compatible with x64 5516 '/dynamicbase', 5517 '/ignore:4199', 5518 '/ignore:4221', 5519 '/nxcompat', 5520 ], 5521 }, 5522 }, 5523 }, 5524 }, 5525 }, 5526 }], 5527 ['enable_new_npdevice_api==1', { 5528 'target_defaults': { 5529 'defines': [ 5530 'ENABLE_NEW_NPDEVICE_API', 5531 ], 5532 }, 5533 }], 5534 # Don't warn about the "typedef 'foo' locally defined but not used" 5535 # for gcc 4.8. 5536 # TODO: remove this flag once all builds work. See crbug.com/227506 5537 ['gcc_version>=48 and clang==0', { 5538 'target_defaults': { 5539 'cflags': [ 5540 '-Wno-unused-local-typedefs', 5541 ], 5542 }, 5543 }], 5544 ['gcc_version>=48 and clang==0 and host_clang==1', { 5545 'target_defaults': { 5546 'target_conditions': [ 5547 ['_toolset=="host"', { 'cflags!': [ '-Wno-unused-local-typedefs' ]}], 5548 ], 5549 }, 5550 }], 5551 # We need a special case to handle the android webview build on mac because 5552 # the host gcc there doesn't accept this flag, but the target gcc may 5553 # require it. 5554 ['gcc_version>=48 and android_webview_build==1 and host_os=="mac"', { 5555 'target_defaults': { 5556 'target_conditions': [ 5557 ['_toolset=="host"', { 5558 'cflags!': [ 5559 '-Wno-unused-local-typedefs', 5560 ], 5561 }], 5562 ], 5563 }, 5564 }], 5565 ['clang==1 and ((OS!="mac" and OS!="ios") or clang_xcode==0) ' 5566 'and OS!="win"', { 5567 'make_global_settings': [ 5568 ['CC', '<(make_clang_dir)/bin/clang'], 5569 ['CXX', '<(make_clang_dir)/bin/clang++'], 5570 ['CC.host', '$(CC)'], 5571 ['CXX.host', '$(CXX)'], 5572 ], 5573 }], 5574 ['clang==1 and OS=="win"', { 5575 'make_global_settings': [ 5576 # On Windows, gyp's ninja generator only looks at CC. 5577 ['CC', '<(make_clang_dir)/bin/clang-cl'], 5578 ], 5579 }], 5580 ['OS=="android" and clang==0', { 5581 # Hardcode the compiler names in the Makefile so that 5582 # it won't depend on the environment at make time. 5583 'make_global_settings': [ 5584 ['CC', '<!(/bin/echo -n <(android_toolchain)/*-gcc)'], 5585 ['CXX', '<!(/bin/echo -n <(android_toolchain)/*-g++)'], 5586 ['CC.host', '<(host_cc)'], 5587 ['CXX.host', '<(host_cxx)'], 5588 ], 5589 }], 5590 ['OS=="linux" and target_arch=="mipsel"', { 5591 'make_global_settings': [ 5592 ['CC', '<(sysroot)/../bin/mipsel-linux-gnu-gcc'], 5593 ['CXX', '<(sysroot)/../bin/mipsel-linux-gnu-g++'], 5594 ['CC.host', '<(host_cc)'], 5595 ['CXX.host', '<(host_cxx)'], 5596 ], 5597 }], 5598 ['OS=="linux" and target_arch=="arm" and host_arch!="arm" and chromeos==0 and clang==0', { 5599 # Set default ARM cross compiling on linux. These can be overridden 5600 # using CC/CXX/etc environment variables. 5601 'make_global_settings': [ 5602 ['CC', '<!(which arm-linux-gnueabihf-gcc)'], 5603 ['CXX', '<!(which arm-linux-gnueabihf-g++)'], 5604 ['CC.host', '<(host_cc)'], 5605 ['CXX.host', '<(host_cxx)'], 5606 ], 5607 }], 5608 5609 # TODO(yyanagisawa): supports GENERATOR==make 5610 # make generator doesn't support CC_wrapper without CC 5611 # in make_global_settings yet. 5612 ['use_goma==1 and ("<(GENERATOR)"=="ninja" or clang==1)', { 5613 'make_global_settings': [ 5614 ['CC_wrapper', '<(gomadir)/gomacc'], 5615 ['CXX_wrapper', '<(gomadir)/gomacc'], 5616 ['CC.host_wrapper', '<(gomadir)/gomacc'], 5617 ['CXX.host_wrapper', '<(gomadir)/gomacc'], 5618 ], 5619 }], 5620 ], 5621 'xcode_settings': { 5622 # DON'T ADD ANYTHING NEW TO THIS BLOCK UNLESS YOU REALLY REALLY NEED IT! 5623 # This block adds *project-wide* configuration settings to each project 5624 # file. It's almost always wrong to put things here. Specify your 5625 # custom xcode_settings in target_defaults to add them to targets instead. 5626 5627 'conditions': [ 5628 # In an Xcode Project Info window, the "Base SDK for All Configurations" 5629 # setting sets the SDK on a project-wide basis. In order to get the 5630 # configured SDK to show properly in the Xcode UI, SDKROOT must be set 5631 # here at the project level. 5632 ['OS=="mac"', { 5633 'conditions': [ 5634 ['mac_sdk_path==""', { 5635 'SDKROOT': 'macosx<(mac_sdk)', # -isysroot 5636 }, { 5637 'SDKROOT': '<(mac_sdk_path)', # -isysroot 5638 }], 5639 ], 5640 }], 5641 ['OS=="ios"', { 5642 'conditions': [ 5643 ['ios_sdk_path==""', { 5644 'conditions': [ 5645 # TODO(justincohen): Ninja only supports simulator for now. 5646 ['"<(GENERATOR)"=="xcode"', { 5647 'SDKROOT': 'iphoneos<(ios_sdk)', # -isysroot 5648 }, { 5649 'SDKROOT': 'iphonesimulator<(ios_sdk)', # -isysroot 5650 }], 5651 ], 5652 }, { 5653 'SDKROOT': '<(ios_sdk_path)', # -isysroot 5654 }], 5655 ], 5656 }], 5657 ['OS=="ios"', { 5658 # Target both iPhone and iPad. 5659 'TARGETED_DEVICE_FAMILY': '1,2', 5660 }, { # OS!="ios" 5661 'conditions': [ 5662 ['target_arch=="x64"', { 5663 'ARCHS': [ 5664 'x86_64' 5665 ], 5666 }], 5667 ['target_arch=="ia32"', { 5668 'ARCHS': [ 5669 'i386' 5670 ], 5671 }], 5672 ], 5673 }], 5674 ], 5675 5676 # The Xcode generator will look for an xcode_settings section at the root 5677 # of each dict and use it to apply settings on a file-wide basis. Most 5678 # settings should not be here, they should be in target-specific 5679 # xcode_settings sections, or better yet, should use non-Xcode-specific 5680 # settings in target dicts. SYMROOT is a special case, because many other 5681 # Xcode variables depend on it, including variables such as 5682 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something 5683 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the 5684 # files to appear (when present) in the UI as actual files and not red 5685 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR, 5686 # and therefore SYMROOT, needs to be set at the project level. 5687 'SYMROOT': '<(DEPTH)/xcodebuild', 5688 }, 5689} 5690