Re: [PATCH] Add an ldflags_sl meson build option - Mailing list pgsql-hackers

From Matt Smith (matts3)
Subject Re: [PATCH] Add an ldflags_sl meson build option
Date
Msg-id MW6PR11MB8310CB3957C87AA39046ADB68C70A@MW6PR11MB8310.namprd11.prod.outlook.com
Whole thread Raw
In response to Re: [PATCH] Add an ldflags_sl meson build option  (Peter Eisentraut <peter@eisentraut.org>)
List pgsql-hackers
I have a Bazel toolchain that sets different linker flags for exe/shared lib.

I wanted to build postgresql shared libs with meson using the same toolchain flags that I build all my other 3rd party deps in Bazel.

Currently for postgresql builds, we set LDFLAGS to the Bazel toolchain executable flags which means that any postgresql shared_library() gets the exe flags.

I noticed ldflags_sl was already setup to pass through shared_library flags, but I couldn't find a way to set it via meson build options.

From: Peter Eisentraut <peter@eisentraut.org>
Sent: Monday, June 16, 2025 9:32 PM
To: Matt Smith (matts3) <matts3@cisco.com>; pgsql-hackers@postgresql.org <pgsql-hackers@postgresql.org>
Subject: Re: [PATCH] Add an ldflags_sl meson build option
 
On 16.06.25 06:10, Matt Smith (matts3) 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.

What uses do you have in mind for this?

pgsql-hackers by date:

Previous
From: "Devulapalli, Raghuveer"
Date:
Subject: RE: Improve CRC32C performance on SSE4.2
Next
From: Sutou Kouhei
Date:
Subject: Re: Make COPY format extendable: Extract COPY TO format implementations