meson: mingw: Allow multiple definitions

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.erzuk5v4ai4b53do@awork3.anarazel.de
This commit is contained in:
Andres Freund 2022-09-28 09:48:09 -07:00
parent dfefa0e464
commit caeeabd110
1 changed files with 2 additions and 0 deletions

View 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)