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
diff --git a/clang/lib/Driver/ToolChains.h b/clang/lib/Driver/ToolChains.h
index 7a1a050..ace9b84 100644
--- a/clang/lib/Driver/ToolChains.h
+++ b/clang/lib/Driver/ToolChains.h
@@ -308,8 +308,11 @@
};
class LLVM_LIBRARY_VISIBILITY NetBSD : public Generic_ELF {
+ const llvm::Triple ToolTriple;
+
public:
- NetBSD(const HostInfo &Host, const llvm::Triple& Triple);
+ NetBSD(const HostInfo &Host, const llvm::Triple& Triple,
+ const llvm::Triple& ToolTriple);
virtual Tool &SelectTool(const Compilation &C, const JobAction &JA,
const ActionList &Inputs) const;