Re: Build with LTO / -flto on macOS - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: Build with LTO / -flto on macOS
Date
Msg-id 1f9ab49c-4a6a-49b0-9221-a30940806cb9@eisentraut.org
Whole thread Raw
In response to Re: Build with LTO / -flto on macOS  (Aleksander Alekseev <aleksander@timescale.com>)
Responses Re: Build with LTO / -flto on macOS
List pgsql-hackers
On 19.07.24 12:40, Aleksander Alekseev wrote:
> It seems to me that the patch is not going to become any better and it
> doesn't need any more attention from the reviewers. Thus I changed the
> status of the CF entry to "Ready for Committer".

I'm happy to commit this patch.

I checked that for non-LTO builds, this option does not change the 
output binary, so it seems harmless in that sense.

An equivalent change has recently been merged into meson upstream, so 
we'll get the same behavior on meson before long.

The argument "If you're going to manually inject -flto, seems like you 
could manually inject -Wl,-export_dynamic too, so why do you need this
patch?" is true, but the behavior that the link fails unless you use 
both options is pretty surprising, so this is a small quality of life 
improvement.  Also, it seems that LTO use is already in the wild, so it 
seems sensible to make that easier to exercise during development too. 
Maybe a configure --enable-lto option would be sensible, but that can be 
a separate patch.




pgsql-hackers by date:

Previous
From: Ertan Küçükoglu
Date:
Subject: Re: Windows default locale vs initdb
Next
From: Alvaro Herrera
Date:
Subject: Re: Vacuum ERRORs out considering freezing dead tuples from before OldestXmin