From c5dfb607f5bbe40ed398691515b2d79551ac6058 Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Wed, 3 Nov 2010 04:37:51 +0000 Subject: 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 --- clang/lib/Driver/ToolChains.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'clang/lib/Driver/ToolChains.h') diff --git a/clang/lib/Driver/ToolChains.h b/clang/lib/Driver/ToolChains.h index b98f1769c67..04288a2ee06 100644 --- a/clang/lib/Driver/ToolChains.h +++ b/clang/lib/Driver/ToolChains.h @@ -317,7 +317,12 @@ class LLVM_LIBRARY_VISIBILITY Linux : public Generic_ELF { public: Linux(const HostInfo &Host, const llvm::Triple& Triple); + virtual bool HasNativeLLVMSupport() const; + virtual Tool &SelectTool(const Compilation &C, const JobAction &JA) const; + + std::string Linker; + std::vector ExtraOpts; }; -- cgit v1.2.3