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 | 637603a7ccced82eb4166a421ce502b245586eb8 (patch) | |
| tree | c2a34e99a4b11552420e45140e6b20be38d7b8e9 /clang/lib/Driver/Tools.h | |
| parent | 5ec1941e5893ba5bf451e98e394ef6a47d37e50b (diff) | |
| download | bcm5719-llvm-637603a7ccced82eb4166a421ce502b245586eb8.tar.gz bcm5719-llvm-637603a7ccced82eb4166a421ce502b245586eb8.zip | |
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.
llvm-svn: 131404
Diffstat (limited to 'clang/lib/Driver/Tools.h')
| -rw-r--r-- | clang/lib/Driver/Tools.h | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/clang/lib/Driver/Tools.h b/clang/lib/Driver/Tools.h index 93abf75722e..4a5a7e47452 100644 --- a/clang/lib/Driver/Tools.h +++ b/clang/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; } |

