From eea2e84b82653942543bae570d28f409c5e3f2df Mon Sep 17 00:00:00 2001 From: bradh352 Date: Mon, 1 Nov 2021 14:30:56 -0400 Subject: [PATCH] try to fix asan/ubsan/lsan when built with clang. try to support code coverage properly. --- .cirrus.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index 94a99124..d086e5aa 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -49,7 +49,7 @@ task: CONFIG_OPTS: "--enable-debug" CFLAGS: "-fsanitize=address" CXXFLAGS: "-fsanitize=address" - LDFLAGS: "-fsanitize=address" + LDFLAGS: "-fsanitize=address -lpthread" - name: "UBSAN" # FreeBSD just hangs trying to run tests, think it may be trying to run leak sanitizer only_if: $DIST != 'FREEBSD' @@ -59,7 +59,7 @@ task: CONFIG_OPTS: "--enable-debug" CFLAGS: "-fsanitize=undefined -fno-sanitize-recover" CXXFLAGS: "-fsanitize=undefined -fno-sanitize-recover" - LDFLAGS: "-fsanitize=undefined" + LDFLAGS: "-fsanitize=undefined -lpthread" - name: "LSAN" # lsan only works on debian x86/x64 only_if: $DIST == 'DEBIAN' @@ -69,7 +69,7 @@ task: CONFIG_OPTS: "--enable-debug" CFLAGS: "-fsanitize=leak" CXXFLAGS: "-fsanitize=leak" - LDFLAGS: "-fsanitize=leak" + LDFLAGS: "-fsanitize=leak -lpthread" - name: "ANALYZE" env: BUILD_TYPE: "analyze" @@ -87,6 +87,11 @@ task: only_if: $DIST == 'DEBIAN' env: BUILD_TYPE: "coverage" + CI_NAME: "cirrus-ci" + CI_BUILD_NUMBER: "${CIRRUS_BUILD_ID}" + CI_BUILD_URL: "${CIRRUS_REPO_CLONE_URL}" + CI_BRANCH: "${CIRRUS_BASE_BRANCH}" + CI_PULL_REQUEST: "${CIRRUS_PR}" CONFIG_OPTS: "--enable-debug --disable-shared --enable-code-coverage --enable-tests" install_script: