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_mac) { | 155 if (is_android) { |
| 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) { |
156 # http://crbug.com/352073 | 165 # http://crbug.com/352073 |
157 cflags += [ | 166 cflags += [ |
158 "-mllvm", | 167 "-mllvm", |
159 "-asan-globals=0", | 168 "-asan-globals=0", |
160 ] | 169 ] |
161 libs = [ "clang_rt.asan_osx_dynamic" ] | 170 libs = [ "clang_rt.asan_osx_dynamic" ] |
162 | 171 |
163 # TODO(GYP): deal with mac_bundles. | 172 # TODO(GYP): deal with mac_bundles. |
164 } else if (is_win) { | 173 } else if (is_win) { |
165 assert(target_cpu == "x86", "WinASan is 32-bit only currently") | 174 assert(target_cpu == "x86", "WinASan is 32-bit only currently") |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
297 if (target_cpu == "arm") { | 306 if (target_cpu == "arm") { |
298 # http://crbug.com/517105 | 307 # http://crbug.com/517105 |
299 cflags += [ | 308 cflags += [ |
300 "-mllvm", | 309 "-mllvm", |
301 "-sanitizer-coverage-block-threshold=0", | 310 "-sanitizer-coverage-block-threshold=0", |
302 ] | 311 ] |
303 } | 312 } |
304 defines = [ "SANITIZER_COVERAGE" ] | 313 defines = [ "SANITIZER_COVERAGE" ] |
305 } | 314 } |
306 } | 315 } |
OLD | NEW |