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

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

Issue 2959083002: android: Use fdebug-info-for-profiling in minimal_symbols mode (the default). (Closed)
Patch Set: Created 3 years, 6 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 d6392d1df7b2618bd3a7ba5a86129f039aa9babb..ac12aed24a6e4720e1b4733d03274b5029c9046d 100644
--- a/build/config/compiler/BUILD.gn
+++ b/build/config/compiler/BUILD.gn
@@ -1724,14 +1724,6 @@ config("symbols") {
# dump_syms, so this is still required (https://crbug.com/622406).
cflags += [ "-fno-standalone-debug" ]
}
- } else if (is_android) {
- # Breakpad can't handle DWARF 4 symbols properly yet, so use DWARF 3
- # explicitly on android where we are hitting https://crbug.com/638485.
- # The arguments MUST be in this order because of a gcc arg parsing bug.
- cflags = [
- "-gdwarf-3",
- "-g2",
- ]
} else {
cflags = [ "-g2" ]
}
@@ -1765,16 +1757,16 @@ config("minimal_symbols") {
cflags = []
ldflags = [ "/DEBUG" ]
} else {
+ cflags = [ "-g1" ]
if (is_android) {
- # Breakpad can't handle DWARF 4 symbols properly yet, so use DWARF 3
- # explicitly on android where we are hitting https://crbug.com/638485.
- # The arguments MUST be in this order because of a gcc arg parsing bug.
- cflags = [
- "-gdwarf-3",
- "-g1",
- ]
- } else {
- cflags = [ "-g1" ]
+ # Android defaults to symbol_level=1 builds in production builds
+ # (https://crbug.com/648948), but clang, unlike gcc, doesn't emit
+ # DW_AT_linkage_name in -g1 builds. -fdebug-info-for-profiling enables
+ # that (and a bunch of other things we don't need), so that we get
+ # qualified names in stacks.
+ # TODO(thakis): Consider making clang emit DW_AT_linkage_name in -g1 mode;
+ # failing that consider doing this on non-Android too.
+ cflags += [ "-fdebug-info-for-profiling" ]
}
# Note: -gsplit-dwarf implicitly turns on -g2 with clang, so don't pass it.
« 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