diff options
author | Tim Northover <tnorthover@apple.com> | 2014-01-16 08:48:16 +0000 |
---|---|---|
committer | Tim Northover <tnorthover@apple.com> | 2014-01-16 08:48:16 +0000 |
commit | 157d911b42788d402b04a9cd7cbf45b0fd4541fb (patch) | |
tree | 8802de96f362b14c72bdedc4f9f7da9de6f8db3a /clang/lib/Driver/Tools.h | |
parent | d1487261a0250aa2bca61d1eeb24ec00f801e659 (diff) | |
download | bcm5719-llvm-157d911b42788d402b04a9cd7cbf45b0fd4541fb.tar.gz bcm5719-llvm-157d911b42788d402b04a9cd7cbf45b0fd4541fb.zip |
MachO: use *-*-*-macho for MachO embedded targets.
Previously we had bodged together some hacks mapping MachO embedded
targets (i.e. mainly ARM v6M and v7M) to the "*-*-darwin-eabi" triple.
This is incorrect in both details (they don't run Darwin and they're
not EABI in any real sense).
This commit appropriates the existing "MachO" environment for the
purpose instead.
llvm-svn: 199367
Diffstat (limited to 'clang/lib/Driver/Tools.h')
-rw-r--r-- | clang/lib/Driver/Tools.h | 41 |
1 files changed, 21 insertions, 20 deletions
diff --git a/clang/lib/Driver/Tools.h b/clang/lib/Driver/Tools.h index 2ede62e019b..873969b4d78 100644 --- a/clang/lib/Driver/Tools.h +++ b/clang/lib/Driver/Tools.h @@ -25,7 +25,7 @@ namespace driver { class Driver; namespace toolchains { - class Darwin; + class MachO; } namespace tools { @@ -210,27 +210,28 @@ namespace arm { } namespace darwin { - llvm::Triple::ArchType getArchTypeForDarwinArchName(StringRef Str); + llvm::Triple::ArchType getArchTypeForMachOArchName(StringRef Str); + void setTripleTypeForMachOArchName(llvm::Triple &T, StringRef Str); - class LLVM_LIBRARY_VISIBILITY DarwinTool : public Tool { + class LLVM_LIBRARY_VISIBILITY MachOTool : public Tool { virtual void anchor(); protected: - void AddDarwinArch(const llvm::opt::ArgList &Args, + void AddMachOArch(const llvm::opt::ArgList &Args, llvm::opt::ArgStringList &CmdArgs) const; - const toolchains::Darwin &getDarwinToolChain() const { - return reinterpret_cast<const toolchains::Darwin&>(getToolChain()); + const toolchains::MachO &getMachOToolChain() const { + return reinterpret_cast<const toolchains::MachO&>(getToolChain()); } public: - DarwinTool(const char *Name, const char *ShortName, + MachOTool(const char *Name, const char *ShortName, const ToolChain &TC) : Tool(Name, ShortName, TC) {} }; - class LLVM_LIBRARY_VISIBILITY Assemble : public DarwinTool { + class LLVM_LIBRARY_VISIBILITY Assemble : public MachOTool { public: - Assemble(const ToolChain &TC) : DarwinTool("darwin::Assemble", - "assembler", TC) {} + Assemble(const ToolChain &TC) : MachOTool("darwin::Assemble", + "assembler", TC) {} virtual bool hasIntegratedCPP() const { return false; } @@ -241,14 +242,14 @@ namespace darwin { const char *LinkingOutput) const; }; - class LLVM_LIBRARY_VISIBILITY Link : public DarwinTool { + class LLVM_LIBRARY_VISIBILITY Link : public MachOTool { bool NeedsTempPath(const InputInfoList &Inputs) const; void AddLinkArgs(Compilation &C, const llvm::opt::ArgList &Args, llvm::opt::ArgStringList &CmdArgs, const InputInfoList &Inputs) const; public: - Link(const ToolChain &TC) : DarwinTool("darwin::Link", "linker", TC) {} + Link(const ToolChain &TC) : MachOTool("darwin::Link", "linker", TC) {} virtual bool hasIntegratedCPP() const { return false; } virtual bool isLinkJob() const { return true; } @@ -260,9 +261,9 @@ namespace darwin { const char *LinkingOutput) const; }; - class LLVM_LIBRARY_VISIBILITY Lipo : public DarwinTool { + class LLVM_LIBRARY_VISIBILITY Lipo : public MachOTool { public: - Lipo(const ToolChain &TC) : DarwinTool("darwin::Lipo", "lipo", TC) {} + Lipo(const ToolChain &TC) : MachOTool("darwin::Lipo", "lipo", TC) {} virtual bool hasIntegratedCPP() const { return false; } @@ -273,10 +274,10 @@ namespace darwin { const char *LinkingOutput) const; }; - class LLVM_LIBRARY_VISIBILITY Dsymutil : public DarwinTool { + class LLVM_LIBRARY_VISIBILITY Dsymutil : public MachOTool { public: - Dsymutil(const ToolChain &TC) : DarwinTool("darwin::Dsymutil", - "dsymutil", TC) {} + Dsymutil(const ToolChain &TC) : MachOTool("darwin::Dsymutil", + "dsymutil", TC) {} virtual bool hasIntegratedCPP() const { return false; } virtual bool isDsymutilJob() const { return true; } @@ -288,10 +289,10 @@ namespace darwin { const char *LinkingOutput) const; }; - class LLVM_LIBRARY_VISIBILITY VerifyDebug : public DarwinTool { + class LLVM_LIBRARY_VISIBILITY VerifyDebug : public MachOTool { public: - VerifyDebug(const ToolChain &TC) : DarwinTool("darwin::VerifyDebug", - "dwarfdump", TC) {} + VerifyDebug(const ToolChain &TC) : MachOTool("darwin::VerifyDebug", + "dwarfdump", TC) {} virtual bool hasIntegratedCPP() const { return false; } |