Files
rust_browser/scripts/sanitizer.sh
2026-01-29 01:16:53 -05:00

16 lines
340 B
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
export CC=clang
export CXX=clang++
# Keep sanitizer artifacts isolated
export CARGO_TARGET_DIR=target_san
# Nightly-only sanitizer flag:
export RUSTFLAGS="-C linker=clang -C link-arg=-fuse-ld=lld -Z sanitizer=address"
# ASan generally includes LSan on Linux.
cargo test --workspace --all-features