summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorTom Stellard <thomas.stellard@amd.com>2016-05-05 17:03:41 +0000
committerTom Stellard <thomas.stellard@amd.com>2016-05-05 17:03:41 +0000
commitf6699f504757c738958d51a5e53513be7035ee9d (patch)
tree413bd7809875e92e273e524f43cecbc878658466 /clang/lib
parentfcfaea4cffe5e5ea0b71f85acf21a00017542ec8 (diff)
downloadbcm5719-llvm-f6699f504757c738958d51a5e53513be7035ee9d.tar.gz
bcm5719-llvm-f6699f504757c738958d51a5e53513be7035ee9d.zip
AMDGPU: Use lld as the linker again
Summary: Now that LLVM is emitting version 2 of the AMD code object, we can start using lld again for linking instead of our custom tool. Reviewers: arsenm, kzhuravl Subscribers: rafael, cfe-commits Differential Revision: http://reviews.llvm.org/D19952 llvm-svn: 268648
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/Driver/Tools.cpp2
-rw-r--r--clang/lib/Driver/Tools.h2
2 files changed, 3 insertions, 1 deletions
diff --git a/clang/lib/Driver/Tools.cpp b/clang/lib/Driver/Tools.cpp
index c688763e69d..3b639bc975a 100644
--- a/clang/lib/Driver/Tools.cpp
+++ b/clang/lib/Driver/Tools.cpp
@@ -6786,6 +6786,8 @@ void amdgpu::Linker::ConstructJob(Compilation &C, const JobAction &JA,
std::string Linker = getToolChain().GetProgramPath(getShortName());
ArgStringList CmdArgs;
AddLinkerInputs(getToolChain(), Inputs, Args, CmdArgs);
+ CmdArgs.push_back("-shared");
+ CmdArgs.push_back("-o");
CmdArgs.push_back(Output.getFilename());
C.addCommand(llvm::make_unique<Command>(JA, *this, Args.MakeArgString(Linker),
CmdArgs, Inputs));
diff --git a/clang/lib/Driver/Tools.h b/clang/lib/Driver/Tools.h
index d25d91d87f3..c9d5c2238d6 100644
--- a/clang/lib/Driver/Tools.h
+++ b/clang/lib/Driver/Tools.h
@@ -242,7 +242,7 @@ namespace amdgpu {
class LLVM_LIBRARY_VISIBILITY Linker : public GnuTool {
public:
- Linker(const ToolChain &TC) : GnuTool("amdgpu::Linker", "amdphdrs", 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,
OpenPOWER on IntegriCloud