aboutsummaryrefslogtreecommitdiff
path: root/lib/Driver/Tools.h
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2010-11-07 20:14:31 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2010-11-07 20:14:31 +0000
commitc1da981bba867681004004b2d54ec2fdf3c08913 (patch)
tree96c2983ab5ee80187516aba0690a52f6ef7bdde3 /lib/Driver/Tools.h
parentdfdfc584f2a8d9f1eebd6e6eaa9b1bbff519d8f9 (diff)
Use ld directly on linux. Changes from the previous try:
*) Try to detect as much as possible from the system itself, not the distro. This should make it easier to port to a new distro and more likely to work on a unknown one. *) The distro enum now doesn't include the arch. Just use the existing host detection support in LLVM. *) Correctly handle --sysroot. A small regression is that now clang will pass bitcode file to the linker. This is necessary for the gold plugin support to work. It might be better to detect this at configure/cmake time, but doing it in c++ first is a lot easier. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118382 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/Tools.h')
-rw-r--r--lib/Driver/Tools.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/Driver/Tools.h b/lib/Driver/Tools.h
index 63faf91654..edfb2df38e 100644
--- a/lib/Driver/Tools.h
+++ b/lib/Driver/Tools.h
@@ -348,6 +348,18 @@ namespace linuxtools {
const ArgList &TCArgs,
const char *LinkingOutput) const;
};
+ class LLVM_LIBRARY_VISIBILITY Link : public Tool {
+ public:
+ Link(const ToolChain &TC) : Tool("linux::Link", "linker", TC) {}
+
+ virtual bool hasIntegratedCPP() const { return false; }
+
+ virtual void ConstructJob(Compilation &C, const JobAction &JA,
+ const InputInfo &Output,
+ const InputInfoList &Inputs,
+ const ArgList &TCArgs,
+ const char *LinkingOutput) const;
+ };
}
/// minix -- Directly call GNU Binutils assembler and linker
namespace minix {