Re: meson: Add _static and _shared suffixes to the library names

From: Nazir Bilal Yavuz <byavuz81(at)gmail(dot)com>
To: Wolfgang Walther <walther(at)technowledgy(dot)de>
Cc: Peter Eisentraut <peter(at)eisentraut(dot)org>, Jacob Champion <jacob(dot)champion(at)enterprisedb(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Andres Freund <andres(at)anarazel(dot)de>
Subject: Re: meson: Add _static and _shared suffixes to the library names
Date: 2025-08-13 08:05:23
Message-ID: CAN55FZ3pYuc3FH1V2_A+xuuUK7JFBnQE1gJj-5Ke1LWR4KwOtg@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

Thank you for looking into this!

On Wed, 13 Aug 2025 at 10:50, Wolfgang Walther <walther(at)technowledgy(dot)de> wrote:
>
> Nazir Bilal Yavuz:
> > 1- Setting different names for .pdb files for shared libraries only on
> > the Windows OS. I think that is the correct fix, it just adds _shared
> > suffix to .pdb files of shared libraries on the Windows OS.
>
> How about renaming the .pdb files, but instead of adding _shared, rename
> both .pdb files to libpq.a.pdb and libpq.dll.pdb?
>
> I think that would be much clearer than libpq.pdb and libpq_shared.pdb.

That works for me. I think the only downside is that there are 22
static_library() and 4 shared_library() calls inside the meson build.
So we need to copy this logic [1] 22 times more if we want to rename
static libraries' .pdb files.

[1]
${name}_pdb_args = []
if host_system == 'windows'
${name}_pdb_args = ['/PDB:' + meson.current_build_dir() / '${name}.pdb']
endif

--
Regards,
Nazir Bilal Yavuz
Microsoft

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Chao Li 2025-08-13 08:08:45 Re: GB18030-2022 Support in PostgreSQL
Previous Message Erik Nordström 2025-08-13 08:05:04 Fix for typo in UUIDv7 timestamp extraction