summaryrefslogtreecommitdiff
path: root/lib/Driver/ToolChain.cpp
diff options
context:
space:
mode:
authorVlad Tsyrklevich <vlad@tsyrklevich.net>2018-04-03 22:33:53 +0000
committerVlad Tsyrklevich <vlad@tsyrklevich.net>2018-04-03 22:33:53 +0000
commit2da4adbc5fc5989126208a90b4acd0e3ae9afeff (patch)
tree8713fa2bb93368dc85b1698d3cfa6cc2f3739326 /lib/Driver/ToolChain.cpp
parentc35631a920b1a25fb3d77387430857d90e1ea657 (diff)
downloadclang-2da4adbc5fc5989126208a90b4acd0e3ae9afeff.tar.gz
Add the -fsanitize=shadow-call-stack flag
Summary: Add support for the -fsanitize=shadow-call-stack flag which causes clang to add ShadowCallStack attribute to functions compiled with that flag enabled. Reviewers: pcc, kcc Reviewed By: pcc, kcc Subscribers: cryptoad, cfe-commits, kcc Differential Revision: https://reviews.llvm.org/D44801 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@329122 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/ToolChain.cpp')
-rw-r--r--lib/Driver/ToolChain.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Driver/ToolChain.cpp b/lib/Driver/ToolChain.cpp
index 645f357530..23d6503d33 100644
--- a/lib/Driver/ToolChain.cpp
+++ b/lib/Driver/ToolChain.cpp
@@ -814,6 +814,8 @@ SanitizerMask ToolChain::getSupportedSanitizers() const {
getTriple().getArch() == llvm::Triple::wasm32 ||
getTriple().getArch() == llvm::Triple::wasm64)
Res |= CFIICall;
+ if (getTriple().getArch() == llvm::Triple::x86_64)
+ Res |= ShadowCallStack;
return Res;
}