diff options
author | van Hauser <vh@thc.org> | 2020-05-26 13:19:57 +0200 |
---|---|---|
committer | van Hauser <vh@thc.org> | 2020-05-26 13:19:57 +0200 |
commit | 996e1515b320fb2d44c367dea7b4d26f2d56f5df (patch) | |
tree | 6a298c420819aa9a22feae38bf88385d305d6e41 /examples/aflpp_driver/GNUmakefile | |
parent | 0994972c07333af3a1fecf694c6527517da966ca (diff) | |
download | afl++-996e1515b320fb2d44c367dea7b4d26f2d56f5df.tar.gz |
better performance compilation options for afl++ and targets
Diffstat (limited to 'examples/aflpp_driver/GNUmakefile')
-rw-r--r-- | examples/aflpp_driver/GNUmakefile | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/examples/aflpp_driver/GNUmakefile b/examples/aflpp_driver/GNUmakefile new file mode 100644 index 00000000..fca3fd2c --- /dev/null +++ b/examples/aflpp_driver/GNUmakefile @@ -0,0 +1,27 @@ +ifeq "" "$(LLVM_CONFIG)" + LLVM_CONFIG=llvm-config +endif + +LLVM_BINDIR = $(shell $(LLVM_CONFIG) --bindir 2>/dev/null) +ifneq "" "$(LLVM_BINDIR)" + LLVM_BINDIR := $(LLVM_BINDIR)/ +endif + +FLAGS=-O3 -funroll-loops + +all: libAFLDriver.a libAFLDriver2.a + +aflpp_driver.o: aflpp_driver.cpp + $(LLVM_BINDIR)clang++ $(FLAGS) -stdlib=libc++ -funroll-loops -std=c++11 -c aflpp_driver.cpp + +afl-llvm-rt.o: ../../llvm_mode/afl-llvm-rt.o.c + $(LLVM_BINDIR)clang $(FLAGS) -I../../include -c -o afl-llvm-rt.o ../../llvm_mode/afl-llvm-rt.o.c + +libAFLDriver.a: aflpp_driver.o + ar ru libAFLDriver.a aflpp_driver.o + +libAFLDriver2.a: aflpp_driver.o afl-llvm-rt.o + ar ru libAFLDriver2.a aflpp_driver.o afl-llvm-rt.o + +clean: + rm -f *.o libAFLDriver*.a *~ core |