[AArch64] Enable thread sanitizer on clang
authorRenato Golin <renato.golin@linaro.org>
Wed, 5 Aug 2015 18:42:41 +0000 (18:42 +0000)
committerRenato Golin <renato.golin@linaro.org>
Wed, 5 Aug 2015 18:42:41 +0000 (18:42 +0000)
With this option, clang can use -fsanitize=thread on AArch64.

Patch by Adhemerval Zanella.

llvm-svn: 244091

clang/lib/Driver/ToolChains.cpp

index 8defd5b..1e27d0a 100644 (file)
@@ -3626,10 +3626,10 @@ SanitizerMask Linux::getSupportedSanitizers() const {
   Res |= SanitizerKind::Vptr;
   if (IsX86_64 || IsMIPS64 || IsAArch64)
     Res |= SanitizerKind::DataFlow;
-  if (IsX86_64 || IsMIPS64) {
+  if (IsX86_64 || IsMIPS64)
     Res |= SanitizerKind::Leak;
+  if (IsX86_64 || IsMIPS64 || IsAArch64)
     Res |= SanitizerKind::Thread;
-  }
   if (IsX86_64 || IsMIPS64 || IsPowerPC64)
     Res |= SanitizerKind::Memory;
   if (IsX86 || IsX86_64) {