[PATCH] D15953: Driver: Pass -flavor gnu to lld for AMDGPU rather than -flavor gnu-old

Tom Stellard via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 7 12:33:50 PST 2016


tstellarAMD updated this revision to Diff 44249.
tstellarAMD added a comment.

Use ld.lld alias instead of '-flavor gnu'


http://reviews.llvm.org/D15953

Files:
  lib/Driver/Tools.cpp
  lib/Driver/Tools.h
  test/Driver/amdgpu-toolchain.c

Index: test/Driver/amdgpu-toolchain.c
===================================================================
--- test/Driver/amdgpu-toolchain.c
+++ 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{{.*}}
Index: lib/Driver/Tools.h
===================================================================
--- lib/Driver/Tools.h
+++ lib/Driver/Tools.h
@@ -240,7 +240,7 @@
 
 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,
Index: lib/Driver/Tools.cpp
===================================================================
--- lib/Driver/Tools.cpp
+++ lib/Driver/Tools.cpp
@@ -6520,10 +6520,6 @@
 
   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());


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D15953.44249.patch
Type: text/x-patch
Size: 1558 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160107/b720f2bb/attachment.bin>


More information about the cfe-commits mailing list