Re: small development tip: Consider using the gold linker

Поиск
Список
Период
Сортировка
От Peter Geoghegan
Тема Re: small development tip: Consider using the gold linker
Дата
Msg-id CAH2-Wzkgd=FkVLUyUCFpWJ_ZBxOMrQ9A-+d2a+YQFvNBgLQKOw@mail.gmail.com
обсуждение исходный текст
Ответ на small development tip: Consider using the gold linker  (Andres Freund <andres@anarazel.de>)
Ответы Re: small development tip: Consider using the gold linker
Список pgsql-hackers
On Mon, Jul 9, 2018 at 4:40 PM, Andres Freund <andres@anarazel.de> wrote:
> FWIW, I've lately noticed that I spend a fair time waiting for the
> linker during edit-compile-test cycles.  Due to an independent issue I
> just used the gold linker, and the speedup is quite noticable.
>
> Just relinking the backend, without rebuilding anything else, goes from
> 0m3.975s to 0m1.585s. Given ccache commonly prevents actually having to
> recompile files, that works out to a noticable benefit.
>
> For me just adding '-fuse-ld=gold' to CFLAGS works.

I tried this out today. It makes quite a noticeable difference for me.
Thanks for the tip.

> Unfortunately I get some spurious warnings, but I hope that's just a
> debian unstable issue: /usr/bin/ld.gold: warning: discarding version
> information for __cxa_finalize@GLIBC_2.2.5, defined in unused shared
> library /lib/x86_64-linux-gnu/libc.so.6 (linked with --as-needed)

I didn't have this problem.

-- 
Peter Geoghegan


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Isaac Morland
Дата:
Сообщение: Re: Have an encrypted pgpass file
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Have an encrypted pgpass file