Skip to content

Commit 0b296ae

Browse files
committed
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 llvm/llvm-project#120397 and #224 for context around this.
1 parent 8dabd61 commit 0b296ae

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

run-tests.sh

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,9 @@ cat<<EOF > is-ucrt.c
5252
#endif
5353
EOF
5454
ANY_ARCH=$(echo $ARCHS | awk '{print $1}')
55-
if ! $ANY_ARCH-w64-mingw32-gcc$TOOLEXT -E is-ucrt.c > /dev/null 2>&1; then
55+
if $ANY_ARCH-w64-mingw32-gcc$TOOLEXT -E is-ucrt.c > /dev/null 2>&1; then
56+
IS_UCRT=1
57+
else
5658
# If the default CRT isn't UCRT, we can't build for mingw32uwp.
5759
unset HAVE_UWP
5860
fi
@@ -94,30 +96,33 @@ fi
9496

9597

9698
for arch in $ARCHS; do
99+
unset HAVE_ASAN
97100
case $arch in
98101
i686)
99102
RUN="$RUN_I686"
100103
COPY="$COPY_I686"
101104
NATIVE="$NATIVE_X86"
102-
HAVE_ASAN=1
105+
if [ -n "$IS_UCRT" ]; then
106+
HAVE_ASAN=1
107+
fi
103108
;;
104109
x86_64)
105110
RUN="$RUN_X86_64"
106111
COPY="$COPY_X86_64"
107112
NATIVE="$NATIVE_X86"
108-
HAVE_ASAN=1
113+
if [ -n "$IS_UCRT" ]; then
114+
HAVE_ASAN=1
115+
fi
109116
;;
110117
armv7)
111118
RUN="$RUN_ARMV7"
112119
COPY="$COPY_ARMV7"
113120
NATIVE="$NATIVE_ARMV7"
114-
unset HAVE_ASAN
115121
;;
116122
aarch64)
117123
RUN="$RUN_AARCH64"
118124
COPY="$COPY_AARCH64"
119125
NATIVE="$NATIVE_AARCH64"
120-
unset HAVE_ASAN
121126
;;
122127
esac
123128

0 commit comments

Comments
 (0)