From f9faef8fd4d18005bc4eade77e012bf7f4e001ff Mon Sep 17 00:00:00 2001 From: Kamil Rytarowski Date: Mon, 7 Aug 2017 10:57:03 +0000 Subject: [PATCH] Enable LLVM asan support for NetBSD/i386 Summary: Verified to work and useful to run check-asan, as this target tests 32-bit and 64-bit execution. Sponsored by Reviewers: joerg, filcab, dim, vitalybuka Reviewed By: vitalybuka Subscribers: #sanitizers, cfe-commits Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D36378 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@310245 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Driver/ToolChains/NetBSD.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/Driver/ToolChains/NetBSD.cpp b/lib/Driver/ToolChains/NetBSD.cpp index acc56278f3..e8db333a4c 100644 --- a/lib/Driver/ToolChains/NetBSD.cpp +++ b/lib/Driver/ToolChains/NetBSD.cpp @@ -417,9 +417,10 @@ void NetBSD::addLibStdCxxIncludePaths(const llvm::opt::ArgList &DriverArgs, } SanitizerMask NetBSD::getSupportedSanitizers() const { + const bool IsX86 = getTriple().getArch() == llvm::Triple::x86; const bool IsX86_64 = getTriple().getArch() == llvm::Triple::x86_64; SanitizerMask Res = ToolChain::getSupportedSanitizers(); - if (IsX86_64) { + if (IsX86 || IsX86_64) { Res |= SanitizerKind::Address; } return Res; -- 2.50.1