meson: Fix support for empty darwin sysroot
The -isysroot options should only be added if the sysroot resolved to a nonempty string. This matches the behavior in src/template/darwin (also documented in installation.sgml). Discussion: https://www.postgresql.org/message-id/flat/60765bf0-5027-4b23-9f78-4a365d28823f%40enterprisedb.com
This commit is contained in:
parent
0276ae42dd
commit
c15631f0f5
1 changed files with 4 additions and 2 deletions
|
@ -233,8 +233,10 @@ elif host_system == 'darwin'
|
|||
sysroot_args = [files('src/tools/darwin_sysroot'), get_option('darwin_sysroot')]
|
||||
pg_sysroot = run_command(sysroot_args, check:true).stdout().strip()
|
||||
message('darwin sysroot: @0@'.format(pg_sysroot))
|
||||
cflags += ['-isysroot', pg_sysroot]
|
||||
ldflags += ['-isysroot', pg_sysroot]
|
||||
if pg_sysroot != ''
|
||||
cflags += ['-isysroot', pg_sysroot]
|
||||
ldflags += ['-isysroot', pg_sysroot]
|
||||
endif
|
||||
# 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
|
||||
|
|
Loading…
Reference in a new issue