On Wed, Jul 12, 2017 at 01:04:49PM -0700, Adam Buchbinder wrote: > Tested with clang-3.9. > > Signed-off-by: Adam Buchbinder <abuchbinder@xxxxxxxxxx> > --- > Makefile | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/Makefile b/Makefile > index 81598df..8948301 100644 > --- a/Makefile > +++ b/Makefile > @@ -17,6 +17,7 @@ > # abort - call abort() on first error (dumps core) > # all - shortcut for all of the above > # asan - enable address sanitizer compiler feature > +# tsan - enable thread sanitizer compiler feature > # ubsan - undefined behaviour sanitizer compiler feature > # bcheck - extended build checks > # W=123 build with warnings (default: off) > @@ -157,6 +158,11 @@ ifneq (,$(findstring asan,$(D))) > DEBUG_CFLAGS_INTERNAL += -fsanitize=address > endif > > +ifneq (,$(findstring tsan,$(D))) > + DEBUG_CFLAGS_INTERNAL += -fsanitize=thread -fPIE > + LD_FLAGS += -fsanitize=thread -ltsan -pie Why do you need to set PIE here? Is is necessary for tsan? > +endif > + > ifneq (,$(findstring ubsan,$(D))) > DEBUG_CFLAGS_INTERNAL += -fsanitize=undefined > endif > -- > 2.13.2.932.g7449e964c-goog > > -- > To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in > the body of a message to majordomo@xxxxxxxxxxxxxxx > More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html
