r365396 - [Sanitizers] Don't use clang_rt.sancov_{begin, end} on Solaris
Rainer Orth via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 8 15:04:25 PDT 2019
Author: ro
Date: Mon Jul 8 15:04:25 2019
New Revision: 365396
URL: http://llvm.org/viewvc/llvm-project?rev=365396&view=rev
Log:
[Sanitizers] Don't use clang_rt.sancov_{begin,end} on Solaris
As explained in https://reviews.llvm.org/D63601, there's no point using clang_rt.sancov_{begin,end}
on Solaris any longer.
This companion patch to the above removes their use from the driver.
Tested on amd64-pc-solaris2.11
Differential Revision: https://reviews.llvm.org/D63602
Modified:
cfe/trunk/lib/Driver/ToolChains/Solaris.cpp
Modified: cfe/trunk/lib/Driver/ToolChains/Solaris.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains/Solaris.cpp?rev=365396&r1=365395&r2=365396&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/ToolChains/Solaris.cpp (original)
+++ cfe/trunk/lib/Driver/ToolChains/Solaris.cpp Mon Jul 8 15:04:25 2019
@@ -96,13 +96,6 @@ void solaris::Linker::ConstructJob(Compi
Args.MakeArgString(getToolChain().GetFilePath("crtbegin.o")));
}
- // Provide __start___sancov_guards. Solaris ld doesn't automatically create
- // __start_SECNAME labels.
- CmdArgs.push_back("--whole-archive");
- CmdArgs.push_back(
- getToolChain().getCompilerRTArgString(Args, "sancov_begin"));
- CmdArgs.push_back("--no-whole-archive");
-
getToolChain().AddFilePathLibArgs(Args, CmdArgs);
Args.AddAllArgs(CmdArgs, {options::OPT_L, options::OPT_T_Group,
@@ -131,13 +124,6 @@ void solaris::Linker::ConstructJob(Compi
linkSanitizerRuntimeDeps(getToolChain(), CmdArgs);
}
- // Provide __stop___sancov_guards. Solaris ld doesn't automatically create
- // __stop_SECNAME labels.
- CmdArgs.push_back("--whole-archive");
- CmdArgs.push_back(
- getToolChain().getCompilerRTArgString(Args, "sancov_end"));
- CmdArgs.push_back("--no-whole-archive");
-
if (!Args.hasArg(options::OPT_nostdlib, options::OPT_nostartfiles)) {
CmdArgs.push_back(
Args.MakeArgString(getToolChain().GetFilePath("crtend.o")));
More information about the cfe-commits
mailing list