Skip to content

Commit

Permalink
SafeStack: Disable Darwin support
Browse files Browse the repository at this point in the history
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
  • Loading branch information
vlad902 committed Aug 14, 2018
1 parent 422f9aa commit d203e14
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions lib/Driver/ToolChains/Darwin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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()) {
Expand Down

0 comments on commit d203e14

Please sign in to comment.