Disable zlib on mingw Windows build to avoid dependency on zlib (mono/mono#15493)
authorJohan Lorensson <lateralusx.github@gmail.com>
Mon, 1 Jul 2019 23:15:38 +0000 (01:15 +0200)
committerAlexander Köplinger <alex.koeplinger@outlook.com>
Mon, 1 Jul 2019 23:15:37 +0000 (01:15 +0200)
mono/mono#4484 broke Windows mingw build due to new dependency, zlib1.dll not available in PATH on build bots. Disabling for now until we know how this should be handled (and also fixed for MSVC build runtime).

Commit migrated from https://github.com/mono/mono/commit/51a11b68c52034f0c6beef9f62dfa1c9d33761f0

src/mono/mono/metadata/debug-mono-ppdb.c
src/mono/mono/mini/Makefile.am.in

index c8977dd..eb51b80 100644 (file)
@@ -29,7 +29,7 @@
 #include <mono/utils/bsearch.h>
 #include <mono/utils/mono-logger-internals.h>
 
-#if defined (HAVE_SYS_ZLIB)
+#if defined (HAVE_SYS_ZLIB) && !defined(HOST_WIN32)
 #include <zlib.h>
 #endif
 
@@ -172,7 +172,7 @@ mono_ppdb_load_file (MonoImage *image, const guint8 *raw_contents, int size)
 
        if (ppdb_data) {
                /* Embedded PPDB data */
-#if defined (HAVE_SYS_ZLIB)
+#if defined (HAVE_SYS_ZLIB) && !defined(HOST_WIN32)
                /* ppdb_size is the uncompressed size */
                guint8 *data = g_malloc0 (ppdb_size);
                z_stream stream;
index b14a0f1..8a2fb37 100755 (executable)
@@ -243,11 +243,15 @@ else
 LLVMMONOF=$(LLVM_LIBS) $(LLVM_LDFLAGS)
 endif
 
+if !HOST_WIN32
 if HAVE_ZLIB
 Z_LIBS= -lz
 else
 Z_LIBS=
 endif
+else
+Z_LIBS=
+endif
 
 mono_boehm_LDADD = \
        libmain_a-main.$(OBJEXT) \