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

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

Issue 1541163002: GN(android) Don't enable --gc-sections in debug mode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix gn gen Created 4 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 | chrome/BUILD.gn » ('j') | 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 8f827de89ee008c3f7d6555011f72d38d04fcde9..b7d82a4687b72622526eb37c3334042756e9c5ef 100644
--- a/build/config/compiler/BUILD.gn
+++ b/build/config/compiler/BUILD.gn
@@ -1159,7 +1159,10 @@ config("no_optimize") {
if (!using_sanitizer) {
cflags += [ "-fomit-frame-pointer" ]
}
- ldflags = common_optimize_on_ldflags
+
+ # Don't use gc-sections since it can cause links to succeed when they
+ # actually shouldn't. http://crbug.com/159847
+ ldflags = common_optimize_on_ldflags - [ "-Wl,--gc-sections" ]
} else {
cflags = [ "-O0" ]
ldflags = []
« no previous file with comments | « no previous file | chrome/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698