From: Derek Schuff Date: Mon, 8 Aug 2016 21:14:15 +0000 (+0000) Subject: [Driver] Enable CFI for WebAssembly X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=76aa229a462b5700a3e05adf9a173982a1baeacc;p=clang [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 --- 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; }