aboutsummaryrefslogtreecommitdiff
path: root/ci/test/01_base_install.sh
diff options
context:
space:
mode:
authorfanquake <fanquake@gmail.com>2023-05-23 18:09:32 +0100
committerfanquake <fanquake@gmail.com>2023-05-29 17:20:50 +0100
commitd3cbcbf62693ad7394b3f8693b1c08d4271903fa (patch)
tree137453246634d610b92b7100081f3fb161069633 /ci/test/01_base_install.sh
parent796bd1d0d147ac90f921ce3831961f97748d4e1a (diff)
downloadbitcoin-d3cbcbf62693ad7394b3f8693b1c08d4271903fa.tar.xz
ci: compile clang and compiler-rt in MSAN jobs
This works around https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1005341.
Diffstat (limited to 'ci/test/01_base_install.sh')
-rwxr-xr-xci/test/01_base_install.sh29
1 files changed, 25 insertions, 4 deletions
diff --git a/ci/test/01_base_install.sh b/ci/test/01_base_install.sh
index fd60e51258..43a76c3d56 100755
--- a/ci/test/01_base_install.sh
+++ b/ci/test/01_base_install.sh
@@ -42,11 +42,32 @@ if [ -n "$PIP_PACKAGES" ]; then
fi
if [[ ${USE_MEMORY_SANITIZER} == "true" ]]; then
- update-alternatives --install /usr/bin/clang++ clang++ "$(which clang++-16)" 100
- update-alternatives --install /usr/bin/clang clang "$(which clang-16)" 100
git clone --depth=1 https://github.com/llvm/llvm-project -b llvmorg-16.0.4 "${BASE_SCRATCH_DIR}"/msan/llvm-project
- cmake -B "${BASE_SCRATCH_DIR}"/msan/build/ -DLLVM_ENABLE_RUNTIMES='libcxx;libcxxabi' -DCMAKE_BUILD_TYPE=Release -DLLVM_USE_SANITIZER=MemoryWithOrigins -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DLLVM_TARGETS_TO_BUILD=X86 -DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=OFF -DLIBCXX_ENABLE_DEBUG_MODE=ON -DLIBCXX_ENABLE_ASSERTIONS=ON -S "${BASE_SCRATCH_DIR}"/msan/llvm-project/runtimes
- make -C "${BASE_SCRATCH_DIR}"/msan/build/ "$MAKEJOBS"
+
+ cmake -G Ninja -B "${BASE_SCRATCH_DIR}"/msan/clang_build/ -DLLVM_ENABLE_PROJECTS="clang" \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DLLVM_TARGETS_TO_BUILD=X86 \
+ -DLLVM_ENABLE_RUNTIMES="compiler-rt;libcxx;libcxxabi;libunwind" \
+ -S "${BASE_SCRATCH_DIR}"/msan/llvm-project/llvm
+
+ ninja -C "${BASE_SCRATCH_DIR}"/msan/clang_build/ "$MAKEJOBS"
+ ninja -C "${BASE_SCRATCH_DIR}"/msan/clang_build/ install-runtimes
+
+ update-alternatives --install /usr/bin/clang++ clang++ "${BASE_SCRATCH_DIR}"/msan/clang_build/bin/clang++ 100
+ update-alternatives --install /usr/bin/clang clang "${BASE_SCRATCH_DIR}"/msan/clang_build/bin/clang 100
+
+ cmake -G Ninja -B "${BASE_SCRATCH_DIR}"/msan/cxx_build/ -DLLVM_ENABLE_RUNTIMES='libcxx;libcxxabi' \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DLLVM_USE_SANITIZER=MemoryWithOrigins \
+ -DCMAKE_C_COMPILER=clang \
+ -DCMAKE_CXX_COMPILER=clang++ \
+ -DLLVM_TARGETS_TO_BUILD=X86 \
+ -DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=OFF \
+ -DLIBCXX_ENABLE_DEBUG_MODE=ON \
+ -DLIBCXX_ENABLE_ASSERTIONS=ON \
+ -S "${BASE_SCRATCH_DIR}"/msan/llvm-project/runtimes
+
+ ninja -C "${BASE_SCRATCH_DIR}"/msan/cxx_build/ "$MAKEJOBS"
fi
if [[ "${RUN_TIDY}" == "true" ]]; then