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