Make NEON build detection a bit more robust
This commit is contained in:
1 parent
8ccda0ea91
commit
4f345be6e8
2 files changed
+31
-1
No files matched your search
@@ -13,6 +13,9 @@ endif
|
||||
ifneq ($(findstring amd64, $(cpu_arch)), )
|
||||
IS_SIMD_ARCH=x86
|
||||
endif
|
||||
ifneq ($(findstring arm, $(cpu_arch)), )
|
||||
IS_SIMD_ARCH=arm
|
||||
endif
|
||||
ifneq ($(findstring arm64, $(cpu_arch)), )
|
||||
IS_SIMD_ARCH=arm64
|
||||
endif
|
||||
@@ -24,13 +27,14 @@ ifneq ($(IS_SIMD_ARCH), )
|
||||
MULTIARCHSRCS = hardnested_bf_core.c hardnested_bitarray_core.c
|
||||
endif
|
||||
ifeq ($(MULTIARCHSRCS), )
|
||||
MYCFLAGS += -DNOSIMD_BUILD
|
||||
MYSRCS += hardnested_bf_core.c hardnested_bitarray_core.c
|
||||
endif
|
||||
|
||||
LIB_A = libhardnested.a
|
||||
|
||||
MYOBJS = $(MYSRCS:%.c=$(OBJDIR)/%.o)
|
||||
ifeq ($(IS_SIMD_ARCH), arm64)
|
||||
ifneq ($(findstring arm, $(IS_SIMD_ARCH)), )
|
||||
MYOBJS += $(MULTIARCHSRCS:%.c=$(OBJDIR)/%_NOSIMD.o) \
|
||||
$(MULTIARCHSRCS:%.c=$(OBJDIR)/%_NEON.o)
|
||||
else
|
||||
@@ -54,6 +58,11 @@ ifeq ($(IS_SIMD_ARCH), arm64)
|
||||
SUPPORTS_AVX512=False
|
||||
HARD_SWITCH_NOSIMD = -DNOSIMD_BUILD
|
||||
endif
|
||||
ifeq ($(IS_SIMD_ARCH), arm)
|
||||
SUPPORTS_AVX512=False
|
||||
HARD_SWITCH_NEON = -mfpu=neon
|
||||
HARD_SWITCH_NOSIMD = -DNOSIMD_BUILD
|
||||
endif
|
||||
ifeq "$(SUPPORTS_AVX512)" "True"
|
||||
HARD_SWITCH_NOSIMD += -mno-avx512f
|
||||
HARD_SWITCH_MMX += -mno-avx512f
|
||||
|
||||
Reference in new issue
Block a user