2009-03-18 05:38:00 +08:00
|
|
|
//===--- ToolChains.h - ToolChain Implementations ---------------*- C++ -*-===//
|
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#ifndef CLANG_LIB_DRIVER_TOOLCHAINS_H_
|
|
|
|
#define CLANG_LIB_DRIVER_TOOLCHAINS_H_
|
|
|
|
|
2009-03-18 06:07:31 +08:00
|
|
|
#include "clang/Driver/Action.h"
|
2009-03-18 05:38:00 +08:00
|
|
|
#include "clang/Driver/ToolChain.h"
|
|
|
|
|
2009-03-18 06:07:31 +08:00
|
|
|
#include "llvm/ADT/DenseMap.h"
|
2009-03-18 05:38:00 +08:00
|
|
|
#include "llvm/Support/Compiler.h"
|
|
|
|
|
2009-03-18 06:07:31 +08:00
|
|
|
#include "Tools.h"
|
|
|
|
|
2009-03-18 05:38:00 +08:00
|
|
|
namespace clang {
|
|
|
|
namespace driver {
|
2009-03-18 06:18:43 +08:00
|
|
|
namespace toolchains {
|
2009-03-18 05:38:00 +08:00
|
|
|
|
2009-09-18 16:15:13 +08:00
|
|
|
/// Generic_GCC - A tool chain using the 'gcc' command to perform
|
|
|
|
/// all subcommands; this relies on gcc translating the majority of
|
|
|
|
/// command line options.
|
2010-05-12 04:16:05 +08:00
|
|
|
class LLVM_LIBRARY_VISIBILITY Generic_GCC : public ToolChain {
|
2009-03-31 05:06:03 +08:00
|
|
|
protected:
|
2009-03-18 06:07:31 +08:00
|
|
|
mutable llvm::DenseMap<unsigned, Tool*> Tools;
|
|
|
|
|
2009-03-18 05:38:00 +08:00
|
|
|
public:
|
2009-05-22 10:53:45 +08:00
|
|
|
Generic_GCC(const HostInfo &Host, const llvm::Triple& Triple);
|
2009-03-20 08:20:03 +08:00
|
|
|
~Generic_GCC();
|
2009-03-18 05:38:00 +08:00
|
|
|
|
2009-03-20 08:20:03 +08:00
|
|
|
virtual Tool &SelectTool(const Compilation &C, const JobAction &JA) const;
|
2009-03-18 06:07:31 +08:00
|
|
|
|
2009-03-20 08:20:03 +08:00
|
|
|
virtual bool IsUnwindTablesDefault() const;
|
|
|
|
virtual const char *GetDefaultRelocationModel() const;
|
|
|
|
virtual const char *GetForcedPicModel() const;
|
2009-03-18 05:38:00 +08:00
|
|
|
};
|
|
|
|
|
2009-09-18 16:15:13 +08:00
|
|
|
/// Darwin - The base Darwin tool chain.
|
2010-05-12 04:16:05 +08:00
|
|
|
class LLVM_LIBRARY_VISIBILITY Darwin : public ToolChain {
|
2010-08-02 13:44:07 +08:00
|
|
|
public:
|
|
|
|
/// The host version.
|
|
|
|
unsigned DarwinVersion[3];
|
|
|
|
|
|
|
|
private:
|
2009-03-20 08:57:52 +08:00
|
|
|
mutable llvm::DenseMap<unsigned, Tool*> Tools;
|
|
|
|
|
2010-01-27 08:56:25 +08:00
|
|
|
/// Whether the information on the target has been initialized.
|
|
|
|
//
|
|
|
|
// FIXME: This should be eliminated. What we want to do is make this part of
|
|
|
|
// the "default target for arguments" selection process, once we get out of
|
|
|
|
// the argument translation business.
|
|
|
|
mutable bool TargetInitialized;
|
|
|
|
|
|
|
|
/// Whether we are targetting iPhoneOS target.
|
|
|
|
mutable bool TargetIsIPhoneOS;
|
2010-05-14 10:03:00 +08:00
|
|
|
|
2010-01-27 08:56:25 +08:00
|
|
|
/// The OS version we are targetting.
|
|
|
|
mutable unsigned TargetVersion[3];
|
|
|
|
|
2009-03-27 00:23:12 +08:00
|
|
|
/// The default macosx-version-min of this tool chain; empty until
|
|
|
|
/// initialized.
|
2010-01-26 09:45:19 +08:00
|
|
|
std::string MacosxVersionMin;
|
2009-03-27 00:23:12 +08:00
|
|
|
|
2010-07-20 01:11:33 +08:00
|
|
|
private:
|
2010-07-20 01:11:36 +08:00
|
|
|
void AddDeploymentTarget(DerivedArgList &Args) const;
|
2010-07-20 01:11:33 +08:00
|
|
|
|
2009-03-20 08:57:52 +08:00
|
|
|
public:
|
2010-08-02 13:44:07 +08:00
|
|
|
Darwin(const HostInfo &Host, const llvm::Triple& Triple);
|
2009-09-05 02:34:51 +08:00
|
|
|
~Darwin();
|
2009-03-20 08:57:52 +08:00
|
|
|
|
2010-08-24 06:35:37 +08:00
|
|
|
std::string ComputeEffectiveClangTriple(const ArgList &Args) const;
|
|
|
|
|
2009-09-18 16:14:36 +08:00
|
|
|
/// @name Darwin Specific Toolchain API
|
|
|
|
/// {
|
|
|
|
|
2010-01-27 08:56:25 +08:00
|
|
|
// FIXME: Eliminate these ...Target functions and derive separate tool chains
|
|
|
|
// for these targets and put version in constructor.
|
|
|
|
void setTarget(bool isIPhoneOS, unsigned Major, unsigned Minor,
|
|
|
|
unsigned Micro) const {
|
|
|
|
// FIXME: For now, allow reinitialization as long as values don't
|
|
|
|
// change. This will go away when we move away from argument translation.
|
|
|
|
if (TargetInitialized && TargetIsIPhoneOS == isIPhoneOS &&
|
|
|
|
TargetVersion[0] == Major && TargetVersion[1] == Minor &&
|
|
|
|
TargetVersion[2] == Micro)
|
|
|
|
return;
|
|
|
|
|
|
|
|
assert(!TargetInitialized && "Target already initialized!");
|
|
|
|
TargetInitialized = true;
|
|
|
|
TargetIsIPhoneOS = isIPhoneOS;
|
|
|
|
TargetVersion[0] = Major;
|
|
|
|
TargetVersion[1] = Minor;
|
|
|
|
TargetVersion[2] = Micro;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool isTargetIPhoneOS() const {
|
|
|
|
assert(TargetInitialized && "Target not initialized!");
|
|
|
|
return TargetIsIPhoneOS;
|
|
|
|
}
|
|
|
|
|
2010-03-20 08:50:21 +08:00
|
|
|
bool isTargetInitialized() const { return TargetInitialized; }
|
|
|
|
|
2010-01-27 08:56:25 +08:00
|
|
|
void getTargetVersion(unsigned (&Res)[3]) const {
|
|
|
|
assert(TargetInitialized && "Target not initialized!");
|
|
|
|
Res[0] = TargetVersion[0];
|
|
|
|
Res[1] = TargetVersion[1];
|
|
|
|
Res[2] = TargetVersion[2];
|
|
|
|
}
|
|
|
|
|
2010-01-22 10:04:58 +08:00
|
|
|
/// getDarwinArchName - Get the "Darwin" arch name for a particular compiler
|
|
|
|
/// invocation. For example, Darwin treats different ARM variations as
|
|
|
|
/// distinct architectures.
|
|
|
|
llvm::StringRef getDarwinArchName(const ArgList &Args) const;
|
|
|
|
|
2010-01-27 08:57:03 +08:00
|
|
|
static bool isVersionLT(unsigned (&A)[3], unsigned (&B)[3]) {
|
2009-09-18 16:14:55 +08:00
|
|
|
for (unsigned i=0; i < 3; ++i) {
|
|
|
|
if (A[i] > B[i]) return false;
|
|
|
|
if (A[i] < B[i]) return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2010-01-27 08:57:03 +08:00
|
|
|
bool isIPhoneOSVersionLT(unsigned V0, unsigned V1=0, unsigned V2=0) const {
|
|
|
|
assert(isTargetIPhoneOS() && "Unexpected call for OS X target!");
|
2009-09-18 16:14:55 +08:00
|
|
|
unsigned B[3] = { V0, V1, V2 };
|
2010-01-27 08:57:03 +08:00
|
|
|
return isVersionLT(TargetVersion, B);
|
2009-09-18 16:14:55 +08:00
|
|
|
}
|
|
|
|
|
2010-01-27 08:57:03 +08:00
|
|
|
bool isMacosxVersionLT(unsigned V0, unsigned V1=0, unsigned V2=0) const {
|
|
|
|
assert(!isTargetIPhoneOS() && "Unexpected call for iPhoneOS target!");
|
2010-01-27 08:56:56 +08:00
|
|
|
unsigned B[3] = { V0, V1, V2 };
|
2010-01-27 08:57:03 +08:00
|
|
|
return isVersionLT(TargetVersion, B);
|
2010-01-27 08:56:56 +08:00
|
|
|
}
|
|
|
|
|
2009-09-18 16:14:36 +08:00
|
|
|
/// AddLinkSearchPathArgs - Add the linker search paths to \arg CmdArgs.
|
|
|
|
///
|
|
|
|
/// \param Args - The input argument list.
|
|
|
|
/// \param CmdArgs [out] - The command argument list to append the paths
|
|
|
|
/// (prefixed by -L) to.
|
2009-09-18 16:15:13 +08:00
|
|
|
virtual void AddLinkSearchPathArgs(const ArgList &Args,
|
|
|
|
ArgStringList &CmdArgs) const = 0;
|
2009-03-27 00:23:12 +08:00
|
|
|
|
2009-09-18 16:15:03 +08:00
|
|
|
/// AddLinkRuntimeLibArgs - Add the linker arguments to link the compiler
|
|
|
|
/// runtime library.
|
2009-09-18 16:15:13 +08:00
|
|
|
virtual void AddLinkRuntimeLibArgs(const ArgList &Args,
|
|
|
|
ArgStringList &CmdArgs) const = 0;
|
2009-09-18 16:15:03 +08:00
|
|
|
|
2009-09-18 16:14:36 +08:00
|
|
|
/// }
|
|
|
|
/// @name ToolChain Implementation
|
|
|
|
/// {
|
|
|
|
|
2010-08-02 13:43:56 +08:00
|
|
|
virtual types::ID LookupTypeForExtension(const char *Ext) const;
|
|
|
|
|
2010-09-17 08:24:52 +08:00
|
|
|
virtual bool HasNativeLLVMSupport() const;
|
|
|
|
|
2010-06-12 06:00:26 +08:00
|
|
|
virtual DerivedArgList *TranslateArgs(const DerivedArgList &Args,
|
2009-09-10 02:36:12 +08:00
|
|
|
const char *BoundArch) const;
|
2009-03-20 08:57:52 +08:00
|
|
|
|
|
|
|
virtual Tool &SelectTool(const Compilation &C, const JobAction &JA) const;
|
|
|
|
|
2009-11-17 16:07:36 +08:00
|
|
|
virtual bool IsBlocksDefault() const {
|
2010-07-22 08:40:31 +08:00
|
|
|
// Always allow blocks on Darwin; users interested in versioning are
|
|
|
|
// expected to use /usr/include/Blocks.h.
|
|
|
|
return true;
|
2009-11-17 16:07:36 +08:00
|
|
|
}
|
2010-05-14 10:03:00 +08:00
|
|
|
virtual bool IsIntegratedAssemblerDefault() const {
|
2010-06-24 02:15:13 +08:00
|
|
|
#ifdef DISABLE_DEFAULT_INTEGRATED_ASSEMBLER
|
|
|
|
return false;
|
|
|
|
#else
|
2010-05-14 10:03:00 +08:00
|
|
|
// Default integrated assembler to on for x86.
|
|
|
|
return (getTriple().getArch() == llvm::Triple::x86 ||
|
|
|
|
getTriple().getArch() == llvm::Triple::x86_64);
|
2010-06-24 02:15:13 +08:00
|
|
|
#endif
|
2010-05-14 10:03:00 +08:00
|
|
|
}
|
2011-02-04 10:20:39 +08:00
|
|
|
virtual bool IsStrictAliasingDefault() const {
|
|
|
|
#ifdef DISABLE_DEFAULT_STRICT_ALIASING
|
|
|
|
return false;
|
|
|
|
#else
|
|
|
|
return ToolChain::IsStrictAliasingDefault();
|
|
|
|
#endif
|
|
|
|
}
|
2010-12-24 05:35:43 +08:00
|
|
|
|
|
|
|
virtual bool IsObjCDefaultSynthPropertiesDefault() const {
|
|
|
|
// Always allow default synthesized properties on Darwin.
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2009-11-17 16:07:36 +08:00
|
|
|
virtual bool IsObjCNonFragileABIDefault() const {
|
2010-04-25 02:37:41 +08:00
|
|
|
// Non-fragile ABI is default for everything but i386.
|
|
|
|
return getTriple().getArch() != llvm::Triple::x86;
|
2009-11-17 16:07:36 +08:00
|
|
|
}
|
2010-02-02 05:07:43 +08:00
|
|
|
virtual bool IsObjCLegacyDispatchDefault() const {
|
|
|
|
// This is only used with the non-fragile ABI.
|
2010-04-25 02:37:41 +08:00
|
|
|
|
|
|
|
// Legacy dispatch is used everywhere except on x86_64.
|
|
|
|
return getTriple().getArch() != llvm::Triple::x86_64;
|
2010-02-02 05:07:43 +08:00
|
|
|
}
|
2010-04-25 01:56:46 +08:00
|
|
|
virtual bool UseObjCMixedDispatch() const {
|
2010-04-25 02:37:41 +08:00
|
|
|
// This is only used with the non-fragile ABI and non-legacy dispatch.
|
|
|
|
|
|
|
|
// Mixed dispatch is used everywhere except OS X before 10.6.
|
|
|
|
return !(!isTargetIPhoneOS() && isMacosxVersionLT(10, 6));
|
2010-04-25 01:56:46 +08:00
|
|
|
}
|
2009-03-20 08:57:52 +08:00
|
|
|
virtual bool IsUnwindTablesDefault() const;
|
2009-11-17 16:07:36 +08:00
|
|
|
virtual unsigned GetDefaultStackProtectorLevel() const {
|
2010-01-27 08:57:11 +08:00
|
|
|
// Stack protectors default to on for 10.6 and beyond.
|
|
|
|
return !isTargetIPhoneOS() && !isMacosxVersionLT(10, 6);
|
2009-11-17 16:07:36 +08:00
|
|
|
}
|
2009-03-20 08:57:52 +08:00
|
|
|
virtual const char *GetDefaultRelocationModel() const;
|
|
|
|
virtual const char *GetForcedPicModel() const;
|
2009-09-18 16:14:36 +08:00
|
|
|
|
2010-04-11 00:20:23 +08:00
|
|
|
virtual bool SupportsObjCGC() const;
|
|
|
|
|
2009-12-18 10:43:17 +08:00
|
|
|
virtual bool UseDwarfDebugFlags() const;
|
|
|
|
|
2010-02-11 02:49:11 +08:00
|
|
|
virtual bool UseSjLjExceptions() const;
|
|
|
|
|
2009-09-18 16:14:36 +08:00
|
|
|
/// }
|
2009-03-20 08:57:52 +08:00
|
|
|
};
|
|
|
|
|
2009-09-18 16:15:13 +08:00
|
|
|
/// DarwinClang - The Darwin toolchain used by Clang.
|
2010-05-12 04:16:05 +08:00
|
|
|
class LLVM_LIBRARY_VISIBILITY DarwinClang : public Darwin {
|
2009-09-18 16:15:13 +08:00
|
|
|
public:
|
2010-08-02 13:44:07 +08:00
|
|
|
DarwinClang(const HostInfo &Host, const llvm::Triple& Triple);
|
2009-09-18 16:15:13 +08:00
|
|
|
|
|
|
|
/// @name Darwin ToolChain Implementation
|
|
|
|
/// {
|
|
|
|
|
|
|
|
virtual void AddLinkSearchPathArgs(const ArgList &Args,
|
|
|
|
ArgStringList &CmdArgs) const;
|
|
|
|
|
|
|
|
virtual void AddLinkRuntimeLibArgs(const ArgList &Args,
|
|
|
|
ArgStringList &CmdArgs) const;
|
|
|
|
|
2010-09-17 09:20:05 +08:00
|
|
|
virtual void AddCXXStdlibLibArgs(const ArgList &Args,
|
|
|
|
ArgStringList &CmdArgs) const;
|
2010-09-17 09:16:06 +08:00
|
|
|
|
2010-09-18 02:39:08 +08:00
|
|
|
virtual void AddCCKextLibArgs(const ArgList &Args,
|
|
|
|
ArgStringList &CmdArgs) const;
|
|
|
|
|
2009-09-18 16:15:13 +08:00
|
|
|
/// }
|
|
|
|
};
|
|
|
|
|
|
|
|
/// DarwinGCC - The Darwin toolchain used by GCC.
|
2010-05-12 04:16:05 +08:00
|
|
|
class LLVM_LIBRARY_VISIBILITY DarwinGCC : public Darwin {
|
2009-09-18 16:15:13 +08:00
|
|
|
/// GCC version to use.
|
2009-10-07 11:21:11 +08:00
|
|
|
unsigned GCCVersion[3];
|
2009-09-18 16:15:13 +08:00
|
|
|
|
|
|
|
/// The directory suffix for this tool chain.
|
|
|
|
std::string ToolChainDir;
|
|
|
|
|
|
|
|
public:
|
2010-08-02 13:44:07 +08:00
|
|
|
DarwinGCC(const HostInfo &Host, const llvm::Triple& Triple);
|
2009-09-18 16:15:13 +08:00
|
|
|
|
|
|
|
/// @name Darwin ToolChain Implementation
|
|
|
|
/// {
|
|
|
|
|
|
|
|
virtual void AddLinkSearchPathArgs(const ArgList &Args,
|
|
|
|
ArgStringList &CmdArgs) const;
|
|
|
|
|
|
|
|
virtual void AddLinkRuntimeLibArgs(const ArgList &Args,
|
|
|
|
ArgStringList &CmdArgs) const;
|
|
|
|
|
|
|
|
/// }
|
|
|
|
};
|
|
|
|
|
|
|
|
/// Darwin_Generic_GCC - Generic Darwin tool chain using gcc.
|
2010-05-12 04:16:05 +08:00
|
|
|
class LLVM_LIBRARY_VISIBILITY Darwin_Generic_GCC : public Generic_GCC {
|
2009-03-20 08:57:52 +08:00
|
|
|
public:
|
2009-09-18 16:15:13 +08:00
|
|
|
Darwin_Generic_GCC(const HostInfo &Host, const llvm::Triple& Triple)
|
2009-05-22 10:53:45 +08:00
|
|
|
: Generic_GCC(Host, Triple) {}
|
2009-03-20 08:57:52 +08:00
|
|
|
|
2010-08-24 06:35:37 +08:00
|
|
|
std::string ComputeEffectiveClangTriple(const ArgList &Args) const;
|
|
|
|
|
2009-03-20 08:57:52 +08:00
|
|
|
virtual const char *GetDefaultRelocationModel() const { return "pic"; }
|
|
|
|
};
|
|
|
|
|
2010-10-30 04:14:02 +08:00
|
|
|
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);
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2010-05-12 04:16:05 +08:00
|
|
|
class LLVM_LIBRARY_VISIBILITY AuroraUX : public Generic_GCC {
|
2009-08-22 09:06:46 +08:00
|
|
|
public:
|
|
|
|
AuroraUX(const HostInfo &Host, const llvm::Triple& Triple);
|
|
|
|
|
|
|
|
virtual Tool &SelectTool(const Compilation &C, const JobAction &JA) const;
|
|
|
|
};
|
|
|
|
|
2010-10-30 04:14:02 +08:00
|
|
|
class LLVM_LIBRARY_VISIBILITY OpenBSD : public Generic_ELF {
|
2009-06-30 04:52:51 +08:00
|
|
|
public:
|
|
|
|
OpenBSD(const HostInfo &Host, const llvm::Triple& Triple);
|
|
|
|
|
|
|
|
virtual Tool &SelectTool(const Compilation &C, const JobAction &JA) const;
|
|
|
|
};
|
|
|
|
|
2010-10-30 04:14:02 +08:00
|
|
|
class LLVM_LIBRARY_VISIBILITY FreeBSD : public Generic_ELF {
|
2009-03-31 05:06:03 +08:00
|
|
|
public:
|
2010-08-02 13:43:59 +08:00
|
|
|
FreeBSD(const HostInfo &Host, const llvm::Triple& Triple);
|
2009-03-31 05:06:03 +08:00
|
|
|
|
|
|
|
virtual Tool &SelectTool(const Compilation &C, const JobAction &JA) const;
|
|
|
|
};
|
|
|
|
|
2011-02-03 02:59:27 +08:00
|
|
|
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;
|
|
|
|
};
|
|
|
|
|
2010-07-08 00:01:42 +08:00
|
|
|
class LLVM_LIBRARY_VISIBILITY Minix : public Generic_GCC {
|
|
|
|
public:
|
|
|
|
Minix(const HostInfo &Host, const llvm::Triple& Triple);
|
|
|
|
|
|
|
|
virtual Tool &SelectTool(const Compilation &C, const JobAction &JA) const;
|
|
|
|
};
|
|
|
|
|
2010-10-30 04:14:02 +08:00
|
|
|
class LLVM_LIBRARY_VISIBILITY DragonFly : public Generic_ELF {
|
2009-05-03 02:28:39 +08:00
|
|
|
public:
|
2009-05-22 10:53:45 +08:00
|
|
|
DragonFly(const HostInfo &Host, const llvm::Triple& Triple);
|
2009-05-03 02:28:39 +08:00
|
|
|
|
|
|
|
virtual Tool &SelectTool(const Compilation &C, const JobAction &JA) const;
|
|
|
|
};
|
|
|
|
|
2010-10-30 04:14:02 +08:00
|
|
|
class LLVM_LIBRARY_VISIBILITY Linux : public Generic_ELF {
|
2009-05-26 15:52:18 +08:00
|
|
|
public:
|
|
|
|
Linux(const HostInfo &Host, const llvm::Triple& Triple);
|
2010-08-10 08:25:48 +08:00
|
|
|
|
2010-11-08 04:14:31 +08:00
|
|
|
virtual bool HasNativeLLVMSupport() const;
|
|
|
|
|
2010-08-10 08:25:48 +08:00
|
|
|
virtual Tool &SelectTool(const Compilation &C, const JobAction &JA) const;
|
2010-11-08 04:14:31 +08:00
|
|
|
|
|
|
|
std::string Linker;
|
|
|
|
std::vector<std::string> ExtraOpts;
|
2009-05-26 15:52:18 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2010-03-05 05:07:38 +08:00
|
|
|
/// TCEToolChain - A tool chain using the llvm bitcode tools to perform
|
|
|
|
/// all subcommands. See http://tce.cs.tut.fi for our peculiar target.
|
2010-05-12 04:16:05 +08:00
|
|
|
class LLVM_LIBRARY_VISIBILITY TCEToolChain : public ToolChain {
|
2010-03-05 05:07:38 +08:00
|
|
|
public:
|
|
|
|
TCEToolChain(const HostInfo &Host, const llvm::Triple& Triple);
|
|
|
|
~TCEToolChain();
|
|
|
|
|
|
|
|
virtual Tool &SelectTool(const Compilation &C, const JobAction &JA) const;
|
|
|
|
bool IsMathErrnoDefault() const;
|
|
|
|
bool IsUnwindTablesDefault() const;
|
|
|
|
const char* GetDefaultRelocationModel() const;
|
|
|
|
const char* GetForcedPicModel() const;
|
|
|
|
|
|
|
|
private:
|
|
|
|
mutable llvm::DenseMap<unsigned, Tool*> Tools;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
2010-08-22 05:55:07 +08:00
|
|
|
class LLVM_LIBRARY_VISIBILITY Windows : public ToolChain {
|
|
|
|
mutable llvm::DenseMap<unsigned, Tool*> Tools;
|
|
|
|
|
|
|
|
public:
|
|
|
|
Windows(const HostInfo &Host, const llvm::Triple& Triple);
|
|
|
|
|
|
|
|
virtual Tool &SelectTool(const Compilation &C, const JobAction &JA) const;
|
|
|
|
|
|
|
|
virtual bool IsIntegratedAssemblerDefault() const;
|
|
|
|
virtual bool IsUnwindTablesDefault() const;
|
|
|
|
virtual const char *GetDefaultRelocationModel() const;
|
|
|
|
virtual const char *GetForcedPicModel() const;
|
|
|
|
};
|
|
|
|
|
2009-03-18 05:38:00 +08:00
|
|
|
} // end namespace toolchains
|
|
|
|
} // end namespace driver
|
|
|
|
} // end namespace clang
|
|
|
|
|
|
|
|
#endif
|