diff options
author | Jack Lloyd <[email protected]> | 2017-08-29 07:01:53 -0400 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2017-08-29 07:01:53 -0400 |
commit | 922d3dcb678fa9ff9a54b9a920e530fe753da384 (patch) | |
tree | 3b7bbdc56376fd01a16c181895dd7c231a288d82 /src/build-data | |
parent | d3cc9179a72cebddf2057256ab8a4d421b202b21 (diff) | |
parent | 4a64e42c3985ae7d460cf52d3e38a13b6b562572 (diff) |
Merge GH #1158 Add build mode for fuzzer tests
Diffstat (limited to 'src/build-data')
-rw-r--r-- | src/build-data/buildh.in | 1 | ||||
-rw-r--r-- | src/build-data/makefile/gmake.in | 2 | ||||
-rw-r--r-- | src/build-data/makefile/gmake_fuzzers.in | 18 |
3 files changed, 21 insertions, 0 deletions
diff --git a/src/build-data/buildh.in b/src/build-data/buildh.in index 2376b056e..6e60718ee 100644 --- a/src/build-data/buildh.in +++ b/src/build-data/buildh.in @@ -25,6 +25,7 @@ /* How many bits per limb in a BigInt */ #define BOTAN_MP_WORD_BITS %{mp_bits} %{unsafe_fuzzer_mode_define} +%{fuzzer_type} #define BOTAN_INSTALL_PREFIX R"(%{prefix})" #define BOTAN_INSTALL_HEADER_DIR "%{includedir}/botan-%{version_major}" diff --git a/src/build-data/makefile/gmake.in b/src/build-data/makefile/gmake.in index 22e4ef778..c77c1908c 100644 --- a/src/build-data/makefile/gmake.in +++ b/src/build-data/makefile/gmake.in @@ -53,6 +53,8 @@ $(STATIC_LIB): $(LIBOBJS) %{gmake_coverage_in} +%{gmake_fuzzers_in} + SPHINX_CONFIG = %{sphinx_config_dir} SPHINX_OPTS = -b html diff --git a/src/build-data/makefile/gmake_fuzzers.in b/src/build-data/makefile/gmake_fuzzers.in new file mode 100644 index 000000000..82fa8b256 --- /dev/null +++ b/src/build-data/makefile/gmake_fuzzers.in @@ -0,0 +1,18 @@ + +# Fuzzer build commands + +FUZZER_LINK_CMD = %{fuzzer_link_cmd} +FUZZER_LINKS_TO = $(LIB_LINKS_TO) %{fuzzer_libs} +FUZZER_FLAGS = $(CXXFLAGS) $(WARN_FLAGS) + +%{fuzzer_build_cmds} + +FUZZERS=%{fuzzer_objs} + +fuzzers: libs $(FUZZERS) + +fuzzer_corpus: + git clone --depth=1 https://github.com/randombit/crypto-corpus.git fuzzer_corpus + +fuzzer_corpus_zip: fuzzer_corpus + ./src/scripts/create_corpus_zip.py fuzzer_corpus %{fuzzobj_dir} |