public inbox for [email protected]  
help / color / mirror / Atom feed
From: Peter Eisentraut <[email protected]>
To: [email protected]
Subject: pgsql: meson: allow disabling building/installation of static libraries
Date: Mon, 23 Feb 2026 15:51:38 +0000
Message-ID: <[email protected]> (raw)

meson: allow disabling building/installation of static libraries.

We now support the common meson option -Ddefault_library, with values
'both' (the default), 'shared' (install only shared libraries), and
'static' (install only static libraries).  The 'static' choice doesn't
actually work, since psql and other programs insist on linking to the
shared version of libpq, but it's there pro-forma.  It could be built
out if we really wanted, but since we have never supported the
equivalent in the autoconf build system, there doesn't appear to be an
urgent need.

With an eye to re-supporting AIX, the internal implementation
distinguishes whether to install libpgport.a and other static-only
libraries from whether to build/install the static variant of
libraries that we can build both ways.  This detail isn't exposed as a
meson option, though it could be if there's demand.

The Cirrus CI task SanityCheck now uses -Ddefault_library=shared to
save a little bit of build time (and to test this option).

Author: Peter Eisentraut <[email protected]>
Reviewed-by: Andres Freund <[email protected]>
Reviewed-by: Tom Lane <[email protected]>
Discussion: https://postgr.es/m/[email protected]

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/78727dcba32ed374eb2e92df976649bff56e2056

Modified Files
--------------
.cirrus.tasks.yml                          |  1 +
doc/src/sgml/installation.sgml             | 11 +++++++++++
meson.build                                | 27 +++++++++++++++++++++++++++
src/common/meson.build                     |  1 +
src/fe_utils/meson.build                   |  4 +++-
src/interfaces/ecpg/compatlib/meson.build  |  4 ++++
src/interfaces/ecpg/ecpglib/meson.build    |  4 ++++
src/interfaces/ecpg/pgtypeslib/meson.build |  4 ++++
src/interfaces/libpq-oauth/meson.build     |  4 ++++
src/interfaces/libpq/meson.build           |  4 ++++
src/port/meson.build                       |  1 +
11 files changed, 64 insertions(+), 1 deletion(-)



reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: pgsql: meson: allow disabling building/installation of static libraries
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox