mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-20 14:05:23 +01:00
Merge #16338: test: Disable other targets when enable-fuzz is set
84edfc72e5
Update doc and CI config (qmma)48bcb2ac24
Disable other targets when enable-fuzz is set (qmma) Pull request description: This is to fix https://github.com/bitcoin/bitcoin/issues/16094 When the `enable-fuzz` flag is set, disable all other binary targets. ACKs for top commit: MarcoFalke: ACK84edfc72e5
(only checked that travis compiled this) Tree-SHA512: f4ac80526388a67709986b22de88b00bf93ab44ae31a20bd4d8923a4982ab97e015a9f13010081d6ecf6c23ae8afeac7ca9d849d198ce6ebe239aa3127151efc
This commit is contained in:
commit
5859b7dc6f
3 changed files with 28 additions and 9 deletions
|
@ -179,7 +179,7 @@ jobs:
|
|||
RUN_FUNCTIONAL_TESTS=false
|
||||
RUN_FUZZ_TESTS=true
|
||||
GOAL="install"
|
||||
BITCOIN_CONFIG="--disable-wallet --disable-bench --with-utils=no --with-daemon=no --with-libs=no --with-gui=no --enable-fuzz --with-sanitizers=fuzzer,address CC=clang CXX=clang++"
|
||||
BITCOIN_CONFIG="--enable-fuzz --with-sanitizers=fuzzer,address CC=clang CXX=clang++"
|
||||
|
||||
- stage: test
|
||||
name: 'x86_64 Linux [GOAL: install] [bionic] [no wallet]'
|
||||
|
|
31
configure.ac
31
configure.ac
|
@ -148,7 +148,8 @@ AC_ARG_ENABLE([extended-functional-tests],
|
|||
[use_extended_functional_tests=no])
|
||||
|
||||
AC_ARG_ENABLE([fuzz],
|
||||
AS_HELP_STRING([--enable-fuzz],[enable building of fuzz targets (default no)]),
|
||||
AS_HELP_STRING([--enable-fuzz],
|
||||
[enable building of fuzz targets (default no). enabling this will disable all other targets]),
|
||||
[enable_fuzz=$enableval],
|
||||
[enable_fuzz=no])
|
||||
|
||||
|
@ -956,6 +957,29 @@ AC_SUBST(LEVELDB_CPPFLAGS)
|
|||
AC_SUBST(LIBLEVELDB)
|
||||
AC_SUBST(LIBMEMENV)
|
||||
|
||||
dnl enable-fuzz should disable all other targets
|
||||
if test "x$enable_fuzz" = "xyes"; then
|
||||
AC_MSG_WARN(enable-fuzz will disable all other targets)
|
||||
build_bitcoin_utils=no
|
||||
build_bitcoin_cli=no
|
||||
build_bitcoin_tx=no
|
||||
build_bitcoin_wallet=no
|
||||
build_bitcoind=no
|
||||
build_bitcoin_libs=no
|
||||
bitcoin_enable_qt=no
|
||||
bitcoin_enable_qt_test=no
|
||||
bitcoin_enable_qt_dbus=no
|
||||
enable_wallet=no
|
||||
use_bench=no
|
||||
use_upnp=no
|
||||
use_zmq=no
|
||||
else
|
||||
BITCOIN_QT_INIT
|
||||
|
||||
dnl sets $bitcoin_enable_qt, $bitcoin_enable_qt_test, $bitcoin_enable_qt_dbus
|
||||
BITCOIN_QT_CONFIGURE([$use_pkgconfig])
|
||||
fi
|
||||
|
||||
if test x$enable_wallet != xno; then
|
||||
dnl Check for libdb_cxx only if wallet enabled
|
||||
BITCOIN_FIND_BDB48
|
||||
|
@ -970,11 +994,6 @@ if test x$use_upnp != xno; then
|
|||
)
|
||||
fi
|
||||
|
||||
BITCOIN_QT_INIT
|
||||
|
||||
dnl sets $bitcoin_enable_qt, $bitcoin_enable_qt_test, $bitcoin_enable_qt_dbus
|
||||
BITCOIN_QT_CONFIGURE([$use_pkgconfig])
|
||||
|
||||
if test x$build_bitcoin_wallet$build_bitcoin_cli$build_bitcoin_tx$build_bitcoind$bitcoin_enable_qt$use_tests$use_bench = xnonononononono; then
|
||||
use_boost=no
|
||||
else
|
||||
|
|
|
@ -46,7 +46,7 @@ export AFLPATH=$PWD
|
|||
To build Bitcoin Core using AFL instrumentation (this assumes that the
|
||||
`AFLPATH` was set as above):
|
||||
```
|
||||
./configure --disable-ccache --disable-shared --enable-tests --enable-fuzz --disable-wallet --disable-bench --with-utils=no --with-daemon=no --with-libs=no --with-gui=no CC=${AFLPATH}/afl-gcc CXX=${AFLPATH}/afl-g++
|
||||
./configure --disable-ccache --disable-shared --enable-tests --enable-fuzz CC=${AFLPATH}/afl-gcc CXX=${AFLPATH}/afl-g++
|
||||
export AFL_HARDEN=1
|
||||
cd src/
|
||||
make
|
||||
|
@ -83,7 +83,7 @@ found in the `compiler-rt` runtime libraries package).
|
|||
To build all fuzz targets with libFuzzer, run
|
||||
|
||||
```
|
||||
./configure --disable-ccache --disable-wallet --disable-bench --with-utils=no --with-daemon=no --with-libs=no --with-gui=no --enable-fuzz --with-sanitizers=fuzzer,address CC=clang CXX=clang++
|
||||
./configure --disable-ccache --enable-fuzz --with-sanitizers=fuzzer,address CC=clang CXX=clang++
|
||||
make
|
||||
```
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue