meson: Fix import library name in Windows
authorPeter Eisentraut <[email protected]>
Thu, 20 Jun 2024 06:09:28 +0000 (08:09 +0200)
committerPeter Eisentraut <[email protected]>
Thu, 20 Jun 2024 07:08:36 +0000 (09:08 +0200)
This changes the import library name from 'postgres.exe.lib' to
'postgres.lib', which is what it was with the old MSVC build system.
Extension builds use that name.

Bug: #18513
Reported-by: Muralikrishna Bandaru <[email protected]>
meson.build
src/backend/meson.build

index 2767abd19e2ec835ecdeb2f723b638d96bdcab1e..02929bb845f88fcf7c153edc0c9bd7e9c3f4fd06 100644 (file)
@@ -201,7 +201,7 @@ if host_system == 'cygwin'
   cppflags += '-D_GNU_SOURCE'
   dlsuffix = '.dll'
   mod_link_args_fmt = ['@0@']
-  mod_link_with_name = 'lib@0@.exe.a'
+  mod_link_with_name = 'lib@[email protected]'
   mod_link_with_dir = 'libdir'
 
 elif host_system == 'darwin'
@@ -273,10 +273,10 @@ elif host_system == 'windows'
   export_file_suffix = 'def'
   if cc.get_id() == 'msvc'
     export_fmt = '/DEF:@0@'
-    mod_link_with_name = '@0@.exe.lib'
+    mod_link_with_name = '@[email protected]'
   else
     export_fmt = '@0@'
-    mod_link_with_name = 'lib@0@.exe.a'
+    mod_link_with_name = 'lib@[email protected]'
   endif
   mod_link_args_fmt = ['@0@']
   mod_link_with_dir = 'libdir'
index 436c04af0809ac5b54f0aa78aaa56db7691a5780..78c57268142c29f74ee716cf81d4c42424c6f315 100644 (file)
@@ -133,7 +133,7 @@ postgres = executable('postgres',
   link_with: backend_link_with,
   link_depends: backend_link_depends,
   export_dynamic: true,
-  implib: true,
+  implib: 'postgres',
   dependencies: backend_build_deps,
   kwargs: default_bin_args,
 )