Faster linking (-gsplit-dwarf, gold/lld, --gdb-index)

Luboš Luňák l.lunak at
Wed Jul 4 15:37:38 UTC 2018

 Ok, so I've just pushed my changes to master.

 TLDR: If your distro is not older than 2-3 years, you can probably just 
pass --enable-split-debug --enable-gdb-index --enable-ld=gold to configure 
and you'll just magically get faster builds taking less space and faster gdb 

 I've decided not to enable the options by default for now, just to see if 
something breaks. I still plan to do that later, if nothing shows up.

 Note that this is meant primarily for debug builds. It should work also for 
release builds, but I have no idea what it will do e.g. with distro packaging 
tools that generate debuginfo packages.

 If you want to see numbers, see previous mails, nothing has really changed 
there (except for lld below).

 I've changed --enable-gold to --enable-ld=<linker>, because I've found out 
that LLVM besides Clang provides also a linker called lld, and lld at least 
in version 6 actually performs even better than gold (4s vs gold's 6-7s). 
There are some caveats though:
* lld6 crashes sometimes and needs [1] (openSUSE users, 
devel:tools:compiler/libLLVM6 has it)
* Valgrind can't handle lld's debuginfo and needs [2] and [3], or 
passing --no-rosegment to lld, see (openSUSE users, 
home:llunak:my/valgrind has them)


 Luboš Luňák
 l.lunak at

More information about the LibreOffice mailing list