[PATCH] D30238: [Driver] Enable SafeStack for Fuchsia targets

Roland McGrath via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 21 18:25:10 PST 2017


mcgrathr created this revision.

The runtime support is provided directly by the Fuchsia system C library.


Repository:
  rL LLVM

https://reviews.llvm.org/D30238

Files:
  lib/Driver/ToolChains.cpp
  lib/Driver/ToolChains.h


Index: lib/Driver/ToolChains.h
===================================================================
--- lib/Driver/ToolChains.h
+++ lib/Driver/ToolChains.h
@@ -1095,6 +1095,8 @@
     return llvm::DebuggerKind::GDB;
   }
 
+  SanitizerMask getSupportedSanitizers() const override;
+
   RuntimeLibType
   GetRuntimeLibType(const llvm::opt::ArgList &Args) const override;
   CXXStdlibType
Index: lib/Driver/ToolChains.cpp
===================================================================
--- lib/Driver/ToolChains.cpp
+++ lib/Driver/ToolChains.cpp
@@ -4860,6 +4860,12 @@
   CmdArgs.push_back("-lunwind");
 }
 
+SanitizerMask Fuchsia::getSupportedSanitizers() const {
+  SanitizerMask Res = ToolChain::getSupportedSanitizers();
+  Res |= SanitizerKind::SafeStack;
+  return Res;
+}
+
 /// DragonFly - DragonFly tool chain which can call as(1) and ld(1) directly.
 
 DragonFly::DragonFly(const Driver &D, const llvm::Triple &Triple,


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D30238.89314.patch
Type: text/x-patch
Size: 929 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170222/eea730b2/attachment.bin>


More information about the cfe-commits mailing list