aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvanhauser-thc <vh@thc.org>2022-11-10 16:12:37 +0100
committervanhauser-thc <vh@thc.org>2022-11-10 16:12:37 +0100
commitb2f12c37120e6529d1bab83976db009263dedc97 (patch)
tree131b80f68b63bcbae60dc5018aaf7c79610c702c
parent2323952d6217aac36f2866dc4596e6b81a0d380e (diff)
downloadafl++-b2f12c37120e6529d1bab83976db009263dedc97.tar.gz
llvm debug
-rw-r--r--GNUmakefile1
-rw-r--r--GNUmakefile.llvm17
-rw-r--r--docs/INSTALL.md1
3 files changed, 12 insertions, 7 deletions
diff --git a/GNUmakefile b/GNUmakefile
index f5f2dcb2..c8f7f35a 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -381,6 +381,7 @@ help:
@echo ASAN_BUILD - compiles AFL++ with memory sanitizer for debug purposes
@echo UBSAN_BUILD - compiles AFL++ tools with undefined behaviour sanitizer for debug purposes
@echo DEBUG - no optimization, -ggdb3, all warnings and -Werror
+ @echo LLVM_DEBUG - shows llvm deprecation warnings
@echo PROFILING - compile afl-fuzz with profiling information
@echo INTROSPECTION - compile afl-fuzz with mutation introspection
@echo NO_PYTHON - disable python support
diff --git a/GNUmakefile.llvm b/GNUmakefile.llvm
index 4dc5a56e..7e090f69 100644
--- a/GNUmakefile.llvm
+++ b/GNUmakefile.llvm
@@ -255,16 +255,19 @@ else
endif
CFLAGS ?= -O3 -funroll-loops -fPIC -D_FORTIFY_SOURCE=2
-CFLAGS_SAFE := -Wall -g -Wno-cast-qual -Wno-variadic-macros -Wno-pointer-sign -I ./include/ -I ./instrumentation/ \
+CFLAGS_SAFE := -Wall -g -Wno-cast-qual -Wno-variadic-macros -Wno-pointer-sign \
+ -I ./include/ -I ./instrumentation/ \
-DAFL_PATH=\"$(HELPER_PATH)\" -DBIN_PATH=\"$(BIN_PATH)\" \
-DLLVM_BINDIR=\"$(LLVM_BINDIR)\" -DVERSION=\"$(VERSION)\" \
-DLLVM_LIBDIR=\"$(LLVM_LIBDIR)\" -DLLVM_VERSION=\"$(LLVMVER)\" \
- -Wno-deprecated -DAFL_CLANG_FLTO=\"$(AFL_CLANG_FLTO)\" \
- -DAFL_REAL_LD=\"$(AFL_REAL_LD)\" \
- -DAFL_CLANG_LDPATH=\"$(AFL_CLANG_LDPATH)\" \
- -DAFL_CLANG_FUSELD=\"$(AFL_CLANG_FUSELD)\" \
- -DCLANG_BIN=\"$(CLANG_BIN)\" -DCLANGPP_BIN=\"$(CLANGPP_BIN)\" -DUSE_BINDIR=$(USE_BINDIR) -Wno-unused-function \
- $(AFL_CLANG_DEBUG_PREFIX)
+ -DAFL_CLANG_FLTO=\"$(AFL_CLANG_FLTO)\" -DAFL_REAL_LD=\"$(AFL_REAL_LD)\" \
+ -DAFL_CLANG_LDPATH=\"$(AFL_CLANG_LDPATH)\" -DAFL_CLANG_FUSELD=\"$(AFL_CLANG_FUSELD)\" \
+ -DCLANG_BIN=\"$(CLANG_BIN)\" -DCLANGPP_BIN=\"$(CLANGPP_BIN)\" -DUSE_BINDIR=$(USE_BINDIR) \
+ -Wno-unused-function $(AFL_CLANG_DEBUG_PREFIX)
+ifndef LLVM_DEBUG
+ CFLAGS_SAFE += -Wno-deprecated
+endif
+
override CFLAGS += $(CFLAGS_SAFE)
ifdef AFL_TRACE_PC
diff --git a/docs/INSTALL.md b/docs/INSTALL.md
index 86ba916f..591b7ded 100644
--- a/docs/INSTALL.md
+++ b/docs/INSTALL.md
@@ -83,6 +83,7 @@ These build options exist:
* UBSAN_BUILD - compiles AFL++ tools with undefined behaviour sanitizer for
debug purposes
* DEBUG - no optimization, -ggdb3, all warnings and -Werror
+* LLVM_DEBUG - shows llvm deprecation warnings
* PROFILING - compile afl-fuzz with profiling information
* INTROSPECTION - compile afl-fuzz with mutation introspection
* NO_PYTHON - disable python support