OLD | NEW |
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/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/config/sanitizers/sanitizers.gni") | 7 import("//build/config/sanitizers/sanitizers.gni") |
8 | 8 |
9 # Contains the dependencies needed for sanitizers to link into executables and | 9 # Contains the dependencies needed for sanitizers to link into executables and |
10 # shared_libraries. Unconditionally depend upon this target as it is empty if | 10 # shared_libraries. Unconditionally depend upon this target as it is empty if |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 if (is_win) { | 145 if (is_win) { |
146 cflags += [ "-fsanitize-blacklist=" + | 146 cflags += [ "-fsanitize-blacklist=" + |
147 rebase_path("//tools/memory/asan/blacklist_win.txt", | 147 rebase_path("//tools/memory/asan/blacklist_win.txt", |
148 root_build_dir) ] | 148 root_build_dir) ] |
149 } else { | 149 } else { |
150 # TODO(rnk): Remove this as discussed in http://crbug.com/427202. | 150 # TODO(rnk): Remove this as discussed in http://crbug.com/427202. |
151 cflags += | 151 cflags += |
152 [ "-fsanitize-blacklist=" + | 152 [ "-fsanitize-blacklist=" + |
153 rebase_path("//tools/memory/asan/blacklist.txt", root_build_dir) ] | 153 rebase_path("//tools/memory/asan/blacklist.txt", root_build_dir) ] |
154 } | 154 } |
155 if (is_android) { | 155 if (is_mac) { |
156 # Android build relies on -Wl,--gc-sections removing unreachable code. | |
157 # ASan instrumentation for globals inhibits this and results in a | |
158 # library with unresolvable relocations. | |
159 # TODO(eugenis): find a way to reenable this. | |
160 cflags += [ | |
161 "-mllvm", | |
162 "-asan-globals=0", | |
163 ] | |
164 } else if (is_mac) { | |
165 # http://crbug.com/352073 | 156 # http://crbug.com/352073 |
166 cflags += [ | 157 cflags += [ |
167 "-mllvm", | 158 "-mllvm", |
168 "-asan-globals=0", | 159 "-asan-globals=0", |
169 ] | 160 ] |
170 libs = [ "clang_rt.asan_osx_dynamic" ] | 161 libs = [ "clang_rt.asan_osx_dynamic" ] |
171 | 162 |
172 # TODO(GYP): deal with mac_bundles. | 163 # TODO(GYP): deal with mac_bundles. |
173 } else if (is_win) { | 164 } else if (is_win) { |
174 assert(target_cpu == "x86", "WinASan is 32-bit only currently") | 165 assert(target_cpu == "x86", "WinASan is 32-bit only currently") |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
306 if (target_cpu == "arm") { | 297 if (target_cpu == "arm") { |
307 # http://crbug.com/517105 | 298 # http://crbug.com/517105 |
308 cflags += [ | 299 cflags += [ |
309 "-mllvm", | 300 "-mllvm", |
310 "-sanitizer-coverage-block-threshold=0", | 301 "-sanitizer-coverage-block-threshold=0", |
311 ] | 302 ] |
312 } | 303 } |
313 defines = [ "SANITIZER_COVERAGE" ] | 304 defines = [ "SANITIZER_COVERAGE" ] |
314 } | 305 } |
315 } | 306 } |
OLD | NEW |