Re: meson: Add _static and _shared suffixes to the library names - Mailing list pgsql-hackers

From Nazir Bilal Yavuz
Subject Re: meson: Add _static and _shared suffixes to the library names
Date
Msg-id CAN55FZ3pYuc3FH1V2_A+xuuUK7JFBnQE1gJj-5Ke1LWR4KwOtg@mail.gmail.com
Whole thread Raw
In response to Re: meson: Add _static and _shared suffixes to the library names  (Wolfgang Walther <walther@technowledgy.de>)
List pgsql-hackers
Hi,

Thank you for looking into this!

On Wed, 13 Aug 2025 at 10:50, Wolfgang Walther <walther@technowledgy.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



pgsql-hackers by date:

Previous
From: Erik Nordström
Date:
Subject: Fix for typo in UUIDv7 timestamp extraction
Next
From: Chao Li
Date:
Subject: Re: GB18030-2022 Support in PostgreSQL