diff options
| author | Rafael Espindola <rafael.espindola@gmail.com> | 2010-11-03 04:37:51 +0000 |
|---|---|---|
| committer | Rafael Espindola <rafael.espindola@gmail.com> | 2010-11-03 04:37:51 +0000 |
| commit | c5dfb607f5bbe40ed398691515b2d79551ac6058 (patch) | |
| tree | 2f134e869545e6e4249f7bedff5efae6c21f7d8f /clang/lib/Driver/Tools.h | |
| parent | c63d846ad66a8be9b50be4ea038cd776076d67a0 (diff) | |
| download | bcm5719-llvm-c5dfb607f5bbe40ed398691515b2d79551ac6058.tar.gz bcm5719-llvm-c5dfb607f5bbe40ed398691515b2d79551ac6058.zip | |
Switch clang to run ld directly on linux. I tested this on all the linux
distros listed by running
gcc main.o -o main
g++ main.o -o main
gcc main.o -o main -static
g++ main.o -o main -static
gcc f.o -o f.so -shared
g++ f.o -o f.so -shared
and comparing the ld line with the one created by clang. I also added
-m32/m64 in distros that support it.
While I tested many distros, there will always be more. If you are hit by this
it should be somewhat easy to add your distro. If you are in a hurry, do
revert this, but please inform how to detect you distro and the ld command
lines produced by the above gcc invocations. Most distros have some patches
on gcc :-(
llvm-svn: 118149
Diffstat (limited to 'clang/lib/Driver/Tools.h')
| -rw-r--r-- | clang/lib/Driver/Tools.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/clang/lib/Driver/Tools.h b/clang/lib/Driver/Tools.h index 63faf916549..edfb2df38e1 100644 --- a/clang/lib/Driver/Tools.h +++ b/clang/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 { |

