##// END OF EJS Templates
fuzz: use a variable to allow specifying python-config to use...
Augie Fackler -
r44264:bf045386 default
parent child Browse files
Show More
@@ -3,13 +3,15 b' CXX = clang++'
3 3
4 4 LIB_FUZZING_ENGINE ?= -lFuzzingEngine
5 5
6 PYTHON_CONFIG ?= $$OUT/sanpy/bin/python-config
7
6 8 CXXFLAGS += -Wno-deprecated-register
7 9
8 10 all: bdiff mpatch xdiff
9 11
10 12 pyutil.o: pyutil.cc pyutil.h
11 13 $(CXX) $(CXXFLAGS) -g -O1 \
12 `$$OUT/sanpy/bin/python-config --cflags` \
14 `$(PYTHON_CONFIG) --cflags` \
13 15 -I../../mercurial -c -o pyutil.o pyutil.cc
14 16
15 17 bdiff.o: ../../mercurial/bdiff.c
@@ -71,98 +73,98 b' xdiff_fuzzer: xdiff.cc fuzz-xdiffi.o fuz'
71 73 $(LIB_FUZZING_ENGINE) -o $$OUT/xdiff_fuzzer
72 74
73 75 manifest.o: ../../mercurial/cext/manifest.c
74 $(CC) $(CFLAGS) `$$OUT/sanpy/bin/python-config --cflags` \
76 $(CC) $(CFLAGS) `$(PYTHON_CONFIG) --cflags` \
75 77 -I../../mercurial \
76 78 -c -o manifest.o ../../mercurial/cext/manifest.c
77 79
78 80 charencode.o: ../../mercurial/cext/charencode.c
79 $(CC) $(CFLAGS) `$$OUT/sanpy/bin/python-config --cflags` \
81 $(CC) $(CFLAGS) `$(PYTHON_CONFIG) --cflags` \
80 82 -I../../mercurial \
81 83 -c -o charencode.o ../../mercurial/cext/charencode.c
82 84
83 85 parsers.o: ../../mercurial/cext/parsers.c
84 $(CC) $(CFLAGS) `$$OUT/sanpy/bin/python-config --cflags` \
86 $(CC) $(CFLAGS) `$(PYTHON_CONFIG) --cflags` \
85 87 -I../../mercurial \
86 88 -c -o parsers.o ../../mercurial/cext/parsers.c
87 89
88 90 dirs.o: ../../mercurial/cext/dirs.c
89 $(CC) $(CFLAGS) `$$OUT/sanpy/bin/python-config --cflags` \
91 $(CC) $(CFLAGS) `$(PYTHON_CONFIG) --cflags` \
90 92 -I../../mercurial \
91 93 -c -o dirs.o ../../mercurial/cext/dirs.c
92 94
93 95 pathencode.o: ../../mercurial/cext/pathencode.c
94 $(CC) $(CFLAGS) `$$OUT/sanpy/bin/python-config --cflags` \
96 $(CC) $(CFLAGS) `$(PYTHON_CONFIG) --cflags` \
95 97 -I../../mercurial \
96 98 -c -o pathencode.o ../../mercurial/cext/pathencode.c
97 99
98 100 revlog.o: ../../mercurial/cext/revlog.c
99 $(CC) $(CFLAGS) `$$OUT/sanpy/bin/python-config --cflags` \
101 $(CC) $(CFLAGS) `$(PYTHON_CONFIG) --cflags` \
100 102 -I../../mercurial \
101 103 -c -o revlog.o ../../mercurial/cext/revlog.c
102 104
103 105 dirs_fuzzer: dirs.cc manifest.o charencode.o parsers.o dirs.o pathencode.o revlog.o pyutil.o
104 $(CXX) $(CXXFLAGS) `$$OUT/sanpy/bin/python-config --cflags` \
106 $(CXX) $(CXXFLAGS) `$(PYTHON_CONFIG) --cflags` \
105 107 -Wno-register -Wno-macro-redefined \
106 108 -I../../mercurial dirs.cc \
107 109 manifest.o charencode.o parsers.o dirs.o pathencode.o revlog.o pyutil.o \
108 $(LIB_FUZZING_ENGINE) `$$OUT/sanpy/bin/python-config --ldflags` \
110 $(LIB_FUZZING_ENGINE) `$(PYTHON_CONFIG) --ldflags` \
109 111 -o $$OUT/dirs_fuzzer
110 112
111 113 fncache_fuzzer: fncache.cc manifest.o charencode.o parsers.o dirs.o pathencode.o revlog.o pyutil.o
112 $(CXX) $(CXXFLAGS) `$$OUT/sanpy/bin/python-config --cflags` \
114 $(CXX) $(CXXFLAGS) `$(PYTHON_CONFIG) --cflags` \
113 115 -Wno-register -Wno-macro-redefined \
114 116 -I../../mercurial fncache.cc \
115 117 manifest.o charencode.o parsers.o dirs.o pathencode.o revlog.o pyutil.o \
116 $(LIB_FUZZING_ENGINE) `$$OUT/sanpy/bin/python-config --ldflags` \
118 $(LIB_FUZZING_ENGINE) `$(PYTHON_CONFIG) --ldflags` \
117 119 -o $$OUT/fncache_fuzzer
118 120
119 121 jsonescapeu8fast_fuzzer: jsonescapeu8fast.cc manifest.o charencode.o parsers.o dirs.o pathencode.o revlog.o pyutil.o
120 $(CXX) $(CXXFLAGS) `$$OUT/sanpy/bin/python-config --cflags` \
122 $(CXX) $(CXXFLAGS) `$(PYTHON_CONFIG) --cflags` \
121 123 -Wno-register -Wno-macro-redefined \
122 124 -I../../mercurial jsonescapeu8fast.cc \
123 125 manifest.o charencode.o parsers.o dirs.o pathencode.o revlog.o pyutil.o \
124 $(LIB_FUZZING_ENGINE) `$$OUT/sanpy/bin/python-config --ldflags` \
126 $(LIB_FUZZING_ENGINE) `$(PYTHON_CONFIG) --ldflags` \
125 127 -o $$OUT/jsonescapeu8fast_fuzzer
126 128
127 129 manifest_corpus.zip:
128 130 python manifest_corpus.py $$OUT/manifest_fuzzer_seed_corpus.zip
129 131
130 132 manifest_fuzzer: manifest.cc manifest.o charencode.o parsers.o dirs.o pathencode.o revlog.o pyutil.o
131 $(CXX) $(CXXFLAGS) `$$OUT/sanpy/bin/python-config --cflags` \
133 $(CXX) $(CXXFLAGS) `$(PYTHON_CONFIG) --cflags` \
132 134 -Wno-register -Wno-macro-redefined \
133 135 -I../../mercurial manifest.cc \
134 136 manifest.o charencode.o parsers.o dirs.o pathencode.o revlog.o pyutil.o \
135 $(LIB_FUZZING_ENGINE) `$$OUT/sanpy/bin/python-config --ldflags` \
137 $(LIB_FUZZING_ENGINE) `$(PYTHON_CONFIG) --ldflags` \
136 138 -o $$OUT/manifest_fuzzer
137 139
138 140 revlog_fuzzer: revlog.cc manifest.o charencode.o parsers.o dirs.o pathencode.o revlog.o pyutil.o
139 $(CXX) $(CXXFLAGS) `$$OUT/sanpy/bin/python-config --cflags` \
141 $(CXX) $(CXXFLAGS) `$(PYTHON_CONFIG) --cflags` \
140 142 -Wno-register -Wno-macro-redefined \
141 143 -I../../mercurial revlog.cc \
142 144 manifest.o charencode.o parsers.o dirs.o pathencode.o revlog.o pyutil.o \
143 $(LIB_FUZZING_ENGINE) `$$OUT/sanpy/bin/python-config --ldflags` \
145 $(LIB_FUZZING_ENGINE) `$(PYTHON_CONFIG) --ldflags` \
144 146 -o $$OUT/revlog_fuzzer
145 147
146 148 revlog_corpus.zip:
147 149 python revlog_corpus.py $$OUT/revlog_fuzzer_seed_corpus.zip
148 150
149 151 dirstate_fuzzer: dirstate.cc manifest.o charencode.o parsers.o dirs.o pathencode.o revlog.o pyutil.o
150 $(CXX) $(CXXFLAGS) `$$OUT/sanpy/bin/python-config --cflags` \
152 $(CXX) $(CXXFLAGS) `$(PYTHON_CONFIG) --cflags` \
151 153 -Wno-register -Wno-macro-redefined \
152 154 -I../../mercurial dirstate.cc \
153 155 manifest.o charencode.o parsers.o dirs.o pathencode.o revlog.o pyutil.o \
154 $(LIB_FUZZING_ENGINE) `$$OUT/sanpy/bin/python-config --ldflags` \
156 $(LIB_FUZZING_ENGINE) `$(PYTHON_CONFIG) --ldflags` \
155 157 -o $$OUT/dirstate_fuzzer
156 158
157 159 dirstate_corpus.zip:
158 160 python dirstate_corpus.py $$OUT/dirstate_fuzzer_seed_corpus.zip
159 161
160 162 fm1readmarkers_fuzzer: fm1readmarkers.cc manifest.o charencode.o parsers.o dirs.o pathencode.o revlog.o pyutil.o
161 $(CXX) $(CXXFLAGS) `$$OUT/sanpy/bin/python-config --cflags` \
163 $(CXX) $(CXXFLAGS) `$(PYTHON_CONFIG) --cflags` \
162 164 -Wno-register -Wno-macro-redefined \
163 165 -I../../mercurial fm1readmarkers.cc \
164 166 manifest.o charencode.o parsers.o dirs.o pathencode.o revlog.o pyutil.o \
165 $(LIB_FUZZING_ENGINE) `$$OUT/sanpy/bin/python-config --ldflags` \
167 $(LIB_FUZZING_ENGINE) `$(PYTHON_CONFIG) --ldflags` \
166 168 -o $$OUT/fm1readmarkers_fuzzer
167 169
168 170 fm1readmarkers_corpus.zip:
General Comments 0
You need to be logged in to leave comments. Login now