[gtk/f16c.msvc: 77/79] meson.build: Improve F16C detection on Visual Studio
- From: Chun-wei Fan <fanchunwei src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/f16c.msvc: 77/79] meson.build: Improve F16C detection on Visual Studio
- Date: Mon, 12 Apr 2021 10:13:52 +0000 (UTC)
commit 6d6c8c59ebbcab0a2ec3e87912f4daf466da1e54
Author: Chun-wei Fan <fanchunwei src gnome org>
Date: Mon Apr 12 16:24:37 2021 +0800
meson.build: Improve F16C detection on Visual Studio
The __builtin_cpu...() intrisics are strictly for GCC/CLang-based compilers, so
don't use them in the checking code on Visual Studio. The test code will still
compile without this change, but will certainly fail if we want it to link.
meson.build | 2 ++
1 file changed, 2 insertions(+)
---
diff --git a/meson.build b/meson.build
index 641208158c..902bd72031 100644
--- a/meson.build
+++ b/meson.build
@@ -707,8 +707,10 @@ int main () {
__m128i i = _mm_cvtps_ph (s, 0);
_mm_storel_epi64 ((__m128i*)h, i);
+#if defined (__GNUC__) || defined (__clang__)
__builtin_cpu_init ();
__builtin_cpu_supports ("f16c");
+#endif
return 0;
}'''
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]