From: Chun-wei Fan Date: Wed, 26 Jan 2022 10:22:21 +0000 (+0800) Subject: meson: Make tests run better on MSVC builds X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=734b60dd8c249618b63712c99e17201a596fee26;p=thirdparty%2Fvala.git meson: Make tests run better on MSVC builds 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 ` --msvc-syntax` for this to work best. --- diff --git a/tests/meson.build b/tests/meson.build index 1f22ddaec..1c5d738c1 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -1371,13 +1371,23 @@ vala_flags = [ '--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',