Skip to content

Commit

Permalink
Driver: Use the new ELF lld linker for AMDGPU
Browse files Browse the repository at this point in the history
Summary: 'gnu-old' has been deprecated in favor or 'gnu'.

Reviewers: arsenm, ruiu, rafael

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D15953

llvm-svn: 257175
  • Loading branch information
tstellarAMD committed Jan 8, 2016
1 parent 4504c1b commit 0e04f6c
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 6 deletions.
4 changes: 0 additions & 4 deletions clang/lib/Driver/Tools.cpp
Expand Up @@ -6520,10 +6520,6 @@ void amdgpu::Linker::ConstructJob(Compilation &C, const JobAction &JA,

std::string Linker = getToolChain().GetProgramPath(getShortName());
ArgStringList CmdArgs;
CmdArgs.push_back("-flavor");
CmdArgs.push_back("old-gnu");
CmdArgs.push_back("-target");
CmdArgs.push_back(Args.MakeArgString(getToolChain().getTripleString()));
AddLinkerInputs(getToolChain(), Inputs, Args, CmdArgs);
CmdArgs.push_back("-o");
CmdArgs.push_back(Output.getFilename());
Expand Down
2 changes: 1 addition & 1 deletion clang/lib/Driver/Tools.h
Expand Up @@ -240,7 +240,7 @@ namespace amdgpu {

class LLVM_LIBRARY_VISIBILITY Linker : public GnuTool {
public:
Linker(const ToolChain &TC) : GnuTool("amdgpu::Linker", "lld", TC) {}
Linker(const ToolChain &TC) : GnuTool("amdgpu::Linker", "ld.lld", TC) {}
bool isLinkJob() const override { return true; }
bool hasIntegratedCPP() const override { return false; }
void ConstructJob(Compilation &C, const JobAction &JA,
Expand Down
2 changes: 1 addition & 1 deletion clang/test/Driver/amdgpu-toolchain.c
@@ -1,3 +1,3 @@
// RUN: %clang -### -target amdgcn--amdhsa -x assembler -mcpu=kaveri %s 2>&1 | FileCheck -check-prefix=AS_LINK %s
// AS_LINK: clang{{.*}} "-cc1as"
// AS_LINK: lld{{.*}} "-flavor" "old-gnu" "-target" "amdgcn--amdhsa"
// AS_LINK: ld.lld{{.*}}

0 comments on commit 0e04f6c

Please sign in to comment.