pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tristan Partin <tristan@neon.tech>
To: Tristan Partin <tristan@neon.tech>
To: Andres Freund <andres@anarazel.de>
Cc: pgsql-hackers@postgresql.org
Subject: Re: Meson build updates
Date: Wed, 12 Jul 2023 11:10:21 -0500
Message-ID: <CU0BPAZ4TIJU.2M804H0H066GR@gonk> (raw)
In-Reply-To: <CTPDJLWBJV4V.1O65TIXTC8STQ@gonk>
References: <CSPIJVUDZFKX.3KHMOAVGF94RV@c3po>
	<20230609164135.77fjwqkqzdxfs3f5@awork3.anarazel.de>
	<CT8BP7BRV4A2.AOE7263UX2SH@gonk>
	<20230609183603.o56z3ngtak6qhb3s@awork3.anarazel.de>
	<CTBSCT2V1TVP.2AUJVJLNWQVG3@gonk>
	<20230629190242.kgnimiizjbvmdfni@awork3.anarazel.de>
	<CTPDBT2W78PQ.2QUDVHFNR5MCS@gonk>
	<20230629191308.jrmbdgngedorxytz@awork3.anarazel.de>
	<CTPDJLWBJV4V.1O65TIXTC8STQ@gonk>

On Thu Jun 29, 2023 at 2:17 PM CDT, Tristan Partin wrote:
> On Thu Jun 29, 2023 at 2:13 PM CDT, Andres Freund wrote:
> > Hi,
> >
> > On 2023-06-29 14:07:19 -0500, Tristan Partin wrote:
> > > I still think the overrides are important, at the very least for libpq,
> > > but I will defer to your aforementioned decision for now.
> >
> > libpq makes sense to me, fwiw. Just doing it for all binaries individually
> > didn't seem as obviously beneficial.
> >
> > FWIW, it seems it could be handled somewhat centrally for binaries, the
> > bin_targets array should have all that's needed?
>
> I will send a follow-up patch with at least libpq overridden. I will
> investigate the bin_targets.

Attached is a patch which does just that without overriding the
binaries. I investigated the bin_targets stuff, but some test
executables get added there, so it wouldn't work out that well.

-- 
Tristan Partin
Neon (https://neon.tech)

Attachments:

v6-0001-Add-Meson-override-for-libpq.patch (text/x-patch, 1.3K) download From b52a13d1575e4965e8c1794e7a62f24ecfeeb1cf Mon Sep 17 00:00:00 2001 From: Tristan Partin <tristan@neon.tech> Date: Wed, 17 May 2023 10:36:52 -0500 Subject: [PATCH v6] Add Meson override for libpq Meson has the ability to do transparent overrides when projects are used as subprojects. For instance, say I am building a Postgres extension. I can define Postgres to be a subproject of my extension given the following wrap file: [wrap-git] url = https://git.postgresql.org/git/postgresql.git revision = master depth = 1 [provide] dependency_names = libpq Then in my extension (root project), I can have the following line snippet: libpq = dependency('libpq') This will tell Meson to transparently compile libpq prior to it compiling my extension (because I depend on libpq) if libpq isn't found on the host system. --- src/interfaces/libpq/meson.build | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/interfaces/libpq/meson.build b/src/interfaces/libpq/meson.build index 80e6a15adf..6d18970e81 100644 --- a/src/interfaces/libpq/meson.build +++ b/src/interfaces/libpq/meson.build @@ -84,6 +84,8 @@ libpq = declare_dependency( include_directories: [include_directories('.')] ) +meson.override_dependency('libpq', libpq) + pkgconfig.generate( name: 'libpq', description: 'PostgreSQL libpq library', -- Tristan Partin Neon (https://neon.tech)

view thread (30+ messages)  latest in thread

Message-ID: <CU0BPAZ4TIJU.2M804H0H066GR@gonk>
Permalink:  ../CU0BPAZ4TIJU.2M804H0H066GR@gonk/
Also on:    postgresql.org/message-id/CU0BPAZ4TIJU.2M804H0H066GR@gonk

 ·  · 

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: pgsql-hackers@postgresql.org
  Cc: tristan@neon.tech, andres@anarazel.de
  Subject: Re: Meson build updates
  In-Reply-To: <CU0BPAZ4TIJU.2M804H0H066GR@gonk>

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

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