summaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authoratotic <atotic@google.com>2016-03-25 11:52:10 -0700
committerCommit bot <commit-bot@chromium.org>2016-03-25 18:53:12 +0000
commitfcb018ec85c2e56e44180bb3e2a822082826000d (patch)
treefcb192c30669610f91a0416b733a77fc30c5f081 /build
parent37a519748d7fef8a95eb513e9768c9523c744274 (diff)
downloadchromium_src-fcb018ec85c2e56e44180bb3e2a822082826000d.zip
chromium_src-fcb018ec85c2e56e44180bb3e2a822082826000d.tar.gz
chromium_src-fcb018ec85c2e56e44180bb3e2a822082826000d.tar.bz2
adds gdb-index option for linker
This cl adds a new configuration flag to gold linker: "gdb_index" The flag is on by default if is_desktop_linux && is_debug && is_component_build The previous attempt to add this flag to all the builds was reverted because of disk-space requirements. This checkin makes it a default only for linux debug builds. Why do this? gold linker has a flag to automatically generate gdb-index section inside shared libraries when linking. Webkit single-file compile/linking time: 16.31s without gdb-index 16.11s with gdb-index gdb startup time ~51s without gdb-index ~19s with gdb-index BUG= Committed: https://crrev.com/f68b7c07a30baac088b8eda055ba52835c04692c Cr-Commit-Position: refs/heads/master@{#378600} Review URL: https://codereview.chromium.org/1680943002 Cr-Commit-Position: refs/heads/master@{#383324}
Diffstat (limited to 'build')
-rw-r--r--build/config/compiler/BUILD.gn8
1 files changed, 8 insertions, 0 deletions
diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
index 3a8327c..37d583e 100644
--- a/build/config/compiler/BUILD.gn
+++ b/build/config/compiler/BUILD.gn
@@ -75,6 +75,10 @@ declare_args() {
# Omit unwind support in official builds to save space.
# We can use breakpad for these builds.
exclude_unwind_tables = is_chrome_branded && is_official_build
+
+ # If true, gold linker will save symbol table inside object files.
+ # This speeds up gdb startup by 60%
+ gdb_index = false
}
# Apply the default logic for these values if they were not set explicitly.
@@ -300,6 +304,10 @@ config("compiler") {
#"-Wl,--thread-count=4",
]
+ if (gdb_index) {
+ ldflags += [ "-Wl,--gdb-index" ]
+ }
+
if (!using_sanitizer && !(is_android && use_order_profiling)) {
# TODO(brettw) common.gypi has this only for target toolset.
ldflags += [ "-Wl,--icf=all" ]