Skip to content

Commit 7b9bb38

Browse files
committed
Merge branch 'js/fuzz-cxxflags'
The build procedure to link for fuzzing test has been made customizable with a new Makefile variable. * js/fuzz-cxxflags: Makefile: use FUZZ_CXXFLAGS for linking fuzzers
2 parents b8a9209 + 927c77e commit 7b9bb38

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Makefile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3099,14 +3099,16 @@ cover_db_html: cover_db
30993099
# An example command to build against libFuzzer from LLVM 4.0.0:
31003100
#
31013101
# make CC=clang CXX=clang++ \
3102-
# CFLAGS="-fsanitize-coverage=trace-pc-guard -fsanitize=address" \
3102+
# FUZZ_CXXFLAGS="-fsanitize-coverage=trace-pc-guard -fsanitize=address" \
31033103
# LIB_FUZZING_ENGINE=/usr/lib/llvm-4.0/lib/libFuzzer.a \
31043104
# fuzz-all
31053105
#
3106+
FUZZ_CXXFLAGS ?= $(CFLAGS)
3107+
31063108
.PHONY: fuzz-all
31073109

31083110
$(FUZZ_PROGRAMS): all
3109-
$(QUIET_LINK)$(CXX) $(CFLAGS) $(LIB_OBJS) $(BUILTIN_OBJS) \
3111+
$(QUIET_LINK)$(CXX) $(FUZZ_CXXFLAGS) $(LIB_OBJS) $(BUILTIN_OBJS) \
31103112
$(XDIFF_OBJS) $(EXTLIBS) git.o $@.o $(LIB_FUZZING_ENGINE) -o $@
31113113

31123114
fuzz-all: $(FUZZ_PROGRAMS)

0 commit comments

Comments
 (0)