Peter Eisentraut <peter.eisentraut@enterprisedb.com> writes:
> On 16.03.23 19:11, Andres Freund wrote:
>> So I just elected to leave it at the default for meson.
> AFAICT, the default for meson is buildtype=debug, which is -O0. The -O3
> comes from meson.build setting buildtype=release.
> I think a good compromise would be buildtype=debugoptimized, which is
> -O2 with debug symbols, which also sort of matches the default in the
> autoconf world.
That sounds promising.
> At least during the transition phase I would prefer having the same
> default optimization level in both build systems, mainly because of how
> this affects warnings.
I'd prefer sticking to -O2 mainly because of the risk of new bugs.
The meson conversion is a big enough job without adding "harden
Postgres against -O3" to the list of tasks that must be accomplished.
We can take that on in due time, but let's keep it separate.
regards, tom lane