aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorPlatin21 <arminmops@icloud.com>2021-12-19 21:51:51 +0100
committerPlatin21 <arminmops@icloud.com>2021-12-19 21:51:51 +0100
commit3e465c7e84490ea73f9419286fd53e95ba911c38 (patch)
treecd7e7d05c265dde1c117e665927891a082308717 /Makefile
parent0548db423067bce16d45af651819bf56feb5d411 (diff)
Changes to required llvm version 13 as both 12 and 11 don't work correctly on macOS Apple Silicon
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile14
1 files changed, 12 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 23fb7be66..a7aecbb2d 100644
--- a/Makefile
+++ b/Makefile
@@ -8,11 +8,21 @@ CC=clang
OS=$(shell uname)
ifeq ($(OS), Darwin)
+ ARCH=$(shell uname -m)
LLVM_CONFIG=llvm-config
- ifneq ($(shell llvm-config --version | grep '^11\.'),)
+
+ # LLVM Version Setting
+ LLVM_VERSION_PATTERN="^11\."
+ LLVM_VERSION="11"
+ ifeq ($(ARCH), arm64)
+ LLVM_VERSION="13"
+ LLVM_VERSION_PATTERN="^13"
+ endif
+
+ ifneq ($(shell llvm-config --version | grep $(LLVM_VERSION_PATTERN)),)
LLVM_CONFIG=llvm-config
else
- $(error "Requirement: llvm-config must be version 11")
+ $(error "Requirement: llvm-config must be version $(LLVM_VERSION)")
endif
LDFLAGS:=$(LDFLAGS) -liconv