From 76aa229a462b5700a3e05adf9a173982a1baeacc Mon Sep 17 00:00:00 2001 From: Derek Schuff Date: Mon, 8 Aug 2016 21:14:15 +0000 Subject: [PATCH] [Driver] Enable CFI for WebAssembly Since CFI support has landed in the WebAssembly backend, enable it in the frontend driver. Patch by Dominic Chen Differential Revision: https://reviews.llvm.org/D23244 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@278051 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Driver/ToolChain.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/Driver/ToolChain.cpp b/lib/Driver/ToolChain.cpp index 58afaed91a..863bd0a164 100644 --- a/lib/Driver/ToolChain.cpp +++ b/lib/Driver/ToolChain.cpp @@ -697,7 +697,9 @@ SanitizerMask ToolChain::getSupportedSanitizers() const { SanitizerMask Res = (Undefined & ~Vptr & ~Function) | (CFI & ~CFIICall) | CFICastStrict | UnsignedIntegerOverflow | LocalBounds; if (getTriple().getArch() == llvm::Triple::x86 || - getTriple().getArch() == llvm::Triple::x86_64) + getTriple().getArch() == llvm::Triple::x86_64 || + getTriple().getArch() == llvm::Triple::wasm32 || + getTriple().getArch() == llvm::Triple::wasm64) Res |= CFIICall; return Res; } -- 2.40.0