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

Side by Side Diff: build/config/sanitizers/BUILD.gn

Issue 2645263003: Revert of Enable use-after-scope check in ASAN configs. (Closed)
Patch Set: Created 3 years, 11 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 | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 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_overrides/build.gni") 5 import("//build_overrides/build.gni")
6 import("//build/config/chrome_build.gni") 6 import("//build/config/chrome_build.gni")
7 import("//build/config/chromecast_build.gni") 7 import("//build/config/chromecast_build.gni")
8 import("//build/config/clang/clang.gni") 8 import("//build/config/clang/clang.gni")
9 import("//build/config/sanitizers/sanitizers.gni") 9 import("//build/config/sanitizers/sanitizers.gni")
10 import("//build/toolchain/toolchain.gni") 10 import("//build/toolchain/toolchain.gni")
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 config("default_sanitizer_ldflags") { 193 config("default_sanitizer_ldflags") {
194 visibility = [ 194 visibility = [
195 ":default_sanitizer_flags", 195 ":default_sanitizer_flags",
196 ":deps", 196 ":deps",
197 ] 197 ]
198 198
199 if (is_posix) { 199 if (is_posix) {
200 ldflags = [] 200 ldflags = []
201 if (is_asan) { 201 if (is_asan) {
202 ldflags += [ "-fsanitize=address" ] 202 ldflags += [ "-fsanitize=address" ]
203 if (!is_mac) {
204 ldflags += [ "-fsanitize-address-use-after-scope" ]
205 }
206 } 203 }
207 if (is_lsan) { 204 if (is_lsan) {
208 ldflags += [ "-fsanitize=leak" ] 205 ldflags += [ "-fsanitize=leak" ]
209 } 206 }
210 if (is_tsan) { 207 if (is_tsan) {
211 ldflags += [ "-fsanitize=thread" ] 208 ldflags += [ "-fsanitize=thread" ]
212 } 209 }
213 if (is_msan) { 210 if (is_msan) {
214 ldflags += [ "-fsanitize=memory" ] 211 ldflags += [ "-fsanitize=memory" ]
215 } 212 }
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 "-isystem" + rebase_path("$prefix/libc++/$include", root_build_dir), 302 "-isystem" + rebase_path("$prefix/libc++/$include", root_build_dir),
306 "-isystem" + rebase_path("$prefix/libc++abi/$include", root_build_dir), 303 "-isystem" + rebase_path("$prefix/libc++abi/$include", root_build_dir),
307 ] 304 ]
308 } 305 }
309 } 306 }
310 307
311 config("asan_flags") { 308 config("asan_flags") {
312 cflags = [] 309 cflags = []
313 if (is_asan) { 310 if (is_asan) {
314 cflags += [ "-fsanitize=address" ] 311 cflags += [ "-fsanitize=address" ]
315 if (!is_mac) {
316 cflags += [ "-fsanitize-address-use-after-scope" ]
317 }
318 if (!asan_globals) { 312 if (!asan_globals) {
319 cflags += [ 313 cflags += [
320 "-mllvm", 314 "-mllvm",
321 "-asan-globals=0", 315 "-asan-globals=0",
322 ] 316 ]
323 } 317 }
324 if (is_win) { 318 if (is_win) {
325 if (!defined(asan_win_blacklist_path)) { 319 if (!defined(asan_win_blacklist_path)) {
326 asan_win_blacklist_path = 320 asan_win_blacklist_path =
327 rebase_path("//tools/memory/asan/blacklist_win.txt", root_build_dir) 321 rebase_path("//tools/memory/asan/blacklist_win.txt", root_build_dir)
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
566 # This allows to selectively disable ubsan_vptr, when needed. In particular, 560 # This allows to selectively disable ubsan_vptr, when needed. In particular,
567 # if some third_party code is required to be compiled without rtti, which 561 # if some third_party code is required to be compiled without rtti, which
568 # is a requirement for ubsan_vptr. 562 # is a requirement for ubsan_vptr.
569 config("default_sanitizer_flags_but_ubsan_vptr") { 563 config("default_sanitizer_flags_but_ubsan_vptr") {
570 configs = all_sanitizer_configs - [ ":ubsan_vptr_flags" ] 564 configs = all_sanitizer_configs - [ ":ubsan_vptr_flags" ]
571 } 565 }
572 566
573 config("default_sanitizer_flags_but_coverage") { 567 config("default_sanitizer_flags_but_coverage") {
574 configs = all_sanitizer_configs - [ ":coverage_flags" ] 568 configs = all_sanitizer_configs - [ ":coverage_flags" ]
575 } 569 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698