scripts: exit on first TSAN error
@@ -4,6 +4,11 @@ readonly SCRIPTS_DIR="$(dirname "$(readlink -f "$0")")"
# shellcheck source=scripts/common
source "${SCRIPTS_DIR}/common"
+# Set flags for TSAN runs (https://github.com/google/sanitizers/wiki/ThreadSanitizerFlags):
+# - exit on error
+# - don't check atomics (false positive on absl::MutexLock, github.com/google/sanitizers/issues/953)
+export TSAN_OPTIONS="halt_on_error=1 report_atomic_races=0"
+
# Build Oak server.
"${SCRIPTS_DIR}/build_server_dev" "$@"
