meson: Mostly assume clang-cl is MSVC

We need to enable building the dirent and gnulib sources for clang-cl,
as we are still using the Microsoft-style headers and lib's and CRT.
We need to also do this for the following, for similar reasoning:

-Symbol export (via __declspec(dllexport))
-Dependency discovery without pkg-config files
-long long and ssize_t detection

We do, however, enable the autoptr tests for clang-cl builds.  Note that
at this point real MSVC builds are still better supported than clang-cl
builds, and it will likely remain so for at least the near future,
alhtough real MSVC builds of the GTK stack are consumable and are usable
by clang-cl.
This commit is contained in:
Chun-wei Fan
2019-07-10 00:22:51 +08:00
committed by Chun-wei Fan
parent b80c17e325
commit e8d471f3e1
9 changed files with 17 additions and 17 deletions

View File

@@ -97,7 +97,7 @@ test_env.set('GIO_LAUNCH_DESKTOP', meson.build_root() + '/gio/gio-launch-desktop
# 1.2.14 required for dbus_message_set_serial
dbus1_dep = dependency('dbus-1', required : false, version : '>= 1.2.14')
if not dbus1_dep.found()
if cc.get_id() == 'msvc'
if cc.get_id() == 'msvc' or cc.get_id() == 'clang-cl'
# MSVC: Search for the DBus library by the configuration, which corresponds
# to the output of CMake builds of DBus. Note that debugoptimized
# is really a Release build with .PDB files.
@@ -382,7 +382,7 @@ test_extra_programs += {
},
}
if cc.get_id() != 'msvc'
if cc.get_id() != 'msvc' and cc.get_id() != 'clang-cl'
test_extra_programs += {
# These three are manual-run tests because they need a session bus but don't bring one up themselves
# FIXME: these build but don't seem to work!