GIO tests fail to build with clang-cl
After !1973 (merged) GLib builds successfully with clang-cl, but tests still fail to build:
[1/4] Compiling C object gio/tests/resourceplugin.dll.p/meson-generated_.._plugin-resources.c.obj
FAILED: gio/tests/resourceplugin.dll.p/meson-generated_.._plugin-resources.c.obj
"clang-cl" "-Igio\tests\resourceplugin.dll.p" "-Igio\tests" "-I..\gio\tests" "-I." "-I.." "-Iglib" "-I..\glib" "-Isubprojects\proxy-libintl" "-I..\subprojects\proxy-libintl" "-Igmodule" "-I..\gmodule" "-Igobject" "-I..\gobject" "-Igio" "-I..\gio" "/MD" "/nologo" "/showIncludes" "/W2" "/clang:-std=gnu11" "/O2" "/Zi" "-D_GNU_SOURCE" "-fno-strict-aliasing" "-DG_ENABLE_DEBUG" "/Fdgio\tests\resourceplugin.dll.p\meson-generated_.._plugin-resources.c.pdb" /Fogio/tests/resourceplugin.dll.p/meson-generated_.._plugin-resources.c.obj "/c" gio/tests/plugin-resources.c
gio/tests/plugin-resources.c(164,24): error: expected ')'
extern int (* _array ## _func)(void); \
^
gio/tests/plugin-resources.c(164,14): note: to match this '('
extern int (* _array ## _func)(void); \
^
gio/tests/plugin-resources.c(166,7): error: redefinition of '_func' as different kind of symbol
int _func ## _wrapper(void) { _func(); g_slist_find (NULL, _array ## _func); return 0; } \
^
gio/tests/plugin-resources.c(162,15): note: previous definition is here
static void _func(void); \
^
gio/tests/plugin-resources.c(166,12): error: expected ';' after top level declarator
int _func ## _wrapper(void) { _func(); g_slist_find (NULL, _array ## _func); return 0; } \
^
;
gio/tests/plugin-resources.c(168,39): error: pragma comment requires parenthesized identifier and optional string
__pragma(comment(linker,"/include:" _sym_prefix # _func "_wrapper")) \
^
gio/tests/plugin-resources.c(180,24): error: expected ')'
extern int (* _array ## _func)(void); \
^
gio/tests/plugin-resources.c(180,14): note: to match this '('
extern int (* _array ## _func)(void); \
^
gio/tests/plugin-resources.c(182,7): error: redefinition of '_func' as different kind of symbol
int _func ## _constructor(void) { atexit (_func); g_slist_find (NULL, _array ## _func); return 0; } \
^
gio/tests/plugin-resources.c(178,15): note: previous definition is here
static void _func(void); \
^
gio/tests/plugin-resources.c(182,12): error: expected ';' after top level declarator
int _func ## _constructor(void) { atexit (_func); g_slist_find (NULL, _array ## _func); return 0; } \
^
;
gio/tests/plugin-resources.c(184,40): error: pragma comment requires parenthesized identifier and optional string
__pragma(comment(linker,"/include:" _sym_prefix # _func "_constructor")) \
^
8 errors generated.
[2/4] Compiling C object gio/tests/resources.exe.p/meson-generated_.._test_resources.c.obj
FAILED: gio/tests/resources.exe.p/meson-generated_.._test_resources.c.obj
"clang-cl" "-Igio\tests\resources.exe.p" "-Igio\tests" "-I..\gio\tests" "-I." "-I.." "-Iglib" "-I..\glib" "-Isubprojects\proxy-libintl" "-I..\subprojects\proxy-libintl" "-Igmodule" "-I..\gmodule" "-Igobject" "-I..\gobject" "-Igio" "-I..\gio" "/MD" "/nologo" "/showIncludes" "/W2" "/clang:-std=gnu11" "/O2" "/Zi" "-D_GNU_SOURCE" "-fno-strict-aliasing" "-DG_ENABLE_DEBUG" "-DG_LOG_DOMAIN=\"GLib-GIO\"" "-DGLIB_MKENUMS=\"gobject\\glib-mkenums\"" "-DGLIB_COMPILE_SCHEMAS=\"C:\\Users\\Aleksandr\\glib\\build\\gio\\glib-compile-schemas.exe\"" "-UG_DISABLE_ASSERT" "/Fdgio\tests\resources.exe.p\meson-generated_.._test_resources.c.pdb" /Fogio/tests/resources.exe.p/meson-generated_.._test_resources.c.obj "/c" gio/tests/test_resources.c
gio/tests/test_resources.c(9571,24): error: expected ')'
extern int (* _array ## _func)(void); \
^
gio/tests/test_resources.c(9571,14): note: to match this '('
extern int (* _array ## _func)(void); \
^
gio/tests/test_resources.c(9573,7): error: redefinition of '_func' as different kind of symbol
int _func ## _wrapper(void) { _func(); g_slist_find (NULL, _array ## _func); return 0; } \
^
gio/tests/test_resources.c(9569,15): note: previous definition is here
static void _func(void); \
^
gio/tests/test_resources.c(9573,12): error: expected ';' after top level declarator
int _func ## _wrapper(void) { _func(); g_slist_find (NULL, _array ## _func); return 0; } \
^
;
gio/tests/test_resources.c(9575,39): error: pragma comment requires parenthesized identifier and optional string
__pragma(comment(linker,"/include:" _sym_prefix # _func "_wrapper")) \
^
gio/tests/test_resources.c(9587,24): error: expected ')'
extern int (* _array ## _func)(void); \
^
gio/tests/test_resources.c(9587,14): note: to match this '('
extern int (* _array ## _func)(void); \
^
gio/tests/test_resources.c(9589,7): error: redefinition of '_func' as different kind of symbol
int _func ## _constructor(void) { atexit (_func); g_slist_find (NULL, _array ## _func); return 0; } \
^
gio/tests/test_resources.c(9585,15): note: previous definition is here
static void _func(void); \
^
gio/tests/test_resources.c(9589,12): error: expected ';' after top level declarator
int _func ## _constructor(void) { atexit (_func); g_slist_find (NULL, _array ## _func); return 0; } \
^
;
gio/tests/test_resources.c(9591,40): error: pragma comment requires parenthesized identifier and optional string
__pragma(comment(linker,"/include:" _sym_prefix # _func "_constructor")) \
^
8 errors generated.
ninja: build stopped: cannot make progress due to previous errors.