meson: mingw: Allow multiple definitions
authorAndres Freund <[email protected]>
Wed, 28 Sep 2022 16:48:09 +0000 (09:48 -0700)
committerAndres Freund <[email protected]>
Thu, 29 Sep 2022 01:48:19 +0000 (18:48 -0700)
I didn't carry this forward from the win32 template. It's not needed anymore
for the reason stated therein, but it turns out to be required to
e.g. override getopt. Possibly a better solution exists, but that's for later.

Discussion: http://postgr.es/m/20220928022724[email protected]

meson.build

index 02c086c04e775205b712b5aa8e7629e0ef0cc01a..cd410319f3f4adce58b145a8a3af9c450b1f4fbc 100644 (file)
@@ -277,6 +277,8 @@ elif host_system == 'windows'
     # ldflags += '/nxcompat' # generated by msbuild, should have it for ninja?
   else
     ldflags += '-Wl,--stack,@0@'.format(cdata.get('WIN32_STACK_RLIMIT'))
+    # Need to allow multiple definitions, we e.g. want to override getopt.
+    ldflags += '-Wl,--allow-multiple-definition'
   endif
 
   os_deps += cc.find_library('ws2_32', required: true)