summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2017-01-09 12:25:28 -0500
committerNick Mathewson <nickm@torproject.org>2017-01-30 08:37:25 -0500
commit92679d90d54d6bde28124fd56e443c02f89b4e52 (patch)
tree658560bed35d8e240fbfd0aa39f61109bc389426 /src
parent99d4faf6d35b5923daf48605da0d9da2e7de1824 (diff)
downloadtor-92679d90d54d6bde28124fd56e443c02f89b4e52.tar.gz
tor-92679d90d54d6bde28124fd56e443c02f89b4e52.zip
Try to refactor OSS fuzzers into static libraries.
Diffstat (limited to 'src')
-rw-r--r--src/test/fuzz/include.am87
1 files changed, 35 insertions, 52 deletions
diff --git a/src/test/fuzz/include.am b/src/test/fuzz/include.am
index bb92c87ff7..b73139f992 100644
--- a/src/test/fuzz/include.am
+++ b/src/test/fuzz/include.am
@@ -178,79 +178,62 @@ endif
if OSS_FUZZ_ENABLED
OSS_FUZZ_CPPFLAGS = $(FUZZING_CPPFLAGS) -DLLVM_FUZZ
OSS_FUZZ_CFLAGS = $(FUZZING_CFLAGS)
-OSS_FUZZ_LDFLAG = $(FUZZING_LDFLAG)
-OSS_FUZZ_LIBS = $(FUZZING_LIBS) -lFuzzingEngine -lstdc++
-src_test_fuzz_oss_fuzz_consensus_SOURCES = \
+src_test_fuzz_oss_fuzz_consensus_a_SOURCES = \
$(src_test_fuzz_fuzz_consensus_SOURCES)
-src_test_fuzz_oss_fuzz_consensus_CPPFLAGS = $(OSS_FUZZ_CPPFLAGS)
-src_test_fuzz_oss_fuzz_consensus_CFLAGS = $(OSS_FUZZ_CFLAGS)
-src_test_fuzz_oss_fuzz_consensus_LDFLAGS = $(OSS_FUZZ_LDFLAG)
-src_test_fuzz_oss_fuzz_consensus_LDADD = $(OSS_FUZZ_LIBS)
+src_test_fuzz_oss_fuzz_consensus_a_CPPFLAGS = $(OSS_FUZZ_CPPFLAGS)
+src_test_fuzz_oss_fuzz_consensus_a_CFLAGS = $(OSS_FUZZ_CFLAGS)
-src_test_fuzz_oss_fuzz_descriptor_SOURCES = \
+src_test_fuzz_oss_fuzz_descriptor_a_SOURCES = \
$(src_test_fuzz_fuzz_descriptor_SOURCES)
-src_test_fuzz_oss_fuzz_descriptor_CPPFLAGS = $(OSS_FUZZ_CPPFLAGS)
-src_test_fuzz_oss_fuzz_descriptor_CFLAGS = $(OSS_FUZZ_CFLAGS)
-src_test_fuzz_oss_fuzz_descriptor_LDFLAGS = $(OSS_FUZZ_LDFLAG)
-src_test_fuzz_oss_fuzz_descriptor_LDADD = $(OSS_FUZZ_LIBS)
+src_test_fuzz_oss_fuzz_descriptor_a_CPPFLAGS = $(OSS_FUZZ_CPPFLAGS)
+src_test_fuzz_oss_fuzz_descriptor_a_CFLAGS = $(OSS_FUZZ_CFLAGS)
-src_test_fuzz_oss_fuzz_extrainfo_SOURCES = \
+src_test_fuzz_oss_fuzz_extrainfo_a_SOURCES = \
$(src_test_fuzz_fuzz_extrainfo_SOURCES)
-src_test_fuzz_oss_fuzz_extrainfo_CPPFLAGS = $(OSS_FUZZ_CPPFLAGS)
-src_test_fuzz_oss_fuzz_extrainfo_CFLAGS = $(OSS_FUZZ_CFLAGS)
-src_test_fuzz_oss_fuzz_extrainfo_LDFLAGS = $(OSS_FUZZ_LDFLAG)
-src_test_fuzz_oss_fuzz_extrainfo_LDADD = $(OSS_FUZZ_LIBS)
+src_test_fuzz_oss_fuzz_extrainfo_a_CPPFLAGS = $(OSS_FUZZ_CPPFLAGS)
+src_test_fuzz_oss_fuzz_extrainfo_a_CFLAGS = $(OSS_FUZZ_CFLAGS)
-src_test_fuzz_oss_fuzz_http_SOURCES = \
+src_test_fuzz_oss_fuzz_http_a_SOURCES = \
$(src_test_fuzz_fuzz_http_SOURCES)
-src_test_fuzz_oss_fuzz_http_CPPFLAGS = $(OSS_FUZZ_CPPFLAGS)
-src_test_fuzz_oss_fuzz_http_CFLAGS = $(OSS_FUZZ_CFLAGS)
-src_test_fuzz_oss_fuzz_http_LDFLAGS = $(OSS_FUZZ_LDFLAG)
-src_test_fuzz_oss_fuzz_http_LDADD = $(OSS_FUZZ_LIBS)
+src_test_fuzz_oss_fuzz_http_a_CPPFLAGS = $(OSS_FUZZ_CPPFLAGS)
+src_test_fuzz_oss_fuzz_http_a_CFLAGS = $(OSS_FUZZ_CFLAGS)
-src_test_fuzz_oss_fuzz_hsdescv2_SOURCES = \
+src_test_fuzz_oss_fuzz_hsdescv2_a_SOURCES = \
$(src_test_fuzz_fuzz_hsdescv2_SOURCES)
-src_test_fuzz_oss_fuzz_hsdescv2_CPPFLAGS = $(OSS_FUZZ_CPPFLAGS)
-src_test_fuzz_oss_fuzz_hsdescv2_CFLAGS = $(OSS_FUZZ_CFLAGS)
-src_test_fuzz_oss_fuzz_hsdescv2_LDFLAGS = $(OSS_FUZZ_LDFLAG)
-src_test_fuzz_oss_fuzz_hsdescv2_LDADD = $(OSS_FUZZ_LIBS)
+src_test_fuzz_oss_fuzz_hsdescv2_a_CPPFLAGS = $(OSS_FUZZ_CPPFLAGS)
+src_test_fuzz_oss_fuzz_hsdescv2_a_CFLAGS = $(OSS_FUZZ_CFLAGS)
-src_test_fuzz_oss_fuzz_iptsv2_SOURCES = \
+src_test_fuzz_oss_fuzz_iptsv2_a_SOURCES = \
$(src_test_fuzz_fuzz_iptsv2_SOURCES)
-src_test_fuzz_oss_fuzz_iptsv2_CPPFLAGS = $(OSS_FUZZ_CPPFLAGS)
-src_test_fuzz_oss_fuzz_iptsv2_CFLAGS = $(OSS_FUZZ_CFLAGS)
-src_test_fuzz_oss_fuzz_iptsv2_LDFLAGS = $(OSS_FUZZ_LDFLAG)
-src_test_fuzz_oss_fuzz_iptsv2_LDADD = $(OSS_FUZZ_LIBS)
+src_test_fuzz_oss_fuzz_iptsv2_a_CPPFLAGS = $(OSS_FUZZ_CPPFLAGS)
+src_test_fuzz_oss_fuzz_iptsv2_a_CFLAGS = $(OSS_FUZZ_CFLAGS)
-src_test_fuzz_oss_fuzz_microdesc_SOURCES = \
+src_test_fuzz_oss_fuzz_microdesc_a_SOURCES = \
$(src_test_fuzz_fuzz_microdesc_SOURCES)
-src_test_fuzz_oss_fuzz_microdesc_CPPFLAGS = $(OSS_FUZZ_CPPFLAGS)
-src_test_fuzz_oss_fuzz_microdesc_CFLAGS = $(OSS_FUZZ_CFLAGS)
-src_test_fuzz_oss_fuzz_microdesc_LDFLAGS = $(OSS_FUZZ_LDFLAG)
-src_test_fuzz_oss_fuzz_microdesc_LDADD = $(OSS_FUZZ_LIBS)
+src_test_fuzz_oss_fuzz_microdesc_a_CPPFLAGS = $(OSS_FUZZ_CPPFLAGS)
+src_test_fuzz_oss_fuzz_microdesc_a_CFLAGS = $(OSS_FUZZ_CFLAGS)
-src_test_fuzz_oss_fuzz_vrs_SOURCES = \
+src_test_fuzz_oss_fuzz_vrs_a_a_SOURCES = \
$(src_test_fuzz_fuzz_vrs_SOURCES)
-src_test_fuzz_oss_fuzz_vrs_CPPFLAGS = $(OSS_FUZZ_CPPFLAGS)
-src_test_fuzz_oss_fuzz_vrs_CFLAGS = $(OSS_FUZZ_CFLAGS)
-src_test_fuzz_oss_fuzz_vrs_LDFLAGS = $(OSS_FUZZ_LDFLAG)
-src_test_fuzz_oss_fuzz_vrs_LDADD = $(OSS_FUZZ_LIBS)
+src_test_fuzz_oss_fuzz_vrs_a_a_CPPFLAGS = $(OSS_FUZZ_CPPFLAGS)
+src_test_fuzz_oss_fuzz_vrs_a_a_CFLAGS = $(OSS_FUZZ_CFLAGS)
OSS_FUZZ_FUZZERS = \
- src/test/fuzz/oss-fuzz-consensus \
- src/test/fuzz/oss-fuzz-descriptor \
- src/test/fuzz/oss-fuzz-extrainfo \
- src/test/fuzz/oss-fuzz-http \
- src/test/fuzz/oss-fuzz-hsdescv2 \
- src/test/fuzz/oss-fuzz-iptsv2 \
- src/test/fuzz/oss-fuzz-microdesc \
- src/test/fuzz/oss-fuzz-vrs
+ src/test/fuzz/oss-fuzz-consensus.a \
+ src/test/fuzz/oss-fuzz-descriptor.a \
+ src/test/fuzz/oss-fuzz-extrainfo.a \
+ src/test/fuzz/oss-fuzz-http.a \
+ src/test/fuzz/oss-fuzz-hsdescv2.a \
+ src/test/fuzz/oss-fuzz-iptsv2.a \
+ src/test/fuzz/oss-fuzz-microdesc.a \
+ src/test/fuzz/oss-fuzz-vrs.a
else
-OSS_FUZZ_FUZZERS
+OSS_FUZZ_FUZZERS =
endif
-noinst_PROGRAMS += $(FUZZERS) $(LIBFUZZER_FUZZERS) $(OSS_FUZZ_FUZZERS)
+noinst_PROGRAMS += $(FUZZERS) $(LIBFUZZER_FUZZERS)
+noinst_LIBRARIES += $(OSS_FUZZ_FUZZERS)
oss-fuzz-fuzzers: $(OSS_FUZZ_FUZZERS)
fuzzers: $(FUZZERS) $(LIBFUZZER_FUZZERS)