Skip to content

Commit 48bcb2a

Browse files
committed
Disable other targets when enable-fuzz is set
1 parent dfdcb3d commit 48bcb2a

File tree

1 file changed

+25
-6
lines changed

1 file changed

+25
-6
lines changed

configure.ac

Lines changed: 25 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,8 @@ AC_ARG_ENABLE([extended-functional-tests],
148148
[use_extended_functional_tests=no])
149149

150150
AC_ARG_ENABLE([fuzz],
151-
AS_HELP_STRING([--enable-fuzz],[enable building of fuzz targets (default no)]),
151+
AS_HELP_STRING([--enable-fuzz],
152+
[enable building of fuzz targets (default no). enabling this will disable all other targets]),
152153
[enable_fuzz=$enableval],
153154
[enable_fuzz=no])
154155

@@ -933,6 +934,29 @@ AC_SUBST(LEVELDB_CPPFLAGS)
933934
AC_SUBST(LIBLEVELDB)
934935
AC_SUBST(LIBMEMENV)
935936

937+
dnl enable-fuzz should disable all other targets
938+
if test "x$enable_fuzz" = "xyes"; then
939+
AC_MSG_WARN(enable-fuzz will disable all other targets)
940+
build_bitcoin_utils=no
941+
build_bitcoin_cli=no
942+
build_bitcoin_tx=no
943+
build_bitcoin_wallet=no
944+
build_bitcoind=no
945+
build_bitcoin_libs=no
946+
bitcoin_enable_qt=no
947+
bitcoin_enable_qt_test=no
948+
bitcoin_enable_qt_dbus=no
949+
enable_wallet=no
950+
use_bench=no
951+
use_upnp=no
952+
use_zmq=no
953+
else
954+
BITCOIN_QT_INIT
955+
956+
dnl sets $bitcoin_enable_qt, $bitcoin_enable_qt_test, $bitcoin_enable_qt_dbus
957+
BITCOIN_QT_CONFIGURE([$use_pkgconfig])
958+
fi
959+
936960
if test x$enable_wallet != xno; then
937961
dnl Check for libdb_cxx only if wallet enabled
938962
BITCOIN_FIND_BDB48
@@ -947,11 +971,6 @@ if test x$use_upnp != xno; then
947971
)
948972
fi
949973

950-
BITCOIN_QT_INIT
951-
952-
dnl sets $bitcoin_enable_qt, $bitcoin_enable_qt_test, $bitcoin_enable_qt_dbus
953-
BITCOIN_QT_CONFIGURE([$use_pkgconfig])
954-
955974
if test x$build_bitcoin_wallet$build_bitcoin_cli$build_bitcoin_tx$build_bitcoind$bitcoin_enable_qt$use_tests$use_bench = xnonononononono; then
956975
use_boost=no
957976
else

0 commit comments

Comments
 (0)