diff options
author | Joerg Sonnenberger <joerg@bec.de> | 2011-05-16 13:35:02 +0000 |
---|---|---|
committer | Joerg Sonnenberger <joerg@bec.de> | 2011-05-16 13:35:02 +0000 |
commit | 182564cd14a2105fff05fd52f5940eff96161d57 (patch) | |
tree | 71b8a2e4273b1ffae01c59b020b5fd0fd3fd84cf /lib/Driver/Tools.h | |
parent | 07622fdd2e8e10427f668712ccce8dd768006640 (diff) |
Make the triple an explicit argument of FindTargetProgramPath.
Preserve the original triple in the NetBSD toolchain when using -m32 or
-m64 and the resulting effective target is different from the triple it
started with. This allows -m32 to use the same assembler/linking in
cross-compiling mode and avoids confusion about passing down target
specific flags in that case like --32.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131404 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/Tools.h')
-rw-r--r-- | lib/Driver/Tools.h | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/lib/Driver/Tools.h b/lib/Driver/Tools.h index 93abf75722..4a5a7e4745 100644 --- a/lib/Driver/Tools.h +++ b/lib/Driver/Tools.h @@ -14,6 +14,7 @@ #include "clang/Driver/Types.h" #include "clang/Driver/Util.h" +#include "llvm/ADT/Triple.h" #include "llvm/Support/Compiler.h" namespace clang { @@ -338,9 +339,12 @@ namespace freebsd { /// netbsd -- Directly call GNU Binutils assembler and linker namespace netbsd { class LLVM_LIBRARY_VISIBILITY Assemble : public Tool { + private: + const llvm::Triple ToolTriple; + public: - Assemble(const ToolChain &TC) : Tool("netbsd::Assemble", "assembler", - TC) {} + Assemble(const ToolChain &TC, const llvm::Triple &ToolTriple) + : Tool("netbsd::Assemble", "assembler", TC), ToolTriple(ToolTriple) {} virtual bool hasIntegratedCPP() const { return false; } @@ -351,8 +355,12 @@ namespace netbsd { const char *LinkingOutput) const; }; class LLVM_LIBRARY_VISIBILITY Link : public Tool { + private: + const llvm::Triple ToolTriple; + public: - Link(const ToolChain &TC) : Tool("netbsd::Link", "linker", TC) {} + Link(const ToolChain &TC, const llvm::Triple &ToolTriple) + : Tool("netbsd::Ling", "linker", TC), ToolTriple(ToolTriple) {} virtual bool hasIntegratedCPP() const { return false; } |