Skip to content
Snippets Groups Projects
Commit 070b8aac authored by Jonathan Foote's avatar Jonathan Foote
Browse files

pass flags through for oss-fuzz

parent 22eac052
No related branches found
No related tags found
1 merge request!868Pass fuzzer-related build flags through in oss-fuzz env
......@@ -19,7 +19,18 @@ packet_libfuzzer_LDADD = $(top_builddir)/src/libknot.la
zscanner_libfuzzer_SOURCES = zscanner_libfuzzer.c
zscanner_libfuzzer_LDADD = $(top_builddir)/src/zscanner/libzscanner.la
if OSS_FUZZ
# CFLAGS, LDFLAGS, etc. are defined by the oss-fuzz environment; just link
# in the fuzzing engine
packet_libfuzzer_LDADD += ${LIB_FUZZING_ENGINE} -lc++
zscanner_libfuzzer_LDADD += ${LIB_FUZZING_ENGINE} -lc++
else
if SANITIZE_FUZZER
packet_libfuzzer_LDFLAGS = -fsanitize=fuzzer
zscanner_libfuzzer_LDFLAGS = -fsanitize=fuzzer
......@@ -28,14 +39,13 @@ zscanner_libfuzzer_LDFLAGS = -fsanitize=fuzzer
TESTS = check/check_fuzzers.test
EXTRA_DIST = check/check_fuzzers.test
if OSS_FUZZ
packet_libfuzzer_LDADD += -lFuzzingEngine
zscanner_libfuzzer_LDADD += -lFuzzingEngine
endif
else
packet_libfuzzer_SOURCES += main.c
zscanner_libfuzzer_SOURCES += main.c
AM_CPPFLAGS += -DTEST_RUN
TESTS = $(FUZZERS)
endif
endif # if SANITIZE_FUZZER
endif # if OSS_FUZZ
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment