summaryrefslogtreecommitdiffstats
path: root/ossfuzz
diff options
context:
space:
mode:
authorYann Collet <Cyan4973@users.noreply.github.com>2020-11-06 18:34:05 (GMT)
committerGitHub <noreply@github.com>2020-11-06 18:34:05 (GMT)
commit1008b8929e43175b8d772729f4045f7272aad6dc (patch)
tree32402a7bad44e4ca47424bfca15b8d5d782fa5bf /ossfuzz
parent664427aa8f6808411a2c04f003a9b364bdebe578 (diff)
parent073fe18edf0411523ca5c3935b5b7805e4cafe14 (diff)
downloadlz4-1008b8929e43175b8d772729f4045f7272aad6dc.zip
lz4-1008b8929e43175b8d772729f4045f7272aad6dc.tar.gz
lz4-1008b8929e43175b8d772729f4045f7272aad6dc.tar.bz2
Merge pull request #938 from terrelln/fuzzer-fix
[ossfuzz] Fix parallel builds
Diffstat (limited to 'ossfuzz')
-rw-r--r--ossfuzz/Makefile14
1 files changed, 7 insertions, 7 deletions
diff --git a/ossfuzz/Makefile b/ossfuzz/Makefile
index f247405..2ec1675 100644
--- a/ossfuzz/Makefile
+++ b/ossfuzz/Makefile
@@ -26,7 +26,7 @@
# ##########################################################################
LZ4DIR := ../lib
-LIB_FUZZING_ENGINE ?= standaloneengine.o
+LIB_FUZZING_ENGINE ?=
DEBUGLEVEL?= 1
DEBUGFLAGS = -g -DLZ4_DEBUG=$(DEBUGLEVEL)
@@ -59,12 +59,12 @@ $(LZ4DIR)/liblz4.a:
$(CC) -c $(LZ4_CFLAGS) $(LZ4_CPPFLAGS) $< -o $@
# Generic rule for generating fuzzers
-%_fuzzer: %_fuzzer.o lz4_helpers.o fuzz_data_producer.o $(LZ4DIR)/liblz4.a
- # Compile the standalone code just in case. The OSS-Fuzz code might
- # override the LIB_FUZZING_ENGINE value to "-fsanitize=fuzzer"
- $(CC) -c $(LZ4_CFLAGS) $(LZ4_CPPFLAGS) standaloneengine.c -o standaloneengine.o
-
- # Now compile the actual fuzzer.
+ifeq ($(LIB_FUZZING_ENGINE),)
+ LIB_FUZZING_DEPS := standaloneengine.o
+else
+ LIB_FUZZING_DEPS :=
+endif
+%_fuzzer: %_fuzzer.o lz4_helpers.o fuzz_data_producer.o $(LZ4DIR)/liblz4.a $(LIB_FUZZING_DEPS)
$(CXX) $(LZ4_CXXFLAGS) $(LZ4_CPPFLAGS) $(LDFLAGS) $(LIB_FUZZING_ENGINE) $^ -o $@$(EXT)
%_fuzzer_clean: