| 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.
|
|
|