Skip to content

Commit 9416602

Browse files
Enable memtag sanitizer in all AArch64 toolchains
That sanitizer does not have runtime library or other dependencies. Differential Revision: https://reviews.llvm.org/D65642 llvm-svn: 368697
1 parent 5b25674 commit 9416602

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

clang/lib/Driver/ToolChain.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -923,6 +923,9 @@ SanitizerMask ToolChain::getSupportedSanitizers() const {
923923
if (getTriple().getArch() == llvm::Triple::x86_64 ||
924924
getTriple().getArch() == llvm::Triple::aarch64)
925925
Res |= SanitizerKind::ShadowCallStack;
926+
if (getTriple().getArch() == llvm::Triple::aarch64 ||
927+
getTriple().getArch() == llvm::Triple::aarch64_be)
928+
Res |= SanitizerKind::MemTag;
926929
return Res;
927930
}
928931

clang/lib/Driver/ToolChains/Linux.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1029,8 +1029,6 @@ SanitizerMask Linux::getSupportedSanitizers() const {
10291029
Res |= SanitizerKind::HWAddress;
10301030
Res |= SanitizerKind::KernelHWAddress;
10311031
}
1032-
if (IsAArch64)
1033-
Res |= SanitizerKind::MemTag;
10341032
return Res;
10351033
}
10361034

0 commit comments

Comments
 (0)