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.



Reply via email to