summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2016-12-19 15:17:42 -0500
committerNick Mathewson <nickm@torproject.org>2017-01-30 08:37:25 -0500
commiteb414a08a9272090e6b35080c2ac8b7415a83094 (patch)
treefbbedb50ea5a5260a42e53504412b83e732b74d7 /configure.ac
parentb1567cf500044be4d6c97e4ef65345acb4aa70ff (diff)
downloadtor-eb414a08a9272090e6b35080c2ac8b7415a83094.tar.gz
tor-eb414a08a9272090e6b35080c2ac8b7415a83094.zip
Add libfuzzer support.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac6
1 files changed, 5 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 721f5cd8c3..784b3cde14 100644
--- a/configure.ac
+++ b/configure.ac
@@ -49,6 +49,8 @@ AC_ARG_ENABLE(asserts-in-tests,
AS_HELP_STRING(--disable-asserts-in-tests, [disable tor_assert() calls in the unit tests, for branch coverage]))
AC_ARG_ENABLE(system-torrc,
AS_HELP_STRING(--disable-system-torrc, [don't look for a system-wide torrc file]))
+AC_ARG_ENABLE(libfuzzer,
+ AS_HELP_STRING(--libfuzzer, [build extra fuzzers based on 'libfuzzer']))
if test "x$enable_coverage" != "xyes" -a "x$enable_asserts_in_tests" = "xno" ; then
AC_MSG_ERROR([Can't disable assertions outside of coverage build])
@@ -57,6 +59,7 @@ fi
AM_CONDITIONAL(UNITTESTS_ENABLED, test "x$enable_unittests" != "xno")
AM_CONDITIONAL(COVERAGE_ENABLED, test "x$enable_coverage" = "xyes")
AM_CONDITIONAL(DISABLE_ASSERTS_IN_UNIT_TESTS, test "x$enable_asserts_in_tests" = "xno")
+AM_CONDITIONAL(LIBFUZZER_ENABLED, test "x$enable_libfuzzer" = "xyes")
if test "$enable_static_tor" = "yes"; then
enable_static_libevent="yes";
@@ -735,6 +738,7 @@ CFLAGS_FWRAPV=
CFLAGS_ASAN=
CFLAGS_UBSAN=
+
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [
#if !defined(__clang__)
#error
@@ -758,7 +762,7 @@ m4_ifdef([AS_VAR_IF],[
AS_VAR_POPDEF([can_compile])
TOR_CHECK_CFLAGS(-Wstack-protector)
TOR_CHECK_CFLAGS(--param ssp-buffer-size=1)
- if test "$bwin32" = "false"; then
+ if test "$bwin32" = "false" && test "$enable_libfuzzer" != "yes"; then
TOR_CHECK_CFLAGS(-fPIE)
TOR_CHECK_LDFLAGS(-pie, "$all_ldflags_for_check", "$all_libs_for_check")
fi