diff options
author | hexcoder- <heiko@hexco.de> | 2019-12-09 12:19:57 +0100 |
---|---|---|
committer | hexcoder- <heiko@hexco.de> | 2019-12-09 12:19:57 +0100 |
commit | 30e4e7340e7dd36288c39b0bc45ec71421872621 (patch) | |
tree | c22ffd7e9d451c8fb13a26c309079be24e2368f9 | |
parent | aa95728c359dd3a551692fc0bd19df944619e97e (diff) | |
download | afl++-30e4e7340e7dd36288c39b0bc45ec71421872621.tar.gz |
on MacOS llvm is not installed by default, add a test for that. Before this fix
the make run proceeded, producing meaningless error messages.
-rw-r--r-- | llvm_mode/Makefile | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/llvm_mode/Makefile b/llvm_mode/Makefile index 8c769361..d5dfe7c0 100644 --- a/llvm_mode/Makefile +++ b/llvm_mode/Makefile @@ -35,7 +35,7 @@ else LLVM_CONFIG ?= llvm-config endif -LLVMVER = $(shell $(LLVM_CONFIG) --version 2>/dev/null) +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_NEW_API = $(shell $(LLVM_CONFIG) --version 2>/dev/null | egrep -q '^1[0-9]' && echo 1 || echo 0 ) LLVM_MAJOR = $(shell $(LLVM_CONFIG) --version 2>/dev/null | sed 's/\..*//') @@ -43,8 +43,12 @@ LLVM_BINDIR = $(shell $(LLVM_CONFIG) --bindir 2>/dev/null) LLVM_STDCXX = gnu++11 LLVM_APPLE = $(shell clang -v 2>&1 | grep -iq apple && echo 1 || echo 0) +ifeq "$(LLVMVER)" "" + $(error llvm_mode needs llvm-config, which was not found) +endif + ifeq "$(LLVM_UNSUPPORTED)" "1" - $(warn llvm_mode only supports versions 3.8.0 up to 9) + $(warn llvm_mode only supports llvm versions 3.8.0 up to 9) endif ifeq "$(LLVM_MAJOR)" "9" |