Skip to content

Commit 69ccb24

Browse files
asg017claude
andcommitted
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>
1 parent 0de765f commit 69ccb24

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,12 @@ ifndef OMIT_SIMD
4343
CFLAGS += -mcpu=apple-m1 -DSQLITE_VEC_ENABLE_NEON
4444
endif
4545
ifeq ($(shell uname -s),Linux)
46+
ifeq ($(findstring android,$(CC)),)
4647
ifneq ($(filter avx,$(shell grep -o 'avx[^ ]*' /proc/cpuinfo 2>/dev/null | head -1)),)
4748
CFLAGS += -mavx -DSQLITE_VEC_ENABLE_AVX
4849
endif
4950
endif
51+
endif
5052
endif
5153

5254
ifdef USE_BREW_SQLITE

0 commit comments

Comments
 (0)