From d9f9d6531f3c8c8ce22b63989cdeaeb220f0f36a Mon Sep 17 00:00:00 2001 From: Thomas Lively Date: Thu, 6 Jun 2019 01:38:12 +0000 Subject: [PATCH] [WebAssembly] Support Leak Sanitizer on Emscripten Summary: LSan is currently being ported to Emscripten and mostly works. Enabling the support in upstream would simplify testing. Patch by Guanzhong Chen. Reviewers: tlively, aheejin Reviewed By: aheejin Subscribers: dschuff, sbc100, jgravelle-google, sunfish, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D62830 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@362667 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Driver/ToolChains/WebAssembly.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Driver/ToolChains/WebAssembly.cpp b/lib/Driver/ToolChains/WebAssembly.cpp index 7fffbbe6bf..9f63d2e374 100644 --- a/lib/Driver/ToolChains/WebAssembly.cpp +++ b/lib/Driver/ToolChains/WebAssembly.cpp @@ -211,7 +211,7 @@ void WebAssembly::AddCXXStdlibLibArgs(const llvm::opt::ArgList &Args, SanitizerMask WebAssembly::getSupportedSanitizers() const { SanitizerMask Res = ToolChain::getSupportedSanitizers(); if (getTriple().isOSEmscripten()) { - Res |= SanitizerKind::Vptr; + Res |= SanitizerKind::Vptr | SanitizerKind::Leak; } return Res; } -- 2.40.0