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

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

Issue 2931983003: Move libc++ configs and flags out of //build/config/sanitizers (Closed)
Patch Set: Update installer files Created 3 years, 6 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 | « build/config/sanitizers/BUILD.gn ('k') | chrome/installer/linux/BUILD.gn » ('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 import("//build/config/chrome_build.gni") 5 import("//build/config/chrome_build.gni")
6 import("//build/config/chromecast_build.gni") 6 import("//build/config/chromecast_build.gni")
7 import("//build/toolchain/toolchain.gni") 7 import("//build/toolchain/toolchain.gni")
8 8
9 declare_args() { 9 declare_args() {
10 # Compile for Address Sanitizer to find memory bugs. 10 # Compile for Address Sanitizer to find memory bugs.
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 is_ubsan = false 120 is_ubsan = false
121 is_ubsan_null = false 121 is_ubsan_null = false
122 is_ubsan_no_recover = false 122 is_ubsan_no_recover = false
123 is_ubsan_security = false 123 is_ubsan_security = false
124 is_ubsan_vptr = false 124 is_ubsan_vptr = false
125 msan_track_origins = 0 125 msan_track_origins = 0
126 sanitizer_coverage_flags = "" 126 sanitizer_coverage_flags = ""
127 use_afl = false 127 use_afl = false
128 use_cfi_diag = false 128 use_cfi_diag = false
129 use_cfi_recover = false 129 use_cfi_recover = false
130 use_custom_libcxx = false
131 use_drfuzz = false 130 use_drfuzz = false
132 use_libfuzzer = false 131 use_libfuzzer = false
133 use_prebuilt_instrumented_libraries = false 132 use_prebuilt_instrumented_libraries = false
134 use_locally_built_instrumented_libraries = false 133 use_locally_built_instrumented_libraries = false
135 use_sanitizer_coverage = false 134 use_sanitizer_coverage = false
136 } 135 }
137 136
138 # Args that are in turn dependent on other args must be in a separate 137 # Args that are in turn dependent on other args must be in a separate
139 # declare_args block. User overrides are only applied at the end of a 138 # declare_args block. User overrides are only applied at the end of a
140 # declare_args block. 139 # declare_args block.
141 declare_args() { 140 declare_args() {
142 # Use libc++ (buildtools/third_party/libc++ and
143 # buildtools/third_party/libc++abi) instead of stdlibc++ as standard library.
144 # This is intended to be used for instrumented builds.
145 use_custom_libcxx =
146 (is_asan && is_linux && !is_chromeos &&
147 (!is_chromecast || is_cast_desktop_build)) || is_tsan || is_msan ||
148 is_ubsan || is_ubsan_security || (use_libfuzzer && !is_mac) || use_afl
149
150 # Enable -fsanitize-coverage. 141 # Enable -fsanitize-coverage.
151 use_sanitizer_coverage = 142 use_sanitizer_coverage =
152 use_libfuzzer || use_afl || sanitizer_coverage_flags != "" 143 use_libfuzzer || use_afl || sanitizer_coverage_flags != ""
153 144
154 # Detect overflow/underflow for global objects. 145 # Detect overflow/underflow for global objects.
155 # 146 #
156 # Mac: http://crbug.com/352073 147 # Mac: http://crbug.com/352073
157 asan_globals = !is_mac 148 asan_globals = !is_mac
158 } 149 }
159 150
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 199
209 # ASAN build on Windows is not working in debug mode. Intercepting memory 200 # ASAN build on Windows is not working in debug mode. Intercepting memory
210 # allocation functions is hard on Windows and not yet implemented in LLVM. 201 # allocation functions is hard on Windows and not yet implemented in LLVM.
211 assert(!is_win || !is_debug || !is_asan, 202 assert(!is_win || !is_debug || !is_asan,
212 "ASan on Windows doesn't work in debug (set is_debug=false).") 203 "ASan on Windows doesn't work in debug (set is_debug=false).")
213 204
214 # Make sure that if we recover on detection (i.e. not crash), diagnostics are 205 # Make sure that if we recover on detection (i.e. not crash), diagnostics are
215 # printed. 206 # printed.
216 assert(!use_cfi_recover || use_cfi_diag, 207 assert(!use_cfi_recover || use_cfi_diag,
217 "Only use CFI recovery together with diagnostics.") 208 "Only use CFI recovery together with diagnostics.")
OLDNEW
« no previous file with comments | « build/config/sanitizers/BUILD.gn ('k') | chrome/installer/linux/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698