Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
Makefile: use FUZZ_CXXFLAGS for linking fuzzers
author
Josh Steadmon
<steadmon@google.com>
Wed, 14 Nov 2018 19:41:47 +0000
(11:41 -0800)
committer
Junio C Hamano
<gitster@pobox.com>
Fri, 16 Nov 2018 05:25:06 +0000
(14:25 +0900)
OSS-Fuzz requires C++-specific flags to link fuzzers. Passing these in
CFLAGS causes lots of build warnings. Using separate FUZZ_CXXFLAGS
avoids this.
Signed-off-by: Josh Steadmon <steadmon@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Makefile
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
1127a98
)
diff --git
a/Makefile
b/Makefile
index 1b3d893090cdd081752b57f9203cf2257596bf4e..507968416dbf9f6091b97a8a29b6cc0f493242b6 100644
(file)
--- a/
Makefile
+++ b/
Makefile
@@
-3083,14
+3083,16
@@
cover_db_html: cover_db
# An example command to build against libFuzzer from LLVM 4.0.0:
#
# make CC=clang CXX=clang++ \
# An example command to build against libFuzzer from LLVM 4.0.0:
#
# make CC=clang CXX=clang++ \
-#
C
FLAGS="-fsanitize-coverage=trace-pc-guard -fsanitize=address" \
+#
FUZZ_CXX
FLAGS="-fsanitize-coverage=trace-pc-guard -fsanitize=address" \
# LIB_FUZZING_ENGINE=/usr/lib/llvm-4.0/lib/libFuzzer.a \
# fuzz-all
#
# LIB_FUZZING_ENGINE=/usr/lib/llvm-4.0/lib/libFuzzer.a \
# fuzz-all
#
+FUZZ_CXXFLAGS ?= $(CFLAGS)
+
.PHONY: fuzz-all
$(FUZZ_PROGRAMS): all
.PHONY: fuzz-all
$(FUZZ_PROGRAMS): all
- $(QUIET_LINK)$(CXX) $(
C
FLAGS) $(LIB_OBJS) $(BUILTIN_OBJS) \
+ $(QUIET_LINK)$(CXX) $(
FUZZ_CXX
FLAGS) $(LIB_OBJS) $(BUILTIN_OBJS) \
$(XDIFF_OBJS) $(EXTLIBS) git.o $@.o $(LIB_FUZZING_ENGINE) -o $@
fuzz-all: $(FUZZ_PROGRAMS)
$(XDIFF_OBJS) $(EXTLIBS) git.o $@.o $(LIB_FUZZING_ENGINE) -o $@
fuzz-all: $(FUZZ_PROGRAMS)