##// END OF EJS Templates
fuzz: follow modern guidelines and use LIB_FUZZING_ENGINE...
Augie Fackler -
r44249:7cb99887 default draft
parent child Browse files
Show More
@@ -1,6 +1,8 b''
1 CC = clang
1 CC = clang
2 CXX = clang++
2 CXX = clang++
3
3
4 LIB_FUZZING_ENGINE ?= -lFuzzingEngine
5
4 all: bdiff mpatch xdiff
6 all: bdiff mpatch xdiff
5
7
6 pyutil.o: pyutil.cc pyutil.h
8 pyutil.o: pyutil.cc pyutil.h
@@ -22,7 +24,7 b' bdiff-oss-fuzz.o: ../../mercurial/bdiff.'
22
24
23 bdiff_fuzzer: bdiff.cc bdiff-oss-fuzz.o
25 bdiff_fuzzer: bdiff.cc bdiff-oss-fuzz.o
24 $(CXX) $(CXXFLAGS) -std=c++17 -I../../mercurial bdiff.cc \
26 $(CXX) $(CXXFLAGS) -std=c++17 -I../../mercurial bdiff.cc \
25 bdiff-oss-fuzz.o -lFuzzingEngine -o \
27 bdiff-oss-fuzz.o $(LIB_FUZZING_ENGINE) -o \
26 $$OUT/bdiff_fuzzer
28 $$OUT/bdiff_fuzzer
27
29
28 mpatch.o: ../../mercurial/mpatch.c
30 mpatch.o: ../../mercurial/mpatch.c
@@ -39,7 +41,7 b' mpatch-oss-fuzz.o: ../../mercurial/mpatc'
39
41
40 mpatch_fuzzer: mpatch.cc mpatch-oss-fuzz.o
42 mpatch_fuzzer: mpatch.cc mpatch-oss-fuzz.o
41 $(CXX) $(CXXFLAGS) -std=c++17 -I../../mercurial mpatch.cc \
43 $(CXX) $(CXXFLAGS) -std=c++17 -I../../mercurial mpatch.cc \
42 mpatch-oss-fuzz.o -lFuzzingEngine -o \
44 mpatch-oss-fuzz.o $(LIB_FUZZING_ENGINE) -o \
43 $$OUT/mpatch_fuzzer
45 $$OUT/mpatch_fuzzer
44
46
45 mpatch_corpus.zip:
47 mpatch_corpus.zip:
@@ -64,7 +66,7 b' fuzz-x%.o: ../../mercurial/thirdparty/xd'
64 xdiff_fuzzer: xdiff.cc fuzz-xdiffi.o fuzz-xprepare.o fuzz-xutils.o
66 xdiff_fuzzer: xdiff.cc fuzz-xdiffi.o fuzz-xprepare.o fuzz-xutils.o
65 $(CXX) $(CXXFLAGS) -std=c++17 -I../../mercurial xdiff.cc \
67 $(CXX) $(CXXFLAGS) -std=c++17 -I../../mercurial xdiff.cc \
66 fuzz-xdiffi.o fuzz-xprepare.o fuzz-xutils.o \
68 fuzz-xdiffi.o fuzz-xprepare.o fuzz-xutils.o \
67 -lFuzzingEngine -o $$OUT/xdiff_fuzzer
69 $(LIB_FUZZING_ENGINE) -o $$OUT/xdiff_fuzzer
68
70
69 manifest.o: ../../mercurial/cext/manifest.c
71 manifest.o: ../../mercurial/cext/manifest.c
70 $(CC) $(CFLAGS) `$$OUT/sanpy/bin/python-config --cflags` \
72 $(CC) $(CFLAGS) `$$OUT/sanpy/bin/python-config --cflags` \
@@ -101,7 +103,7 b' dirs_fuzzer: dirs.cc manifest.o charenco'
101 -Wno-register -Wno-macro-redefined \
103 -Wno-register -Wno-macro-redefined \
102 -I../../mercurial dirs.cc \
104 -I../../mercurial dirs.cc \
103 manifest.o charencode.o parsers.o dirs.o pathencode.o revlog.o pyutil.o \
105 manifest.o charencode.o parsers.o dirs.o pathencode.o revlog.o pyutil.o \
104 -lFuzzingEngine `$$OUT/sanpy/bin/python-config --ldflags` \
106 $(LIB_FUZZING_ENGINE) `$$OUT/sanpy/bin/python-config --ldflags` \
105 -o $$OUT/dirs_fuzzer
107 -o $$OUT/dirs_fuzzer
106
108
107 fncache_fuzzer: fncache.cc manifest.o charencode.o parsers.o dirs.o pathencode.o revlog.o pyutil.o
109 fncache_fuzzer: fncache.cc manifest.o charencode.o parsers.o dirs.o pathencode.o revlog.o pyutil.o
@@ -109,7 +111,7 b' fncache_fuzzer: fncache.cc manifest.o ch'
109 -Wno-register -Wno-macro-redefined \
111 -Wno-register -Wno-macro-redefined \
110 -I../../mercurial fncache.cc \
112 -I../../mercurial fncache.cc \
111 manifest.o charencode.o parsers.o dirs.o pathencode.o revlog.o pyutil.o \
113 manifest.o charencode.o parsers.o dirs.o pathencode.o revlog.o pyutil.o \
112 -lFuzzingEngine `$$OUT/sanpy/bin/python-config --ldflags` \
114 $(LIB_FUZZING_ENGINE) `$$OUT/sanpy/bin/python-config --ldflags` \
113 -o $$OUT/fncache_fuzzer
115 -o $$OUT/fncache_fuzzer
114
116
115 jsonescapeu8fast_fuzzer: jsonescapeu8fast.cc manifest.o charencode.o parsers.o dirs.o pathencode.o revlog.o pyutil.o
117 jsonescapeu8fast_fuzzer: jsonescapeu8fast.cc manifest.o charencode.o parsers.o dirs.o pathencode.o revlog.o pyutil.o
@@ -117,7 +119,7 b' jsonescapeu8fast_fuzzer: jsonescapeu8fas'
117 -Wno-register -Wno-macro-redefined \
119 -Wno-register -Wno-macro-redefined \
118 -I../../mercurial jsonescapeu8fast.cc \
120 -I../../mercurial jsonescapeu8fast.cc \
119 manifest.o charencode.o parsers.o dirs.o pathencode.o revlog.o pyutil.o \
121 manifest.o charencode.o parsers.o dirs.o pathencode.o revlog.o pyutil.o \
120 -lFuzzingEngine `$$OUT/sanpy/bin/python-config --ldflags` \
122 $(LIB_FUZZING_ENGINE) `$$OUT/sanpy/bin/python-config --ldflags` \
121 -o $$OUT/jsonescapeu8fast_fuzzer
123 -o $$OUT/jsonescapeu8fast_fuzzer
122
124
123 manifest_corpus.zip:
125 manifest_corpus.zip:
@@ -128,7 +130,7 b' manifest_fuzzer: manifest.cc manifest.o '
128 -Wno-register -Wno-macro-redefined \
130 -Wno-register -Wno-macro-redefined \
129 -I../../mercurial manifest.cc \
131 -I../../mercurial manifest.cc \
130 manifest.o charencode.o parsers.o dirs.o pathencode.o revlog.o pyutil.o \
132 manifest.o charencode.o parsers.o dirs.o pathencode.o revlog.o pyutil.o \
131 -lFuzzingEngine `$$OUT/sanpy/bin/python-config --ldflags` \
133 $(LIB_FUZZING_ENGINE) `$$OUT/sanpy/bin/python-config --ldflags` \
132 -o $$OUT/manifest_fuzzer
134 -o $$OUT/manifest_fuzzer
133
135
134 revlog_fuzzer: revlog.cc manifest.o charencode.o parsers.o dirs.o pathencode.o revlog.o pyutil.o
136 revlog_fuzzer: revlog.cc manifest.o charencode.o parsers.o dirs.o pathencode.o revlog.o pyutil.o
@@ -136,7 +138,7 b' revlog_fuzzer: revlog.cc manifest.o char'
136 -Wno-register -Wno-macro-redefined \
138 -Wno-register -Wno-macro-redefined \
137 -I../../mercurial revlog.cc \
139 -I../../mercurial revlog.cc \
138 manifest.o charencode.o parsers.o dirs.o pathencode.o revlog.o pyutil.o \
140 manifest.o charencode.o parsers.o dirs.o pathencode.o revlog.o pyutil.o \
139 -lFuzzingEngine `$$OUT/sanpy/bin/python-config --ldflags` \
141 $(LIB_FUZZING_ENGINE) `$$OUT/sanpy/bin/python-config --ldflags` \
140 -o $$OUT/revlog_fuzzer
142 -o $$OUT/revlog_fuzzer
141
143
142 revlog_corpus.zip:
144 revlog_corpus.zip:
@@ -147,7 +149,7 b' dirstate_fuzzer: dirstate.cc manifest.o '
147 -Wno-register -Wno-macro-redefined \
149 -Wno-register -Wno-macro-redefined \
148 -I../../mercurial dirstate.cc \
150 -I../../mercurial dirstate.cc \
149 manifest.o charencode.o parsers.o dirs.o pathencode.o revlog.o pyutil.o \
151 manifest.o charencode.o parsers.o dirs.o pathencode.o revlog.o pyutil.o \
150 -lFuzzingEngine `$$OUT/sanpy/bin/python-config --ldflags` \
152 $(LIB_FUZZING_ENGINE) `$$OUT/sanpy/bin/python-config --ldflags` \
151 -o $$OUT/dirstate_fuzzer
153 -o $$OUT/dirstate_fuzzer
152
154
153 dirstate_corpus.zip:
155 dirstate_corpus.zip:
@@ -158,7 +160,7 b' fm1readmarkers_fuzzer: fm1readmarkers.cc'
158 -Wno-register -Wno-macro-redefined \
160 -Wno-register -Wno-macro-redefined \
159 -I../../mercurial fm1readmarkers.cc \
161 -I../../mercurial fm1readmarkers.cc \
160 manifest.o charencode.o parsers.o dirs.o pathencode.o revlog.o pyutil.o \
162 manifest.o charencode.o parsers.o dirs.o pathencode.o revlog.o pyutil.o \
161 -lFuzzingEngine `$$OUT/sanpy/bin/python-config --ldflags` \
163 $(LIB_FUZZING_ENGINE) `$$OUT/sanpy/bin/python-config --ldflags` \
162 -o $$OUT/fm1readmarkers_fuzzer
164 -o $$OUT/fm1readmarkers_fuzzer
163
165
164 fm1readmarkers_corpus.zip:
166 fm1readmarkers_corpus.zip:
General Comments 0
You need to be logged in to leave comments. Login now