meson: Export all libcommon functions in Windows builds
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>
Wed, 25 Dec 2024 17:22:25 +0000 (19:22 +0200)
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>
Wed, 25 Dec 2024 17:22:25 +0000 (19:22 +0200)
This fixes "unresolved external symbol" errors with extensions that
use functions from libpgport that need special CFLAGS to
compile. Currently, that includes the CRC-32 functions.

Commit 2571c1d5cc did this for libcommon, but I missed that libpqport
has the same issue.

Reported-by: Tom Lane
Backpatch-through: 16, where Meson was introduced
Discussion: https://www.postgresql.org/message-id/CAOdR5yF0krWrxycA04rgUKCgKugRvGWzzGLAhDZ9bzNv8g0Lag@mail.gmail.com

src/port/meson.build

index c5bceed9cda21c69c9e36d2c9baa116d3fa8837b..9c916d8521d692e1e418061a420fb686113f52b2 100644 (file)
@@ -184,6 +184,7 @@ foreach name, opts : pgport_variants
   lib = static_library('libpgport@0@'.format(name),
       pgport_sources,
       link_with: cflag_libs,
+      link_whole: cflag_libs,
       c_pch: pch_c_h,
       kwargs: opts + {
         'dependencies': opts['dependencies'] + [ssl],