Skip to content

Commit

Permalink
T1248:orkaudio:ThreadSanitizer support
Browse files Browse the repository at this point in the history
-- invoke in projects as:
       autoreconf -i
       ../configure --enable-tsan
  • Loading branch information
ericzuck committed Jun 16, 2021
1 parent 39db40b commit 995fe51
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 1 deletion.
19 changes: 18 additions & 1 deletion orkaudio/configure.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,27 @@ AC_INIT(configure.in)

AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE(orkaudio, 1.0)


AC_ARG_ENABLE( [tsan],
AS_HELP_STRING([--enable-tsan], [enable thread sanitizer])
)
AC_ARG_ENABLE( [tsan],
AS_HELP_STRING([--enable-asan], [enable address sanitizer])
)

AC_LANG_CPLUSPLUS
AC_PROG_CXX

AS_IF([test "x$enable_tsan" = "xyes"], [
CXXFLAGS+=" -fsanitize=thread "
LDFLAGS+=" -fsanitize=thread "
])

AS_IF([test "x$enable_asan" = "xyes"], [
CXXFLAGS+=" -fsanitize=address "
LDFLAGS+=" -fsanitize=address "
])

speex_lib=speex


Expand Down
17 changes: 17 additions & 0 deletions orkbasecxx/configure.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,30 @@ AC_INIT(configure.in)
AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE(orkbase, 1.0)

AC_ARG_ENABLE( [tsan],
AS_HELP_STRING([--enable-tsan], [enable thread sanitizer])
)
AC_ARG_ENABLE( [tsan],
AS_HELP_STRING([--enable-asan], [enable address sanitizer])
)

boost_lib=-lboost_system

AC_PREFIX_DEFAULT(/usr)

AC_LANG_CPLUSPLUS
AC_PROG_CXX

AS_IF([test "x$enable_tsan" = "xyes"], [
CXXFLAGS+=" -fsanitize=thread "
LDFLAGS+=" -fsanitize=thread "
])

AS_IF([test "x$enable_asan" = "xyes"], [
CXXFLAGS+=" -fsanitize=address "
LDFLAGS+=" -fsanitize=address "
])

# look for XERCES_3
AC_CHECK_HEADERS([/usr/include/xercesc/dom/DOMLSSerializer.hpp],[CXXFLAGS+=" -DXERCES_3 "])

Expand Down

0 comments on commit 995fe51

Please sign in to comment.