feat: support build on darwin arm64 (#2439)

main: support build on darwin arm64
This commit is contained in:
Pure White
2022-01-12 19:10:08 +08:00
committed by GitHub
parent ef77b645b9
commit 93e0636c03
5 changed files with 38 additions and 21 deletions
+1
View File
@@ -9,6 +9,7 @@ CLANG_SRC ?= $(LLVM_PROJECTDIR)/clang
LLD_SRC ?= $(LLVM_PROJECTDIR)/lld
# Try to autodetect LLVM build tools.
# FIXME(#2438): This doesn't work on darwin now. Homebrew installed llvm is key-only.
detect = $(shell command -v $(1) 2> /dev/null && echo $(1))
CLANG ?= $(word 1,$(abspath $(call detect,llvm-build/bin/clang))$(call detect,clang-13)$(call detect,clang-12)$(call detect,clang-11)$(call detect,clang))
LLVM_AR ?= $(word 1,$(abspath $(call detect,llvm-build/bin/llvm-ar))$(call detect,llvm-ar-13)$(call detect,llvm-ar-12)$(call detect,llvm-ar-11)$(call detect,llvm-ar))