meson: macos: Use -Wl,-undefined,error for modules

meson defaults to -Wl,-undefined,dynamic_lookup for modules, which we don't
want because a) it's different from what we do for autoconf, b) it causes
warnings starting in macOS Ventura.

Discussion: https://postgr.es/m/20221015211955.q4cwbsfkyk3c4ty3@awork3.anarazel.de
This commit is contained in:
Andres Freund 2022-10-15 17:00:27 -07:00
parent 57bab33302
commit 9a95a510ad
1 changed files with 4 additions and 0 deletions

View File

@ -228,6 +228,10 @@ elif host_system == 'darwin'
message('darwin sysroot: @0@'.format(pg_sysroot))
cflags += ['-isysroot', pg_sysroot]
ldflags += ['-isysroot', pg_sysroot]
# meson defaults to -Wl,-undefined,dynamic_lookup for modules, which we
# don't want because a) it's different from what we do for autoconf, b) it
# causes warnings starting in macOS Ventura
ldflags_mod += ['-Wl,-undefined,error']
elif host_system == 'freebsd'
sema_kind = 'unnamed_posix'