]> granicus.if.org Git - clang/commitdiff
Enable memtag sanitizer in all AArch64 toolchains
authorMomchil Velikov <momchil.velikov@arm.com>
Tue, 13 Aug 2019 14:20:23 +0000 (14:20 +0000)
committerMomchil Velikov <momchil.velikov@arm.com>
Tue, 13 Aug 2019 14:20:23 +0000 (14:20 +0000)
That sanitizer does not have runtime library or other dependencies.

Differential Revision: https://reviews.llvm.org/D65642

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@368697 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Driver/ToolChain.cpp
lib/Driver/ToolChains/Linux.cpp

index d0513a75caee8fcda5cd3a661314f0fabb7e33cc..4379da99d07bd1db5fe3c674a622250f9f770026 100644 (file)
@@ -923,6 +923,9 @@ SanitizerMask ToolChain::getSupportedSanitizers() const {
   if (getTriple().getArch() == llvm::Triple::x86_64 ||
       getTriple().getArch() == llvm::Triple::aarch64)
     Res |= SanitizerKind::ShadowCallStack;
+  if (getTriple().getArch() == llvm::Triple::aarch64 ||
+      getTriple().getArch() == llvm::Triple::aarch64_be)
+    Res |= SanitizerKind::MemTag;
   return Res;
 }
 
index 7f59bc77f526b9265e01a4bfb09c850332ba553c..087783875ffe27de7b485454ec594ab040709380 100644 (file)
@@ -1029,8 +1029,6 @@ SanitizerMask Linux::getSupportedSanitizers() const {
     Res |= SanitizerKind::HWAddress;
     Res |= SanitizerKind::KernelHWAddress;
   }
-  if (IsAArch64)
-    Res |= SanitizerKind::MemTag;
   return Res;
 }