[PATCH] D53038: [Hexagon] Use GetLinkerPath method instead of hard-coded linker name.
Sid Manning via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 9 13:21:46 PDT 2018
sidneym created this revision.
sidneym added reviewers: shankare, ruiu, kparzysz, bcain.
Herald added a subscriber: cfe-commits.
Use GetLinkerPath method instead of hard-coding linker name.
Change should allow -fuse-ld to work on the Hexagon target.
Repository:
rC Clang
https://reviews.llvm.org/D53038
Files:
lib/Driver/ToolChains/Hexagon.cpp
lib/Driver/ToolChains/Hexagon.h
Index: lib/Driver/ToolChains/Hexagon.h
===================================================================
--- lib/Driver/ToolChains/Hexagon.h
+++ lib/Driver/ToolChains/Hexagon.h
@@ -81,6 +81,9 @@
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; }
Index: lib/Driver/ToolChains/Hexagon.cpp
===================================================================
--- lib/Driver/ToolChains/Hexagon.cpp
+++ lib/Driver/ToolChains/Hexagon.cpp
@@ -369,9 +369,8 @@
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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D53038.168861.patch
Type: text/x-patch
Size: 1275 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181009/72c8570e/attachment.bin>
More information about the llvm-commits
mailing list