about summary refs log tree commit diff
path: root/GNUmakefile.llvm
diff options
context:
space:
mode:
authorhexcoder- <heiko@hexco.de>2021-02-13 23:29:04 +0100
committerhexcoder- <heiko@hexco.de>2021-02-13 23:29:04 +0100
commite45333bcf96f86b5ef0b905a8e84fad7b7cb0427 (patch)
tree30deaa24dbcc759bf03df3b1043ef1ca69f89089 /GNUmakefile.llvm
parentc906c042be926652aa2e2d9fb4886ee03f5d86c2 (diff)
parent9bd1e19d7f004b4da6a610b07e59f99d66bb7ec2 (diff)
downloadafl++-e45333bcf96f86b5ef0b905a8e84fad7b7cb0427.tar.gz
Merge branch 'dev' of https://github.com/AFLplusplus/AFLplusplus into dev
Diffstat (limited to 'GNUmakefile.llvm')
-rw-r--r--GNUmakefile.llvm15
1 files changed, 10 insertions, 5 deletions
diff --git a/GNUmakefile.llvm b/GNUmakefile.llvm
index 3554c8bf..cc332f6c 100644
--- a/GNUmakefile.llvm
+++ b/GNUmakefile.llvm
@@ -43,7 +43,8 @@ endif
 LLVMVER  = $(shell $(LLVM_CONFIG) --version 2>/dev/null | sed 's/git//' | sed 's/svn//' )
 LLVM_MAJOR = $(shell $(LLVM_CONFIG) --version 2>/dev/null | sed 's/\..*//' )
 LLVM_MINOR = $(shell $(LLVM_CONFIG) --version 2>/dev/null | sed 's/.*\.//' | sed 's/git//' | sed 's/svn//' | sed 's/ .*//' )
-LLVM_UNSUPPORTED = $(shell $(LLVM_CONFIG) --version 2>/dev/null | egrep -q '^3\.[0-3]|^19' && echo 1 || echo 0 )
+LLVM_UNSUPPORTED = $(shell $(LLVM_CONFIG) --version 2>/dev/null | egrep -q '^3\.[0-3]|^[0-2]\.' && echo 1 || echo 0 )
+LLVM_TOO_NEW = $(shell $(LLVM_CONFIG) --version 2>/dev/null | egrep -q '^1[3-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_10_OK = $(shell $(LLVM_CONFIG) --version 2>/dev/null | egrep -q '^1[1-9]|^10\.[1-9]|^10\.0.[1-9]' && echo 1 || echo 0 )
 LLVM_HAVE_LTO = $(shell $(LLVM_CONFIG) --version 2>/dev/null | egrep -q '^1[1-9]' && echo 1 || echo 0 )
@@ -58,7 +59,11 @@ ifeq "$(LLVMVER)" ""
 endif
 
 ifeq "$(LLVM_UNSUPPORTED)" "1"
-  $(warning llvm_mode only supports llvm versions 3.4 up to 12)
+  $(error llvm_mode only supports llvm from version 3.4 onwards)
+endif
+
+ifeq "$(LLVM_TOO_NEW)" "1"
+  $(warning you are using an in-development llvm version - this might break llvm_mode!)
 endif
 
 LLVM_TOO_OLD=1
@@ -208,12 +213,12 @@ ifeq "$(LLVM_LTO)" "1"
       ifneq "$(shell readlink $(LLVM_BINDIR)/ld.lld 2>&1)" ""
         AFL_REAL_LD = $(LLVM_BINDIR)/ld.lld
       else
-        $(warn ld.lld not found, cannot enable LTO mode)
+        $(warning ld.lld not found, cannot enable LTO mode)
         LLVM_LTO = 0
       endif
     endif
   else
-    $(warn clang option -flto is not working - maybe LLVMgold.so not found - cannot enable LTO mode)
+    $(warning clang option -flto is not working - maybe LLVMgold.so not found - cannot enable LTO mode)
     LLVM_LTO = 0
   endif
 endif
@@ -226,7 +231,7 @@ ifeq "$(LLVM_LTO)" "1"
       AFL_CLANG_LDPATH=1
     endif
   else
-    $(warn -fuse-ld is not working, cannot enable LTO mode)
+    $(warning -fuse-ld is not working, cannot enable LTO mode)
     LLVM_LTO = 0
   endif
 endif