[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

llvm-svn: 344147
This commit is contained in:
Sid Manning 2018-10-10 15:37:03 +00:00
parent e6e817534a
commit a6a201916a
2 changed files with 5 additions and 3 deletions

View File

@ -369,9 +369,8 @@ void hexagon::Linker::ConstructJob(Compilation &C, const JobAction &JA,
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.

View File

@ -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; }