diff options
author | Saleem Abdulrasool <compnerd@compnerd.org> | 2014-06-29 06:11:14 +0000 |
---|---|---|
committer | Saleem Abdulrasool <compnerd@compnerd.org> | 2014-06-29 06:11:14 +0000 |
commit | a4a474b859c8560d9f451a951acb6a477d2d08b6 (patch) | |
tree | 560a9e3ad9905dfcdc23a7329d0f005cbe017acc /clang/lib/Driver/Tools.h | |
parent | 7206a52522bbf7a3d8ddee9d19f9562ef06434a9 (diff) | |
download | bcm5719-llvm-a4a474b859c8560d9f451a951acb6a477d2d08b6.tar.gz bcm5719-llvm-a4a474b859c8560d9f451a951acb6a477d2d08b6.zip |
Driver: add a cygwin linker tool
This adds a linker tool for the Windows cygwin environment. This linker
invocation is significantly different from the generic ld invocation. It
requires additional parameters as well as does not accept some normal
parameters. This should fix self-hosting on Cygwin.
llvm-svn: 211995
Diffstat (limited to 'clang/lib/Driver/Tools.h')
-rw-r--r-- | clang/lib/Driver/Tools.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/clang/lib/Driver/Tools.h b/clang/lib/Driver/Tools.h index c4e6d6c8298..708715e4fd1 100644 --- a/clang/lib/Driver/Tools.h +++ b/clang/lib/Driver/Tools.h @@ -457,6 +457,24 @@ namespace gnutools { const char *LinkingOutput) const override; }; } + +namespace cygwin { +class LLVM_LIBRARY_VISIBILITY Link : public Tool { +public: + Link(const ToolChain &TC) : Tool("cygwin::Link", "linker", TC) {} + + bool hasIntegratedCPP() const override { return false; } + bool isLinkJob() const override { return true; } + + void ConstructJob(Compilation &C, const JobAction &JA, + const InputInfo &Output, const InputInfoList &Inputs, + const llvm::opt::ArgList &Args, + const char *LinkingOutput) const override; +private: + void AddLibGCC(const llvm::opt::ArgList &Args, ArgStringList &CmdArgs) const; +}; +} + /// minix -- Directly call GNU Binutils assembler and linker namespace minix { class LLVM_LIBRARY_VISIBILITY Assemble : public Tool { |