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

Unified 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, 1 month 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/config/sanitizers/BUILD.gn
diff --git a/build/config/sanitizers/BUILD.gn b/build/config/sanitizers/BUILD.gn
index 19d0a3ff856c0f27e4035a0e596be7e3479f52e9..c958e2d3e2ed922ee2e5af0f4dab913aa03aa0a5 100644
--- a/build/config/sanitizers/BUILD.gn
+++ b/build/config/sanitizers/BUILD.gn
@@ -102,8 +102,21 @@ config("default_sanitizer_flags") {
"-fsanitize=address",
"-fsanitize-blacklist=$asan_blacklist_path",
]
- if (is_mac) {
- cflags += [ "-mllvm -asan-globals=0" ] # http://crbug.com/352073
+ if (is_android) {
+ # Android build relies on -Wl,--gc-sections removing unreachable code.
+ # ASan instrumentation for globals inhibits this and results in a
+ # library with unresolvable relocations.
+ # TODO(eugenis): find a way to reenable this.
+ cflags += [
+ "-mllvm",
+ "-asan-globals=0",
+ ]
+ } else if (is_mac) {
+ # http://crbug.com/352073
+ cflags += [
+ "-mllvm",
+ "-asan-globals=0",
+ ]
# TODO(GYP): deal with mac_bundles.
}
}
« 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