From d203e14677d0ca95bf0f0009fe91794e2c8261aa Mon Sep 17 00:00:00 2001 From: Vlad Tsyrklevich Date: Tue, 14 Aug 2018 19:50:41 +0000 Subject: [PATCH] SafeStack: Disable Darwin support Summary: Darwin support does not appear to be used as evidenced by the fact that the runtime has never supported non-trivial programs. Reviewers: pcc, kubamracek Reviewed By: pcc Subscribers: cfe-commits, kcc Differential Revision: https://reviews.llvm.org/D50724 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@339720 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Driver/ToolChains/Darwin.cpp | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/lib/Driver/ToolChains/Darwin.cpp b/lib/Driver/ToolChains/Darwin.cpp index dc540688d2..4306de154a 100644 --- a/lib/Driver/ToolChains/Darwin.cpp +++ b/lib/Driver/ToolChains/Darwin.cpp @@ -509,15 +509,6 @@ void darwin::Linker::ConstructJob(Compilation &C, const JobAction &JA, if (!Args.hasArg(options::OPT_nostdlib, options::OPT_nostartfiles)) getMachOToolChain().addStartObjectFileArgs(Args, CmdArgs); - // SafeStack requires its own runtime libraries - // These libraries should be linked first, to make sure the - // __safestack_init constructor executes before everything else - if (getToolChain().getSanitizerArgs().needsSafeStackRt()) { - getMachOToolChain().AddLinkRuntimeLib(Args, CmdArgs, - "libclang_rt.safestack_osx.a", - toolchains::Darwin::RLO_AlwaysLink); - } - Args.AddAllArgs(CmdArgs, options::OPT_L); AddLinkerInputs(getToolChain(), Inputs, Args, CmdArgs, JA); @@ -2297,7 +2288,6 @@ SanitizerMask Darwin::getSupportedSanitizers() const { if (isTargetMacOS()) { if (!isMacosxVersionLT(10, 9)) Res |= SanitizerKind::Vptr; - Res |= SanitizerKind::SafeStack; if (IsX86_64) Res |= SanitizerKind::Thread; } else if (isTargetIOSSimulator() || isTargetTvOSSimulator()) { -- 2.40.0