From 0b296aefc0ce1dad3abd0351768c8edfebfc43a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Mon, 10 Feb 2025 23:52:40 +0200 Subject: [PATCH] run-tests: Skip asan tests on msvcrt Asan doesn't really run properly on msvcrt.dll; skip testing it in that configuration. See discussion on https://github.com/llvm/llvm-project/pull/120397 and https://github.com/mstorsjo/llvm-mingw/issues/224 for context around this. --- run-tests.sh | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/run-tests.sh b/run-tests.sh index 598eefa..cf08571 100755 --- a/run-tests.sh +++ b/run-tests.sh @@ -52,7 +52,9 @@ cat< is-ucrt.c #endif EOF ANY_ARCH=$(echo $ARCHS | awk '{print $1}') -if ! $ANY_ARCH-w64-mingw32-gcc$TOOLEXT -E is-ucrt.c > /dev/null 2>&1; then +if $ANY_ARCH-w64-mingw32-gcc$TOOLEXT -E is-ucrt.c > /dev/null 2>&1; then + IS_UCRT=1 +else # If the default CRT isn't UCRT, we can't build for mingw32uwp. unset HAVE_UWP fi @@ -94,30 +96,33 @@ fi for arch in $ARCHS; do + unset HAVE_ASAN case $arch in i686) RUN="$RUN_I686" COPY="$COPY_I686" NATIVE="$NATIVE_X86" - HAVE_ASAN=1 + if [ -n "$IS_UCRT" ]; then + HAVE_ASAN=1 + fi ;; x86_64) RUN="$RUN_X86_64" COPY="$COPY_X86_64" NATIVE="$NATIVE_X86" - HAVE_ASAN=1 + if [ -n "$IS_UCRT" ]; then + HAVE_ASAN=1 + fi ;; armv7) RUN="$RUN_ARMV7" COPY="$COPY_ARMV7" NATIVE="$NATIVE_ARMV7" - unset HAVE_ASAN ;; aarch64) RUN="$RUN_AARCH64" COPY="$COPY_AARCH64" NATIVE="$NATIVE_AARCH64" - unset HAVE_ASAN ;; esac