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

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

Issue 2770933009: linux: Improve gdb startup time for debug builds from over 4 minutes to 35s. (Closed)
Patch Set: reland: no 32-bit Created 3 years, 9 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 916d78a120b4e470fdebafc087f7292898ff9824..83d649b4c44ad5724d446fae9df91943c2e4422c 100644
--- a/build/config/compiler/BUILD.gn
+++ b/build/config/compiler/BUILD.gn
@@ -65,10 +65,6 @@ declare_args() {
exclude_unwind_tables = (is_chrome_branded && is_official_build) ||
(is_chromecast && !is_cast_desktop_build && !is_debug)
- # If true, gold linker will save symbol table inside object files.
- # This speeds up gdb startup by 60%
- gdb_index = false
-
# If true, optimize for size. Does not affect windows builds.
# Linux & Mac favor speed over size.
# TODO(brettw) it's weird that Mac and desktop Linux are different. We should
@@ -309,7 +305,8 @@ config("compiler") {
ldflags += [ "-fPIC" ]
}
- cflags += [ "-pipe" ] # Use pipes for communicating between sub-processes. Faster.
+ # Use pipes for communicating between sub-processes. Faster.
+ cflags += [ "-pipe" ]
ldflags += [
"-Wl,-z,noexecstack",
@@ -375,10 +372,6 @@ config("compiler") {
}
}
- if (gdb_index) {
- ldflags += [ "-Wl,--gdb-index" ]
- }
-
# TODO(thestig): Make this flag work with GN.
#if (!is_official_build && !is_chromeos && !(is_asan || is_lsan || is_tsan || is_msan)) {
# ldflags += [
@@ -1662,6 +1655,15 @@ config("symbols") {
}
asmflags = cflags
ldflags = []
+
+ # TODO(thakis): Figure out if there's a way to make this go for 32-bit,
+ # currently we get "warning:
+ # obj/native_client/src/trusted/service_runtime/sel_asm/nacl_switch_32.o:
+ # DWARF info may be corrupt; offsets in a range list entry are in different
+ # sections" there. Maybe just a bug in nacl_switch_32.S.
+ if (!is_mac && !is_ios && !is_nacl && target_cpu != "x86") {
+ ldflags += [ "-Wl,--gdb-index" ]
+ }
}
}
@@ -1683,9 +1685,8 @@ config("minimal_symbols") {
} else {
cflags = [ "-g1" ]
}
- if (use_debug_fission) {
- cflags += [ "-gsplit-dwarf" ]
- }
+
+ # Note: -gsplit-dwarf implicitly turns on -g2 with clang, so don't pass it.
asmflags = cflags
ldflags = []
}
« 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