Commit 8cbbffc3 authored by Xiao Shi's avatar Xiao Shi Committed by Facebook Github Bot

restrict NEON version to aarch64

Summary:
F14 library relies on the dependent targets to set the neon-related compiler
flags consistently. As it turns out, this is difficult for non-aarch64
platforms where neon availability is not guaranteed.

Hence, for safety (so that we don't cause SIGILL on older generation Android
devices), we restrict the neon version of F14 to aarch64.

Reviewed By: Maratyszcza, nbronson

Differential Revision: D9519198

fbshipit-source-id: cd0c92b17403bce9156a915ad96020f565ca3d6a
parent e45b48c7
......@@ -18,8 +18,13 @@
#include <folly/Portability.h>
// F14 has been implemented for SSE2 and NEON (so far)
#if FOLLY_SSE >= 2 || FOLLY_NEON
// F14 has been implemented for SSE2 and NEON (so far). The NEON version is only
// enabled on aarch64 as it is difficult to ensure that dependent targets on
// other Android ARM platforms set the NEON compilation flags consistently. If
// dependent targets don't consistently build with NEON, due to C++ templates
// and ODR, the NEON version may be linked in where a non-NEON version is
// expected.
#if ((FOLLY_SSE >= 2) || (FOLLY_NEON && FOLLY_AARCH64))
#define FOLLY_F14_VECTOR_INTRINSICS_AVAILABLE 1
#else
#define FOLLY_F14_VECTOR_INTRINSICS_AVAILABLE 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