forked from extern/whisper.cpp
Merge pull request #67 from undefdev/defensive-apple-arm-make
added handling for falsely as x86_64 announced ARM Macs
This commit is contained in:
commit
744bd47685
13
Makefile
13
Makefile
@ -2,6 +2,19 @@ UNAME_S := $(shell uname -s)
|
|||||||
UNAME_P := $(shell uname -p)
|
UNAME_P := $(shell uname -p)
|
||||||
UNAME_M := $(shell uname -m)
|
UNAME_M := $(shell uname -m)
|
||||||
|
|
||||||
|
# Mac OS + Arm can report x86_64
|
||||||
|
# ref: https://github.com/ggerganov/whisper.cpp/issues/66#issuecomment-1282546789
|
||||||
|
ifeq ($(UNAME_S),Darwin)
|
||||||
|
ifneq ($(UNAME_P),arm)
|
||||||
|
SYSCTL_M := $(shell sysctl -n hw.optional.arm64)
|
||||||
|
ifeq ($(SYSCTL_M),1)
|
||||||
|
UNAME_P := arm
|
||||||
|
UNAME_M := arm64
|
||||||
|
warn := $(warning Your arch is announced as x86_64, but it seems to actually be ARM64. Not fixing that can lead to bad performance. For more info see: https://github.com/ggerganov/whisper.cpp/issues/66\#issuecomment-1282546789)
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
#
|
#
|
||||||
# Compile flags
|
# Compile flags
|
||||||
#
|
#
|
||||||
|
Loading…
Reference in New Issue
Block a user