diff options
Diffstat (limited to 'contrib/llvm/tools/clang/lib/Driver/ToolChains.h')
-rw-r--r-- | contrib/llvm/tools/clang/lib/Driver/ToolChains.h | 52 |
1 files changed, 48 insertions, 4 deletions
diff --git a/contrib/llvm/tools/clang/lib/Driver/ToolChains.h b/contrib/llvm/tools/clang/lib/Driver/ToolChains.h index d1f1556..0e3645c 100644 --- a/contrib/llvm/tools/clang/lib/Driver/ToolChains.h +++ b/contrib/llvm/tools/clang/lib/Driver/ToolChains.h @@ -155,6 +155,8 @@ public: virtual types::ID LookupTypeForExtension(const char *Ext) const; + virtual bool HasNativeLLVMSupport() const; + virtual DerivedArgList *TranslateArgs(const DerivedArgList &Args, const char *BoundArch) const; @@ -174,6 +176,18 @@ public: getTriple().getArch() == llvm::Triple::x86_64); #endif } + virtual bool IsStrictAliasingDefault() const { +#ifdef DISABLE_DEFAULT_STRICT_ALIASING + return false; +#else + return ToolChain::IsStrictAliasingDefault(); +#endif + } + + virtual bool IsObjCDefaultSynthPropertiesDefault() const { + return false; + } + virtual bool IsObjCNonFragileABIDefault() const { // Non-fragile ABI is default for everything but i386. return getTriple().getArch() != llvm::Triple::x86; @@ -221,6 +235,12 @@ public: virtual void AddLinkRuntimeLibArgs(const ArgList &Args, ArgStringList &CmdArgs) const; + virtual void AddCXXStdlibLibArgs(const ArgList &Args, + ArgStringList &CmdArgs) const; + + virtual void AddCCKextLibArgs(const ArgList &Args, + ArgStringList &CmdArgs) const; + /// } }; @@ -258,6 +278,18 @@ public: virtual const char *GetDefaultRelocationModel() const { return "pic"; } }; +class LLVM_LIBRARY_VISIBILITY Generic_ELF : public Generic_GCC { + public: + Generic_ELF(const HostInfo &Host, const llvm::Triple& Triple) + : Generic_GCC(Host, Triple) {} + + virtual bool IsIntegratedAssemblerDefault() const { + // Default integrated assembler to on for x86. + return (getTriple().getArch() == llvm::Triple::x86 || + getTriple().getArch() == llvm::Triple::x86_64); + } +}; + class LLVM_LIBRARY_VISIBILITY AuroraUX : public Generic_GCC { public: AuroraUX(const HostInfo &Host, const llvm::Triple& Triple); @@ -265,20 +297,27 @@ public: virtual Tool &SelectTool(const Compilation &C, const JobAction &JA) const; }; -class LLVM_LIBRARY_VISIBILITY OpenBSD : public Generic_GCC { +class LLVM_LIBRARY_VISIBILITY OpenBSD : public Generic_ELF { public: OpenBSD(const HostInfo &Host, const llvm::Triple& Triple); virtual Tool &SelectTool(const Compilation &C, const JobAction &JA) const; }; -class LLVM_LIBRARY_VISIBILITY FreeBSD : public Generic_GCC { +class LLVM_LIBRARY_VISIBILITY FreeBSD : public Generic_ELF { public: FreeBSD(const HostInfo &Host, const llvm::Triple& Triple); virtual Tool &SelectTool(const Compilation &C, const JobAction &JA) const; }; +class LLVM_LIBRARY_VISIBILITY NetBSD : public Generic_ELF { +public: + NetBSD(const HostInfo &Host, const llvm::Triple& Triple); + + virtual Tool &SelectTool(const Compilation &C, const JobAction &JA) const; +}; + class LLVM_LIBRARY_VISIBILITY Minix : public Generic_GCC { public: Minix(const HostInfo &Host, const llvm::Triple& Triple); @@ -286,18 +325,23 @@ public: virtual Tool &SelectTool(const Compilation &C, const JobAction &JA) const; }; -class LLVM_LIBRARY_VISIBILITY DragonFly : public Generic_GCC { +class LLVM_LIBRARY_VISIBILITY DragonFly : public Generic_ELF { public: DragonFly(const HostInfo &Host, const llvm::Triple& Triple); virtual Tool &SelectTool(const Compilation &C, const JobAction &JA) const; }; -class LLVM_LIBRARY_VISIBILITY Linux : public Generic_GCC { +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<std::string> ExtraOpts; }; |