r344147 - [Hexagon] Use GetLinkerPath instead of hard-coded string.
Sid Manning via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 10 08:37:03 PDT 2018
Author: sidneym
Date: Wed Oct 10 08:37:03 2018
New Revision: 344147
URL: http://llvm.org/viewvc/llvm-project?rev=344147&view=rev
Log:
[Hexagon] Use GetLinkerPath instead of hard-coded string.
Add GetLinkerPath and set the default to "hexagon-link".
Use GetLinkerPath instead of the hard-coded string.
This change will allow -fuse-ld to function correctly.
Differential revision: https://reviews.llvm.org/D53038
Modified:
cfe/trunk/lib/Driver/ToolChains/Hexagon.cpp
cfe/trunk/lib/Driver/ToolChains/Hexagon.h
Modified: cfe/trunk/lib/Driver/ToolChains/Hexagon.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains/Hexagon.cpp?rev=344147&r1=344146&r2=344147&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/ToolChains/Hexagon.cpp (original)
+++ cfe/trunk/lib/Driver/ToolChains/Hexagon.cpp Wed Oct 10 08:37:03 2018
@@ -369,9 +369,8 @@ void hexagon::Linker::ConstructJob(Compi
constructHexagonLinkArgs(C, JA, HTC, Output, Inputs, Args, CmdArgs,
LinkingOutput);
- std::string Linker = HTC.GetProgramPath("hexagon-link");
- C.addCommand(llvm::make_unique<Command>(JA, *this, Args.MakeArgString(Linker),
- CmdArgs, Inputs));
+ const char *Exec = Args.MakeArgString(HTC.GetLinkerPath());
+ C.addCommand(llvm::make_unique<Command>(JA, *this, Exec, CmdArgs, Inputs));
}
// Hexagon tools end.
Modified: cfe/trunk/lib/Driver/ToolChains/Hexagon.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains/Hexagon.h?rev=344147&r1=344146&r2=344147&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/ToolChains/Hexagon.h (original)
+++ cfe/trunk/lib/Driver/ToolChains/Hexagon.h Wed Oct 10 08:37:03 2018
@@ -81,6 +81,9 @@ public:
void addLibStdCxxIncludePaths(
const llvm::opt::ArgList &DriverArgs,
llvm::opt::ArgStringList &CC1Args) const override;
+
+ const char *getDefaultLinker() const override { return "hexagon-link"; }
+
CXXStdlibType GetCXXStdlibType(const llvm::opt::ArgList &Args) const override;
StringRef GetGCCLibAndIncVersion() const { return GCCLibAndIncVersion.Text; }
More information about the cfe-commits
mailing list