Merge pull request #121032 from Radvendii/zlib-windows-static

zlib: fix windows static compile
This commit is contained in:
Sandro 2021-04-30 04:06:17 +02:00 committed by GitHub
commit 90ac20b969
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -84,7 +84,7 @@ stdenv.mkDerivation (rec {
''
# Non-typical naming confuses libtool which then refuses to use zlib's DLL
# in some cases, e.g. when compiling libpng.
+ lib.optionalString (stdenv.hostPlatform.libc == "msvcrt") ''
+ lib.optionalString (stdenv.hostPlatform.libc == "msvcrt" && shared) ''
ln -s zlib1.dll $out/bin/libz.dll
'';