feat: add lab-rv32i-freertos-vector-raii card

This commit is contained in:
user
2026-07-21 19:14:20 +02:00
commit d1094e85f2
64 changed files with 33884 additions and 0 deletions
+28
View File
@@ -0,0 +1,28 @@
#!/usr/bin/env sh
set -eu
cxx=${CXX_HOST:-c++}
build_dir=${1:-host-build}
mkdir -p "$build_dir"
flags="-std=c++17 -Wall -Wextra -Werror -pedantic -Iinclude"
sanitizers="-fsanitize=address,undefined -fno-omit-frame-pointer"
$cxx $flags $sanitizers tests/vector_host.cpp -o "$build_dir/vector_host"
ASAN_OPTIONS=detect_leaks=1 "$build_dir/vector_host"
if $cxx $flags -c tests/vector_copy_rejected.cpp \
-o "$build_dir/vector_copy_rejected.o" \
>"$build_dir/vector_copy_rejected.log" 2>&1; then
echo "copying VectorV1 compiled successfully" >&2
exit 1
fi
if ! grep -Eq "deleted|use of deleted" "$build_dir/vector_copy_rejected.log"; then
echo "copy rejection failed for an unexpected reason" >&2
cat "$build_dir/vector_copy_rejected.log" >&2
exit 1
fi
echo "PASS host: move-only VectorV1, self-move and destructor safety"