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

Unified Diff: build/config/sanitizers/BUILD.gn

Issue 1889073002: Revert of Android: Avoid linking with --gc-sections. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build/config/compiler/BUILD.gn ('k') | chrome/browser/ui/BUILD.gn » ('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 258d69fb1f2f1e903a037828de9fb413a28b1a88..ce48fedc86fc74d752a67a4d38179083b157d884 100644
--- a/build/config/sanitizers/BUILD.gn
+++ b/build/config/sanitizers/BUILD.gn
@@ -152,7 +152,16 @@
[ "-fsanitize-blacklist=" +
rebase_path("//tools/memory/asan/blacklist.txt", root_build_dir) ]
}
- if (is_mac) {
+ 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",
« no previous file with comments | « build/config/compiler/BUILD.gn ('k') | chrome/browser/ui/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698