Use compiler flags that would work on Visual Studio so that tests can
run much better than without. Currently, one may need to set the
PKG_CONFIG envvar to `<pkg-config-executable> --msvc-syntax` for this to
work best.
'--disable-warnings',
'--save-temps',
'--cc', cc.cmd_array()[-1],
+ '-X', '-DGETTEXT_PACKAGE="valac"',
+]
+
+if cc.get_id() == 'msvc'
+vala_flags += [
+ '-X', '-Od',
+ '-X', 'gmodule-2.0.lib', # undefined reference to `g_module_open_full'
+]
+else
+vala_flags += [
'-X', '-g',
'-X', '-O0',
'-X', '-pipe',
'-X', '-lm',
'-X', '-lgmodule-2.0', # undefined reference to `g_module_open_full'
- '-X', '-DGETTEXT_PACKAGE="valac"',
]
+endif
test_envars = [
'G_DEBUG=fatal-warnings',