Commit 6d6c8c59 authored by Chun-wei Fan's avatar Chun-wei Fan
Browse files

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.
parent 46ed7540
...@@ -707,8 +707,10 @@ int main () { ...@@ -707,8 +707,10 @@ int main () {
__m128i i = _mm_cvtps_ph (s, 0); __m128i i = _mm_cvtps_ph (s, 0);
_mm_storel_epi64 ((__m128i*)h, i); _mm_storel_epi64 ((__m128i*)h, i);
#if defined (__GNUC__) || defined (__clang__)
__builtin_cpu_init (); __builtin_cpu_init ();
__builtin_cpu_supports ("f16c"); __builtin_cpu_supports ("f16c");
#endif
return 0; return 0;
}''' }'''
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment