diff options
author | Gerald Combs <gerald@wireshark.org> | 2017-11-20 12:44:17 -0800 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2017-11-21 16:55:18 +0000 |
commit | 0b2ecccd863b577335c1c87a902783d3de158839 (patch) | |
tree | af12ca156f988ca2deff794843d8e67125116735 /configure.ac | |
parent | 8cbde93146bfd72e98b942fe81d69300f9488dac (diff) |
Add ThreadSanitizer configure-time options.
Add ENABLE_TSAN and enable-tsan options to CMake and Autotools
respectively which enable ThreadSanitizer, similar to AddressSanitizer
and UndefinedBehaviorSanitizer.
Change-Id: I79adf5c1516b0938f140bbf501c181bf14d7619b
Reviewed-on: https://code.wireshark.org/review/24515
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 8abddafe02..3fcc038f18 100644 --- a/configure.ac +++ b/configure.ac @@ -759,6 +759,20 @@ AC_ARG_ENABLE(asan, AC_SUBST(NO_SANITIZE_CFLAGS) AC_SUBST(NO_SANITIZE_LDFLAGS) +# Try to enable ThreadSanitizer. +# +AC_ARG_ENABLE(tsan, + AC_HELP_STRING( [--enable-tsan], + [Enable ThreadSanitizer (TSan) for debugging@<:@default=no@:>@]), +[ + # + # Available since Clang >= 3.2 and GCC >= 4.8 + # + AC_WIRESHARK_COMPILER_FLAGS_CHECK(-fsanitize=thread) + AC_WIRESHARK_LDFLAGS_CHECK(-fsanitize=thread) + +]) + # Try to enable UndefinedBehaviorSanitizer. # AC_ARG_ENABLE(ubsan, |