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

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

Issue 882443003: Disable -Wl,--as-needed in sanitizer mode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Change comment to the gypi one. Created 5 years, 11 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/config/compiler/BUILD.gn
diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
index 255a2cd0a9750e5c3b514cb59f6383d577fb2857..f6947e4a45e1e0e127e8e87887a58a04386d2fc5 100644
--- a/build/config/compiler/BUILD.gn
+++ b/build/config/compiler/BUILD.gn
@@ -948,9 +948,15 @@ if (is_win) {
# Specifically tell the linker to perform optimizations.
# See http://lwn.net/Articles/192624/ .
"-Wl,-O1",
- "-Wl,--as-needed",
"-Wl,--gc-sections",
]
+
+ if (!using_sanitizer) {
+ # Functions interposed by the sanitizers can make ld think
+ # that some libraries aren't needed when they actually are,
+ # http://crbug.com/234010. As workaround, disable --as-needed.
+ common_optimize_on_ldflags += [ "-Wl,--as-needed" ]
+ }
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698