meson: Export all libcommon functions in Windows builds
authorHeikki Linnakangas <[email protected]>
Wed, 25 Dec 2024 16:14:18 +0000 (18:14 +0200)
committerHeikki Linnakangas <[email protected]>
Wed, 25 Dec 2024 16:14:26 +0000 (18:14 +0200)
This fixes "unresolved external symbol" errors with extensions that
use functions from libcommon. This was reported with pgvector.

Reported-by: Andrew Kane
Author: Vladlen Popolitov
Back-through: 16, where Meson was introduced
Discussion: https://www.postgresql.org/message-id/CAOdR5yF0krWrxycA04rgUKCgKugRvGWzzGLAhDZ9bzNv8g0Lag@mail.gmail.com

src/common/meson.build

index de68e408fa395abc0c486a62429efb3b57256b2b..b2d45c1d6753bffe476693c8575c33aded0144d1 100644 (file)
@@ -169,6 +169,7 @@ foreach name, opts : pgcommon_variants
 
   lib = static_library('libpgcommon@0@'.format(name),
       link_with: cflag_libs,
+      link_whole: cflag_libs,
       c_pch: pch_c_h,
       include_directories: include_directories('.'),
       kwargs: opts + {