Update V8 to version 4.7.44.
[chromium-blink-merge.git] / build / config / sanitizers / sanitizers.gni
blobc575eb1cc1f680218a6fe220ab38ae5af4b09ec6
1 # Copyright 2015 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
5 declare_args() {
6   # Use libc++ (buildtools/third_party/libc++ and
7   # buildtools/third_party/libc++abi) instead of stdlibc++ as standard library.
8   # This is intended to be used for instrumented builds.
9   use_custom_libcxx = (is_asan && is_linux) || is_tsan || is_msan
11   # Track where uninitialized memory originates from. From fastest to slowest:
12   # 0 - no tracking, 1 - track only the initial allocation site, 2 - track the
13   # chain of stores leading from allocation site to use site.
14   msan_track_origins = 2
16   # Use dynamic libraries instrumented by one of the sanitizers instead of the
17   # standard system libraries. Set this flag to download prebuilt binaries from
18   # GCS.
19   use_prebuilt_instrumented_libraries = false
21   # Enable building with SyzyAsan which can find certain types of memory
22   # errors. Only works on Windows. See
23   # https://code.google.com/p/sawbuck/wiki/SyzyASanHowTo
24   is_syzyasan = false
26   # Compile with Control Flow Integrity to protect virtual calls and casts.
27   # See http://clang.llvm.org/docs/ControlFlowIntegrity.html
28   is_cfi = false
30   # By default, Control Flow Integrity will crash the program if it detects a
31   # violation. Set this to true to print detailed diagnostics instead.
32   use_cfi_diag = false
35 # MSan only links Chrome properly in release builds (brettw -- 9/1/2015). The
36 # same is possibly true for the other non-ASan sanitizers. But regardless of
37 # whether it links, one would normally never run a sanitizer in debug mode.
38 # Running in debug mode probably indicates you forgot to set the "is_debug =
39 # false" flag in the build args. ASan seems to run fine in debug mode.
41 # If you find a use-case where you want to compile a sanitizer in debug mode
42 # and have verified it works, ask brettw and we can consider removing it from
43 # this condition. We may also be able to find another way to enable your case
44 # without having people accidentally get broken builds by compiling an
45 # unsupported or unadvisable configurations.
47 # For one-off testing, just comment this assertion out.
48 assert(!is_debug || !(is_msan || is_lsan || is_tsan),
49        "Sanitizers should generally be used in release (set is_debug=false).")