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.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#ifndef CLANG_LIB_DRIVER_TOOLS_H_
|
|
|
|
#define CLANG_LIB_DRIVER_TOOLS_H_
|
|
|
|
|
|
|
|
#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"
|
2009-03-18 06:07:58 +08:00
|
|
|
|
2011-05-16 21:35:02 +08:00
|
|
|
#include "llvm/ADT/Triple.h"
|
2009-03-18 06:07:58 +08:00
|
|
|
#include "llvm/Support/Compiler.h"
|
|
|
|
|
|
|
|
namespace clang {
|
2012-06-20 14:18:46 +08:00
|
|
|
class ObjCRuntime;
|
|
|
|
|
2009-03-18 06:07:58 +08:00
|
|
|
namespace driver {
|
2009-04-18 08:34:01 +08:00
|
|
|
class Driver;
|
|
|
|
|
2009-03-27 00:23:12 +08:00
|
|
|
namespace toolchains {
|
2009-09-05 02:34:51 +08:00
|
|
|
class Darwin;
|
2009-03-27 00:23:12 +08:00
|
|
|
}
|
|
|
|
|
2009-03-18 06:18:43 +08:00
|
|
|
namespace tools {
|
2009-03-18 06:07:58 +08:00
|
|
|
|
2010-05-21 05:30:13 +08:00
|
|
|
/// \brief Clang compiler tool.
|
2010-05-12 04:16:05 +08:00
|
|
|
class LLVM_LIBRARY_VISIBILITY Clang : public Tool {
|
2011-11-06 08:40:05 +08:00
|
|
|
void AddPreprocessingOptions(Compilation &C,
|
|
|
|
const Driver &D,
|
2009-04-18 08:34:01 +08:00
|
|
|
const ArgList &Args,
|
2009-04-09 07:54:23 +08:00
|
|
|
ArgStringList &CmdArgs,
|
|
|
|
const InputInfo &Output,
|
|
|
|
const InputInfoList &Inputs) const;
|
|
|
|
|
2011-03-18 01:10:06 +08:00
|
|
|
void AddARMTargetArgs(const ArgList &Args, ArgStringList &CmdArgs,
|
|
|
|
bool KernelOrKext) const;
|
2010-03-02 10:41:08 +08:00
|
|
|
void AddMIPSTargetArgs(const ArgList &Args, ArgStringList &CmdArgs) const;
|
2012-06-12 06:35:19 +08:00
|
|
|
void AddPPCTargetArgs(const ArgList &Args, ArgStringList &CmdArgs) const;
|
2010-11-10 01:21:19 +08:00
|
|
|
void AddSparcTargetArgs(const ArgList &Args, ArgStringList &CmdArgs) const;
|
2009-09-10 06:33:08 +08:00
|
|
|
void AddX86TargetArgs(const ArgList &Args, ArgStringList &CmdArgs) const;
|
2011-12-13 05:14:55 +08:00
|
|
|
void AddHexagonTargetArgs (const ArgList &Args, ArgStringList &CmdArgs) const;
|
2009-09-10 06:33:08 +08:00
|
|
|
|
2012-06-20 14:18:46 +08:00
|
|
|
enum RewriteKind { RK_None, RK_Fragile, RK_NonFragile };
|
|
|
|
|
|
|
|
ObjCRuntime AddObjCRuntimeArgs(const ArgList &args, ArgStringList &cmdArgs,
|
|
|
|
RewriteKind rewrite) const;
|
|
|
|
|
2009-03-18 06:07:58 +08:00
|
|
|
public:
|
2010-05-22 08:37:18 +08:00
|
|
|
Clang(const ToolChain &TC) : Tool("clang", "clang frontend", TC) {}
|
2009-03-18 06:07:58 +08:00
|
|
|
|
2010-04-07 01:07:49 +08:00
|
|
|
virtual bool hasGoodDiagnostics() const { return true; }
|
2010-02-03 11:07:56 +08:00
|
|
|
virtual bool hasIntegratedAssembler() const { return true; }
|
2009-03-18 06:07:58 +08:00
|
|
|
virtual bool hasIntegratedCPP() const { return true; }
|
2009-03-18 14:00:36 +08:00
|
|
|
|
2010-05-21 05:30:13 +08:00
|
|
|
virtual void ConstructJob(Compilation &C, const JobAction &JA,
|
|
|
|
const InputInfo &Output,
|
|
|
|
const InputInfoList &Inputs,
|
|
|
|
const ArgList &TCArgs,
|
|
|
|
const char *LinkingOutput) const;
|
|
|
|
};
|
|
|
|
|
|
|
|
/// \brief Clang integrated assembler tool.
|
|
|
|
class LLVM_LIBRARY_VISIBILITY ClangAs : public Tool {
|
2012-02-11 04:37:10 +08:00
|
|
|
void AddARMTargetArgs(const ArgList &Args, ArgStringList &CmdArgs) const;
|
2010-05-21 05:30:13 +08:00
|
|
|
public:
|
2010-05-22 08:37:18 +08:00
|
|
|
ClangAs(const ToolChain &TC) : Tool("clang::as",
|
|
|
|
"clang integrated assembler", TC) {}
|
2010-05-21 05:30:13 +08:00
|
|
|
|
|
|
|
virtual bool hasGoodDiagnostics() const { return true; }
|
|
|
|
virtual bool hasIntegratedAssembler() const { return false; }
|
|
|
|
virtual bool hasIntegratedCPP() const { return false; }
|
|
|
|
|
2009-03-18 14:00:36 +08:00
|
|
|
virtual void ConstructJob(Compilation &C, const JobAction &JA,
|
2009-09-09 23:08:12 +08:00
|
|
|
const InputInfo &Output,
|
|
|
|
const InputInfoList &Inputs,
|
|
|
|
const ArgList &TCArgs,
|
2009-03-18 14:00:36 +08:00
|
|
|
const char *LinkingOutput) const;
|
2009-03-18 06:07:58 +08:00
|
|
|
};
|
|
|
|
|
2009-03-18 06:45:24 +08:00
|
|
|
/// gcc - Generic GCC tool implementations.
|
|
|
|
namespace gcc {
|
2010-05-12 04:16:05 +08:00
|
|
|
class LLVM_LIBRARY_VISIBILITY Common : public Tool {
|
2009-03-18 06:07:58 +08:00
|
|
|
public:
|
2010-05-22 08:37:18 +08:00
|
|
|
Common(const char *Name, const char *ShortName,
|
|
|
|
const ToolChain &TC) : Tool(Name, ShortName, TC) {}
|
2009-03-18 14:00:36 +08:00
|
|
|
|
|
|
|
virtual void ConstructJob(Compilation &C, const JobAction &JA,
|
2009-09-09 23:08:12 +08:00
|
|
|
const InputInfo &Output,
|
|
|
|
const InputInfoList &Inputs,
|
|
|
|
const ArgList &TCArgs,
|
2009-03-18 14:00:36 +08:00
|
|
|
const char *LinkingOutput) const;
|
2009-03-18 16:07:30 +08:00
|
|
|
|
|
|
|
/// RenderExtraToolArgs - Render any arguments necessary to force
|
|
|
|
/// the particular tool mode.
|
2010-01-26 06:35:08 +08:00
|
|
|
virtual void RenderExtraToolArgs(const JobAction &JA,
|
|
|
|
ArgStringList &CmdArgs) const = 0;
|
2009-03-18 06:07:58 +08:00
|
|
|
};
|
|
|
|
|
2009-09-09 23:08:12 +08:00
|
|
|
|
2010-05-12 04:16:05 +08:00
|
|
|
class LLVM_LIBRARY_VISIBILITY Preprocess : public Common {
|
2009-03-18 06:07:58 +08:00
|
|
|
public:
|
2010-05-22 08:37:18 +08:00
|
|
|
Preprocess(const ToolChain &TC) : Common("gcc::Preprocess",
|
|
|
|
"gcc preprocessor", TC) {}
|
2009-03-18 16:07:30 +08:00
|
|
|
|
2010-04-07 01:07:49 +08:00
|
|
|
virtual bool hasGoodDiagnostics() const { return true; }
|
2009-03-18 16:07:30 +08:00
|
|
|
virtual bool hasIntegratedCPP() const { return false; }
|
|
|
|
|
2010-01-26 06:35:08 +08:00
|
|
|
virtual void RenderExtraToolArgs(const JobAction &JA,
|
|
|
|
ArgStringList &CmdArgs) const;
|
2009-03-18 16:07:30 +08:00
|
|
|
};
|
|
|
|
|
2010-05-12 04:16:05 +08:00
|
|
|
class LLVM_LIBRARY_VISIBILITY Precompile : public Common {
|
2009-03-18 16:07:30 +08:00
|
|
|
public:
|
2010-05-22 08:37:18 +08:00
|
|
|
Precompile(const ToolChain &TC) : Common("gcc::Precompile",
|
|
|
|
"gcc precompile", TC) {}
|
2009-03-18 06:07:58 +08:00
|
|
|
|
2010-04-07 01:07:49 +08:00
|
|
|
virtual bool hasGoodDiagnostics() const { return true; }
|
2009-03-18 06:07:58 +08:00
|
|
|
virtual bool hasIntegratedCPP() const { return true; }
|
2009-03-18 14:00:36 +08:00
|
|
|
|
2010-01-26 06:35:08 +08:00
|
|
|
virtual void RenderExtraToolArgs(const JobAction &JA,
|
|
|
|
ArgStringList &CmdArgs) const;
|
2009-03-18 06:07:58 +08:00
|
|
|
};
|
|
|
|
|
2010-05-12 04:16:05 +08:00
|
|
|
class LLVM_LIBRARY_VISIBILITY Compile : public Common {
|
2009-03-18 06:07:58 +08:00
|
|
|
public:
|
2010-05-22 08:37:18 +08:00
|
|
|
Compile(const ToolChain &TC) : Common("gcc::Compile",
|
|
|
|
"gcc frontend", TC) {}
|
2009-03-18 06:07:58 +08:00
|
|
|
|
2010-04-07 01:07:49 +08:00
|
|
|
virtual bool hasGoodDiagnostics() const { return true; }
|
2009-03-18 06:07:58 +08:00
|
|
|
virtual bool hasIntegratedCPP() const { return true; }
|
2009-03-18 14:00:36 +08:00
|
|
|
|
2010-01-26 06:35:08 +08:00
|
|
|
virtual void RenderExtraToolArgs(const JobAction &JA,
|
|
|
|
ArgStringList &CmdArgs) const;
|
2009-03-18 06:07:58 +08:00
|
|
|
};
|
|
|
|
|
2010-05-12 04:16:05 +08:00
|
|
|
class LLVM_LIBRARY_VISIBILITY Assemble : public Common {
|
2009-03-18 06:07:58 +08:00
|
|
|
public:
|
2010-05-22 08:37:18 +08:00
|
|
|
Assemble(const ToolChain &TC) : Common("gcc::Assemble",
|
|
|
|
"assembler (via gcc)", TC) {}
|
2009-03-18 06:07:58 +08:00
|
|
|
|
|
|
|
virtual bool hasIntegratedCPP() const { return false; }
|
2009-03-18 14:00:36 +08:00
|
|
|
|
2010-01-26 06:35:08 +08:00
|
|
|
virtual void RenderExtraToolArgs(const JobAction &JA,
|
|
|
|
ArgStringList &CmdArgs) const;
|
2009-03-18 06:07:58 +08:00
|
|
|
};
|
|
|
|
|
2010-05-12 04:16:05 +08:00
|
|
|
class LLVM_LIBRARY_VISIBILITY Link : public Common {
|
2009-03-18 06:07:58 +08:00
|
|
|
public:
|
2010-05-22 08:37:18 +08:00
|
|
|
Link(const ToolChain &TC) : Common("gcc::Link",
|
|
|
|
"linker (via gcc)", TC) {}
|
2009-03-18 06:07:58 +08:00
|
|
|
|
|
|
|
virtual bool hasIntegratedCPP() const { return false; }
|
2012-03-07 08:30:40 +08:00
|
|
|
virtual bool isLinkJob() const { return true; }
|
2009-03-18 14:00:36 +08:00
|
|
|
|
2010-01-26 06:35:08 +08:00
|
|
|
virtual void RenderExtraToolArgs(const JobAction &JA,
|
|
|
|
ArgStringList &CmdArgs) const;
|
2009-03-18 06:07:58 +08:00
|
|
|
};
|
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 {
|
|
|
|
// 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 Assemble : public Tool {
|
|
|
|
public:
|
|
|
|
Assemble(const ToolChain &TC) : Tool("hexagon::Assemble",
|
|
|
|
"hexagon-as", TC) {}
|
|
|
|
|
|
|
|
virtual bool hasIntegratedCPP() const { return false; }
|
|
|
|
|
|
|
|
virtual void RenderExtraToolArgs(const JobAction &JA,
|
|
|
|
ArgStringList &CmdArgs) const;
|
|
|
|
virtual void ConstructJob(Compilation &C, const JobAction &JA,
|
|
|
|
const InputInfo &Output,
|
|
|
|
const InputInfoList &Inputs,
|
|
|
|
const ArgList &TCArgs,
|
|
|
|
const char *LinkingOutput) const;
|
|
|
|
};
|
|
|
|
|
|
|
|
class LLVM_LIBRARY_VISIBILITY Link : public Tool {
|
|
|
|
public:
|
|
|
|
Link(const ToolChain &TC) : Tool("hexagon::Link",
|
|
|
|
"hexagon-ld", TC) {}
|
|
|
|
|
|
|
|
virtual bool hasIntegratedCPP() const { return false; }
|
2012-03-07 08:30:40 +08:00
|
|
|
virtual bool isLinkJob() const { return true; }
|
2011-12-13 05:14:55 +08:00
|
|
|
|
|
|
|
virtual void RenderExtraToolArgs(const JobAction &JA,
|
|
|
|
ArgStringList &CmdArgs) const;
|
|
|
|
virtual void ConstructJob(Compilation &C, const JobAction &JA,
|
|
|
|
const InputInfo &Output,
|
|
|
|
const InputInfoList &Inputs,
|
|
|
|
const ArgList &TCArgs,
|
|
|
|
const char *LinkingOutput) const;
|
|
|
|
};
|
|
|
|
} // end namespace hexagon.
|
|
|
|
|
|
|
|
|
2009-03-20 08:52:38 +08:00
|
|
|
namespace darwin {
|
2010-05-12 04:16:05 +08:00
|
|
|
class LLVM_LIBRARY_VISIBILITY DarwinTool : public Tool {
|
2011-12-20 10:48:34 +08:00
|
|
|
virtual void anchor();
|
2009-09-10 02:36:20 +08:00
|
|
|
protected:
|
|
|
|
void AddDarwinArch(const ArgList &Args, ArgStringList &CmdArgs) const;
|
|
|
|
|
|
|
|
const toolchains::Darwin &getDarwinToolChain() const {
|
|
|
|
return reinterpret_cast<const toolchains::Darwin&>(getToolChain());
|
|
|
|
}
|
|
|
|
|
|
|
|
public:
|
2010-05-22 08:37:18 +08:00
|
|
|
DarwinTool(const char *Name, const char *ShortName,
|
|
|
|
const ToolChain &TC) : Tool(Name, ShortName, TC) {}
|
2009-09-10 02:36:20 +08:00
|
|
|
};
|
|
|
|
|
2010-05-12 04:16:05 +08:00
|
|
|
class LLVM_LIBRARY_VISIBILITY CC1 : public DarwinTool {
|
2011-12-20 10:48:34 +08:00
|
|
|
virtual void anchor();
|
2009-03-30 08:34:04 +08:00
|
|
|
public:
|
2009-09-09 23:08:12 +08:00
|
|
|
static const char *getBaseInputName(const ArgList &Args,
|
2009-03-30 08:34:04 +08:00
|
|
|
const InputInfoList &Input);
|
2009-09-09 23:08:12 +08:00
|
|
|
static const char *getBaseInputStem(const ArgList &Args,
|
2009-03-30 08:34:04 +08:00
|
|
|
const InputInfoList &Input);
|
2009-09-09 23:08:12 +08:00
|
|
|
static const char *getDependencyFileName(const ArgList &Args,
|
2009-03-30 08:34:04 +08:00
|
|
|
const InputInfoList &Inputs);
|
|
|
|
|
2009-03-30 01:08:39 +08:00
|
|
|
protected:
|
|
|
|
const char *getCC1Name(types::ID Type) const;
|
2009-03-30 02:40:18 +08:00
|
|
|
|
|
|
|
void AddCC1Args(const ArgList &Args, ArgStringList &CmdArgs) const;
|
2011-08-18 02:24:55 +08:00
|
|
|
void RemoveCC1UnsupportedArgs(ArgStringList &CmdArgs) const;
|
2009-03-30 01:08:39 +08:00
|
|
|
void AddCC1OptionsArgs(const ArgList &Args, ArgStringList &CmdArgs,
|
|
|
|
const InputInfoList &Inputs,
|
2009-03-30 02:40:18 +08:00
|
|
|
const ArgStringList &OutputArgs) const;
|
2009-03-30 01:08:39 +08:00
|
|
|
void AddCPPOptionsArgs(const ArgList &Args, ArgStringList &CmdArgs,
|
|
|
|
const InputInfoList &Inputs,
|
2009-03-30 02:40:18 +08:00
|
|
|
const ArgStringList &OutputArgs) const;
|
2009-09-09 23:08:12 +08:00
|
|
|
void AddCPPUniqueOptionsArgs(const ArgList &Args,
|
2009-03-30 02:40:18 +08:00
|
|
|
ArgStringList &CmdArgs,
|
|
|
|
const InputInfoList &Inputs) const;
|
|
|
|
void AddCPPArgs(const ArgList &Args, ArgStringList &CmdArgs) const;
|
2009-03-30 01:08:39 +08:00
|
|
|
|
|
|
|
public:
|
2010-05-22 08:37:18 +08:00
|
|
|
CC1(const char *Name, const char *ShortName,
|
|
|
|
const ToolChain &TC) : DarwinTool(Name, ShortName, TC) {}
|
2009-03-30 01:08:39 +08:00
|
|
|
|
2010-04-07 01:07:49 +08:00
|
|
|
virtual bool hasGoodDiagnostics() const { return true; }
|
2009-03-30 01:08:39 +08:00
|
|
|
virtual bool hasIntegratedCPP() const { return true; }
|
|
|
|
};
|
|
|
|
|
2010-05-12 04:16:05 +08:00
|
|
|
class LLVM_LIBRARY_VISIBILITY Preprocess : public CC1 {
|
2009-03-30 01:08:39 +08:00
|
|
|
public:
|
2010-05-22 08:37:18 +08:00
|
|
|
Preprocess(const ToolChain &TC) : CC1("darwin::Preprocess",
|
|
|
|
"gcc preprocessor", TC) {}
|
2009-03-30 01:08:39 +08:00
|
|
|
|
|
|
|
virtual void ConstructJob(Compilation &C, const JobAction &JA,
|
2009-09-09 23:08:12 +08:00
|
|
|
const InputInfo &Output,
|
|
|
|
const InputInfoList &Inputs,
|
|
|
|
const ArgList &TCArgs,
|
2009-03-30 01:08:39 +08:00
|
|
|
const char *LinkingOutput) const;
|
|
|
|
};
|
|
|
|
|
2010-05-12 04:16:05 +08:00
|
|
|
class LLVM_LIBRARY_VISIBILITY Compile : public CC1 {
|
2009-03-30 01:08:39 +08:00
|
|
|
public:
|
2010-05-22 08:37:18 +08:00
|
|
|
Compile(const ToolChain &TC) : CC1("darwin::Compile", "gcc frontend", TC) {}
|
2009-03-30 01:08:39 +08:00
|
|
|
|
|
|
|
virtual void ConstructJob(Compilation &C, const JobAction &JA,
|
2009-09-09 23:08:12 +08:00
|
|
|
const InputInfo &Output,
|
|
|
|
const InputInfoList &Inputs,
|
|
|
|
const ArgList &TCArgs,
|
2009-03-30 01:08:39 +08:00
|
|
|
const char *LinkingOutput) const;
|
|
|
|
};
|
|
|
|
|
2010-05-12 04:16:05 +08:00
|
|
|
class LLVM_LIBRARY_VISIBILITY Assemble : public DarwinTool {
|
2009-03-21 00:06:39 +08:00
|
|
|
public:
|
2010-05-22 08:37:18 +08:00
|
|
|
Assemble(const ToolChain &TC) : DarwinTool("darwin::Assemble",
|
|
|
|
"assembler", TC) {}
|
2009-03-21 00:06:39 +08:00
|
|
|
|
|
|
|
virtual bool hasIntegratedCPP() const { return false; }
|
|
|
|
|
2009-03-27 00:23:12 +08:00
|
|
|
virtual void ConstructJob(Compilation &C, const JobAction &JA,
|
2009-09-09 23:08:12 +08:00
|
|
|
const InputInfo &Output,
|
|
|
|
const InputInfoList &Inputs,
|
|
|
|
const ArgList &TCArgs,
|
2009-03-27 00:23:12 +08:00
|
|
|
const char *LinkingOutput) const;
|
|
|
|
};
|
|
|
|
|
2010-05-12 04:16:05 +08:00
|
|
|
class LLVM_LIBRARY_VISIBILITY Link : public DarwinTool {
|
2012-10-03 02:02:50 +08:00
|
|
|
bool NeedsTempPath(const InputInfoList &Inputs) const;
|
2010-09-10 05:51:05 +08:00
|
|
|
void AddLinkArgs(Compilation &C, const ArgList &Args,
|
2012-10-03 02:02:50 +08:00
|
|
|
ArgStringList &CmdArgs, const InputInfoList &Inputs) const;
|
2009-03-27 00:23:12 +08:00
|
|
|
|
|
|
|
public:
|
2010-05-22 08:37:18 +08:00
|
|
|
Link(const ToolChain &TC) : DarwinTool("darwin::Link", "linker", TC) {}
|
2009-03-27 00:23:12 +08:00
|
|
|
|
|
|
|
virtual bool hasIntegratedCPP() const { return false; }
|
2012-03-07 08:30:40 +08:00
|
|
|
virtual bool isLinkJob() const { return true; }
|
2009-03-27 00:23:12 +08:00
|
|
|
|
2009-03-21 00:06:39 +08:00
|
|
|
virtual void ConstructJob(Compilation &C, const JobAction &JA,
|
2009-09-09 23:08:12 +08:00
|
|
|
const InputInfo &Output,
|
|
|
|
const InputInfoList &Inputs,
|
|
|
|
const ArgList &TCArgs,
|
2009-03-21 00:06:39 +08:00
|
|
|
const char *LinkingOutput) const;
|
|
|
|
};
|
|
|
|
|
2010-05-12 04:16:05 +08:00
|
|
|
class LLVM_LIBRARY_VISIBILITY Lipo : public DarwinTool {
|
2009-03-20 08:52:38 +08:00
|
|
|
public:
|
2010-05-22 08:37:18 +08:00
|
|
|
Lipo(const ToolChain &TC) : DarwinTool("darwin::Lipo", "lipo", TC) {}
|
2009-03-20 08:52:38 +08:00
|
|
|
|
|
|
|
virtual bool hasIntegratedCPP() const { return false; }
|
|
|
|
|
2010-06-05 02:28:36 +08:00
|
|
|
virtual void ConstructJob(Compilation &C, const JobAction &JA,
|
|
|
|
const InputInfo &Output,
|
|
|
|
const InputInfoList &Inputs,
|
|
|
|
const ArgList &TCArgs,
|
|
|
|
const char *LinkingOutput) const;
|
|
|
|
};
|
|
|
|
|
|
|
|
class LLVM_LIBRARY_VISIBILITY Dsymutil : public DarwinTool {
|
|
|
|
public:
|
|
|
|
Dsymutil(const ToolChain &TC) : DarwinTool("darwin::Dsymutil",
|
|
|
|
"dsymutil", TC) {}
|
|
|
|
|
|
|
|
virtual bool hasIntegratedCPP() const { return false; }
|
|
|
|
|
2009-06-30 04:52:51 +08:00
|
|
|
virtual void ConstructJob(Compilation &C, const JobAction &JA,
|
2009-09-09 23:08:12 +08:00
|
|
|
const InputInfo &Output,
|
|
|
|
const InputInfoList &Inputs,
|
|
|
|
const ArgList &TCArgs,
|
2009-06-30 04:52:51 +08:00
|
|
|
const char *LinkingOutput) const;
|
|
|
|
};
|
2011-08-24 01:56:55 +08:00
|
|
|
|
|
|
|
class LLVM_LIBRARY_VISIBILITY VerifyDebug : public DarwinTool {
|
|
|
|
public:
|
|
|
|
VerifyDebug(const ToolChain &TC) : DarwinTool("darwin::VerifyDebug",
|
|
|
|
"dwarfdump", TC) {}
|
|
|
|
|
|
|
|
virtual bool hasIntegratedCPP() const { return false; }
|
|
|
|
|
|
|
|
virtual void ConstructJob(Compilation &C, const JobAction &JA,
|
|
|
|
const InputInfo &Output,
|
|
|
|
const InputInfoList &Inputs,
|
|
|
|
const ArgList &TCArgs,
|
|
|
|
const char *LinkingOutput) const;
|
|
|
|
};
|
|
|
|
|
2009-06-30 04:52:51 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
/// openbsd -- Directly call GNU Binutils assembler and linker
|
|
|
|
namespace openbsd {
|
2010-05-12 04:16:05 +08:00
|
|
|
class LLVM_LIBRARY_VISIBILITY Assemble : public Tool {
|
2009-06-30 04:52:51 +08:00
|
|
|
public:
|
2010-05-22 08:37:18 +08:00
|
|
|
Assemble(const ToolChain &TC) : Tool("openbsd::Assemble", "assembler",
|
|
|
|
TC) {}
|
2009-06-30 04:52:51 +08:00
|
|
|
|
|
|
|
virtual bool hasIntegratedCPP() const { return false; }
|
|
|
|
|
|
|
|
virtual void ConstructJob(Compilation &C, const JobAction &JA,
|
2009-09-09 23:08:12 +08:00
|
|
|
const InputInfo &Output,
|
|
|
|
const InputInfoList &Inputs,
|
|
|
|
const ArgList &TCArgs,
|
2009-06-30 04:52:51 +08:00
|
|
|
const char *LinkingOutput) const;
|
|
|
|
};
|
2010-05-12 04:16:05 +08:00
|
|
|
class LLVM_LIBRARY_VISIBILITY Link : public Tool {
|
2009-06-30 04:52:51 +08:00
|
|
|
public:
|
2010-05-22 08:37:18 +08:00
|
|
|
Link(const ToolChain &TC) : Tool("openbsd::Link", "linker", TC) {}
|
2009-06-30 04:52:51 +08:00
|
|
|
|
|
|
|
virtual bool hasIntegratedCPP() const { return false; }
|
2012-03-07 08:30:40 +08:00
|
|
|
virtual bool isLinkJob() const { return true; }
|
2009-06-30 04:52:51 +08:00
|
|
|
|
2009-03-20 08:52:38 +08:00
|
|
|
virtual void ConstructJob(Compilation &C, const JobAction &JA,
|
2009-09-09 23:08:12 +08:00
|
|
|
const InputInfo &Output,
|
|
|
|
const InputInfoList &Inputs,
|
|
|
|
const ArgList &TCArgs,
|
2009-03-20 08:52:38 +08:00
|
|
|
const char *LinkingOutput) const;
|
|
|
|
};
|
2009-08-22 09:06:46 +08:00
|
|
|
} // end namespace openbsd
|
2009-03-20 08:52:38 +08:00
|
|
|
|
2012-08-09 07:57:20 +08:00
|
|
|
/// bitrig -- Directly call GNU Binutils assembler and linker
|
|
|
|
namespace bitrig {
|
|
|
|
class LLVM_LIBRARY_VISIBILITY Assemble : public Tool {
|
|
|
|
public:
|
|
|
|
Assemble(const ToolChain &TC) : Tool("bitrig::Assemble", "assembler",
|
|
|
|
TC) {}
|
|
|
|
|
|
|
|
virtual bool hasIntegratedCPP() const { return false; }
|
|
|
|
|
|
|
|
virtual void ConstructJob(Compilation &C, const JobAction &JA,
|
|
|
|
const InputInfo &Output,
|
|
|
|
const InputInfoList &Inputs,
|
|
|
|
const ArgList &TCArgs,
|
|
|
|
const char *LinkingOutput) const;
|
|
|
|
};
|
|
|
|
class LLVM_LIBRARY_VISIBILITY Link : public Tool {
|
|
|
|
public:
|
|
|
|
Link(const ToolChain &TC) : Tool("bitrig::Link", "linker", TC) {}
|
|
|
|
|
|
|
|
virtual bool hasIntegratedCPP() const { return false; }
|
|
|
|
virtual bool isLinkJob() const { return true; }
|
|
|
|
|
|
|
|
virtual void ConstructJob(Compilation &C, const JobAction &JA,
|
|
|
|
const InputInfo &Output,
|
|
|
|
const InputInfoList &Inputs,
|
|
|
|
const ArgList &TCArgs,
|
|
|
|
const char *LinkingOutput) const;
|
|
|
|
};
|
|
|
|
} // end namespace bitrig
|
|
|
|
|
2009-04-01 01:45:15 +08:00
|
|
|
/// freebsd -- Directly call GNU Binutils assembler and linker
|
|
|
|
namespace freebsd {
|
2010-05-12 04:16:05 +08:00
|
|
|
class LLVM_LIBRARY_VISIBILITY Assemble : public Tool {
|
2009-04-01 01:45:15 +08:00
|
|
|
public:
|
2010-05-22 08:37:18 +08:00
|
|
|
Assemble(const ToolChain &TC) : Tool("freebsd::Assemble", "assembler",
|
|
|
|
TC) {}
|
2009-04-01 01:45:15 +08:00
|
|
|
|
|
|
|
virtual bool hasIntegratedCPP() const { return false; }
|
|
|
|
|
2009-04-02 03:36:32 +08:00
|
|
|
virtual void ConstructJob(Compilation &C, const JobAction &JA,
|
2009-09-09 23:08:12 +08:00
|
|
|
const InputInfo &Output,
|
|
|
|
const InputInfoList &Inputs,
|
|
|
|
const ArgList &TCArgs,
|
2009-04-02 03:36:32 +08:00
|
|
|
const char *LinkingOutput) const;
|
|
|
|
};
|
2010-05-12 04:16:05 +08:00
|
|
|
class LLVM_LIBRARY_VISIBILITY Link : public Tool {
|
2009-04-02 03:36:32 +08:00
|
|
|
public:
|
2010-05-22 08:37:18 +08:00
|
|
|
Link(const ToolChain &TC) : Tool("freebsd::Link", "linker", TC) {}
|
2009-04-02 03:36:32 +08:00
|
|
|
|
|
|
|
virtual bool hasIntegratedCPP() const { return false; }
|
2012-03-07 08:30:40 +08:00
|
|
|
virtual bool isLinkJob() const { return true; }
|
2009-04-02 03:36:32 +08:00
|
|
|
|
2009-04-01 01:45:15 +08:00
|
|
|
virtual void ConstructJob(Compilation &C, const JobAction &JA,
|
2009-09-09 23:08:12 +08:00
|
|
|
const InputInfo &Output,
|
|
|
|
const InputInfoList &Inputs,
|
|
|
|
const ArgList &TCArgs,
|
2009-04-01 01:45:15 +08:00
|
|
|
const char *LinkingOutput) const;
|
|
|
|
};
|
2009-08-22 09:06:46 +08:00
|
|
|
} // end namespace freebsd
|
|
|
|
|
2011-02-03 02:59:27 +08:00
|
|
|
/// netbsd -- Directly call GNU Binutils assembler and linker
|
|
|
|
namespace netbsd {
|
|
|
|
class LLVM_LIBRARY_VISIBILITY Assemble : public Tool {
|
2011-05-16 21:35:02 +08:00
|
|
|
|
2011-02-03 02:59:27 +08:00
|
|
|
public:
|
2012-01-27 06:27:52 +08:00
|
|
|
Assemble(const ToolChain &TC)
|
|
|
|
: Tool("netbsd::Assemble", "assembler", TC) {}
|
2011-02-03 02:59:27 +08:00
|
|
|
|
|
|
|
virtual bool hasIntegratedCPP() const { return false; }
|
|
|
|
|
|
|
|
virtual void ConstructJob(Compilation &C, const JobAction &JA,
|
|
|
|
const InputInfo &Output,
|
|
|
|
const InputInfoList &Inputs,
|
|
|
|
const ArgList &TCArgs,
|
|
|
|
const char *LinkingOutput) const;
|
|
|
|
};
|
|
|
|
class LLVM_LIBRARY_VISIBILITY Link : public Tool {
|
2011-05-16 21:35:02 +08:00
|
|
|
|
2011-02-03 02:59:27 +08:00
|
|
|
public:
|
2012-01-27 06:27:52 +08:00
|
|
|
Link(const ToolChain &TC)
|
|
|
|
: Tool("netbsd::Link", "linker", TC) {}
|
2011-02-03 02:59:27 +08:00
|
|
|
|
|
|
|
virtual bool hasIntegratedCPP() const { return false; }
|
2012-03-07 08:30:40 +08:00
|
|
|
virtual bool isLinkJob() const { return true; }
|
2011-02-03 02:59:27 +08:00
|
|
|
|
|
|
|
virtual void ConstructJob(Compilation &C, const JobAction &JA,
|
|
|
|
const InputInfo &Output,
|
|
|
|
const InputInfoList &Inputs,
|
|
|
|
const ArgList &TCArgs,
|
|
|
|
const char *LinkingOutput) const;
|
|
|
|
};
|
|
|
|
} // end namespace netbsd
|
|
|
|
|
2010-08-10 08:25:48 +08:00
|
|
|
/// linux -- Directly call GNU Binutils assembler and linker
|
|
|
|
namespace linuxtools {
|
|
|
|
class LLVM_LIBRARY_VISIBILITY Assemble : public Tool {
|
|
|
|
public:
|
|
|
|
Assemble(const ToolChain &TC) : Tool("linux::Assemble", "assembler",
|
|
|
|
TC) {}
|
|
|
|
|
|
|
|
virtual bool hasIntegratedCPP() const { return false; }
|
|
|
|
|
2010-11-08 04:14:31 +08:00
|
|
|
virtual void ConstructJob(Compilation &C, const JobAction &JA,
|
|
|
|
const InputInfo &Output,
|
|
|
|
const InputInfoList &Inputs,
|
|
|
|
const ArgList &TCArgs,
|
|
|
|
const char *LinkingOutput) const;
|
|
|
|
};
|
|
|
|
class LLVM_LIBRARY_VISIBILITY Link : public Tool {
|
|
|
|
public:
|
|
|
|
Link(const ToolChain &TC) : Tool("linux::Link", "linker", TC) {}
|
|
|
|
|
|
|
|
virtual bool hasIntegratedCPP() const { return false; }
|
2012-03-07 08:30:40 +08:00
|
|
|
virtual bool isLinkJob() const { return true; }
|
2010-11-08 04:14:31 +08:00
|
|
|
|
2010-08-10 08:25:48 +08:00
|
|
|
virtual void ConstructJob(Compilation &C, const JobAction &JA,
|
|
|
|
const InputInfo &Output,
|
|
|
|
const InputInfoList &Inputs,
|
|
|
|
const ArgList &TCArgs,
|
|
|
|
const char *LinkingOutput) const;
|
|
|
|
};
|
|
|
|
}
|
2010-07-08 00:01:42 +08:00
|
|
|
/// minix -- Directly call GNU Binutils assembler and linker
|
|
|
|
namespace minix {
|
|
|
|
class LLVM_LIBRARY_VISIBILITY Assemble : public Tool {
|
|
|
|
public:
|
|
|
|
Assemble(const ToolChain &TC) : Tool("minix::Assemble", "assembler",
|
|
|
|
TC) {}
|
|
|
|
|
|
|
|
virtual bool hasIntegratedCPP() const { return false; }
|
|
|
|
|
|
|
|
virtual void ConstructJob(Compilation &C, const JobAction &JA,
|
|
|
|
const InputInfo &Output,
|
|
|
|
const InputInfoList &Inputs,
|
|
|
|
const ArgList &TCArgs,
|
|
|
|
const char *LinkingOutput) const;
|
|
|
|
};
|
|
|
|
class LLVM_LIBRARY_VISIBILITY Link : public Tool {
|
|
|
|
public:
|
|
|
|
Link(const ToolChain &TC) : Tool("minix::Link", "linker", TC) {}
|
|
|
|
|
|
|
|
virtual bool hasIntegratedCPP() const { return false; }
|
2012-03-07 08:30:40 +08:00
|
|
|
virtual bool isLinkJob() const { return true; }
|
2010-07-08 00:01:42 +08:00
|
|
|
|
|
|
|
virtual void ConstructJob(Compilation &C, const JobAction &JA,
|
|
|
|
const InputInfo &Output,
|
|
|
|
const InputInfoList &Inputs,
|
|
|
|
const ArgList &TCArgs,
|
|
|
|
const char *LinkingOutput) const;
|
|
|
|
};
|
|
|
|
} // end namespace minix
|
|
|
|
|
2012-02-15 21:39:01 +08:00
|
|
|
/// solaris -- Directly call Solaris assembler and linker
|
|
|
|
namespace solaris {
|
|
|
|
class LLVM_LIBRARY_VISIBILITY Assemble : public Tool {
|
|
|
|
public:
|
|
|
|
Assemble(const ToolChain &TC) : Tool("solaris::Assemble", "assembler",
|
|
|
|
TC) {}
|
|
|
|
|
|
|
|
virtual bool hasIntegratedCPP() const { return false; }
|
|
|
|
|
|
|
|
virtual void ConstructJob(Compilation &C, const JobAction &JA,
|
|
|
|
const InputInfo &Output,
|
|
|
|
const InputInfoList &Inputs,
|
|
|
|
const ArgList &TCArgs,
|
|
|
|
const char *LinkingOutput) const;
|
|
|
|
};
|
|
|
|
class LLVM_LIBRARY_VISIBILITY Link : public Tool {
|
|
|
|
public:
|
|
|
|
Link(const ToolChain &TC) : Tool("solaris::Link", "linker", TC) {}
|
|
|
|
|
|
|
|
virtual bool hasIntegratedCPP() const { return false; }
|
2012-03-07 08:30:40 +08:00
|
|
|
virtual bool isLinkJob() const { return true; }
|
2012-02-15 21:39:01 +08:00
|
|
|
|
|
|
|
virtual void ConstructJob(Compilation &C, const JobAction &JA,
|
|
|
|
const InputInfo &Output,
|
|
|
|
const InputInfoList &Inputs,
|
|
|
|
const ArgList &TCArgs,
|
|
|
|
const char *LinkingOutput) const;
|
|
|
|
};
|
2012-02-16 00:25:46 +08:00
|
|
|
} // end namespace solaris
|
2012-02-15 21:39:01 +08:00
|
|
|
|
2009-08-22 09:06:46 +08:00
|
|
|
/// auroraux -- Directly call GNU Binutils assembler and linker
|
|
|
|
namespace auroraux {
|
2010-05-12 04:16:05 +08:00
|
|
|
class LLVM_LIBRARY_VISIBILITY Assemble : public Tool {
|
2009-08-22 09:06:46 +08:00
|
|
|
public:
|
2010-05-22 08:37:18 +08:00
|
|
|
Assemble(const ToolChain &TC) : Tool("auroraux::Assemble", "assembler",
|
|
|
|
TC) {}
|
2009-08-22 09:06:46 +08:00
|
|
|
|
|
|
|
virtual bool hasIntegratedCPP() const { return false; }
|
|
|
|
|
|
|
|
virtual void ConstructJob(Compilation &C, const JobAction &JA,
|
2009-09-09 23:08:12 +08:00
|
|
|
const InputInfo &Output,
|
|
|
|
const InputInfoList &Inputs,
|
|
|
|
const ArgList &TCArgs,
|
2009-08-22 09:06:46 +08:00
|
|
|
const char *LinkingOutput) const;
|
|
|
|
};
|
2010-05-12 04:16:05 +08:00
|
|
|
class LLVM_LIBRARY_VISIBILITY Link : public Tool {
|
2009-08-22 09:06:46 +08:00
|
|
|
public:
|
2010-05-22 08:37:18 +08:00
|
|
|
Link(const ToolChain &TC) : Tool("auroraux::Link", "linker", TC) {}
|
2009-08-22 09:06:46 +08:00
|
|
|
|
|
|
|
virtual bool hasIntegratedCPP() const { return false; }
|
2012-03-07 08:30:40 +08:00
|
|
|
virtual bool isLinkJob() const { return true; }
|
2009-08-22 09:06:46 +08:00
|
|
|
|
|
|
|
virtual void ConstructJob(Compilation &C, const JobAction &JA,
|
2009-09-09 23:08:12 +08:00
|
|
|
const InputInfo &Output,
|
|
|
|
const InputInfoList &Inputs,
|
|
|
|
const ArgList &TCArgs,
|
2009-08-22 09:06:46 +08:00
|
|
|
const char *LinkingOutput) const;
|
|
|
|
};
|
|
|
|
} // end namespace auroraux
|
2009-04-01 01:45:15 +08:00
|
|
|
|
2009-05-03 02:28:39 +08:00
|
|
|
/// dragonfly -- Directly call GNU Binutils assembler and linker
|
|
|
|
namespace dragonfly {
|
2010-05-12 04:16:05 +08:00
|
|
|
class LLVM_LIBRARY_VISIBILITY Assemble : public Tool {
|
2009-05-03 02:28:39 +08:00
|
|
|
public:
|
2010-05-22 08:37:18 +08:00
|
|
|
Assemble(const ToolChain &TC) : Tool("dragonfly::Assemble", "assembler",
|
|
|
|
TC) {}
|
2009-05-03 02:28:39 +08:00
|
|
|
|
|
|
|
virtual bool hasIntegratedCPP() const { return false; }
|
|
|
|
|
|
|
|
virtual void ConstructJob(Compilation &C, const JobAction &JA,
|
2009-09-09 23:08:12 +08:00
|
|
|
const InputInfo &Output,
|
|
|
|
const InputInfoList &Inputs,
|
|
|
|
const ArgList &TCArgs,
|
2009-05-03 02:28:39 +08:00
|
|
|
const char *LinkingOutput) const;
|
|
|
|
};
|
2010-05-12 04:16:05 +08:00
|
|
|
class LLVM_LIBRARY_VISIBILITY Link : public Tool {
|
2009-05-03 02:28:39 +08:00
|
|
|
public:
|
2010-05-22 08:37:18 +08:00
|
|
|
Link(const ToolChain &TC) : Tool("dragonfly::Link", "linker", TC) {}
|
2009-05-03 02:28:39 +08:00
|
|
|
|
|
|
|
virtual bool hasIntegratedCPP() const { return false; }
|
2012-03-07 08:30:40 +08:00
|
|
|
virtual bool isLinkJob() const { return true; }
|
2009-05-03 02:28:39 +08:00
|
|
|
|
|
|
|
virtual void ConstructJob(Compilation &C, const JobAction &JA,
|
2009-09-09 23:08:12 +08:00
|
|
|
const InputInfo &Output,
|
|
|
|
const InputInfoList &Inputs,
|
|
|
|
const ArgList &TCArgs,
|
2009-05-03 02:28:39 +08:00
|
|
|
const char *LinkingOutput) const;
|
|
|
|
};
|
2009-08-22 09:06:46 +08:00
|
|
|
} // end namespace dragonfly
|
2009-05-03 02:28:39 +08:00
|
|
|
|
2010-08-22 05:55:07 +08:00
|
|
|
/// Visual studio tools.
|
|
|
|
namespace visualstudio {
|
|
|
|
class LLVM_LIBRARY_VISIBILITY Link : public Tool {
|
|
|
|
public:
|
|
|
|
Link(const ToolChain &TC) : Tool("visualstudio::Link", "linker", TC) {}
|
|
|
|
|
|
|
|
virtual bool hasIntegratedCPP() const { return false; }
|
2012-03-07 08:30:40 +08:00
|
|
|
virtual bool isLinkJob() const { return true; }
|
2010-08-22 05:55:07 +08:00
|
|
|
|
|
|
|
virtual void ConstructJob(Compilation &C, const JobAction &JA,
|
|
|
|
const InputInfo &Output,
|
|
|
|
const InputInfoList &Inputs,
|
|
|
|
const ArgList &TCArgs,
|
|
|
|
const char *LinkingOutput) const;
|
|
|
|
};
|
|
|
|
} // end namespace visualstudio
|
|
|
|
|
2009-03-18 06:07:58 +08:00
|
|
|
} // end namespace toolchains
|
|
|
|
} // end namespace driver
|
|
|
|
} // end namespace clang
|
|
|
|
|
2009-08-22 09:06:46 +08:00
|
|
|
#endif // CLANG_LIB_DRIVER_TOOLS_H_
|