diff options
author | Derek Schuff <dschuff@google.com> | 2016-08-08 21:14:15 +0000 |
---|---|---|
committer | Derek Schuff <dschuff@google.com> | 2016-08-08 21:14:15 +0000 |
commit | ef313059e528f0bdb7e42104671eaca48e3b68c9 (patch) | |
tree | 8db18d04003c824ee1596c8a4a93bb3ada76446a /clang | |
parent | 3e43970d71fdcea0120f198ee60cadab667dba09 (diff) | |
download | bcm5719-llvm-ef313059e528f0bdb7e42104671eaca48e3b68c9.tar.gz bcm5719-llvm-ef313059e528f0bdb7e42104671eaca48e3b68c9.zip |
[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
llvm-svn: 278051
Diffstat (limited to 'clang')
-rw-r--r-- | clang/lib/Driver/ToolChain.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/lib/Driver/ToolChain.cpp b/clang/lib/Driver/ToolChain.cpp index 58afaed91a9..863bd0a164b 100644 --- a/clang/lib/Driver/ToolChain.cpp +++ b/clang/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; } |