Mercurial > hg
annotate contrib/fuzz/Makefile @ 36766:d382344c69aa
perf: teach perfbdiff to call blocks() and to use xdiff
Differential Revision: https://phab.mercurial-scm.org/D2624
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Sat, 03 Mar 2018 18:55:43 -0500 |
parents | 04d64163039a |
children | fa0ddd5e8fff |
rev | line source |
---|---|
35670
2b9e2415f5b5
contrib: add some basic scaffolding for some fuzz test targets
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
1 bdiff.o: ../../mercurial/bdiff.c |
2b9e2415f5b5
contrib: add some basic scaffolding for some fuzz test targets
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
2 clang -g -O1 -fsanitize=fuzzer-no-link,address -c -o bdiff.o \ |
2b9e2415f5b5
contrib: add some basic scaffolding for some fuzz test targets
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
3 ../../mercurial/bdiff.c |
2b9e2415f5b5
contrib: add some basic scaffolding for some fuzz test targets
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
4 |
2b9e2415f5b5
contrib: add some basic scaffolding for some fuzz test targets
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
5 bdiff: bdiff.cc bdiff.o |
2b9e2415f5b5
contrib: add some basic scaffolding for some fuzz test targets
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
6 clang -DHG_FUZZER_INCLUDE_MAIN=1 -g -O1 -fsanitize=fuzzer-no-link,address \ |
2b9e2415f5b5
contrib: add some basic scaffolding for some fuzz test targets
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
7 -I../../mercurial bdiff.cc bdiff.o -o bdiff |
2b9e2415f5b5
contrib: add some basic scaffolding for some fuzz test targets
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
8 |
2b9e2415f5b5
contrib: add some basic scaffolding for some fuzz test targets
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
9 bdiff-oss-fuzz.o: ../../mercurial/bdiff.c |
2b9e2415f5b5
contrib: add some basic scaffolding for some fuzz test targets
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
10 $$CC $$CFLAGS -c -o bdiff-oss-fuzz.o ../../mercurial/bdiff.c |
2b9e2415f5b5
contrib: add some basic scaffolding for some fuzz test targets
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
11 |
2b9e2415f5b5
contrib: add some basic scaffolding for some fuzz test targets
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
12 bdiff_fuzzer: bdiff.cc bdiff-oss-fuzz.o |
2b9e2415f5b5
contrib: add some basic scaffolding for some fuzz test targets
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
13 $$CXX $$CXXFLAGS -std=c++11 -I../../mercurial bdiff.cc \ |
2b9e2415f5b5
contrib: add some basic scaffolding for some fuzz test targets
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
14 bdiff-oss-fuzz.o -lFuzzingEngine -o $$OUT/bdiff_fuzzer |
2b9e2415f5b5
contrib: add some basic scaffolding for some fuzz test targets
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
15 |
36679
624cbd1477a6
fuzz: add a fuzzer for xdiff
Augie Fackler <augie@google.com>
parents:
35670
diff
changeset
|
16 x%.o: ../../mercurial/thirdparty/xdiff/x%.c ../../mercurial/thirdparty/xdiff/*.h |
624cbd1477a6
fuzz: add a fuzzer for xdiff
Augie Fackler <augie@google.com>
parents:
35670
diff
changeset
|
17 clang -g -O1 -fsanitize=fuzzer-no-link,address -c \ |
624cbd1477a6
fuzz: add a fuzzer for xdiff
Augie Fackler <augie@google.com>
parents:
35670
diff
changeset
|
18 -o $@ \ |
624cbd1477a6
fuzz: add a fuzzer for xdiff
Augie Fackler <augie@google.com>
parents:
35670
diff
changeset
|
19 $< |
624cbd1477a6
fuzz: add a fuzzer for xdiff
Augie Fackler <augie@google.com>
parents:
35670
diff
changeset
|
20 |
36765 | 21 xdiff: xdiff.cc xdiffi.o xprepare.o xutils.o |
36679
624cbd1477a6
fuzz: add a fuzzer for xdiff
Augie Fackler <augie@google.com>
parents:
35670
diff
changeset
|
22 clang -DHG_FUZZER_INCLUDE_MAIN=1 -g -O1 -fsanitize=fuzzer-no-link,address \ |
624cbd1477a6
fuzz: add a fuzzer for xdiff
Augie Fackler <augie@google.com>
parents:
35670
diff
changeset
|
23 -I../../mercurial xdiff.cc \ |
36765 | 24 xdiffi.o xprepare.o xutils.o -o xdiff |
35670
2b9e2415f5b5
contrib: add some basic scaffolding for some fuzz test targets
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
25 |
36679
624cbd1477a6
fuzz: add a fuzzer for xdiff
Augie Fackler <augie@google.com>
parents:
35670
diff
changeset
|
26 fuzz-x%.o: ../../mercurial/thirdparty/xdiff/x%.c ../../mercurial/thirdparty/xdiff/*.h |
624cbd1477a6
fuzz: add a fuzzer for xdiff
Augie Fackler <augie@google.com>
parents:
35670
diff
changeset
|
27 $$CC $$CFLAGS -c \ |
624cbd1477a6
fuzz: add a fuzzer for xdiff
Augie Fackler <augie@google.com>
parents:
35670
diff
changeset
|
28 -o $@ \ |
624cbd1477a6
fuzz: add a fuzzer for xdiff
Augie Fackler <augie@google.com>
parents:
35670
diff
changeset
|
29 $< |
624cbd1477a6
fuzz: add a fuzzer for xdiff
Augie Fackler <augie@google.com>
parents:
35670
diff
changeset
|
30 |
36765 | 31 xdiff_fuzzer: xdiff.cc fuzz-xdiffi.o fuzz-xprepare.o fuzz-xutils.o |
36679
624cbd1477a6
fuzz: add a fuzzer for xdiff
Augie Fackler <augie@google.com>
parents:
35670
diff
changeset
|
32 $$CXX $$CXXFLAGS -std=c++11 -I../../mercurial xdiff.cc \ |
36765 | 33 fuzz-xdiffi.o fuzz-xprepare.o fuzz-xutils.o \ |
36679
624cbd1477a6
fuzz: add a fuzzer for xdiff
Augie Fackler <augie@google.com>
parents:
35670
diff
changeset
|
34 -lFuzzingEngine -o $$OUT/xdiff_fuzzer |
624cbd1477a6
fuzz: add a fuzzer for xdiff
Augie Fackler <augie@google.com>
parents:
35670
diff
changeset
|
35 |
624cbd1477a6
fuzz: add a fuzzer for xdiff
Augie Fackler <augie@google.com>
parents:
35670
diff
changeset
|
36 all: bdiff xdiff |
624cbd1477a6
fuzz: add a fuzzer for xdiff
Augie Fackler <augie@google.com>
parents:
35670
diff
changeset
|
37 |
624cbd1477a6
fuzz: add a fuzzer for xdiff
Augie Fackler <augie@google.com>
parents:
35670
diff
changeset
|
38 oss-fuzz: bdiff_fuzzer xdiff_fuzzer |
35670
2b9e2415f5b5
contrib: add some basic scaffolding for some fuzz test targets
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
39 |
2b9e2415f5b5
contrib: add some basic scaffolding for some fuzz test targets
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
40 .PHONY: all oss-fuzz |