commit 7bb34f6eaf691d9fc18c1a75df8f70713a9d8108
Author: Isuru Fernando <isuruf@gmail.com>
Date:   Sun Apr 5 23:57:06 2020 +0000

    Manually link with libiconv whenever we use libintl.
    
    Sadly our Windows libintl DLL doesn't convey that it should pull in libiconv
    as a dependency (nor does it use pkg-config). Until I figure that out, let's
    just manually link with libintl when needed.
    
    There is also some hacking of gconvert.c and the toplevel meson.build file
    needed to adjust the build system -- it assumes that on Windows you're always
    going to use an internal iconv.
    
    Original Author: Peter Williams <peter@newton.cx>

diff --git a/gio/win32/meson.build b/gio/win32/meson.build
index 8d58998..e46a06d 100644
--- a/gio/win32/meson.build
+++ b/gio/win32/meson.build
@@ -10,6 +10,6 @@ giowin32_sources = [
 giowin32_lib = static_library('giowin32',
   sources : [giowin32_sources],
   include_directories : [configinc, glibinc, gioinc, gmoduleinc],
-  dependencies : [libintl, gioenumtypes_dep],
+  dependencies : [libintl, gioenumtypes_dep] + libiconv,
   pic : true,
   c_args : gio_c_args)
diff --git a/glib/gconvert.c b/glib/gconvert.c
index 829fe38..d8f1947 100644
--- a/glib/gconvert.c
+++ b/glib/gconvert.c
@@ -23,18 +23,12 @@
 #include "config.h"
 #include "glibconfig.h"
 
-#ifndef G_OS_WIN32
 #include <iconv.h>
-#endif
 #include <errno.h>
 #include <stdio.h>
 #include <string.h>
 #include <stdlib.h>
 
-#ifdef G_OS_WIN32
-#include "win_iconv.c"
-#endif
-
 #ifdef G_PLATFORM_WIN32
 #define STRICT
 #include <windows.h>
diff --git a/meson.build b/meson.build
index 43bb468..b6d1201 100644
--- a/meson.build
+++ b/meson.build
@@ -2043,7 +2043,7 @@ glibconfig_conf.set10('G_HAVE_GROWING_STACK', growing_stack)
 # We should never use the MinGW C library's iconv because it may not be
 # available in the actual runtime environment. On Windows, we always use
 # the built-in implementation
-if host_system == 'windows'
+if host_system == 'IGNOREME windows'
   # We have a #include "win_iconv.c" in gconvert.c on Windows, so we don't need
   # any external library for it
   libiconv = []
@@ -2110,8 +2110,8 @@ if libintl.found()
   #
   # Meson's builtin dependency lookup as of 0.60.0 doesn't check for
   # pthread, so we do this manually here.
-  if cc.has_function('ngettext', dependencies : libintl)
-    libintl_deps += [libintl]
+  if cc.has_function('ngettext', dependencies : [libintl] + libiconv)
+    libintl_deps += [libintl] + libiconv
   else
     libintl_pthread = cc.find_library('pthread', required : false)
     if libintl_pthread.found() and cc.has_function('ngettext', dependencies : [libintl, libintl_pthread])
