From 8b458d5bd91051002fd780d2616d6bcb04c3e10b Mon Sep 17 00:00:00 2001 From: Johann Date: Fri, 29 Jun 2018 06:44:13 -0700 Subject: [PATCH] xcode: disable avx512 support xcode reports clang version 9. It does not appear to support inline assembly using avx512 instructions. Tested with cmake libyuv on Mac. Fails without this patch. BUG=libyuv:789 --- include/libyuv/row.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/libyuv/row.h b/include/libyuv/row.h index 646a6abb1..1468f4b99 100644 --- a/include/libyuv/row.h +++ b/include/libyuv/row.h @@ -56,9 +56,10 @@ extern "C" { #endif // __clang__ // clang >= 6.0.0 required for AVX512. -// TODO(fbarchard): fix xcode 9 ios b/789. #if defined(__clang__) && (defined(__x86_64__) || defined(__i386__)) -#if (__clang_major__ >= 7) && !defined(__APPLE_EMBEDDED_SIMULATOR__) +// clang in xcode follows a different versioning scheme. +// TODO(fbarchard): fix xcode 9 ios b/789. +#if (__clang_major__ >= 7) && !defined(__APPLE__) #define CLANG_HAS_AVX512 1 #endif // clang >= 7 #endif // __clang__