2009-03-18 06:07:58 +08:00
|
|
|
//===--- Tools.h - Tool Implementations -------------------------*- C++ -*-===//
|
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2014-08-14 00:25:19 +08:00
|
|
|
#ifndef LLVM_CLANG_LIB_DRIVER_TOOLS_H
|
|
|
|
#define LLVM_CLANG_LIB_DRIVER_TOOLS_H
|
2009-03-18 06:07:58 +08:00
|
|
|
|
2015-06-08 08:22:46 +08:00
|
|
|
#include "clang/Basic/VersionTuple.h"
|
2009-03-18 06:07:58 +08:00
|
|
|
#include "clang/Driver/Tool.h"
|
2009-03-30 01:08:39 +08:00
|
|
|
#include "clang/Driver/Types.h"
|
2009-03-18 16:07:30 +08:00
|
|
|
#include "clang/Driver/Util.h"
|
2015-10-08 12:24:12 +08:00
|
|
|
#include "clang/Frontend/CodeGenOptions.h"
|
2011-05-16 21:35:02 +08:00
|
|
|
#include "llvm/ADT/Triple.h"
|
2013-06-15 01:17:23 +08:00
|
|
|
#include "llvm/Option/Option.h"
|
2009-03-18 06:07:58 +08:00
|
|
|
#include "llvm/Support/Compiler.h"
|
|
|
|
|
|
|
|
namespace clang {
|
2015-07-16 01:58:55 +08:00
|
|
|
class ObjCRuntime;
|
2012-06-20 14:18:46 +08:00
|
|
|
|
2009-03-18 06:07:58 +08:00
|
|
|
namespace driver {
|
2015-07-16 01:58:55 +08:00
|
|
|
class Command;
|
|
|
|
class Driver;
|
2009-04-18 08:34:01 +08:00
|
|
|
|
2009-03-27 00:23:12 +08:00
|
|
|
namespace toolchains {
|
2015-07-16 01:58:55 +08:00
|
|
|
class MachO;
|
2009-03-27 00:23:12 +08:00
|
|
|
}
|
|
|
|
|
2009-03-18 06:18:43 +08:00
|
|
|
namespace tools {
|
2014-06-27 03:59:02 +08:00
|
|
|
|
|
|
|
namespace visualstudio {
|
2015-06-24 04:42:09 +08:00
|
|
|
class Compiler;
|
2014-06-27 03:59:02 +08:00
|
|
|
}
|
|
|
|
|
2013-06-15 01:17:23 +08:00
|
|
|
using llvm::opt::ArgStringList;
|
2009-03-18 06:07:58 +08:00
|
|
|
|
2015-09-26 11:26:44 +08:00
|
|
|
SmallString<128> getCompilerRT(const ToolChain &TC,
|
|
|
|
const llvm::opt::ArgList &Args,
|
|
|
|
StringRef Component, bool Shared = false);
|
2015-07-02 09:48:12 +08:00
|
|
|
|
2015-07-16 01:58:55 +08:00
|
|
|
/// \brief Clang compiler tool.
|
|
|
|
class LLVM_LIBRARY_VISIBILITY Clang : public Tool {
|
|
|
|
public:
|
|
|
|
static const char *getBaseInputName(const llvm::opt::ArgList &Args,
|
|
|
|
const InputInfo &Input);
|
|
|
|
static const char *getBaseInputStem(const llvm::opt::ArgList &Args,
|
|
|
|
const InputInfoList &Inputs);
|
|
|
|
static const char *getDependencyFileName(const llvm::opt::ArgList &Args,
|
|
|
|
const InputInfoList &Inputs);
|
|
|
|
|
|
|
|
private:
|
|
|
|
void AddPreprocessingOptions(Compilation &C, const JobAction &JA,
|
|
|
|
const Driver &D, const llvm::opt::ArgList &Args,
|
|
|
|
llvm::opt::ArgStringList &CmdArgs,
|
|
|
|
const InputInfo &Output,
|
|
|
|
const InputInfoList &Inputs) const;
|
|
|
|
|
|
|
|
void AddAArch64TargetArgs(const llvm::opt::ArgList &Args,
|
2014-03-29 23:09:45 +08:00
|
|
|
llvm::opt::ArgStringList &CmdArgs) const;
|
2015-09-20 02:19:44 +08:00
|
|
|
void AddARMTargetArgs(const llvm::Triple &Triple,
|
|
|
|
const llvm::opt::ArgList &Args,
|
2015-07-16 01:58:55 +08:00
|
|
|
llvm::opt::ArgStringList &CmdArgs,
|
|
|
|
bool KernelOrKext) const;
|
|
|
|
void AddARM64TargetArgs(const llvm::opt::ArgList &Args,
|
2014-07-28 21:17:52 +08:00
|
|
|
llvm::opt::ArgStringList &CmdArgs) const;
|
2015-07-16 01:58:55 +08:00
|
|
|
void AddMIPSTargetArgs(const llvm::opt::ArgList &Args,
|
|
|
|
llvm::opt::ArgStringList &CmdArgs) const;
|
|
|
|
void AddPPCTargetArgs(const llvm::opt::ArgList &Args,
|
|
|
|
llvm::opt::ArgStringList &CmdArgs) const;
|
|
|
|
void AddR600TargetArgs(const llvm::opt::ArgList &Args,
|
|
|
|
llvm::opt::ArgStringList &CmdArgs) const;
|
|
|
|
void AddSparcTargetArgs(const llvm::opt::ArgList &Args,
|
2013-06-17 21:59:19 +08:00
|
|
|
llvm::opt::ArgStringList &CmdArgs) const;
|
2015-07-16 01:58:55 +08:00
|
|
|
void AddSystemZTargetArgs(const llvm::opt::ArgList &Args,
|
|
|
|
llvm::opt::ArgStringList &CmdArgs) const;
|
|
|
|
void AddX86TargetArgs(const llvm::opt::ArgList &Args,
|
|
|
|
llvm::opt::ArgStringList &CmdArgs) const;
|
|
|
|
void AddHexagonTargetArgs(const llvm::opt::ArgList &Args,
|
|
|
|
llvm::opt::ArgStringList &CmdArgs) const;
|
2009-09-10 06:33:08 +08:00
|
|
|
|
2015-07-16 01:58:55 +08:00
|
|
|
enum RewriteKind { RK_None, RK_Fragile, RK_NonFragile };
|
2012-06-20 14:18:46 +08:00
|
|
|
|
2015-07-16 01:58:55 +08:00
|
|
|
ObjCRuntime AddObjCRuntimeArgs(const llvm::opt::ArgList &args,
|
|
|
|
llvm::opt::ArgStringList &cmdArgs,
|
|
|
|
RewriteKind rewrite) const;
|
2012-06-20 14:18:46 +08:00
|
|
|
|
2015-07-16 01:58:55 +08:00
|
|
|
void AddClangCLArgs(const llvm::opt::ArgList &Args,
|
2015-10-08 12:24:12 +08:00
|
|
|
llvm::opt::ArgStringList &CmdArgs,
|
|
|
|
enum CodeGenOptions::DebugInfoKind *DebugInfoKind,
|
|
|
|
bool *EmitCodeView) const;
|
2013-08-08 08:17:41 +08:00
|
|
|
|
2015-07-16 01:58:55 +08:00
|
|
|
visualstudio::Compiler *getCLFallback() const;
|
|
|
|
|
|
|
|
mutable std::unique_ptr<visualstudio::Compiler> CLFallback;
|
|
|
|
|
|
|
|
public:
|
|
|
|
// CAUTION! The first constructor argument ("clang") is not arbitrary,
|
|
|
|
// as it is for other tools. Some operations on a Tool actually test
|
|
|
|
// whether that tool is Clang based on the Tool's Name as a string.
|
|
|
|
Clang(const ToolChain &TC) : Tool("clang", "clang frontend", TC, RF_Full) {}
|
|
|
|
|
|
|
|
bool hasGoodDiagnostics() const override { return true; }
|
|
|
|
bool hasIntegratedAssembler() const override { return true; }
|
|
|
|
bool hasIntegratedCPP() const override { return true; }
|
|
|
|
bool canEmitIR() const override { return true; }
|
|
|
|
|
|
|
|
void ConstructJob(Compilation &C, const JobAction &JA,
|
|
|
|
const InputInfo &Output, const InputInfoList &Inputs,
|
|
|
|
const llvm::opt::ArgList &TCArgs,
|
|
|
|
const char *LinkingOutput) const override;
|
|
|
|
};
|
|
|
|
|
|
|
|
/// \brief Clang integrated assembler tool.
|
|
|
|
class LLVM_LIBRARY_VISIBILITY ClangAs : public Tool {
|
|
|
|
public:
|
|
|
|
ClangAs(const ToolChain &TC)
|
|
|
|
: Tool("clang::as", "clang integrated assembler", TC, RF_Full) {}
|
|
|
|
void AddMIPSTargetArgs(const llvm::opt::ArgList &Args,
|
|
|
|
llvm::opt::ArgStringList &CmdArgs) const;
|
|
|
|
bool hasGoodDiagnostics() const override { return true; }
|
|
|
|
bool hasIntegratedAssembler() const override { return false; }
|
|
|
|
bool hasIntegratedCPP() const override { return false; }
|
|
|
|
|
|
|
|
void ConstructJob(Compilation &C, const JobAction &JA,
|
|
|
|
const InputInfo &Output, const InputInfoList &Inputs,
|
|
|
|
const llvm::opt::ArgList &TCArgs,
|
|
|
|
const char *LinkingOutput) const override;
|
|
|
|
};
|
|
|
|
|
|
|
|
/// \brief Base class for all GNU tools that provide the same behavior when
|
|
|
|
/// it comes to response files support
|
|
|
|
class LLVM_LIBRARY_VISIBILITY GnuTool : public Tool {
|
|
|
|
virtual void anchor();
|
|
|
|
|
|
|
|
public:
|
|
|
|
GnuTool(const char *Name, const char *ShortName, const ToolChain &TC)
|
|
|
|
: Tool(Name, ShortName, TC, RF_Full, llvm::sys::WEM_CurrentCodePage) {}
|
|
|
|
};
|
|
|
|
|
|
|
|
/// gcc - Generic GCC tool implementations.
|
2009-03-18 06:45:24 +08:00
|
|
|
namespace gcc {
|
2015-07-16 01:58:55 +08:00
|
|
|
class LLVM_LIBRARY_VISIBILITY Common : public GnuTool {
|
|
|
|
public:
|
|
|
|
Common(const char *Name, const char *ShortName, const ToolChain &TC)
|
|
|
|
: GnuTool(Name, ShortName, TC) {}
|
|
|
|
|
|
|
|
void ConstructJob(Compilation &C, const JobAction &JA,
|
|
|
|
const InputInfo &Output, const InputInfoList &Inputs,
|
|
|
|
const llvm::opt::ArgList &TCArgs,
|
|
|
|
const char *LinkingOutput) const override;
|
|
|
|
|
|
|
|
/// RenderExtraToolArgs - Render any arguments necessary to force
|
|
|
|
/// the particular tool mode.
|
|
|
|
virtual void RenderExtraToolArgs(const JobAction &JA,
|
|
|
|
llvm::opt::ArgStringList &CmdArgs) const = 0;
|
|
|
|
};
|
|
|
|
|
|
|
|
class LLVM_LIBRARY_VISIBILITY Preprocessor : public Common {
|
|
|
|
public:
|
|
|
|
Preprocessor(const ToolChain &TC)
|
|
|
|
: Common("gcc::Preprocessor", "gcc preprocessor", TC) {}
|
|
|
|
|
|
|
|
bool hasGoodDiagnostics() const override { return true; }
|
|
|
|
bool hasIntegratedCPP() const override { return false; }
|
|
|
|
|
|
|
|
void RenderExtraToolArgs(const JobAction &JA,
|
|
|
|
llvm::opt::ArgStringList &CmdArgs) const override;
|
|
|
|
};
|
|
|
|
|
|
|
|
class LLVM_LIBRARY_VISIBILITY Compiler : public Common {
|
|
|
|
public:
|
|
|
|
Compiler(const ToolChain &TC) : Common("gcc::Compiler", "gcc frontend", TC) {}
|
|
|
|
|
|
|
|
bool hasGoodDiagnostics() const override { return true; }
|
|
|
|
bool hasIntegratedCPP() const override { return true; }
|
|
|
|
|
|
|
|
void RenderExtraToolArgs(const JobAction &JA,
|
|
|
|
llvm::opt::ArgStringList &CmdArgs) const override;
|
|
|
|
};
|
|
|
|
|
|
|
|
class LLVM_LIBRARY_VISIBILITY Linker : public Common {
|
|
|
|
public:
|
|
|
|
Linker(const ToolChain &TC) : Common("gcc::Linker", "linker (via gcc)", TC) {}
|
|
|
|
|
|
|
|
bool hasIntegratedCPP() const override { return false; }
|
|
|
|
bool isLinkJob() const override { return true; }
|
|
|
|
|
|
|
|
void RenderExtraToolArgs(const JobAction &JA,
|
|
|
|
llvm::opt::ArgStringList &CmdArgs) const override;
|
|
|
|
};
|
2009-03-18 06:45:24 +08:00
|
|
|
} // end namespace gcc
|
2009-03-18 06:07:58 +08:00
|
|
|
|
2011-12-13 05:14:55 +08:00
|
|
|
namespace hexagon {
|
2015-06-24 04:42:09 +08:00
|
|
|
// For Hexagon, we do not need to instantiate tools for PreProcess, PreCompile
|
|
|
|
// and Compile.
|
|
|
|
// We simply use "clang -cc1" for those actions.
|
|
|
|
class LLVM_LIBRARY_VISIBILITY Assembler : public GnuTool {
|
|
|
|
public:
|
|
|
|
Assembler(const ToolChain &TC)
|
|
|
|
: GnuTool("hexagon::Assembler", "hexagon-as", TC) {}
|
2011-12-13 05:14:55 +08:00
|
|
|
|
2015-06-24 04:42:09 +08:00
|
|
|
bool hasIntegratedCPP() const override { return false; }
|
2011-12-13 05:14:55 +08:00
|
|
|
|
2015-07-16 01:58:55 +08:00
|
|
|
void RenderExtraToolArgs(const JobAction &JA,
|
|
|
|
llvm::opt::ArgStringList &CmdArgs) const;
|
|
|
|
void ConstructJob(Compilation &C, const JobAction &JA,
|
|
|
|
const InputInfo &Output, const InputInfoList &Inputs,
|
|
|
|
const llvm::opt::ArgList &TCArgs,
|
|
|
|
const char *LinkingOutput) const override;
|
2015-06-24 04:42:09 +08:00
|
|
|
};
|
2011-12-13 05:14:55 +08:00
|
|
|
|
2015-06-24 04:42:09 +08:00
|
|
|
class LLVM_LIBRARY_VISIBILITY Linker : public GnuTool {
|
|
|
|
public:
|
|
|
|
Linker(const ToolChain &TC) : GnuTool("hexagon::Linker", "hexagon-ld", TC) {}
|
2011-12-13 05:14:55 +08:00
|
|
|
|
2015-06-24 04:42:09 +08:00
|
|
|
bool hasIntegratedCPP() const override { return false; }
|
2015-07-16 01:58:55 +08:00
|
|
|
bool isLinkJob() const override { return true; }
|
2011-12-13 05:14:55 +08:00
|
|
|
|
2015-07-16 01:58:55 +08:00
|
|
|
virtual void RenderExtraToolArgs(const JobAction &JA,
|
|
|
|
llvm::opt::ArgStringList &CmdArgs) const;
|
|
|
|
void ConstructJob(Compilation &C, const JobAction &JA,
|
|
|
|
const InputInfo &Output, const InputInfoList &Inputs,
|
|
|
|
const llvm::opt::ArgList &TCArgs,
|
|
|
|
const char *LinkingOutput) const override;
|
|
|
|
};
|
2011-12-13 05:14:55 +08:00
|
|
|
} // end namespace hexagon.
|
|
|
|
|
2015-07-18 09:49:05 +08:00
|
|
|
namespace amdgpu {
|
|
|
|
|
|
|
|
class LLVM_LIBRARY_VISIBILITY Linker : public GnuTool {
|
|
|
|
public:
|
|
|
|
Linker(const ToolChain &TC) : GnuTool("amdgpu::Linker", "lld", TC) {}
|
|
|
|
bool isLinkJob() const override { return true; }
|
|
|
|
bool hasIntegratedCPP() const override { return false; }
|
|
|
|
void ConstructJob(Compilation &C, const JobAction &JA,
|
|
|
|
const InputInfo &Output, const InputInfoList &Inputs,
|
|
|
|
const llvm::opt::ArgList &TCArgs,
|
|
|
|
const char *LinkingOutput) const override;
|
|
|
|
};
|
|
|
|
|
|
|
|
} // end namespace amdgpu
|
|
|
|
|
2013-12-12 21:27:11 +08:00
|
|
|
namespace arm {
|
2015-07-28 07:44:42 +08:00
|
|
|
std::string getARMTargetCPU(StringRef CPU, StringRef Arch,
|
2015-07-16 01:58:55 +08:00
|
|
|
const llvm::Triple &Triple);
|
2015-07-28 07:44:42 +08:00
|
|
|
const std::string getARMArch(StringRef Arch,
|
2015-07-16 01:58:55 +08:00
|
|
|
const llvm::Triple &Triple);
|
2015-08-30 15:51:18 +08:00
|
|
|
StringRef getARMCPUForMArch(StringRef Arch, const llvm::Triple &Triple);
|
2015-09-23 17:29:32 +08:00
|
|
|
StringRef getLLVMArchSuffixForARM(StringRef CPU, StringRef Arch,
|
|
|
|
const llvm::Triple &Triple);
|
2015-01-29 07:30:39 +08:00
|
|
|
|
2015-07-16 01:58:55 +08:00
|
|
|
void appendEBLinkFlags(const llvm::opt::ArgList &Args, ArgStringList &CmdArgs,
|
|
|
|
const llvm::Triple &Triple);
|
2015-11-05 05:37:17 +08:00
|
|
|
} // end namespace arm
|
2011-12-13 05:14:55 +08:00
|
|
|
|
2014-02-12 11:21:20 +08:00
|
|
|
namespace mips {
|
2015-07-16 01:58:55 +08:00
|
|
|
typedef enum { NanLegacy = 1, Nan2008 = 2 } NanEncoding;
|
2015-09-19 12:33:38 +08:00
|
|
|
|
|
|
|
enum class FloatABI {
|
|
|
|
Invalid,
|
|
|
|
Soft,
|
|
|
|
Hard,
|
|
|
|
};
|
|
|
|
|
2015-07-16 01:58:55 +08:00
|
|
|
NanEncoding getSupportedNanEncoding(StringRef &CPU);
|
|
|
|
void getMipsCPUAndABI(const llvm::opt::ArgList &Args,
|
|
|
|
const llvm::Triple &Triple, StringRef &CPUName,
|
|
|
|
StringRef &ABIName);
|
|
|
|
bool hasMipsAbiArg(const llvm::opt::ArgList &Args, const char *Value);
|
|
|
|
bool isUCLibc(const llvm::opt::ArgList &Args);
|
|
|
|
bool isNaN2008(const llvm::opt::ArgList &Args, const llvm::Triple &Triple);
|
|
|
|
bool isFPXXDefault(const llvm::Triple &Triple, StringRef CPUName,
|
2015-09-19 12:33:38 +08:00
|
|
|
StringRef ABIName, mips::FloatABI FloatABI);
|
2015-07-16 01:58:55 +08:00
|
|
|
bool shouldUseFPXX(const llvm::opt::ArgList &Args, const llvm::Triple &Triple,
|
2015-09-19 12:33:38 +08:00
|
|
|
StringRef CPUName, StringRef ABIName,
|
|
|
|
mips::FloatABI FloatABI);
|
2015-11-05 05:37:17 +08:00
|
|
|
} // end namespace mips
|
2014-02-12 11:21:20 +08:00
|
|
|
|
2014-07-28 21:17:52 +08:00
|
|
|
namespace ppc {
|
2015-07-16 01:58:55 +08:00
|
|
|
bool hasPPCAbiArg(const llvm::opt::ArgList &Args, const char *Value);
|
2015-11-05 05:37:17 +08:00
|
|
|
} // end namespace ppc
|
2014-07-28 21:17:52 +08:00
|
|
|
|
2015-06-24 04:42:09 +08:00
|
|
|
/// cloudabi -- Directly call GNU Binutils linker
|
2015-03-26 19:13:44 +08:00
|
|
|
namespace cloudabi {
|
2015-06-24 04:42:09 +08:00
|
|
|
class LLVM_LIBRARY_VISIBILITY Linker : public GnuTool {
|
2015-03-26 19:13:44 +08:00
|
|
|
public:
|
2015-06-24 04:42:09 +08:00
|
|
|
Linker(const ToolChain &TC) : GnuTool("cloudabi::Linker", "linker", TC) {}
|
2015-03-26 19:13:44 +08:00
|
|
|
|
|
|
|
bool hasIntegratedCPP() const override { return false; }
|
|
|
|
bool isLinkJob() const override { return true; }
|
|
|
|
|
|
|
|
void ConstructJob(Compilation &C, const JobAction &JA,
|
|
|
|
const InputInfo &Output, const InputInfoList &Inputs,
|
|
|
|
const llvm::opt::ArgList &TCArgs,
|
|
|
|
const char *LinkingOutput) const override;
|
|
|
|
};
|
|
|
|
} // end namespace cloudabi
|
|
|
|
|
2009-03-20 08:52:38 +08:00
|
|
|
namespace darwin {
|
2015-07-16 01:58:55 +08:00
|
|
|
llvm::Triple::ArchType getArchTypeForMachOArchName(StringRef Str);
|
|
|
|
void setTripleTypeForMachOArchName(llvm::Triple &T, StringRef Str);
|
|
|
|
|
|
|
|
class LLVM_LIBRARY_VISIBILITY MachOTool : public Tool {
|
|
|
|
virtual void anchor();
|
|
|
|
|
|
|
|
protected:
|
|
|
|
void AddMachOArch(const llvm::opt::ArgList &Args,
|
|
|
|
llvm::opt::ArgStringList &CmdArgs) const;
|
|
|
|
|
|
|
|
const toolchains::MachO &getMachOToolChain() const {
|
|
|
|
return reinterpret_cast<const toolchains::MachO &>(getToolChain());
|
|
|
|
}
|
|
|
|
|
|
|
|
public:
|
|
|
|
MachOTool(
|
|
|
|
const char *Name, const char *ShortName, const ToolChain &TC,
|
|
|
|
ResponseFileSupport ResponseSupport = RF_None,
|
|
|
|
llvm::sys::WindowsEncodingMethod ResponseEncoding = llvm::sys::WEM_UTF8,
|
|
|
|
const char *ResponseFlag = "@")
|
|
|
|
: Tool(Name, ShortName, TC, ResponseSupport, ResponseEncoding,
|
|
|
|
ResponseFlag) {}
|
|
|
|
};
|
|
|
|
|
|
|
|
class LLVM_LIBRARY_VISIBILITY Assembler : public MachOTool {
|
|
|
|
public:
|
|
|
|
Assembler(const ToolChain &TC)
|
|
|
|
: MachOTool("darwin::Assembler", "assembler", TC) {}
|
|
|
|
|
|
|
|
bool hasIntegratedCPP() const override { return false; }
|
|
|
|
|
|
|
|
void ConstructJob(Compilation &C, const JobAction &JA,
|
|
|
|
const InputInfo &Output, const InputInfoList &Inputs,
|
|
|
|
const llvm::opt::ArgList &TCArgs,
|
|
|
|
const char *LinkingOutput) const override;
|
|
|
|
};
|
|
|
|
|
|
|
|
class LLVM_LIBRARY_VISIBILITY Linker : 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:
|
|
|
|
Linker(const ToolChain &TC)
|
|
|
|
: MachOTool("darwin::Linker", "linker", TC, RF_FileList,
|
|
|
|
llvm::sys::WEM_UTF8, "-filelist") {}
|
|
|
|
|
|
|
|
bool hasIntegratedCPP() const override { return false; }
|
|
|
|
bool isLinkJob() const override { return true; }
|
|
|
|
|
|
|
|
void ConstructJob(Compilation &C, const JobAction &JA,
|
|
|
|
const InputInfo &Output, const InputInfoList &Inputs,
|
|
|
|
const llvm::opt::ArgList &TCArgs,
|
|
|
|
const char *LinkingOutput) const override;
|
|
|
|
};
|
|
|
|
|
|
|
|
class LLVM_LIBRARY_VISIBILITY Lipo : public MachOTool {
|
|
|
|
public:
|
|
|
|
Lipo(const ToolChain &TC) : MachOTool("darwin::Lipo", "lipo", TC) {}
|
|
|
|
|
|
|
|
bool hasIntegratedCPP() const override { return false; }
|
|
|
|
|
|
|
|
void ConstructJob(Compilation &C, const JobAction &JA,
|
|
|
|
const InputInfo &Output, const InputInfoList &Inputs,
|
|
|
|
const llvm::opt::ArgList &TCArgs,
|
|
|
|
const char *LinkingOutput) const override;
|
|
|
|
};
|
|
|
|
|
|
|
|
class LLVM_LIBRARY_VISIBILITY Dsymutil : public MachOTool {
|
|
|
|
public:
|
|
|
|
Dsymutil(const ToolChain &TC)
|
|
|
|
: MachOTool("darwin::Dsymutil", "dsymutil", TC) {}
|
|
|
|
|
|
|
|
bool hasIntegratedCPP() const override { return false; }
|
|
|
|
bool isDsymutilJob() const override { return true; }
|
|
|
|
|
|
|
|
void ConstructJob(Compilation &C, const JobAction &JA,
|
|
|
|
const InputInfo &Output, const InputInfoList &Inputs,
|
|
|
|
const llvm::opt::ArgList &TCArgs,
|
|
|
|
const char *LinkingOutput) const override;
|
|
|
|
};
|
|
|
|
|
|
|
|
class LLVM_LIBRARY_VISIBILITY VerifyDebug : public MachOTool {
|
|
|
|
public:
|
|
|
|
VerifyDebug(const ToolChain &TC)
|
|
|
|
: MachOTool("darwin::VerifyDebug", "dwarfdump", TC) {}
|
2011-08-24 01:56:55 +08:00
|
|
|
|
2015-07-16 01:58:55 +08:00
|
|
|
bool hasIntegratedCPP() const override { return false; }
|
|
|
|
|
|
|
|
void ConstructJob(Compilation &C, const JobAction &JA,
|
|
|
|
const InputInfo &Output, const InputInfoList &Inputs,
|
|
|
|
const llvm::opt::ArgList &TCArgs,
|
|
|
|
const char *LinkingOutput) const override;
|
|
|
|
};
|
2015-11-05 05:37:17 +08:00
|
|
|
} // end namespace darwin
|
2009-06-30 04:52:51 +08:00
|
|
|
|
2015-06-24 04:42:09 +08:00
|
|
|
/// openbsd -- Directly call GNU Binutils assembler and linker
|
2009-06-30 04:52:51 +08:00
|
|
|
namespace openbsd {
|
2015-06-24 04:42:09 +08:00
|
|
|
class LLVM_LIBRARY_VISIBILITY Assembler : public GnuTool {
|
|
|
|
public:
|
|
|
|
Assembler(const ToolChain &TC)
|
|
|
|
: GnuTool("openbsd::Assembler", "assembler", TC) {}
|
2009-06-30 04:52:51 +08:00
|
|
|
|
2015-06-24 04:42:09 +08:00
|
|
|
bool hasIntegratedCPP() const override { return false; }
|
2009-06-30 04:52:51 +08:00
|
|
|
|
2015-06-24 04:42:09 +08:00
|
|
|
void ConstructJob(Compilation &C, const JobAction &JA,
|
|
|
|
const InputInfo &Output, const InputInfoList &Inputs,
|
|
|
|
const llvm::opt::ArgList &TCArgs,
|
|
|
|
const char *LinkingOutput) const override;
|
|
|
|
};
|
2015-11-05 05:37:17 +08:00
|
|
|
|
2015-06-24 04:42:09 +08:00
|
|
|
class LLVM_LIBRARY_VISIBILITY Linker : public GnuTool {
|
|
|
|
public:
|
|
|
|
Linker(const ToolChain &TC) : GnuTool("openbsd::Linker", "linker", TC) {}
|
2009-06-30 04:52:51 +08:00
|
|
|
|
2015-06-24 04:42:09 +08:00
|
|
|
bool hasIntegratedCPP() const override { return false; }
|
|
|
|
bool isLinkJob() const override { return true; }
|
2009-06-30 04:52:51 +08:00
|
|
|
|
2015-07-16 01:58:55 +08:00
|
|
|
void ConstructJob(Compilation &C, const JobAction &JA,
|
|
|
|
const InputInfo &Output, const InputInfoList &Inputs,
|
|
|
|
const llvm::opt::ArgList &TCArgs,
|
|
|
|
const char *LinkingOutput) const override;
|
|
|
|
};
|
2009-08-22 09:06:46 +08:00
|
|
|
} // end namespace openbsd
|
2009-03-20 08:52:38 +08:00
|
|
|
|
2015-06-24 04:42:09 +08:00
|
|
|
/// bitrig -- Directly call GNU Binutils assembler and linker
|
2012-08-09 07:57:20 +08:00
|
|
|
namespace bitrig {
|
2015-06-24 04:42:09 +08:00
|
|
|
class LLVM_LIBRARY_VISIBILITY Assembler : public GnuTool {
|
|
|
|
public:
|
|
|
|
Assembler(const ToolChain &TC)
|
|
|
|
: GnuTool("bitrig::Assembler", "assembler", TC) {}
|
2012-08-09 07:57:20 +08:00
|
|
|
|
2015-06-24 04:42:09 +08:00
|
|
|
bool hasIntegratedCPP() const override { return false; }
|
2012-08-09 07:57:20 +08:00
|
|
|
|
2015-06-24 04:42:09 +08:00
|
|
|
void ConstructJob(Compilation &C, const JobAction &JA,
|
|
|
|
const InputInfo &Output, const InputInfoList &Inputs,
|
|
|
|
const llvm::opt::ArgList &TCArgs,
|
|
|
|
const char *LinkingOutput) const override;
|
|
|
|
};
|
2015-11-05 05:37:17 +08:00
|
|
|
|
2015-06-24 04:42:09 +08:00
|
|
|
class LLVM_LIBRARY_VISIBILITY Linker : public GnuTool {
|
|
|
|
public:
|
|
|
|
Linker(const ToolChain &TC) : GnuTool("bitrig::Linker", "linker", TC) {}
|
2012-08-09 07:57:20 +08:00
|
|
|
|
2015-06-24 04:42:09 +08:00
|
|
|
bool hasIntegratedCPP() const override { return false; }
|
|
|
|
bool isLinkJob() const override { return true; }
|
2012-08-09 07:57:20 +08:00
|
|
|
|
2015-07-16 01:58:55 +08:00
|
|
|
void ConstructJob(Compilation &C, const JobAction &JA,
|
|
|
|
const InputInfo &Output, const InputInfoList &Inputs,
|
|
|
|
const llvm::opt::ArgList &TCArgs,
|
|
|
|
const char *LinkingOutput) const override;
|
|
|
|
};
|
2012-08-09 07:57:20 +08:00
|
|
|
} // end namespace bitrig
|
|
|
|
|
2015-06-24 04:42:09 +08:00
|
|
|
/// freebsd -- Directly call GNU Binutils assembler and linker
|
2009-04-01 01:45:15 +08:00
|
|
|
namespace freebsd {
|
2015-06-24 04:42:09 +08:00
|
|
|
class LLVM_LIBRARY_VISIBILITY Assembler : public GnuTool {
|
|
|
|
public:
|
|
|
|
Assembler(const ToolChain &TC)
|
|
|
|
: GnuTool("freebsd::Assembler", "assembler", TC) {}
|
2009-04-01 01:45:15 +08:00
|
|
|
|
2015-06-24 04:42:09 +08:00
|
|
|
bool hasIntegratedCPP() const override { return false; }
|
2009-04-01 01:45:15 +08:00
|
|
|
|
2015-06-24 04:42:09 +08:00
|
|
|
void ConstructJob(Compilation &C, const JobAction &JA,
|
|
|
|
const InputInfo &Output, const InputInfoList &Inputs,
|
|
|
|
const llvm::opt::ArgList &TCArgs,
|
|
|
|
const char *LinkingOutput) const override;
|
|
|
|
};
|
2015-11-05 05:37:17 +08:00
|
|
|
|
2015-06-24 04:42:09 +08:00
|
|
|
class LLVM_LIBRARY_VISIBILITY Linker : public GnuTool {
|
|
|
|
public:
|
|
|
|
Linker(const ToolChain &TC) : GnuTool("freebsd::Linker", "linker", TC) {}
|
2009-04-02 03:36:32 +08:00
|
|
|
|
2015-06-24 04:42:09 +08:00
|
|
|
bool hasIntegratedCPP() const override { return false; }
|
|
|
|
bool isLinkJob() const override { return true; }
|
2009-04-02 03:36:32 +08:00
|
|
|
|
2015-07-16 01:58:55 +08:00
|
|
|
void ConstructJob(Compilation &C, const JobAction &JA,
|
|
|
|
const InputInfo &Output, const InputInfoList &Inputs,
|
|
|
|
const llvm::opt::ArgList &TCArgs,
|
|
|
|
const char *LinkingOutput) const override;
|
|
|
|
};
|
2009-08-22 09:06:46 +08:00
|
|
|
} // end namespace freebsd
|
|
|
|
|
2015-06-24 04:42:09 +08:00
|
|
|
/// netbsd -- Directly call GNU Binutils assembler and linker
|
2011-02-03 02:59:27 +08:00
|
|
|
namespace netbsd {
|
2015-06-24 04:42:09 +08:00
|
|
|
class LLVM_LIBRARY_VISIBILITY Assembler : public GnuTool {
|
|
|
|
public:
|
|
|
|
Assembler(const ToolChain &TC)
|
|
|
|
: GnuTool("netbsd::Assembler", "assembler", TC) {}
|
2011-02-03 02:59:27 +08:00
|
|
|
|
2015-06-24 04:42:09 +08:00
|
|
|
bool hasIntegratedCPP() const override { return false; }
|
2011-02-03 02:59:27 +08:00
|
|
|
|
2015-06-24 04:42:09 +08:00
|
|
|
void ConstructJob(Compilation &C, const JobAction &JA,
|
|
|
|
const InputInfo &Output, const InputInfoList &Inputs,
|
|
|
|
const llvm::opt::ArgList &TCArgs,
|
|
|
|
const char *LinkingOutput) const override;
|
|
|
|
};
|
2011-05-16 21:35:02 +08:00
|
|
|
|
2015-11-05 05:37:17 +08:00
|
|
|
class LLVM_LIBRARY_VISIBILITY Linker : public GnuTool {
|
2015-06-24 04:42:09 +08:00
|
|
|
public:
|
|
|
|
Linker(const ToolChain &TC) : GnuTool("netbsd::Linker", "linker", TC) {}
|
2011-02-03 02:59:27 +08:00
|
|
|
|
2015-06-24 04:42:09 +08:00
|
|
|
bool hasIntegratedCPP() const override { return false; }
|
|
|
|
bool isLinkJob() const override { return true; }
|
2011-02-03 02:59:27 +08:00
|
|
|
|
2015-07-16 01:58:55 +08:00
|
|
|
void ConstructJob(Compilation &C, const JobAction &JA,
|
|
|
|
const InputInfo &Output, const InputInfoList &Inputs,
|
|
|
|
const llvm::opt::ArgList &TCArgs,
|
|
|
|
const char *LinkingOutput) const override;
|
|
|
|
};
|
2011-02-03 02:59:27 +08:00
|
|
|
} // end namespace netbsd
|
|
|
|
|
2015-06-24 04:42:09 +08:00
|
|
|
/// Directly call GNU Binutils' assembler and linker.
|
2013-03-29 03:04:25 +08:00
|
|
|
namespace gnutools {
|
2015-06-24 04:42:09 +08:00
|
|
|
class LLVM_LIBRARY_VISIBILITY Assembler : public GnuTool {
|
|
|
|
public:
|
|
|
|
Assembler(const ToolChain &TC) : GnuTool("GNU::Assembler", "assembler", TC) {}
|
2010-08-10 08:25:48 +08:00
|
|
|
|
2015-06-24 04:42:09 +08:00
|
|
|
bool hasIntegratedCPP() const override { return false; }
|
2010-08-10 08:25:48 +08:00
|
|
|
|
2015-06-24 04:42:09 +08:00
|
|
|
void ConstructJob(Compilation &C, const JobAction &JA,
|
|
|
|
const InputInfo &Output, const InputInfoList &Inputs,
|
|
|
|
const llvm::opt::ArgList &TCArgs,
|
|
|
|
const char *LinkingOutput) const override;
|
|
|
|
};
|
2015-11-05 05:37:17 +08:00
|
|
|
|
2015-06-24 04:42:09 +08:00
|
|
|
class LLVM_LIBRARY_VISIBILITY Linker : public GnuTool {
|
|
|
|
public:
|
|
|
|
Linker(const ToolChain &TC) : GnuTool("GNU::Linker", "linker", TC) {}
|
2010-11-08 04:14:31 +08:00
|
|
|
|
2015-06-24 04:42:09 +08:00
|
|
|
bool hasIntegratedCPP() const override { return false; }
|
|
|
|
bool isLinkJob() const override { return true; }
|
2010-11-08 04:14:31 +08:00
|
|
|
|
2015-07-16 01:58:55 +08:00
|
|
|
void ConstructJob(Compilation &C, const JobAction &JA,
|
|
|
|
const InputInfo &Output, const InputInfoList &Inputs,
|
|
|
|
const llvm::opt::ArgList &TCArgs,
|
|
|
|
const char *LinkingOutput) const override;
|
|
|
|
};
|
2015-11-05 05:37:17 +08:00
|
|
|
} // end namespace gnutools
|
2015-07-16 01:58:55 +08:00
|
|
|
|
|
|
|
namespace nacltools {
|
|
|
|
class LLVM_LIBRARY_VISIBILITY AssemblerARM : public gnutools::Assembler {
|
|
|
|
public:
|
|
|
|
AssemblerARM(const ToolChain &TC) : gnutools::Assembler(TC) {}
|
2015-03-31 04:31:33 +08:00
|
|
|
|
2015-07-16 01:58:55 +08:00
|
|
|
void ConstructJob(Compilation &C, const JobAction &JA,
|
|
|
|
const InputInfo &Output, const InputInfoList &Inputs,
|
|
|
|
const llvm::opt::ArgList &TCArgs,
|
|
|
|
const char *LinkingOutput) const override;
|
|
|
|
};
|
2015-11-05 05:37:17 +08:00
|
|
|
|
2015-07-16 01:58:55 +08:00
|
|
|
class LLVM_LIBRARY_VISIBILITY Linker : public Tool {
|
|
|
|
public:
|
|
|
|
Linker(const ToolChain &TC) : Tool("NaCl::Linker", "linker", TC) {}
|
|
|
|
|
|
|
|
bool hasIntegratedCPP() const override { return false; }
|
|
|
|
bool isLinkJob() const override { return true; }
|
|
|
|
|
|
|
|
void ConstructJob(Compilation &C, const JobAction &JA,
|
|
|
|
const InputInfo &Output, const InputInfoList &Inputs,
|
|
|
|
const llvm::opt::ArgList &TCArgs,
|
|
|
|
const char *LinkingOutput) const override;
|
|
|
|
};
|
2015-11-05 05:37:17 +08:00
|
|
|
} // end namespace nacltools
|
2015-03-31 04:31:33 +08:00
|
|
|
|
2015-06-24 04:42:09 +08:00
|
|
|
/// minix -- Directly call GNU Binutils assembler and linker
|
2010-07-08 00:01:42 +08:00
|
|
|
namespace minix {
|
2015-06-24 04:42:09 +08:00
|
|
|
class LLVM_LIBRARY_VISIBILITY Assembler : public GnuTool {
|
|
|
|
public:
|
|
|
|
Assembler(const ToolChain &TC)
|
|
|
|
: GnuTool("minix::Assembler", "assembler", TC) {}
|
2010-07-08 00:01:42 +08:00
|
|
|
|
2015-06-24 04:42:09 +08:00
|
|
|
bool hasIntegratedCPP() const override { return false; }
|
2010-07-08 00:01:42 +08:00
|
|
|
|
2015-06-24 04:42:09 +08:00
|
|
|
void ConstructJob(Compilation &C, const JobAction &JA,
|
|
|
|
const InputInfo &Output, const InputInfoList &Inputs,
|
|
|
|
const llvm::opt::ArgList &TCArgs,
|
|
|
|
const char *LinkingOutput) const override;
|
|
|
|
};
|
2015-11-05 05:37:17 +08:00
|
|
|
|
2015-06-24 04:42:09 +08:00
|
|
|
class LLVM_LIBRARY_VISIBILITY Linker : public GnuTool {
|
|
|
|
public:
|
|
|
|
Linker(const ToolChain &TC) : GnuTool("minix::Linker", "linker", TC) {}
|
2010-07-08 00:01:42 +08:00
|
|
|
|
2015-06-24 04:42:09 +08:00
|
|
|
bool hasIntegratedCPP() const override { return false; }
|
|
|
|
bool isLinkJob() const override { return true; }
|
2010-07-08 00:01:42 +08:00
|
|
|
|
2015-07-16 01:58:55 +08:00
|
|
|
void ConstructJob(Compilation &C, const JobAction &JA,
|
|
|
|
const InputInfo &Output, const InputInfoList &Inputs,
|
|
|
|
const llvm::opt::ArgList &TCArgs,
|
|
|
|
const char *LinkingOutput) const override;
|
|
|
|
};
|
2010-07-08 00:01:42 +08:00
|
|
|
} // end namespace minix
|
|
|
|
|
2015-06-24 04:42:09 +08:00
|
|
|
/// solaris -- Directly call Solaris assembler and linker
|
2012-02-15 21:39:01 +08:00
|
|
|
namespace solaris {
|
2015-06-24 04:42:09 +08:00
|
|
|
class LLVM_LIBRARY_VISIBILITY Assembler : public Tool {
|
|
|
|
public:
|
|
|
|
Assembler(const ToolChain &TC)
|
|
|
|
: Tool("solaris::Assembler", "assembler", TC) {}
|
2012-02-15 21:39:01 +08:00
|
|
|
|
2015-06-24 04:42:09 +08:00
|
|
|
bool hasIntegratedCPP() const override { return false; }
|
2012-02-15 21:39:01 +08:00
|
|
|
|
2015-06-24 04:42:09 +08:00
|
|
|
void ConstructJob(Compilation &C, const JobAction &JA,
|
|
|
|
const InputInfo &Output, const InputInfoList &Inputs,
|
|
|
|
const llvm::opt::ArgList &TCArgs,
|
|
|
|
const char *LinkingOutput) const override;
|
|
|
|
};
|
2015-11-05 05:37:17 +08:00
|
|
|
|
2015-06-24 04:42:09 +08:00
|
|
|
class LLVM_LIBRARY_VISIBILITY Linker : public Tool {
|
|
|
|
public:
|
|
|
|
Linker(const ToolChain &TC) : Tool("solaris::Linker", "linker", TC) {}
|
2012-02-15 21:39:01 +08:00
|
|
|
|
2015-06-24 04:42:09 +08:00
|
|
|
bool hasIntegratedCPP() const override { return false; }
|
|
|
|
bool isLinkJob() const override { return true; }
|
2012-02-15 21:39:01 +08:00
|
|
|
|
2015-07-16 01:58:55 +08:00
|
|
|
void ConstructJob(Compilation &C, const JobAction &JA,
|
|
|
|
const InputInfo &Output, const InputInfoList &Inputs,
|
|
|
|
const llvm::opt::ArgList &TCArgs,
|
|
|
|
const char *LinkingOutput) const override;
|
|
|
|
};
|
2012-02-16 00:25:46 +08:00
|
|
|
} // end namespace solaris
|
2012-02-15 21:39:01 +08:00
|
|
|
|
2015-06-24 04:42:09 +08:00
|
|
|
/// dragonfly -- Directly call GNU Binutils assembler and linker
|
2009-05-03 02:28:39 +08:00
|
|
|
namespace dragonfly {
|
2015-06-24 04:42:09 +08:00
|
|
|
class LLVM_LIBRARY_VISIBILITY Assembler : public GnuTool {
|
|
|
|
public:
|
|
|
|
Assembler(const ToolChain &TC)
|
|
|
|
: GnuTool("dragonfly::Assembler", "assembler", TC) {}
|
2009-05-03 02:28:39 +08:00
|
|
|
|
2015-06-24 04:42:09 +08:00
|
|
|
bool hasIntegratedCPP() const override { return false; }
|
2009-05-03 02:28:39 +08:00
|
|
|
|
2015-06-24 04:42:09 +08:00
|
|
|
void ConstructJob(Compilation &C, const JobAction &JA,
|
|
|
|
const InputInfo &Output, const InputInfoList &Inputs,
|
|
|
|
const llvm::opt::ArgList &TCArgs,
|
|
|
|
const char *LinkingOutput) const override;
|
|
|
|
};
|
2015-11-05 05:37:17 +08:00
|
|
|
|
2015-06-24 04:42:09 +08:00
|
|
|
class LLVM_LIBRARY_VISIBILITY Linker : public GnuTool {
|
|
|
|
public:
|
|
|
|
Linker(const ToolChain &TC) : GnuTool("dragonfly::Linker", "linker", TC) {}
|
2009-05-03 02:28:39 +08:00
|
|
|
|
2015-06-24 04:42:09 +08:00
|
|
|
bool hasIntegratedCPP() const override { return false; }
|
|
|
|
bool isLinkJob() const override { return true; }
|
2009-05-03 02:28:39 +08:00
|
|
|
|
2015-07-16 01:58:55 +08:00
|
|
|
void ConstructJob(Compilation &C, const JobAction &JA,
|
|
|
|
const InputInfo &Output, const InputInfoList &Inputs,
|
|
|
|
const llvm::opt::ArgList &TCArgs,
|
|
|
|
const char *LinkingOutput) const override;
|
|
|
|
};
|
2009-08-22 09:06:46 +08:00
|
|
|
} // end namespace dragonfly
|
2009-05-03 02:28:39 +08:00
|
|
|
|
2014-06-27 03:59:02 +08:00
|
|
|
/// Visual studio tools.
|
2010-08-22 05:55:07 +08:00
|
|
|
namespace visualstudio {
|
2015-06-24 04:42:09 +08:00
|
|
|
VersionTuple getMSVCVersion(const Driver *D, const llvm::Triple &Triple,
|
|
|
|
const llvm::opt::ArgList &Args, bool IsWindowsMSVC);
|
2015-06-08 08:22:46 +08:00
|
|
|
|
2015-06-24 04:42:09 +08:00
|
|
|
class LLVM_LIBRARY_VISIBILITY Linker : public Tool {
|
|
|
|
public:
|
|
|
|
Linker(const ToolChain &TC)
|
|
|
|
: Tool("visualstudio::Linker", "linker", TC, RF_Full,
|
|
|
|
llvm::sys::WEM_UTF16) {}
|
2010-08-22 05:55:07 +08:00
|
|
|
|
2015-06-24 04:42:09 +08:00
|
|
|
bool hasIntegratedCPP() const override { return false; }
|
2015-07-16 01:58:55 +08:00
|
|
|
bool isLinkJob() const override { return true; }
|
2010-08-22 05:55:07 +08:00
|
|
|
|
2015-07-16 01:58:55 +08:00
|
|
|
void ConstructJob(Compilation &C, const JobAction &JA,
|
|
|
|
const InputInfo &Output, const InputInfoList &Inputs,
|
|
|
|
const llvm::opt::ArgList &TCArgs,
|
|
|
|
const char *LinkingOutput) const override;
|
2015-06-24 04:42:09 +08:00
|
|
|
};
|
2013-09-20 04:32:16 +08:00
|
|
|
|
2015-06-24 04:42:09 +08:00
|
|
|
class LLVM_LIBRARY_VISIBILITY Compiler : public Tool {
|
|
|
|
public:
|
|
|
|
Compiler(const ToolChain &TC)
|
|
|
|
: Tool("visualstudio::Compiler", "compiler", TC, RF_Full,
|
|
|
|
llvm::sys::WEM_UTF16) {}
|
2013-09-20 04:32:16 +08:00
|
|
|
|
2015-06-24 04:42:09 +08:00
|
|
|
bool hasIntegratedAssembler() const override { return true; }
|
2015-07-16 01:58:55 +08:00
|
|
|
bool hasIntegratedCPP() const override { return true; }
|
|
|
|
bool isLinkJob() const override { return false; }
|
|
|
|
|
|
|
|
void ConstructJob(Compilation &C, const JobAction &JA,
|
|
|
|
const InputInfo &Output, const InputInfoList &Inputs,
|
|
|
|
const llvm::opt::ArgList &TCArgs,
|
|
|
|
const char *LinkingOutput) const override;
|
|
|
|
|
|
|
|
std::unique_ptr<Command> GetCommand(Compilation &C, const JobAction &JA,
|
|
|
|
const InputInfo &Output,
|
|
|
|
const InputInfoList &Inputs,
|
|
|
|
const llvm::opt::ArgList &TCArgs,
|
|
|
|
const char *LinkingOutput) const;
|
|
|
|
};
|
2010-08-22 05:55:07 +08:00
|
|
|
} // end namespace visualstudio
|
|
|
|
|
2015-07-02 12:45:27 +08:00
|
|
|
/// MinGW -- Directly call GNU Binutils assembler and linker
|
|
|
|
namespace MinGW {
|
|
|
|
class LLVM_LIBRARY_VISIBILITY Assembler : public Tool {
|
|
|
|
public:
|
|
|
|
Assembler(const ToolChain &TC) : Tool("MinGW::Assemble", "assembler", TC) {}
|
|
|
|
|
|
|
|
bool hasIntegratedCPP() const override { return false; }
|
|
|
|
|
|
|
|
void ConstructJob(Compilation &C, const JobAction &JA,
|
|
|
|
const InputInfo &Output, const InputInfoList &Inputs,
|
|
|
|
const llvm::opt::ArgList &TCArgs,
|
|
|
|
const char *LinkingOutput) const override;
|
|
|
|
};
|
|
|
|
|
|
|
|
class LLVM_LIBRARY_VISIBILITY Linker : public Tool {
|
|
|
|
public:
|
|
|
|
Linker(const ToolChain &TC) : Tool("MinGW::Linker", "linker", TC) {}
|
|
|
|
|
|
|
|
bool hasIntegratedCPP() const override { return false; }
|
|
|
|
bool isLinkJob() const override { return true; }
|
|
|
|
|
|
|
|
void ConstructJob(Compilation &C, const JobAction &JA,
|
|
|
|
const InputInfo &Output, const InputInfoList &Inputs,
|
|
|
|
const llvm::opt::ArgList &TCArgs,
|
|
|
|
const char *LinkingOutput) const override;
|
|
|
|
|
|
|
|
private:
|
|
|
|
void AddLibGCC(const llvm::opt::ArgList &Args, ArgStringList &CmdArgs) const;
|
|
|
|
};
|
|
|
|
} // end namespace MinGW
|
|
|
|
|
2013-12-12 19:55:52 +08:00
|
|
|
namespace arm {
|
2015-09-18 13:32:23 +08:00
|
|
|
enum class FloatABI {
|
|
|
|
Invalid,
|
|
|
|
Soft,
|
|
|
|
SoftFP,
|
|
|
|
Hard,
|
|
|
|
};
|
|
|
|
|
2015-09-20 04:40:16 +08:00
|
|
|
FloatABI getARMFloatABI(const ToolChain &TC, const llvm::opt::ArgList &Args);
|
2015-11-05 05:37:17 +08:00
|
|
|
} // end namespace arm
|
|
|
|
|
2013-10-11 18:29:40 +08:00
|
|
|
namespace XCore {
|
2015-06-24 04:42:09 +08:00
|
|
|
// For XCore, we do not need to instantiate tools for PreProcess, PreCompile and
|
|
|
|
// Compile.
|
|
|
|
// We simply use "clang -cc1" for those actions.
|
|
|
|
class LLVM_LIBRARY_VISIBILITY Assembler : public Tool {
|
|
|
|
public:
|
|
|
|
Assembler(const ToolChain &TC) : Tool("XCore::Assembler", "XCore-as", TC) {}
|
2013-10-11 18:29:40 +08:00
|
|
|
|
2015-06-24 04:42:09 +08:00
|
|
|
bool hasIntegratedCPP() const override { return false; }
|
|
|
|
void ConstructJob(Compilation &C, const JobAction &JA,
|
|
|
|
const InputInfo &Output, const InputInfoList &Inputs,
|
|
|
|
const llvm::opt::ArgList &TCArgs,
|
|
|
|
const char *LinkingOutput) const override;
|
|
|
|
};
|
|
|
|
|
|
|
|
class LLVM_LIBRARY_VISIBILITY Linker : public Tool {
|
|
|
|
public:
|
|
|
|
Linker(const ToolChain &TC) : Tool("XCore::Linker", "XCore-ld", TC) {}
|
|
|
|
|
|
|
|
bool hasIntegratedCPP() const override { return false; }
|
2015-07-16 01:58:55 +08:00
|
|
|
bool isLinkJob() const override { return true; }
|
|
|
|
void ConstructJob(Compilation &C, const JobAction &JA,
|
|
|
|
const InputInfo &Output, const InputInfoList &Inputs,
|
|
|
|
const llvm::opt::ArgList &TCArgs,
|
|
|
|
const char *LinkingOutput) const override;
|
|
|
|
};
|
|
|
|
} // end namespace XCore.
|
2013-10-11 18:29:40 +08:00
|
|
|
|
2015-07-16 01:58:55 +08:00
|
|
|
namespace CrossWindows {
|
|
|
|
class LLVM_LIBRARY_VISIBILITY Assembler : public Tool {
|
|
|
|
public:
|
|
|
|
Assembler(const ToolChain &TC) : Tool("CrossWindows::Assembler", "as", TC) {}
|
2013-10-11 18:29:40 +08:00
|
|
|
|
2015-07-16 01:58:55 +08:00
|
|
|
bool hasIntegratedCPP() const override { return false; }
|
2015-06-24 04:42:09 +08:00
|
|
|
|
2015-07-16 01:58:55 +08:00
|
|
|
void ConstructJob(Compilation &C, const JobAction &JA,
|
|
|
|
const InputInfo &Output, const InputInfoList &Inputs,
|
|
|
|
const llvm::opt::ArgList &TCArgs,
|
|
|
|
const char *LinkingOutput) const override;
|
|
|
|
};
|
2013-10-11 18:29:40 +08:00
|
|
|
|
2015-07-16 01:58:55 +08:00
|
|
|
class LLVM_LIBRARY_VISIBILITY Linker : public Tool {
|
|
|
|
public:
|
|
|
|
Linker(const ToolChain &TC)
|
|
|
|
: Tool("CrossWindows::Linker", "ld", TC, RF_Full) {}
|
2014-10-24 11:13:37 +08:00
|
|
|
|
2015-07-16 01:58:55 +08:00
|
|
|
bool hasIntegratedCPP() const override { return false; }
|
|
|
|
bool isLinkJob() const override { return true; }
|
2014-10-24 11:13:37 +08:00
|
|
|
|
|
|
|
void ConstructJob(Compilation &C, const JobAction &JA,
|
|
|
|
const InputInfo &Output, const InputInfoList &Inputs,
|
|
|
|
const llvm::opt::ArgList &TCArgs,
|
|
|
|
const char *LinkingOutput) const override;
|
|
|
|
};
|
2015-11-05 05:37:17 +08:00
|
|
|
} // end namespace CrossWindows
|
2013-10-11 18:29:40 +08:00
|
|
|
|
2015-06-19 22:55:19 +08:00
|
|
|
/// SHAVE tools -- Directly call moviCompile and moviAsm
|
|
|
|
namespace SHAVE {
|
2015-06-24 04:42:09 +08:00
|
|
|
class LLVM_LIBRARY_VISIBILITY Compiler : public Tool {
|
2015-06-19 22:55:19 +08:00
|
|
|
public:
|
2015-06-24 04:42:09 +08:00
|
|
|
Compiler(const ToolChain &TC) : Tool("moviCompile", "movicompile", TC) {}
|
2015-06-19 22:55:19 +08:00
|
|
|
|
|
|
|
bool hasIntegratedCPP() const override { return true; }
|
|
|
|
|
|
|
|
void ConstructJob(Compilation &C, const JobAction &JA,
|
|
|
|
const InputInfo &Output, const InputInfoList &Inputs,
|
|
|
|
const llvm::opt::ArgList &TCArgs,
|
|
|
|
const char *LinkingOutput) const override;
|
|
|
|
};
|
|
|
|
|
2015-06-24 04:42:09 +08:00
|
|
|
class LLVM_LIBRARY_VISIBILITY Assembler : public Tool {
|
2015-06-19 22:55:19 +08:00
|
|
|
public:
|
2015-06-24 04:42:09 +08:00
|
|
|
Assembler(const ToolChain &TC) : Tool("moviAsm", "moviAsm", TC) {}
|
2015-06-19 22:55:19 +08:00
|
|
|
|
|
|
|
bool hasIntegratedCPP() const override { return false; } // not sure.
|
|
|
|
|
|
|
|
void ConstructJob(Compilation &C, const JobAction &JA,
|
|
|
|
const InputInfo &Output, const InputInfoList &Inputs,
|
|
|
|
const llvm::opt::ArgList &TCArgs,
|
|
|
|
const char *LinkingOutput) const override;
|
|
|
|
};
|
|
|
|
} // end namespace SHAVE
|
|
|
|
|
2015-09-18 03:56:40 +08:00
|
|
|
/// The Myriad toolchain uses tools that are in two different namespaces.
|
|
|
|
/// The Compiler and Assembler as defined above are in the SHAVE namespace,
|
|
|
|
/// whereas the linker, which accepts code for a mixture of Sparc and SHAVE,
|
|
|
|
/// is in the Myriad namespace.
|
|
|
|
namespace Myriad {
|
|
|
|
class LLVM_LIBRARY_VISIBILITY Linker : public GnuTool {
|
|
|
|
public:
|
|
|
|
Linker(const ToolChain &TC) : GnuTool("shave::Linker", "ld", TC) {}
|
|
|
|
bool hasIntegratedCPP() const override { return false; }
|
|
|
|
bool isLinkJob() const override { return true; }
|
|
|
|
void ConstructJob(Compilation &C, const JobAction &JA,
|
|
|
|
const InputInfo &Output, const InputInfoList &Inputs,
|
|
|
|
const llvm::opt::ArgList &TCArgs,
|
|
|
|
const char *LinkingOutput) const override;
|
|
|
|
};
|
|
|
|
} // end namespace Myriad
|
|
|
|
|
2015-10-14 20:25:43 +08:00
|
|
|
namespace PS4cpu {
|
|
|
|
class LLVM_LIBRARY_VISIBILITY Assemble : public Tool {
|
|
|
|
public:
|
|
|
|
Assemble(const ToolChain &TC)
|
|
|
|
: Tool("PS4cpu::Assemble", "assembler", TC, RF_Full) {}
|
|
|
|
|
2015-11-05 05:37:17 +08:00
|
|
|
bool hasIntegratedCPP() const override { return false; }
|
2015-10-14 20:25:43 +08:00
|
|
|
|
2015-11-05 05:37:17 +08:00
|
|
|
void ConstructJob(Compilation &C, const JobAction &JA,
|
|
|
|
const InputInfo &Output,
|
|
|
|
const InputInfoList &Inputs,
|
|
|
|
const llvm::opt::ArgList &TCArgs,
|
|
|
|
const char *LinkingOutput) const override;
|
2015-10-14 20:25:43 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
class LLVM_LIBRARY_VISIBILITY Link : public Tool {
|
|
|
|
public:
|
|
|
|
Link(const ToolChain &TC) : Tool("PS4cpu::Link", "linker", TC, RF_Full) {}
|
|
|
|
|
2015-11-05 05:37:17 +08:00
|
|
|
bool hasIntegratedCPP() const override { return false; }
|
|
|
|
bool isLinkJob() const override { return true; }
|
2015-10-14 20:25:43 +08:00
|
|
|
|
2015-11-05 05:37:17 +08:00
|
|
|
void ConstructJob(Compilation &C, const JobAction &JA,
|
|
|
|
const InputInfo &Output,
|
|
|
|
const InputInfoList &Inputs,
|
|
|
|
const llvm::opt::ArgList &TCArgs,
|
|
|
|
const char *LinkingOutput) const override;
|
2015-10-14 20:25:43 +08:00
|
|
|
};
|
|
|
|
} // end namespace PS4cpu
|
|
|
|
|
2015-06-04 00:56:50 +08:00
|
|
|
} // end namespace tools
|
2009-03-18 06:07:58 +08:00
|
|
|
} // end namespace driver
|
|
|
|
} // end namespace clang
|
|
|
|
|
2015-11-05 05:37:17 +08:00
|
|
|
#endif // LLVM_CLANG_LIB_DRIVER_TOOLS_H
|