Updated patch with new description ________________________________ From: Nazir Bilal Yavuz <byavu...@gmail.com> Sent: Tuesday, June 17, 2025 6:05 PM To: Matt Smith (matts3) <mat...@cisco.com> Cc: pgsql-hack...@postgresql.org <pgsql-hack...@postgresql.org> Subject: Re: [PATCH] Add an ldflags_sl meson build option
Hi, On Mon, 16 Jun 2025 at 14:26, Matt Smith (matts3) <mat...@cisco.com> wrote: > > Currently there doesn't seem to be a way to pass shared library-specific > flags via a meson build option. > > This patch allows the existing ldflags_sl to be set via a build option. > > Patch created against the 17.4 release. The patch looks correct. +option('ldflags_sl', type: 'array', value: [], + description: 'Shared library ldflags') nitpick: I would suggest using the same description from autoconf build: 'extra linker flags for linking shared libraries only'. -- Regards, Nazir Bilal Yavuz Microsoft
diff --git a/meson.build b/meson.build index 42a4d25bfd7..68690e5de52 100644 --- a/meson.build +++ b/meson.build @@ -98,7 +98,7 @@ cxxflags_mod = [] ldflags = [] ldflags_be = [] -ldflags_sl = [] +ldflags_sl = get_option('ldflags_sl') ldflags_mod = [] test_c_args = [] diff --git a/meson_options.txt b/meson_options.txt index 246cecf3827..5997eba8644 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -76,6 +76,8 @@ option('darwin_sysroot', type: 'string', value: '', option('rpath', type: 'boolean', value: true, description: 'Embed shared library search path in executables') +option('ldflags_sl', type: 'array', value: [], + description: 'Extra linker flags for linking shared libraries only') # External dependencies