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

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

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

Powered by Google App Engine
This is Rietveld 408576698