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

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

Issue 1469943002: GN(android): Fix up support for is_asan=true (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add include Created 5 years 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/android/internal_rules.gni ('k') | build/config/sanitizers/sanitizers.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 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/config/sanitizers/sanitizers.gni") 5 import("//build/config/sanitizers/sanitizers.gni")
6 6
7 # Contains the dependencies needed for sanitizers to link into executables and 7 # Contains the dependencies needed for sanitizers to link into executables and
8 # shared_libraries. Unconditionally depend upon this target as it is empty if 8 # shared_libraries. Unconditionally depend upon this target as it is empty if
9 # |is_asan|, |is_lsan|, |is_tsan|, |is_msan| and |use_custom_libcxx| are false. 9 # |is_asan|, |is_lsan|, |is_tsan|, |is_msan| and |use_custom_libcxx| are false.
10 group("deps") { 10 group("deps") {
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 "-gline-tables-only", 95 "-gline-tables-only",
96 ] 96 ]
97 } 97 }
98 if (is_asan) { 98 if (is_asan) {
99 asan_blacklist_path = 99 asan_blacklist_path =
100 rebase_path("//tools/memory/asan/blacklist.txt", root_build_dir) 100 rebase_path("//tools/memory/asan/blacklist.txt", root_build_dir)
101 cflags += [ 101 cflags += [
102 "-fsanitize=address", 102 "-fsanitize=address",
103 "-fsanitize-blacklist=$asan_blacklist_path", 103 "-fsanitize-blacklist=$asan_blacklist_path",
104 ] 104 ]
105 if (is_mac) { 105 if (is_android) {
106 cflags += [ "-mllvm -asan-globals=0" ] # http://crbug.com/352073 106 # Android build relies on -Wl,--gc-sections removing unreachable code.
107 # ASan instrumentation for globals inhibits this and results in a
108 # library with unresolvable relocations.
109 # TODO(eugenis): find a way to reenable this.
110 cflags += [
111 "-mllvm",
112 "-asan-globals=0",
113 ]
114 } else if (is_mac) {
115 # http://crbug.com/352073
116 cflags += [
117 "-mllvm",
118 "-asan-globals=0",
119 ]
107 # TODO(GYP): deal with mac_bundles. 120 # TODO(GYP): deal with mac_bundles.
108 } 121 }
109 } 122 }
110 if (is_lsan) { 123 if (is_lsan) {
111 cflags += [ "-fsanitize=leak" ] 124 cflags += [ "-fsanitize=leak" ]
112 } 125 }
113 if (is_tsan) { 126 if (is_tsan) {
114 tsan_blacklist_path = 127 tsan_blacklist_path =
115 rebase_path("//tools/memory/tsan_v2/ignores.txt", root_build_dir) 128 rebase_path("//tools/memory/tsan_v2/ignores.txt", root_build_dir)
116 cflags += [ 129 cflags += [
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 241
229 config("default_sanitizer_coverage_flags") { 242 config("default_sanitizer_coverage_flags") {
230 cflags = [] 243 cflags = []
231 244
232 if (use_sanitizer_coverage) { 245 if (use_sanitizer_coverage) {
233 # FIXME: make this configurable. 246 # FIXME: make this configurable.
234 cflags += 247 cflags +=
235 [ "-fsanitize-coverage=edge,indirect-calls,8bit-counters,trace-cmp" ] 248 [ "-fsanitize-coverage=edge,indirect-calls,8bit-counters,trace-cmp" ]
236 } 249 }
237 } 250 }
OLDNEW
« no previous file with comments | « build/config/android/internal_rules.gni ('k') | build/config/sanitizers/sanitizers.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698