aboutsummaryrefslogtreecommitdiff
path: root/llvm_mode/Makefile
diff options
context:
space:
mode:
authorvan Hauser <vh@thc.org>2019-12-03 00:30:35 +0100
committervan Hauser <vh@thc.org>2019-12-03 00:30:35 +0100
commitef2dc98773c55eb09e4c1a588fb74df58570f868 (patch)
treea0025a05d46f2bc08e67789450c5de8322d92b54 /llvm_mode/Makefile
parent984faca4e82cc7cf600d6a32fa6fc17775901312 (diff)
downloadafl++-ef2dc98773c55eb09e4c1a588fb74df58570f868.tar.gz
maybe we can work with xcode?
Diffstat (limited to 'llvm_mode/Makefile')
-rw-r--r--llvm_mode/Makefile5
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