mirror of
https://github.com/asg017/sqlite-vec.git
synced 2026-04-24 16:26:37 +02:00
Fix Android cross-compilation failing with unsupported '-mavx' flag
The Linux AVX auto-detection checked the host's /proc/cpuinfo, which passes on x86 CI runners even when cross-compiling for Android ARM targets. Skip AVX detection when CC contains 'android'. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
0de765f457
commit
69ccb2405a
1 changed files with 2 additions and 0 deletions
2
Makefile
2
Makefile
|
|
@ -43,10 +43,12 @@ ifndef OMIT_SIMD
|
|||
CFLAGS += -mcpu=apple-m1 -DSQLITE_VEC_ENABLE_NEON
|
||||
endif
|
||||
ifeq ($(shell uname -s),Linux)
|
||||
ifeq ($(findstring android,$(CC)),)
|
||||
ifneq ($(filter avx,$(shell grep -o 'avx[^ ]*' /proc/cpuinfo 2>/dev/null | head -1)),)
|
||||
CFLAGS += -mavx -DSQLITE_VEC_ENABLE_AVX
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
ifdef USE_BREW_SQLITE
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue