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