Skip to content

Commit

Permalink
[Driver] Enable CFI for WebAssembly
Browse files Browse the repository at this point in the history
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

llvm-svn: 278051
  • Loading branch information
dschuff committed Aug 8, 2016
1 parent 3e43970 commit ef31305
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion clang/lib/Driver/ToolChain.cpp
Expand Up @@ -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;
}
Expand Down

0 comments on commit ef31305

Please sign in to comment.