diff options
-rw-r--r-- | llvm_mode/Makefile | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm_mode/Makefile b/llvm_mode/Makefile index 033babac..6dd9fd64 100644 --- a/llvm_mode/Makefile +++ b/llvm_mode/Makefile @@ -36,9 +36,10 @@ else endif LLVMVER = $(shell $(LLVM_CONFIG) --version 2>/dev/null) -LLVM_UNSUPPORTED = $(shell $(LLVM_CONFIG) --version 2>/dev/null | egrep -q '^[12]|^3\.0|^1[0-9]' && echo 1 || echo 0 ) +LLVM_UNSUPPORTED = $(shell $(LLVM_CONFIG) --version 2>/dev/null | egrep -q '^[12]|^3\.0|^1[0-9]' && echo 1 || echo 0) LLVM_MAJOR = $(shell $(LLVM_CONFIG) --version 2>/dev/null | sed 's/\..*//') LLVM_BINDIR = $(shell $(LLVM_CONFIG) --bindir 2>/dev/null) +LLVM_APPLE = $(shell clang -v 2>&1 | grep -iq apple && echo 1 || echo 0) ifeq "$(LLVM_UNSUPPORTED)" "1" $(warn llvm_mode only supports versions 3.8.0 up to 9) @@ -145,7 +146,9 @@ endif test_deps: ifndef AFL_TRACE_PC @echo "[*] Checking for working 'llvm-config'..." + ifneq "$(LLVM_APPLE)" "1" @which $(LLVM_CONFIG) >/dev/null 2>&1 || ( echo "[-] Oops, can't find 'llvm-config'. Install clang or set \$$LLVM_CONFIG or \$$PATH beforehand."; echo " (Sometimes, the binary will be named llvm-config-3.5 or something like that.)"; exit 1 ) + endif else @echo "[!] Note: using -fsanitize=trace-pc mode (this will fail with older LLVM)." endif |