Re: Build with LTO / -flto on macOS

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: Build with LTO / -flto on macOS
Дата
Msg-id 299832f7-72d0-4d2f-bc15-2f0fa4982b31@eisentraut.org
обсуждение исходный текст
Ответ на Build with LTO / -flto on macOS  (Wolfgang Walther <walther@technowledgy.de>)
Ответы Re: Build with LTO / -flto on macOS
Список pgsql-hackers
On 03.06.24 16:22, Wolfgang Walther wrote:
> Building with clang and -flto on macOS currently fails with errors 
> similar to [1]. This is because the --export-dynamic flag is called 
> -export_dynamic [2] instead and we have not been passing this variant to 
> the linker, so far.

It's probably worth clarifying that this option is needed on macOS only 
if LTO is also enabled.  For standard (non-LTO) builds, the 
export-dynamic behavior is already the default on macOS (otherwise 
nothing in PostgreSQL would work).

I don't think we explicitly offer LTO builds as part of the make build 
system, so anyone trying this would do it sort of self-service, by 
passing additional options to configure or make.  In which case they 
might as well pass the -export_dynamic option along in the same way?

I don't mind addressing this in PG18, but I would hesitate with 
backpatching.  With macOS, it's always hard to figure out whether these 
kinds of options work the same way going versions back.




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

Предыдущее
От: Wolfgang Walther
Дата:
Сообщение: Build with LTO / -flto on macOS
Следующее
От: Pavel Stehule
Дата:
Сообщение: Re: [PATCH] psql: \dn+ to show size of each schema (and \dA+ for AMs)