mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-13 10:38:07 +00:00
better performance compilation options for afl++ and targets
This commit is contained in:
27
examples/aflpp_driver/GNUmakefile
Normal file
27
examples/aflpp_driver/GNUmakefile
Normal file
@ -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
|
@ -1,24 +1,2 @@
|
||||
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
|
||||
|
||||
|
||||
|
||||
all: libAFLDriver.a
|
||||
|
||||
aflpp_driver.o: aflpp_driver.cpp
|
||||
$(LLVM_BINDIR)clang++ -O3 -march=native -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++ -O3 -march=native -funroll-loops -stdlib=libc++ -std=c++11 -c aflpp_driver.cpp
|
||||
|
||||
libAFLDriver.a: aflpp_driver.o afl-llvm-rt.o
|
||||
ar ru libAFLDriver.a aflpp_driver.o
|
||||
|
||||
clean:
|
||||
rm -f *.o libAFLDriver.a *~ core
|
||||
all:
|
||||
@gmake all || echo please install GNUmake
|
||||
|
Reference in New Issue
Block a user