[RFC] Faster linking (-gsplit-dwarf, gold)

Luboš Luňák l.lunak at collabora.com
Tue Jun 26 10:21:24 UTC 2018


 I've switched my LO debug build to use -gsplit-dwarf and together with using 
the gold linker this makes the build noticeably smaller and faster to link, 
for a negligible cost when starting gdb. So at 
https://gerrit.libreoffice.org/#/c/56416/ and 
https://gerrit.libreoffice.org/#/c/56417/ there are support 
for --enable-split-debug and --enable-gold that I intend to push.

 However, the actual reason for this mail is that I think that this should be 
the default for whoever can use it. I've been using it for a while on 
openSUSE42.3 (a year-old distro) with Clang5 and it seems that everything 
works just fine (including gdb and valgrind). Gold has been around for a 
couple of years and so has -gsplit-dwarf, so I'd naively expect that any 
distro capable of building current LO should have a decent support there as 

 Has somebody any problematic experience with either of these? I've been 
pointed to 
by Noel, but the problems mentioned there are old and not very convincing.

 And note that I'm talking only about developer builds here 
(i.e. --enable-debug/dbgutil). I expect that distros would have problems with 
handling split debug info and the performance of gold doesn't really matter 
for them either.

Some numbers:
                        normal  | split
total debug build size   19120M |  14294M
CXXObject dir size       10320M |   8137M
libsclo.so size         461669K | 207951K
libsclo bfd link time   32.433s | 20.697s
libsclo gold link time  10.394s |  6.159s
gdb symbols load time       49s |     51s

 Luboš Luňák
 l.lunak at collabora.com

More information about the LibreOffice mailing list