diff options
author | Nick Mathewson <nickm@torproject.org> | 2018-07-17 14:46:16 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-07-17 14:46:16 -0400 |
commit | 4833717d69fee558d55f6e853a22a5e8199357a2 (patch) | |
tree | 6f1292dbe6c3733cb172eeae475f3ebd90b5d7c0 /scripts/codegen | |
parent | c7dcf252fd509714d7607d89b7416ffb313d8365 (diff) | |
parent | 86456472508276b3db4e7760aa1173f93316216f (diff) | |
download | tor-4833717d69fee558d55f6e853a22a5e8199357a2.tar.gz tor-4833717d69fee558d55f6e853a22a5e8199357a2.zip |
Merge branch 'maint-0.3.4'
Diffstat (limited to 'scripts/codegen')
-rwxr-xr-x | scripts/codegen/fuzzing_include_am.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/scripts/codegen/fuzzing_include_am.py b/scripts/codegen/fuzzing_include_am.py index 68f43379ce..3c948d87cf 100755 --- a/scripts/codegen/fuzzing_include_am.py +++ b/scripts/codegen/fuzzing_include_am.py @@ -84,6 +84,7 @@ def get_id_name(s): for fuzzer in FUZZERS: idname = get_id_name(fuzzer) print("""\ +if UNITTESTS_ENABLED src_test_fuzz_fuzz_{name}_SOURCES = \\ src/test/fuzz/fuzzing_common.c \\ src/test/fuzz/fuzz_{name}.c @@ -91,11 +92,14 @@ src_test_fuzz_fuzz_{name}_CPPFLAGS = $(FUZZING_CPPFLAGS) src_test_fuzz_fuzz_{name}_CFLAGS = $(FUZZING_CFLAGS) src_test_fuzz_fuzz_{name}_LDFLAGS = $(FUZZING_LDFLAG) src_test_fuzz_fuzz_{name}_LDADD = $(FUZZING_LIBS) +endif """.format(name=idname)) +print("if UNITTESTS_ENABLED") print("FUZZERS = \\") print(" \\\n".join("\tsrc/test/fuzz/fuzz-{name}".format(name=fuzzer) for fuzzer in FUZZERS)) +print("endif") print("\n# ===== libfuzzer") print("\nif LIBFUZZER_ENABLED") @@ -103,12 +107,14 @@ print("\nif LIBFUZZER_ENABLED") for fuzzer in FUZZERS: idname = get_id_name(fuzzer) print("""\ +if UNITTESTS_ENABLED src_test_fuzz_lf_fuzz_{name}_SOURCES = \\ $(src_test_fuzz_fuzz_{name}_SOURCES) src_test_fuzz_lf_fuzz_{name}_CPPFLAGS = $(LIBFUZZER_CPPFLAGS) src_test_fuzz_lf_fuzz_{name}_CFLAGS = $(LIBFUZZER_CFLAGS) src_test_fuzz_lf_fuzz_{name}_LDFLAGS = $(LIBFUZZER_LDFLAG) src_test_fuzz_lf_fuzz_{name}_LDADD = $(LIBFUZZER_LIBS) +endif """.format(name=idname)) print("LIBFUZZER_FUZZERS = \\") @@ -126,10 +132,12 @@ print("if OSS_FUZZ_ENABLED") for fuzzer in FUZZERS: idname = get_id_name(fuzzer) print("""\ +if UNITTESTS_ENABLED src_test_fuzz_liboss_fuzz_{name}_a_SOURCES = \\ $(src_test_fuzz_fuzz_{name}_SOURCES) src_test_fuzz_liboss_fuzz_{name}_a_CPPFLAGS = $(LIBOSS_FUZZ_CPPFLAGS) src_test_fuzz_liboss_fuzz_{name}_a_CFLAGS = $(LIBOSS_FUZZ_CFLAGS) +endif """.format(name=idname)) print("OSS_FUZZ_FUZZERS = \\") |