From 8f14c3e2e28116709499a26e908db525ae298957 Mon Sep 17 00:00:00 2001 From: Kittywhiskers Van Gogh <63189531+kittywhiskers@users.noreply.github.com> Date: Thu, 17 Mar 2022 19:21:22 +0530 Subject: [PATCH] fuzz: add gitlab build support, use clang --- .gitlab-ci.yml | 7 +++++++ ci/dash/matrix.sh | 8 ++++++++ contrib/containers/ci/Dockerfile | 1 + 3 files changed, 16 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1a7617b06e..b6256d4761 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -257,6 +257,13 @@ linux64_cxx20-build: variables: BUILD_TARGET: linux64_cxx20 +linux64_fuzz-build: + extends: .build-template + needs: + - x86_64-unknown-linux-gnu-debug + variables: + BUILD_TARGET: linux64_fuzz + linux64_tsan-build: extends: - .build-template diff --git a/ci/dash/matrix.sh b/ci/dash/matrix.sh index e38f1fc864..0cafed75ae 100755 --- a/ci/dash/matrix.sh +++ b/ci/dash/matrix.sh @@ -75,6 +75,14 @@ elif [ "$BUILD_TARGET" = "linux64_tsan" ]; then export BITCOIN_CONFIG="--enable-zmq --enable-reduce-exports --enable-crash-hooks --with-sanitizers=thread" export CPPFLAGS="-DDEBUG_LOCKORDER -DENABLE_DASH_DEBUG -DARENA_DEBUG" export PYZMQ=true +elif [ "$BUILD_TARGET" = "linux64_fuzz" ]; then + export HOST=x86_64-unknown-linux-gnu + export DEP_OPTS="NO_UPNP=1 DEBUG=1" + export BITCOIN_CONFIG="--enable-zmq --disable-ccache --enable-fuzz --with-sanitizers=fuzzer,address,undefined CC=clang CXX=clang++" + export CPPFLAGS="-DDEBUG_LOCKORDER -DENABLE_DASH_DEBUG -DARENA_DEBUG" + export PYZMQ=true + export RUN_UNITTESTS=false + export RUN_INTEGRATIONTESTS=false elif [ "$BUILD_TARGET" = "linux64_cxx20" ]; then export HOST=x86_64-unknown-linux-gnu export DEP_OPTS="NO_UPNP=1 DEBUG=1" diff --git a/contrib/containers/ci/Dockerfile b/contrib/containers/ci/Dockerfile index 2b0b73dbcf..92b3f76d63 100644 --- a/contrib/containers/ci/Dockerfile +++ b/contrib/containers/ci/Dockerfile @@ -15,6 +15,7 @@ RUN apt-get update && apt-get install $APT_ARGS \ bsdmainutils \ curl \ ccache \ + clang \ cmake \ git \ g++ \