Skip to content

Commit dcddbe2

Browse files
committed
configure: add support for --with-thread-sanitizer
1 parent cefe5df commit dcddbe2

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-0
lines changed

configure

Lines changed: 20 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

configure.ac

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3109,6 +3109,17 @@ with_pymalloc="no"
31093109
],
31103110
[AC_MSG_RESULT(no)])
31113111

3112+
AC_MSG_CHECKING(for --with-thread-sanitizer)
3113+
AC_ARG_WITH(thread_sanitizer,
3114+
AS_HELP_STRING([--with-thread-sanitizer],
3115+
[enable ThreadSanitizer race detector, 'tsan' (default is no)]),
3116+
[
3117+
AC_MSG_RESULT($withval)
3118+
BASECFLAGS="-fsanitize=thread -fno-omit-frame-pointer -DMI_TSAN=1 $BASECFLAGS"
3119+
LDFLAGS="-fsanitize=thread $LDFLAGS"
3120+
],
3121+
[AC_MSG_RESULT(no)])
3122+
31123123
AC_MSG_CHECKING(for --with-memory-sanitizer)
31133124
AC_ARG_WITH(memory_sanitizer,
31143125
AS_HELP_STRING([--with-memory-sanitizer],

0 commit comments

Comments
 (0)