Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(700)

Side by Side Diff: build/config/sanitizers/sanitizers.gni

Issue 2216183002: Only use sanitizers with default toolchain on Windows as well. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | build/toolchain/gcc_toolchain.gni » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2015 The Chromium Authors. All rights reserved. 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 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 declare_args() { 5 declare_args() {
6 # Compile for Address Sanitizer to find memory bugs. 6 # Compile for Address Sanitizer to find memory bugs.
7 is_asan = false 7 is_asan = false
8 8
9 # Compile for Leak Sanitizer to find leaks. 9 # Compile for Leak Sanitizer to find leaks.
10 is_lsan = false 10 is_lsan = false
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 83
84 # Value for -fsanitize-coverage flag. Setting this causes 84 # Value for -fsanitize-coverage flag. Setting this causes
85 # use_sanitizer_coverage to be enabled. 85 # use_sanitizer_coverage to be enabled.
86 # Default value when unset and use_afl=true: 86 # Default value when unset and use_afl=true:
87 # trace-pc 87 # trace-pc
88 # Default value when unset and use_sanitizer_coverage=true: 88 # Default value when unset and use_sanitizer_coverage=true:
89 # edge,indirect-calls,8bit-counters 89 # edge,indirect-calls,8bit-counters
90 sanitizer_coverage_flags = "" 90 sanitizer_coverage_flags = ""
91 } 91 }
92 92
93 # Disable sanitizers for non-default toolchains.
94 if (current_toolchain != default_toolchain) {
95 is_asan = false
96 is_cfi = false
97 is_lsan = false
98 is_msan = false
99 is_syzyasan = false
100 is_tsan = false
101 is_ubsan = false
102 is_ubsan_null = false
103 is_ubsan_no_recover = false
104 is_ubsan_security = false
105 is_ubsan_vptr = false
106 msan_track_origins = 0
107 sanitizer_coverage_flags = ""
108 use_cfi_diag = false
109 use_custom_libcxx = false
110 use_drfuzz = false
111 use_libfuzzer = false
112 use_prebuilt_instrumented_libraries = false
113 use_locally_built_instrumented_libraries = false
114 use_sanitizer_coverage = false
115 }
116
93 # Args that are in turn dependent on other args must be in a separate 117 # Args that are in turn dependent on other args must be in a separate
94 # declare_args block. User overrides are only applied at the end of a 118 # declare_args block. User overrides are only applied at the end of a
95 # declare_args block. 119 # declare_args block.
96 declare_args() { 120 declare_args() {
97 # Use libc++ (buildtools/third_party/libc++ and 121 # Use libc++ (buildtools/third_party/libc++ and
98 # buildtools/third_party/libc++abi) instead of stdlibc++ as standard library. 122 # buildtools/third_party/libc++abi) instead of stdlibc++ as standard library.
99 # This is intended to be used for instrumented builds. 123 # This is intended to be used for instrumented builds.
100 use_custom_libcxx = 124 use_custom_libcxx =
101 (is_asan && is_linux && !is_chromeos) || is_tsan || is_msan || is_ubsan || 125 (is_asan && is_linux && !is_chromeos) || is_tsan || is_msan || is_ubsan ||
102 is_ubsan_security || use_libfuzzer || use_afl 126 is_ubsan_security || use_libfuzzer || use_afl
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 # this condition. We may also be able to find another way to enable your case 166 # this condition. We may also be able to find another way to enable your case
143 # without having people accidentally get broken builds by compiling an 167 # without having people accidentally get broken builds by compiling an
144 # unsupported or unadvisable configurations. 168 # unsupported or unadvisable configurations.
145 # 169 #
146 # For one-off testing, just comment this assertion out. 170 # For one-off testing, just comment this assertion out.
147 assert(!is_debug || !(is_msan || is_ubsan || is_ubsan_null || is_ubsan_vptr), 171 assert(!is_debug || !(is_msan || is_ubsan || is_ubsan_null || is_ubsan_vptr),
148 "Sanitizers should generally be used in release (set is_debug=false).") 172 "Sanitizers should generally be used in release (set is_debug=false).")
149 173
150 assert(!is_msan || (is_linux && current_cpu == "x64"), 174 assert(!is_msan || (is_linux && current_cpu == "x64"),
151 "MSan currently only works on 64-bit Linux and ChromeOS builds.") 175 "MSan currently only works on 64-bit Linux and ChromeOS builds.")
OLDNEW
« no previous file with comments | « no previous file | build/toolchain/gcc_toolchain.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698