diff options
author | 2016-09-08 11:22:09 -0700 | |
---|---|---|
committer | 2016-09-08 11:22:09 -0700 | |
commit | 9441af52aafd59553ab1a2ea52c390400f93e0bb (patch) | |
tree | 44c6925a1e1c7c243a6f59370ef4ea0d1d80b868 /include/core/SkPreConfig.h | |
parent | 85c922acec37726ac64e9be9a79de697c677f35d (diff) |
Apple devices do not support CRC32 instructions. Don't believe Clang's lies.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2322033002
CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot
Review-Url: https://codereview.chromium.org/2322033002
Diffstat (limited to 'include/core/SkPreConfig.h')
-rw-r--r-- | include/core/SkPreConfig.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/core/SkPreConfig.h b/include/core/SkPreConfig.h index f241bab2ff..b165ae1255 100644 --- a/include/core/SkPreConfig.h +++ b/include/core/SkPreConfig.h @@ -193,6 +193,12 @@ #define SK_ARM_HAS_NEON #endif +// Really this __APPLE__ check shouldn't be necessary, but it seems that Apple's Clang defines +// __ARM_FEATURE_CRC32 for -arch arm64, even though their chips don't support those instructions! +#if defined(__ARM_FEATURE_CRC32) && !defined(__APPLE__) + #define SK_ARM_HAS_CRC32 +#endif + ////////////////////////////////////////////////////////////////////// #if !defined(SKIA_IMPLEMENTATION) |