forked from weaselab/conflict-set
Compare commits
11
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9adf6f44f4 | ||
|
|
321a23f1dc | ||
|
|
0510f01fe1 | ||
|
|
8afe5ec75b | ||
|
|
6eaa0799d5 | ||
|
|
cf783a0cdb | ||
|
|
16bd98ab12 | ||
|
|
374dcf13b7 | ||
|
|
d96d862cea | ||
|
|
2231c093df | ||
|
|
d479f16204 |
+109
-26
@@ -19,15 +19,8 @@ jobs:
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
. /etc/os-release
|
||||
wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | sudo tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc
|
||||
echo "deb http://apt.llvm.org/${VERSION_CODENAME}/ llvm-toolchain-${VERSION_CODENAME}-21 main" | sudo tee /etc/apt/sources.list.d/llvm.list
|
||||
sudo apt-get update -qq
|
||||
sudo apt-get install -y \
|
||||
clang-21 git nodejs pre-commit
|
||||
for tool in clang clang++; do
|
||||
sudo update-alternatives --install /usr/bin/${tool} ${tool} /usr/bin/${tool}-21 100
|
||||
done
|
||||
sudo apt-get install -y git nodejs pre-commit
|
||||
|
||||
- uses: actions/cache@v4
|
||||
with:
|
||||
@@ -61,28 +54,28 @@ jobs:
|
||||
path: /var/cache/apt/archives
|
||||
key: apt-amd64-${{ hashFiles('.gitea/workflows/ci.yml') }}
|
||||
|
||||
- name: Install dependencies
|
||||
- name: Install common dependencies
|
||||
run: |
|
||||
sudo apt-get update -qq
|
||||
sudo apt-get install -y \
|
||||
build-essential ccache cmake gcc g++ libc6-dbg \
|
||||
ninja-build python3 valgrind zstd
|
||||
sudo curl -Ls "https://minio.weaselab.dev/public/$(uname -m)/mc.RELEASE.2025-08-13T08-35-41Z" \
|
||||
-o /usr/local/bin/mc && sudo chmod +x /usr/local/bin/mc
|
||||
|
||||
- name: Install LLVM toolchain
|
||||
if: matrix.name != 'gcc'
|
||||
run: |
|
||||
. /etc/os-release
|
||||
wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | sudo tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc
|
||||
echo "deb http://apt.llvm.org/${VERSION_CODENAME}/ llvm-toolchain-${VERSION_CODENAME}-21 main" | sudo tee /etc/apt/sources.list.d/llvm.list
|
||||
sudo apt-get update -qq
|
||||
sudo apt-get install -y \
|
||||
build-essential ccache clang-21 cmake gcc g++ \
|
||||
libc6-dbg llvm-21 lld-21 mold ninja-build python3 valgrind zstd
|
||||
sudo curl -Ls "https://dl.min.io/client/mc/release/linux-amd64/mc" \
|
||||
-o /usr/local/bin/mc && sudo chmod +x /usr/local/bin/mc
|
||||
clang-21 llvm-21 lld-21 mold
|
||||
for tool in clang clang++ llvm-ar llvm-nm llvm-ranlib llvm-objcopy llvm-cov llvm-symbolizer lld ld.lld; do
|
||||
sudo update-alternatives --install /usr/bin/${tool} ${tool} /usr/bin/${tool}-21 100
|
||||
done
|
||||
|
||||
- uses: actions/cache@v4
|
||||
with:
|
||||
path: .ccache
|
||||
key: ccache-${{ matrix.name }}-${{ gitea.sha }}
|
||||
restore-keys: |
|
||||
ccache-${{ matrix.name }}-
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
export CCACHE_DIR="$GITHUB_WORKSPACE/.ccache"
|
||||
@@ -141,16 +134,23 @@ jobs:
|
||||
echo "deb http://apt.llvm.org/${VERSION_CODENAME}/ llvm-toolchain-${VERSION_CODENAME}-21 main" | sudo tee /etc/apt/sources.list.d/llvm.list
|
||||
sudo apt-get update -qq
|
||||
sudo apt-get install -y \
|
||||
biber build-essential ccache clang-21 cmake devscripts \
|
||||
latexmk libc6-dbg llvm-21 lld-21 mold ninja-build rpm \
|
||||
texlive-bibtex-extra texlive-fonts-recommended \
|
||||
texlive-latex-extra texlive-pictures valgrind zstd
|
||||
sudo curl -Ls "https://dl.min.io/client/mc/release/linux-$(dpkg --print-architecture)/mc" \
|
||||
build-essential ccache clang-21 cmake devscripts \
|
||||
libc6-dbg llvm-21 lld-21 mold ninja-build rpm \
|
||||
valgrind zstd
|
||||
sudo curl -Ls "https://minio.weaselab.dev/public/$(uname -m)/mc.RELEASE.2025-08-13T08-35-41Z" \
|
||||
-o /usr/local/bin/mc && sudo chmod +x /usr/local/bin/mc
|
||||
for tool in clang clang++ llvm-ar llvm-nm llvm-ranlib llvm-objcopy llvm-cov llvm-symbolizer lld ld.lld; do
|
||||
sudo update-alternatives --install /usr/bin/${tool} ${tool} /usr/bin/${tool}-21 100
|
||||
done
|
||||
|
||||
- name: Install paper build dependencies
|
||||
if: matrix.arch == 'amd64'
|
||||
run: |
|
||||
sudo apt-get install -y \
|
||||
biber latexmk \
|
||||
texlive-bibtex-extra texlive-fonts-recommended \
|
||||
texlive-latex-extra texlive-pictures
|
||||
|
||||
- uses: actions/cache@v4
|
||||
with:
|
||||
path: .ccache
|
||||
@@ -218,6 +218,89 @@ jobs:
|
||||
--link "https://minio.weaselab.dev/jenkins/conflict-set/${{ gitea.run_number }}/release-${{ matrix.arch }}/Test.xml.zst" \
|
||||
| tee -a "$GITHUB_STEP_SUMMARY"
|
||||
|
||||
msan:
|
||||
runs-on: ubuntu-latest-amd64
|
||||
env:
|
||||
MSAN_VERSION: "21.1.8"
|
||||
MSAN_URL: "https://minio.weaselab.dev/public/x86_64/msan-toolchain-21.1.8.tar.zst"
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: actions/cache@v4
|
||||
with:
|
||||
path: /var/cache/apt/archives
|
||||
key: apt-amd64-${{ hashFiles('.gitea/workflows/ci.yml') }}
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
. /etc/os-release
|
||||
wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | sudo tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc
|
||||
echo "deb http://apt.llvm.org/${VERSION_CODENAME}/ llvm-toolchain-${VERSION_CODENAME}-21 main" | sudo tee /etc/apt/sources.list.d/llvm.list
|
||||
sudo apt-get update -qq
|
||||
sudo apt-get install -y \
|
||||
build-essential ccache clang-21 cmake libc6-dbg \
|
||||
llvm-21 lld-21 mold ninja-build python3 zstd
|
||||
sudo curl -Ls "https://minio.weaselab.dev/public/$(uname -m)/mc.RELEASE.2025-08-13T08-35-41Z" \
|
||||
-o /usr/local/bin/mc && sudo chmod +x /usr/local/bin/mc
|
||||
for tool in clang clang++ llvm-ar llvm-nm llvm-ranlib llvm-objcopy llvm-cov llvm-symbolizer lld ld.lld; do
|
||||
sudo update-alternatives --install /usr/bin/${tool} ${tool} /usr/bin/${tool}-21 100
|
||||
done
|
||||
|
||||
- name: Download MSan toolchain
|
||||
run: |
|
||||
curl -Ls "${MSAN_URL}" -o /tmp/msan-toolchain.tar.zst
|
||||
sudo mkdir -p /opt/msan
|
||||
sudo tar --zstd -xf /tmp/msan-toolchain.tar.zst -C /opt/msan
|
||||
|
||||
- uses: actions/cache@v4
|
||||
with:
|
||||
path: .ccache
|
||||
key: ccache-msan-${{ gitea.sha }}
|
||||
restore-keys: |
|
||||
ccache-msan-
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
export CCACHE_DIR="$GITHUB_WORKSPACE/.ccache"
|
||||
rm -rf build
|
||||
cmake -S . -B build -G Ninja \
|
||||
-DCMAKE_C_COMPILER=clang \
|
||||
-DCMAKE_CXX_COMPILER=clang++ \
|
||||
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
|
||||
-DCMAKE_BUILD_TYPE=Debug \
|
||||
-DDISABLE_TSAN=ON \
|
||||
-DUSE_MSAN=ON \
|
||||
-DCMAKE_CXX_FLAGS="-fsanitize=memory -stdlib=libc++ -I/opt/msan/include/c++/v1 -L/opt/msan/lib -UNDEBUG" \
|
||||
-DCMAKE_EXE_LINKER_FLAGS="-stdlib=libc++ -Wl,-rpath,/opt/msan/lib" \
|
||||
-DCMAKE_SHARED_LINKER_FLAGS="-stdlib=libc++ -Wl,-rpath,/opt/msan/lib"
|
||||
ninja -C build
|
||||
ccache -s
|
||||
|
||||
- name: Test
|
||||
run: |
|
||||
cd build
|
||||
ctest --no-compress-output --test-output-size-passed 100000 --test-output-size-failed 100000 -T Test -j "$(nproc)" --timeout 300 > /dev/null
|
||||
|
||||
- name: Upload test results to MinIO
|
||||
if: always()
|
||||
env:
|
||||
MINIO_ACCESS_KEY: ${{ secrets.MINIO_ACCESS_KEY }}
|
||||
MC_HOST_minio: https://${{ secrets.MINIO_ACCESS_KEY }}:${{ secrets.MINIO_SECRET_KEY }}@minio.weaselab.dev
|
||||
run: |
|
||||
if [ -z "$MINIO_ACCESS_KEY" ]; then
|
||||
echo "MinIO credentials not configured; skipping upload"
|
||||
exit 0
|
||||
fi
|
||||
zstd build/Testing/*/Test.xml
|
||||
mc cp build/Testing/*/Test.xml.zst "minio/jenkins/conflict-set/${{ gitea.run_number }}/msan/"
|
||||
|
||||
- name: Test summary
|
||||
if: always()
|
||||
run: |
|
||||
python3 ctest_summary.py build/Testing/*/Test.xml \
|
||||
--link "https://minio.weaselab.dev/jenkins/conflict-set/${{ gitea.run_number }}/msan/Test.xml.zst" \
|
||||
| tee -a "$GITHUB_STEP_SUMMARY"
|
||||
|
||||
coverage:
|
||||
runs-on: ubuntu-latest-amd64
|
||||
steps:
|
||||
@@ -237,7 +320,7 @@ jobs:
|
||||
sudo apt-get install -y \
|
||||
build-essential ccache clang-21 cmake gcovr \
|
||||
libc6-dbg llvm-21 lld-21 mold ninja-build python3 valgrind zstd
|
||||
sudo curl -Ls "https://dl.min.io/client/mc/release/linux-amd64/mc" \
|
||||
sudo curl -Ls "https://minio.weaselab.dev/public/$(uname -m)/mc.RELEASE.2025-08-13T08-35-41Z" \
|
||||
-o /usr/local/bin/mc && sudo chmod +x /usr/local/bin/mc
|
||||
for tool in clang clang++ llvm-ar llvm-nm llvm-ranlib llvm-objcopy llvm-cov llvm-symbolizer lld ld.lld; do
|
||||
sudo update-alternatives --install /usr/bin/${tool} ${tool} /usr/bin/${tool}-21 100
|
||||
|
||||
+34
-6
@@ -1,7 +1,7 @@
|
||||
cmake_minimum_required(VERSION 3.18)
|
||||
project(
|
||||
conflict-set
|
||||
VERSION 0.0.14
|
||||
VERSION 0.1.0
|
||||
DESCRIPTION
|
||||
"A data structure for optimistic concurrency control on ranges of bitwise-lexicographically-ordered keys."
|
||||
HOMEPAGE_URL "https://git.weaselab.dev/weaselab/conflict-set"
|
||||
@@ -49,6 +49,18 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||
${LLVM_OBJCOPY}
|
||||
CACHE FILEPATH "path to objcopy binary" FORCE)
|
||||
endif()
|
||||
if(USE_MSAN)
|
||||
find_program(LLD_LINKER lld)
|
||||
if(LLD_LINKER)
|
||||
set(CMAKE_LINKER_TYPE
|
||||
"LLD"
|
||||
CACHE STRING "Use LLD linker" FORCE)
|
||||
set(CMAKE_LINKER
|
||||
${LLD_LINKER}
|
||||
CACHE FILEPATH "path to linker binary" FORCE)
|
||||
add_link_options("-fuse-ld=lld")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||
@@ -103,6 +115,8 @@ option(USE_SIMD_FALLBACK
|
||||
|
||||
option(DISABLE_TSAN "Disable TSAN" OFF)
|
||||
|
||||
option(USE_MSAN "Build with MemorySanitizer (disables ASan/UBSan)" OFF)
|
||||
|
||||
# This is encouraged according to
|
||||
# https://valgrind.org/docs/manual/manual-core-adv.html#manual-core-adv.clientreq
|
||||
include_directories(SYSTEM ${CMAKE_CURRENT_SOURCE_DIR}/third_party/valgrind)
|
||||
@@ -232,8 +246,10 @@ if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR AND BUILD_TESTING)
|
||||
target_compile_definitions(conflict_set_main PRIVATE ENABLE_MAIN)
|
||||
target_link_libraries(conflict_set_main PRIVATE nanobench)
|
||||
|
||||
if(NOT APPLE)
|
||||
# libfuzzer target, to generate/manage corpus
|
||||
if(NOT APPLE AND NOT USE_MSAN)
|
||||
# libfuzzer target, to generate/manage corpus. MSan requires an instrumented
|
||||
# libfuzzer runtime, which is not shipped with the compiler, so skip this
|
||||
# target when building with MSan.
|
||||
set(FUZZ_FLAGS "-fsanitize=fuzzer-no-link,address,undefined")
|
||||
include(CheckCXXCompilerFlag)
|
||||
cmake_push_check_state()
|
||||
@@ -257,8 +273,13 @@ if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR AND BUILD_TESTING)
|
||||
add_executable(fuzz_driver ConflictSet.cpp FuzzTestDriver.cpp)
|
||||
target_compile_options(fuzz_driver PRIVATE ${TEST_FLAGS})
|
||||
if(NOT CMAKE_CROSSCOMPILING)
|
||||
target_compile_options(fuzz_driver PRIVATE -fsanitize=address,undefined)
|
||||
target_link_options(fuzz_driver PRIVATE -fsanitize=address,undefined)
|
||||
if(USE_MSAN)
|
||||
target_compile_options(fuzz_driver PRIVATE -fsanitize=memory)
|
||||
target_link_options(fuzz_driver PRIVATE -fsanitize=memory)
|
||||
else()
|
||||
target_compile_options(fuzz_driver PRIVATE -fsanitize=address,undefined)
|
||||
target_link_options(fuzz_driver PRIVATE -fsanitize=address,undefined)
|
||||
endif()
|
||||
endif()
|
||||
target_compile_definitions(fuzz_driver PRIVATE ENABLE_FUZZ)
|
||||
target_include_directories(fuzz_driver
|
||||
@@ -269,7 +290,9 @@ if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR AND BUILD_TESTING)
|
||||
endforeach()
|
||||
|
||||
# tsan tests
|
||||
if(NOT CMAKE_CROSSCOMPILING AND NOT DISABLE_TSAN)
|
||||
if(NOT CMAKE_CROSSCOMPILING
|
||||
AND NOT DISABLE_TSAN
|
||||
AND NOT USE_MSAN)
|
||||
add_executable(tsan_driver ConflictSet.cpp FuzzTestDriver.cpp)
|
||||
target_compile_options(tsan_driver PRIVATE ${TEST_FLAGS} -fsanitize=thread)
|
||||
target_link_options(tsan_driver PRIVATE -fsanitize=thread)
|
||||
@@ -491,6 +514,11 @@ target_include_directories(
|
||||
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
||||
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}>)
|
||||
|
||||
if(USE_MSAN)
|
||||
target_compile_options(${PROJECT_NAME} PUBLIC -fsanitize=memory)
|
||||
target_link_options(${PROJECT_NAME} PUBLIC -fsanitize=memory)
|
||||
endif()
|
||||
|
||||
set_target_properties(
|
||||
${PROJECT_NAME} PROPERTIES VERSION ${PROJECT_VERSION}
|
||||
SOVERSION ${PROJECT_VERSION_MAJOR})
|
||||
|
||||
+3
-4
@@ -3864,11 +3864,10 @@ PRESERVE_NONE void right_side_iter(Job *job, Context *context) {
|
||||
void Job::init(const ConflictSet::ReadRange *read, ConflictSet::Result *result,
|
||||
Node *root, int64_t oldestVersionFullPrecision) {
|
||||
auto begin = TrivialSpan(read->begin.p, read->begin.len);
|
||||
auto end = TrivialSpan(read->end.p, read->end.len);
|
||||
if (read->readVersion < oldestVersionFullPrecision) [[unlikely]] {
|
||||
*result = ConflictSet::TooOld;
|
||||
continuation = complete;
|
||||
} else if (end.size() == 0) {
|
||||
} else if (read->end.len == 0) {
|
||||
this->begin = begin;
|
||||
this->n = root;
|
||||
this->readVersion = InternalVersionT(read->readVersion);
|
||||
@@ -3876,7 +3875,7 @@ void Job::init(const ConflictSet::ReadRange *read, ConflictSet::Result *result,
|
||||
continuation = check::point_read_state_machine::begin;
|
||||
} else {
|
||||
this->begin = begin;
|
||||
this->end = end;
|
||||
this->end = TrivialSpan(read->end.p, read->end.len);
|
||||
this->n = root;
|
||||
this->readVersion = InternalVersionT(read->readVersion);
|
||||
this->result = result;
|
||||
@@ -5046,8 +5045,8 @@ struct __attribute__((visibility("hidden"))) ConflictSet::Impl {
|
||||
for (int i = 0; i < count; ++i) {
|
||||
const auto &w = writes[i];
|
||||
auto begin = TrivialSpan(w.begin.p, w.begin.len);
|
||||
auto end = TrivialSpan(w.end.p, w.end.len);
|
||||
if (w.end.len > 0) {
|
||||
auto end = TrivialSpan(w.end.p, w.end.len);
|
||||
addWriteRange(rootParent->children[0], begin, end,
|
||||
InternalVersionT(writeVersion), &writeContext);
|
||||
} else {
|
||||
|
||||
-46
@@ -1,46 +0,0 @@
|
||||
FROM ubuntu:rolling
|
||||
|
||||
WORKDIR /tmp
|
||||
ENV HOME=/tmp
|
||||
RUN chmod -R 777 /tmp
|
||||
|
||||
# Install apt dependencies
|
||||
RUN apt-get update
|
||||
RUN apt-get upgrade -y
|
||||
RUN TZ=America/Los_Angeles DEBIAN_FRONTEND=noninteractive apt-get install -y \
|
||||
biber \
|
||||
build-essential \
|
||||
ccache \
|
||||
clang \
|
||||
cmake \
|
||||
curl \
|
||||
devscripts \
|
||||
gcovr \
|
||||
git \
|
||||
latexmk \
|
||||
libc6-dbg \
|
||||
llvm \
|
||||
mold \
|
||||
ninja-build \
|
||||
nodejs \
|
||||
pre-commit \
|
||||
python3-requests \
|
||||
rpm \
|
||||
texlive-bibtex-extra \
|
||||
texlive-fonts-recommended \
|
||||
texlive-latex-extra \
|
||||
texlive-pictures \
|
||||
valgrind \
|
||||
wget \
|
||||
zstd
|
||||
|
||||
# MinIO client, for uploading build artifacts
|
||||
RUN curl -Ls "https://dl.min.io/client/mc/release/linux-$(dpkg --print-architecture)/mc" \
|
||||
-o /usr/local/bin/mc && chmod +x /usr/local/bin/mc
|
||||
|
||||
ENV CC=clang
|
||||
ENV CXX=clang++
|
||||
|
||||
# Try to have all the pre-commit hooks we'll need already initialized
|
||||
COPY .pre-commit-config.yaml /tmp/
|
||||
RUN git init && pre-commit install-hooks
|
||||
+8
-3
@@ -38,6 +38,9 @@ std::span<const uint8_t> keyAfter(Arena &arena, std::span<const uint8_t> key) {
|
||||
|
||||
std::span<const uint8_t> copyToArena(Arena &arena,
|
||||
std::span<const uint8_t> key) {
|
||||
if (key.size() == 0) {
|
||||
return std::span<const uint8_t>();
|
||||
}
|
||||
auto result = std::span<uint8_t>(new (arena) uint8_t[key.size()], key.size());
|
||||
memcpy(result.data(), key.data(), key.size());
|
||||
return result;
|
||||
@@ -97,7 +100,7 @@ force_inline bool getCharacter(const KeyInfo &ki, int character,
|
||||
|
||||
bool operator<(const KeyInfo &lhs, const KeyInfo &rhs) {
|
||||
int i = std::min(lhs.key.size(), rhs.key.size());
|
||||
int c = memcmp(lhs.key.data(), rhs.key.data(), i);
|
||||
int c = i > 0 ? memcmp(lhs.key.data(), rhs.key.data(), i) : 0;
|
||||
if (c != 0)
|
||||
return c < 0;
|
||||
|
||||
@@ -287,7 +290,8 @@ private:
|
||||
|
||||
static force_inline bool less(const uint8_t *a, int aLen, const uint8_t *b,
|
||||
int bLen) {
|
||||
int c = memcmp(a, b, std::min(aLen, bLen));
|
||||
int n = std::min(aLen, bLen);
|
||||
int c = n > 0 ? memcmp(a, b, n) : 0;
|
||||
if (c < 0)
|
||||
return true;
|
||||
if (c > 0)
|
||||
@@ -754,7 +758,8 @@ struct __attribute__((visibility("hidden"))) ConflictSet::Impl {
|
||||
|
||||
void addWrites(const ConflictSet::WriteRange *writes, int count,
|
||||
int64_t writeVersion) {
|
||||
auto points = std::vector<KeyInfo>(count * 2);
|
||||
auto points = std::vector<KeyInfo>();
|
||||
points.reserve(count * 2);
|
||||
Arena arena;
|
||||
|
||||
for (int r = 0; r < count; r++) {
|
||||
|
||||
Executable
+43
@@ -0,0 +1,43 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -euxo pipefail
|
||||
|
||||
LLVM_VERSION="${LLVM_VERSION:-21}"
|
||||
MSAN_PREFIX="${MSAN_PREFIX:-$PWD/msan}"
|
||||
JOBS="${JOBS:-$(nproc)}"
|
||||
|
||||
cd /tmp
|
||||
rm -rf libcxx-msan
|
||||
mkdir libcxx-msan
|
||||
cd libcxx-msan
|
||||
|
||||
git clone --depth=1 "https://github.com/llvm/llvm-project.git" -b "release/${LLVM_VERSION}.x"
|
||||
|
||||
cmake -S llvm-project/runtimes -B build \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_C_COMPILER="clang-${LLVM_VERSION}" \
|
||||
-DCMAKE_CXX_COMPILER="clang++-${LLVM_VERSION}" \
|
||||
-DLLVM_USE_SANITIZER=MemoryWithOrigins \
|
||||
-DLLVM_ENABLE_RUNTIMES="libcxx;libcxxabi;libunwind" \
|
||||
-DLLVM_TARGETS_TO_BUILD=Native \
|
||||
-DCMAKE_INSTALL_PREFIX="${MSAN_PREFIX}" \
|
||||
-DLIBCXXABI_USE_LLVM_UNWINDER=ON \
|
||||
-DLIBCXXABI_ENABLE_STATIC_UNWINDER=ON \
|
||||
-DLIBCXX_USE_COMPILER_RT=ON \
|
||||
-DLIBCXXABI_USE_COMPILER_RT=ON \
|
||||
-DLIBUNWIND_USE_COMPILER_RT=ON \
|
||||
-DLIBCXX_INCLUDE_TESTS=OFF \
|
||||
-DLIBCXXABI_INCLUDE_TESTS=OFF \
|
||||
-DLIBUNWIND_INCLUDE_TESTS=OFF \
|
||||
-DLIBCXX_ENABLE_CLANG_TIDY=OFF
|
||||
|
||||
cmake --build build -j"${JOBS}"
|
||||
cmake --install build
|
||||
|
||||
VERSION="$(clang-"${LLVM_VERSION}" --version | head -n1 | sed -E 's/.*clang version ([0-9.]+).*/\1/')"
|
||||
TARBALL="msan-toolchain-${VERSION}.tar.zst"
|
||||
|
||||
tar --zstd -cf "${TARBALL}" -C "${MSAN_PREFIX}" .
|
||||
|
||||
TARBALL_PATH="$(pwd)/${TARBALL}"
|
||||
echo "Created: ${TARBALL_PATH}"
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user