summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPiotr Brzeziński <thewildtree@outlook.com>2024-03-21 17:45:48 +0100
committerPiotr Brzeziński <thewildtree@outlook.com>2024-03-21 17:45:48 +0100
commit7a60e2074d425b7ad1192ff48ac87af4246a04c4 (patch)
tree175c4f6a71b58174b1c4cc53c7ae39e59981b4cd
parentbca725b320d4f9f70a3d468ad415cca274990875 (diff)
orccpu-arm: Only enable on Apple arm64 if running on macOSHEADmain
Part-of: <https://gitlab.freedesktop.org/gstreamer/orc/-/merge_requests/175>
-rw-r--r--orc/orccpu-arm.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/orc/orccpu-arm.c b/orc/orccpu-arm.c
index 865df59..8e65cee 100644
--- a/orc/orccpu-arm.c
+++ b/orc/orccpu-arm.c
@@ -47,6 +47,9 @@
#if defined(__linux__)
#include <linux/auxvec.h>
#endif
+#ifdef __APPLE__
+#include <TargetConditionals.h>
+#endif
/***** arm *****/
@@ -120,7 +123,7 @@ orc_cpu_arm_getflags_cpuinfo ()
#if defined (_WIN32) && defined (_M_ARM64)
/* On Windows, for desktop applications, we are on always on ARMv8 (aarch64)*/
ret = ORC_TARGET_ARM_EDSP | ORC_TARGET_NEON_NEON;
-#elif defined (__APPLE__) && defined (__arm64__)
+#elif defined (__APPLE__) && defined (__arm64__) && TARGET_OS_OSX
ret = ORC_TARGET_ARM_EDSP | ORC_TARGET_NEON_NEON;
#else
char *cpuinfo;