mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-12-22 15:31:00 +00:00
Pedantically rename all Tool subclasses to be nouns, not verbs. NFC
Classes in Tools.h inherit ultimately from Tool, which is a noun, but subclasses of Tool were named for their operation, such as "Compile", wherein the constructor call "Compile(args...)" could be misconstrued as actually causing a compile to happen. Likewise various other methods were not harmonious with their effect, in that "BuildLinker()" returned a "new namespace::Link(...)" instead of a "new namespace::Linker(...)" which it now does. Exceptions: Clang and ClangAs are un-renamed. Those are their rightful names. And there is no particulary great way to name the "Lipo-er" and a few others. Differential Revision: http://reviews.llvm.org/D10595 llvm-svn: 240455
This commit is contained in:
parent
49047039b0
commit
9535429270
@ -108,10 +108,9 @@ AddCXXStdlibLibArgs(const llvm::opt::ArgList &DriverArgs,
|
|||||||
}
|
}
|
||||||
|
|
||||||
Tool *CrossWindowsToolChain::buildLinker() const {
|
Tool *CrossWindowsToolChain::buildLinker() const {
|
||||||
return new tools::CrossWindows::Link(*this);
|
return new tools::CrossWindows::Linker(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
Tool *CrossWindowsToolChain::buildAssembler() const {
|
Tool *CrossWindowsToolChain::buildAssembler() const {
|
||||||
return new tools::CrossWindows::Assemble(*this);
|
return new tools::CrossWindows::Assembler(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -53,12 +53,12 @@ MSVCToolChain::MSVCToolChain(const Driver &D, const llvm::Triple& Triple,
|
|||||||
}
|
}
|
||||||
|
|
||||||
Tool *MSVCToolChain::buildLinker() const {
|
Tool *MSVCToolChain::buildLinker() const {
|
||||||
return new tools::visualstudio::Link(*this);
|
return new tools::visualstudio::Linker(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
Tool *MSVCToolChain::buildAssembler() const {
|
Tool *MSVCToolChain::buildAssembler() const {
|
||||||
if (getTriple().isOSBinFormatMachO())
|
if (getTriple().isOSBinFormatMachO())
|
||||||
return new tools::darwin::Assemble(*this);
|
return new tools::darwin::Assembler(*this);
|
||||||
getDriver().Diag(clang::diag::err_no_external_assembler);
|
getDriver().Diag(clang::diag::err_no_external_assembler);
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
@ -211,18 +211,15 @@ Tool *MachO::getTool(Action::ActionClass AC) const {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Tool *MachO::buildLinker() const {
|
Tool *MachO::buildLinker() const { return new tools::darwin::Linker(*this); }
|
||||||
return new tools::darwin::Link(*this);
|
|
||||||
}
|
|
||||||
|
|
||||||
Tool *MachO::buildAssembler() const {
|
Tool *MachO::buildAssembler() const {
|
||||||
return new tools::darwin::Assemble(*this);
|
return new tools::darwin::Assembler(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
DarwinClang::DarwinClang(const Driver &D, const llvm::Triple& Triple,
|
DarwinClang::DarwinClang(const Driver &D, const llvm::Triple &Triple,
|
||||||
const ArgList &Args)
|
const ArgList &Args)
|
||||||
: Darwin(D, Triple, Args) {
|
: Darwin(D, Triple, Args) {}
|
||||||
}
|
|
||||||
|
|
||||||
void DarwinClang::addClangWarningOptions(ArgStringList &CC1Args) const {
|
void DarwinClang::addClangWarningOptions(ArgStringList &CC1Args) const {
|
||||||
// For iOS, 64-bit, promote certain warnings to errors.
|
// For iOS, 64-bit, promote certain warnings to errors.
|
||||||
@ -2015,11 +2012,11 @@ Tool *Generic_GCC::getTool(Action::ActionClass AC) const {
|
|||||||
switch (AC) {
|
switch (AC) {
|
||||||
case Action::PreprocessJobClass:
|
case Action::PreprocessJobClass:
|
||||||
if (!Preprocess)
|
if (!Preprocess)
|
||||||
Preprocess.reset(new tools::gcc::Preprocess(*this));
|
Preprocess.reset(new tools::gcc::Preprocessor(*this));
|
||||||
return Preprocess.get();
|
return Preprocess.get();
|
||||||
case Action::CompileJobClass:
|
case Action::CompileJobClass:
|
||||||
if (!Compile)
|
if (!Compile)
|
||||||
Compile.reset(new tools::gcc::Compile(*this));
|
Compile.reset(new tools::gcc::Compiler(*this));
|
||||||
return Compile.get();
|
return Compile.get();
|
||||||
default:
|
default:
|
||||||
return ToolChain::getTool(AC);
|
return ToolChain::getTool(AC);
|
||||||
@ -2027,12 +2024,10 @@ Tool *Generic_GCC::getTool(Action::ActionClass AC) const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Tool *Generic_GCC::buildAssembler() const {
|
Tool *Generic_GCC::buildAssembler() const {
|
||||||
return new tools::gnutools::Assemble(*this);
|
return new tools::gnutools::Assembler(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
Tool *Generic_GCC::buildLinker() const {
|
Tool *Generic_GCC::buildLinker() const { return new tools::gcc::Linker(*this); }
|
||||||
return new tools::gcc::Link(*this);
|
|
||||||
}
|
|
||||||
|
|
||||||
void Generic_GCC::printVerboseInfo(raw_ostream &OS) const {
|
void Generic_GCC::printVerboseInfo(raw_ostream &OS) const {
|
||||||
// Print the information about how we detected the GCC installation.
|
// Print the information about how we detected the GCC installation.
|
||||||
@ -2228,15 +2223,14 @@ Hexagon_TC::Hexagon_TC(const Driver &D, const llvm::Triple &Triple,
|
|||||||
LibPaths);
|
LibPaths);
|
||||||
}
|
}
|
||||||
|
|
||||||
Hexagon_TC::~Hexagon_TC() {
|
Hexagon_TC::~Hexagon_TC() {}
|
||||||
}
|
|
||||||
|
|
||||||
Tool *Hexagon_TC::buildAssembler() const {
|
Tool *Hexagon_TC::buildAssembler() const {
|
||||||
return new tools::hexagon::Assemble(*this);
|
return new tools::hexagon::Assembler(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
Tool *Hexagon_TC::buildLinker() const {
|
Tool *Hexagon_TC::buildLinker() const {
|
||||||
return new tools::hexagon::Link(*this);
|
return new tools::hexagon::Linker(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Hexagon_TC::AddClangSystemIncludeArgs(const ArgList &DriverArgs,
|
void Hexagon_TC::AddClangSystemIncludeArgs(const ArgList &DriverArgs,
|
||||||
@ -2482,13 +2476,13 @@ std::string NaCl_TC::ComputeEffectiveClangTriple(
|
|||||||
}
|
}
|
||||||
|
|
||||||
Tool *NaCl_TC::buildLinker() const {
|
Tool *NaCl_TC::buildLinker() const {
|
||||||
return new tools::nacltools::Link(*this);
|
return new tools::nacltools::Linker(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
Tool *NaCl_TC::buildAssembler() const {
|
Tool *NaCl_TC::buildAssembler() const {
|
||||||
if (getTriple().getArch() == llvm::Triple::arm)
|
if (getTriple().getArch() == llvm::Triple::arm)
|
||||||
return new tools::nacltools::AssembleARM(*this);
|
return new tools::nacltools::AssemblerARM(*this);
|
||||||
return new tools::gnutools::Assemble(*this);
|
return new tools::gnutools::Assembler(*this);
|
||||||
}
|
}
|
||||||
// End NaCl
|
// End NaCl
|
||||||
|
|
||||||
@ -2553,7 +2547,9 @@ void CloudABI::AddCXXStdlibLibArgs(const ArgList &Args,
|
|||||||
CmdArgs.push_back("-lunwind");
|
CmdArgs.push_back("-lunwind");
|
||||||
}
|
}
|
||||||
|
|
||||||
Tool *CloudABI::buildLinker() const { return new tools::cloudabi::Link(*this); }
|
Tool *CloudABI::buildLinker() const {
|
||||||
|
return new tools::cloudabi::Linker(*this);
|
||||||
|
}
|
||||||
|
|
||||||
/// OpenBSD - OpenBSD tool chain which can call as(1) and ld(1) directly.
|
/// OpenBSD - OpenBSD tool chain which can call as(1) and ld(1) directly.
|
||||||
|
|
||||||
@ -2564,12 +2560,10 @@ OpenBSD::OpenBSD(const Driver &D, const llvm::Triple& Triple, const ArgList &Arg
|
|||||||
}
|
}
|
||||||
|
|
||||||
Tool *OpenBSD::buildAssembler() const {
|
Tool *OpenBSD::buildAssembler() const {
|
||||||
return new tools::openbsd::Assemble(*this);
|
return new tools::openbsd::Assembler(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
Tool *OpenBSD::buildLinker() const {
|
Tool *OpenBSD::buildLinker() const { return new tools::openbsd::Linker(*this); }
|
||||||
return new tools::openbsd::Link(*this);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Bitrig - Bitrig tool chain which can call as(1) and ld(1) directly.
|
/// Bitrig - Bitrig tool chain which can call as(1) and ld(1) directly.
|
||||||
|
|
||||||
@ -2580,15 +2574,12 @@ Bitrig::Bitrig(const Driver &D, const llvm::Triple& Triple, const ArgList &Args)
|
|||||||
}
|
}
|
||||||
|
|
||||||
Tool *Bitrig::buildAssembler() const {
|
Tool *Bitrig::buildAssembler() const {
|
||||||
return new tools::bitrig::Assemble(*this);
|
return new tools::bitrig::Assembler(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
Tool *Bitrig::buildLinker() const {
|
Tool *Bitrig::buildLinker() const { return new tools::bitrig::Linker(*this); }
|
||||||
return new tools::bitrig::Link(*this);
|
|
||||||
}
|
|
||||||
|
|
||||||
ToolChain::CXXStdlibType
|
ToolChain::CXXStdlibType Bitrig::GetCXXStdlibType(const ArgList &Args) const {
|
||||||
Bitrig::GetCXXStdlibType(const ArgList &Args) const {
|
|
||||||
if (Arg *A = Args.getLastArg(options::OPT_stdlib_EQ)) {
|
if (Arg *A = Args.getLastArg(options::OPT_stdlib_EQ)) {
|
||||||
StringRef Value = A->getValue();
|
StringRef Value = A->getValue();
|
||||||
if (Value == "libstdc++")
|
if (Value == "libstdc++")
|
||||||
@ -2699,12 +2690,10 @@ void FreeBSD::AddClangCXXStdlibIncludeArgs(const ArgList &DriverArgs,
|
|||||||
}
|
}
|
||||||
|
|
||||||
Tool *FreeBSD::buildAssembler() const {
|
Tool *FreeBSD::buildAssembler() const {
|
||||||
return new tools::freebsd::Assemble(*this);
|
return new tools::freebsd::Assembler(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
Tool *FreeBSD::buildLinker() const {
|
Tool *FreeBSD::buildLinker() const { return new tools::freebsd::Linker(*this); }
|
||||||
return new tools::freebsd::Link(*this);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool FreeBSD::UseSjLjExceptions() const {
|
bool FreeBSD::UseSjLjExceptions() const {
|
||||||
// FreeBSD uses SjLj exceptions on ARM oabi.
|
// FreeBSD uses SjLj exceptions on ARM oabi.
|
||||||
@ -2801,15 +2790,12 @@ NetBSD::NetBSD(const Driver &D, const llvm::Triple& Triple, const ArgList &Args)
|
|||||||
}
|
}
|
||||||
|
|
||||||
Tool *NetBSD::buildAssembler() const {
|
Tool *NetBSD::buildAssembler() const {
|
||||||
return new tools::netbsd::Assemble(*this);
|
return new tools::netbsd::Assembler(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
Tool *NetBSD::buildLinker() const {
|
Tool *NetBSD::buildLinker() const { return new tools::netbsd::Linker(*this); }
|
||||||
return new tools::netbsd::Link(*this);
|
|
||||||
}
|
|
||||||
|
|
||||||
ToolChain::CXXStdlibType
|
ToolChain::CXXStdlibType NetBSD::GetCXXStdlibType(const ArgList &Args) const {
|
||||||
NetBSD::GetCXXStdlibType(const ArgList &Args) const {
|
|
||||||
if (Arg *A = Args.getLastArg(options::OPT_stdlib_EQ)) {
|
if (Arg *A = Args.getLastArg(options::OPT_stdlib_EQ)) {
|
||||||
StringRef Value = A->getValue();
|
StringRef Value = A->getValue();
|
||||||
if (Value == "libstdc++")
|
if (Value == "libstdc++")
|
||||||
@ -2872,12 +2858,10 @@ Minix::Minix(const Driver &D, const llvm::Triple& Triple, const ArgList &Args)
|
|||||||
}
|
}
|
||||||
|
|
||||||
Tool *Minix::buildAssembler() const {
|
Tool *Minix::buildAssembler() const {
|
||||||
return new tools::minix::Assemble(*this);
|
return new tools::minix::Assembler(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
Tool *Minix::buildLinker() const {
|
Tool *Minix::buildLinker() const { return new tools::minix::Linker(*this); }
|
||||||
return new tools::minix::Link(*this);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Solaris - Solaris tool chain which can call as(1) and ld(1) directly.
|
/// Solaris - Solaris tool chain which can call as(1) and ld(1) directly.
|
||||||
|
|
||||||
@ -2894,12 +2878,10 @@ Solaris::Solaris(const Driver &D, const llvm::Triple& Triple,
|
|||||||
}
|
}
|
||||||
|
|
||||||
Tool *Solaris::buildAssembler() const {
|
Tool *Solaris::buildAssembler() const {
|
||||||
return new tools::solaris::Assemble(*this);
|
return new tools::solaris::Assembler(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
Tool *Solaris::buildLinker() const {
|
Tool *Solaris::buildLinker() const { return new tools::solaris::Linker(*this); }
|
||||||
return new tools::solaris::Link(*this);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Distribution (very bare-bones at the moment).
|
/// Distribution (very bare-bones at the moment).
|
||||||
|
|
||||||
@ -3345,12 +3327,10 @@ bool Linux::HasNativeLLVMSupport() const {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
Tool *Linux::buildLinker() const {
|
Tool *Linux::buildLinker() const { return new tools::gnutools::Linker(*this); }
|
||||||
return new tools::gnutools::Link(*this);
|
|
||||||
}
|
|
||||||
|
|
||||||
Tool *Linux::buildAssembler() const {
|
Tool *Linux::buildAssembler() const {
|
||||||
return new tools::gnutools::Assemble(*this);
|
return new tools::gnutools::Assembler(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string Linux::computeSysRoot() const {
|
std::string Linux::computeSysRoot() const {
|
||||||
@ -3710,14 +3690,13 @@ DragonFly::DragonFly(const Driver &D, const llvm::Triple& Triple, const ArgList
|
|||||||
}
|
}
|
||||||
|
|
||||||
Tool *DragonFly::buildAssembler() const {
|
Tool *DragonFly::buildAssembler() const {
|
||||||
return new tools::dragonfly::Assemble(*this);
|
return new tools::dragonfly::Assembler(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
Tool *DragonFly::buildLinker() const {
|
Tool *DragonFly::buildLinker() const {
|
||||||
return new tools::dragonfly::Link(*this);
|
return new tools::dragonfly::Linker(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// XCore tool chain
|
/// XCore tool chain
|
||||||
XCore::XCore(const Driver &D, const llvm::Triple &Triple,
|
XCore::XCore(const Driver &D, const llvm::Triple &Triple,
|
||||||
const ArgList &Args) : ToolChain(D, Triple, Args) {
|
const ArgList &Args) : ToolChain(D, Triple, Args) {
|
||||||
@ -3725,16 +3704,12 @@ XCore::XCore(const Driver &D, const llvm::Triple &Triple,
|
|||||||
}
|
}
|
||||||
|
|
||||||
Tool *XCore::buildAssembler() const {
|
Tool *XCore::buildAssembler() const {
|
||||||
return new tools::XCore::Assemble(*this);
|
return new tools::XCore::Assembler(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
Tool *XCore::buildLinker() const {
|
Tool *XCore::buildLinker() const { return new tools::XCore::Linker(*this); }
|
||||||
return new tools::XCore::Link(*this);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool XCore::isPICDefault() const {
|
bool XCore::isPICDefault() const { return false; }
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool XCore::isPIEDefault() const {
|
bool XCore::isPIEDefault() const {
|
||||||
return false;
|
return false;
|
||||||
@ -3797,11 +3772,11 @@ Tool *SHAVEToolChain::SelectTool(const JobAction &JA) const {
|
|||||||
switch (JA.getKind()) {
|
switch (JA.getKind()) {
|
||||||
case Action::CompileJobClass:
|
case Action::CompileJobClass:
|
||||||
if (!Compiler)
|
if (!Compiler)
|
||||||
Compiler.reset(new tools::SHAVE::Compile(*this));
|
Compiler.reset(new tools::SHAVE::Compiler(*this));
|
||||||
return Compiler.get();
|
return Compiler.get();
|
||||||
case Action::AssembleJobClass:
|
case Action::AssembleJobClass:
|
||||||
if (!Assembler)
|
if (!Assembler)
|
||||||
Assembler.reset(new tools::SHAVE::Assemble(*this));
|
Assembler.reset(new tools::SHAVE::Assembler(*this));
|
||||||
return Assembler.get();
|
return Assembler.get();
|
||||||
default:
|
default:
|
||||||
return ToolChain::getTool(JA.getKind());
|
return ToolChain::getTool(JA.getKind());
|
||||||
|
@ -179,8 +179,8 @@ protected:
|
|||||||
/// @}
|
/// @}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
mutable std::unique_ptr<tools::gcc::Preprocess> Preprocess;
|
mutable std::unique_ptr<tools::gcc::Preprocessor> Preprocess;
|
||||||
mutable std::unique_ptr<tools::gcc::Compile> Compile;
|
mutable std::unique_ptr<tools::gcc::Compiler> Compile;
|
||||||
};
|
};
|
||||||
|
|
||||||
class LLVM_LIBRARY_VISIBILITY MachO : public ToolChain {
|
class LLVM_LIBRARY_VISIBILITY MachO : public ToolChain {
|
||||||
|
@ -5176,9 +5176,9 @@ void Clang::AddClangCLArgs(const ArgList &Args, ArgStringList &CmdArgs) const {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
visualstudio::Compile *Clang::getCLFallback() const {
|
visualstudio::Compiler *Clang::getCLFallback() const {
|
||||||
if (!CLFallback)
|
if (!CLFallback)
|
||||||
CLFallback.reset(new visualstudio::Compile(getToolChain()));
|
CLFallback.reset(new visualstudio::Compiler(getToolChain()));
|
||||||
return CLFallback.get();
|
return CLFallback.get();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -5467,13 +5467,13 @@ void gcc::Common::ConstructJob(Compilation &C, const JobAction &JA,
|
|||||||
C.addCommand(llvm::make_unique<Command>(JA, *this, Exec, CmdArgs));
|
C.addCommand(llvm::make_unique<Command>(JA, *this, Exec, CmdArgs));
|
||||||
}
|
}
|
||||||
|
|
||||||
void gcc::Preprocess::RenderExtraToolArgs(const JobAction &JA,
|
void gcc::Preprocessor::RenderExtraToolArgs(const JobAction &JA,
|
||||||
ArgStringList &CmdArgs) const {
|
ArgStringList &CmdArgs) const {
|
||||||
CmdArgs.push_back("-E");
|
CmdArgs.push_back("-E");
|
||||||
}
|
}
|
||||||
|
|
||||||
void gcc::Compile::RenderExtraToolArgs(const JobAction &JA,
|
void gcc::Compiler::RenderExtraToolArgs(const JobAction &JA,
|
||||||
ArgStringList &CmdArgs) const {
|
ArgStringList &CmdArgs) const {
|
||||||
const Driver &D = getToolChain().getDriver();
|
const Driver &D = getToolChain().getDriver();
|
||||||
|
|
||||||
switch (JA.getType()) {
|
switch (JA.getType()) {
|
||||||
@ -5495,21 +5495,19 @@ void gcc::Compile::RenderExtraToolArgs(const JobAction &JA,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void gcc::Link::RenderExtraToolArgs(const JobAction &JA,
|
void gcc::Linker::RenderExtraToolArgs(const JobAction &JA,
|
||||||
ArgStringList &CmdArgs) const {
|
ArgStringList &CmdArgs) const {
|
||||||
// The types are (hopefully) good enough.
|
// The types are (hopefully) good enough.
|
||||||
}
|
}
|
||||||
|
|
||||||
// Hexagon tools start.
|
// Hexagon tools start.
|
||||||
void hexagon::Assemble::RenderExtraToolArgs(const JobAction &JA,
|
void hexagon::Assembler::RenderExtraToolArgs(const JobAction &JA,
|
||||||
ArgStringList &CmdArgs) const {
|
ArgStringList &CmdArgs) const {}
|
||||||
|
void hexagon::Assembler::ConstructJob(Compilation &C, const JobAction &JA,
|
||||||
}
|
const InputInfo &Output,
|
||||||
void hexagon::Assemble::ConstructJob(Compilation &C, const JobAction &JA,
|
const InputInfoList &Inputs,
|
||||||
const InputInfo &Output,
|
const ArgList &Args,
|
||||||
const InputInfoList &Inputs,
|
const char *LinkingOutput) const {
|
||||||
const ArgList &Args,
|
|
||||||
const char *LinkingOutput) const {
|
|
||||||
claimNoWarnArgs(Args);
|
claimNoWarnArgs(Args);
|
||||||
|
|
||||||
const Driver &D = getToolChain().getDriver();
|
const Driver &D = getToolChain().getDriver();
|
||||||
@ -5568,8 +5566,8 @@ void hexagon::Assemble::ConstructJob(Compilation &C, const JobAction &JA,
|
|||||||
C.addCommand(llvm::make_unique<Command>(JA, *this, Exec, CmdArgs));
|
C.addCommand(llvm::make_unique<Command>(JA, *this, Exec, CmdArgs));
|
||||||
}
|
}
|
||||||
|
|
||||||
void hexagon::Link::RenderExtraToolArgs(const JobAction &JA,
|
void hexagon::Linker::RenderExtraToolArgs(const JobAction &JA,
|
||||||
ArgStringList &CmdArgs) const {
|
ArgStringList &CmdArgs) const {
|
||||||
// The types are (hopefully) good enough.
|
// The types are (hopefully) good enough.
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -5728,11 +5726,11 @@ static void constructHexagonLinkArgs(Compilation &C, const JobAction &JA,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void hexagon::Link::ConstructJob(Compilation &C, const JobAction &JA,
|
void hexagon::Linker::ConstructJob(Compilation &C, const JobAction &JA,
|
||||||
const InputInfo &Output,
|
const InputInfo &Output,
|
||||||
const InputInfoList &Inputs,
|
const InputInfoList &Inputs,
|
||||||
const ArgList &Args,
|
const ArgList &Args,
|
||||||
const char *LinkingOutput) const {
|
const char *LinkingOutput) const {
|
||||||
|
|
||||||
const toolchains::Hexagon_TC& ToolChain =
|
const toolchains::Hexagon_TC& ToolChain =
|
||||||
static_cast<const toolchains::Hexagon_TC&>(getToolChain());
|
static_cast<const toolchains::Hexagon_TC&>(getToolChain());
|
||||||
@ -5992,11 +5990,11 @@ const char *Clang::getDependencyFileName(const ArgList &Args,
|
|||||||
return Args.MakeArgString(Res + ".d");
|
return Args.MakeArgString(Res + ".d");
|
||||||
}
|
}
|
||||||
|
|
||||||
void cloudabi::Link::ConstructJob(Compilation &C, const JobAction &JA,
|
void cloudabi::Linker::ConstructJob(Compilation &C, const JobAction &JA,
|
||||||
const InputInfo &Output,
|
const InputInfo &Output,
|
||||||
const InputInfoList &Inputs,
|
const InputInfoList &Inputs,
|
||||||
const ArgList &Args,
|
const ArgList &Args,
|
||||||
const char *LinkingOutput) const {
|
const char *LinkingOutput) const {
|
||||||
const ToolChain &ToolChain = getToolChain();
|
const ToolChain &ToolChain = getToolChain();
|
||||||
const Driver &D = ToolChain.getDriver();
|
const Driver &D = ToolChain.getDriver();
|
||||||
ArgStringList CmdArgs;
|
ArgStringList CmdArgs;
|
||||||
@ -6062,11 +6060,11 @@ void cloudabi::Link::ConstructJob(Compilation &C, const JobAction &JA,
|
|||||||
C.addCommand(llvm::make_unique<Command>(JA, *this, Exec, CmdArgs));
|
C.addCommand(llvm::make_unique<Command>(JA, *this, Exec, CmdArgs));
|
||||||
}
|
}
|
||||||
|
|
||||||
void darwin::Assemble::ConstructJob(Compilation &C, const JobAction &JA,
|
void darwin::Assembler::ConstructJob(Compilation &C, const JobAction &JA,
|
||||||
const InputInfo &Output,
|
const InputInfo &Output,
|
||||||
const InputInfoList &Inputs,
|
const InputInfoList &Inputs,
|
||||||
const ArgList &Args,
|
const ArgList &Args,
|
||||||
const char *LinkingOutput) const {
|
const char *LinkingOutput) const {
|
||||||
ArgStringList CmdArgs;
|
ArgStringList CmdArgs;
|
||||||
|
|
||||||
assert(Inputs.size() == 1 && "Unexpected number of inputs.");
|
assert(Inputs.size() == 1 && "Unexpected number of inputs.");
|
||||||
@ -6147,7 +6145,7 @@ void darwin::MachOTool::AddMachOArch(const ArgList &Args,
|
|||||||
CmdArgs.push_back("-force_cpusubtype_ALL");
|
CmdArgs.push_back("-force_cpusubtype_ALL");
|
||||||
}
|
}
|
||||||
|
|
||||||
bool darwin::Link::NeedsTempPath(const InputInfoList &Inputs) const {
|
bool darwin::Linker::NeedsTempPath(const InputInfoList &Inputs) const {
|
||||||
// We only need to generate a temp path for LTO if we aren't compiling object
|
// We only need to generate a temp path for LTO if we aren't compiling object
|
||||||
// files. When compiling source files, we run 'dsymutil' after linking. We
|
// files. When compiling source files, we run 'dsymutil' after linking. We
|
||||||
// don't run 'dsymutil' when compiling object files.
|
// don't run 'dsymutil' when compiling object files.
|
||||||
@ -6158,10 +6156,9 @@ bool darwin::Link::NeedsTempPath(const InputInfoList &Inputs) const {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void darwin::Link::AddLinkArgs(Compilation &C,
|
void darwin::Linker::AddLinkArgs(Compilation &C, const ArgList &Args,
|
||||||
const ArgList &Args,
|
ArgStringList &CmdArgs,
|
||||||
ArgStringList &CmdArgs,
|
const InputInfoList &Inputs) const {
|
||||||
const InputInfoList &Inputs) const {
|
|
||||||
const Driver &D = getToolChain().getDriver();
|
const Driver &D = getToolChain().getDriver();
|
||||||
const toolchains::MachO &MachOTC = getMachOToolChain();
|
const toolchains::MachO &MachOTC = getMachOToolChain();
|
||||||
|
|
||||||
@ -6338,11 +6335,11 @@ void darwin::Link::AddLinkArgs(Compilation &C,
|
|||||||
Args.AddLastArg(CmdArgs, options::OPT_Mach);
|
Args.AddLastArg(CmdArgs, options::OPT_Mach);
|
||||||
}
|
}
|
||||||
|
|
||||||
void darwin::Link::ConstructJob(Compilation &C, const JobAction &JA,
|
void darwin::Linker::ConstructJob(Compilation &C, const JobAction &JA,
|
||||||
const InputInfo &Output,
|
const InputInfo &Output,
|
||||||
const InputInfoList &Inputs,
|
const InputInfoList &Inputs,
|
||||||
const ArgList &Args,
|
const ArgList &Args,
|
||||||
const char *LinkingOutput) const {
|
const char *LinkingOutput) const {
|
||||||
assert(Output.getType() == types::TY_Image && "Invalid linker output type.");
|
assert(Output.getType() == types::TY_Image && "Invalid linker output type.");
|
||||||
|
|
||||||
// If the number of arguments surpasses the system limits, we will encode the
|
// If the number of arguments surpasses the system limits, we will encode the
|
||||||
@ -6572,7 +6569,7 @@ void darwin::VerifyDebug::ConstructJob(Compilation &C, const JobAction &JA,
|
|||||||
C.addCommand(llvm::make_unique<Command>(JA, *this, Exec, CmdArgs));
|
C.addCommand(llvm::make_unique<Command>(JA, *this, Exec, CmdArgs));
|
||||||
}
|
}
|
||||||
|
|
||||||
void solaris::Assemble::ConstructJob(Compilation &C, const JobAction &JA,
|
void solaris::Assembler::ConstructJob(Compilation &C, const JobAction &JA,
|
||||||
const InputInfo &Output,
|
const InputInfo &Output,
|
||||||
const InputInfoList &Inputs,
|
const InputInfoList &Inputs,
|
||||||
const ArgList &Args,
|
const ArgList &Args,
|
||||||
@ -6593,11 +6590,11 @@ void solaris::Assemble::ConstructJob(Compilation &C, const JobAction &JA,
|
|||||||
C.addCommand(llvm::make_unique<Command>(JA, *this, Exec, CmdArgs));
|
C.addCommand(llvm::make_unique<Command>(JA, *this, Exec, CmdArgs));
|
||||||
}
|
}
|
||||||
|
|
||||||
void solaris::Link::ConstructJob(Compilation &C, const JobAction &JA,
|
void solaris::Linker::ConstructJob(Compilation &C, const JobAction &JA,
|
||||||
const InputInfo &Output,
|
const InputInfo &Output,
|
||||||
const InputInfoList &Inputs,
|
const InputInfoList &Inputs,
|
||||||
const ArgList &Args,
|
const ArgList &Args,
|
||||||
const char *LinkingOutput) const {
|
const char *LinkingOutput) const {
|
||||||
// FIXME: Find a real GCC, don't hard-code versions here
|
// FIXME: Find a real GCC, don't hard-code versions here
|
||||||
std::string GCCLibPath = "/usr/gcc/4.5/lib/gcc/";
|
std::string GCCLibPath = "/usr/gcc/4.5/lib/gcc/";
|
||||||
const llvm::Triple &T = getToolChain().getTriple();
|
const llvm::Triple &T = getToolChain().getTriple();
|
||||||
@ -6698,11 +6695,11 @@ void solaris::Link::ConstructJob(Compilation &C, const JobAction &JA,
|
|||||||
C.addCommand(llvm::make_unique<Command>(JA, *this, Exec, CmdArgs));
|
C.addCommand(llvm::make_unique<Command>(JA, *this, Exec, CmdArgs));
|
||||||
}
|
}
|
||||||
|
|
||||||
void openbsd::Assemble::ConstructJob(Compilation &C, const JobAction &JA,
|
void openbsd::Assembler::ConstructJob(Compilation &C, const JobAction &JA,
|
||||||
const InputInfo &Output,
|
const InputInfo &Output,
|
||||||
const InputInfoList &Inputs,
|
const InputInfoList &Inputs,
|
||||||
const ArgList &Args,
|
const ArgList &Args,
|
||||||
const char *LinkingOutput) const {
|
const char *LinkingOutput) const {
|
||||||
claimNoWarnArgs(Args);
|
claimNoWarnArgs(Args);
|
||||||
ArgStringList CmdArgs;
|
ArgStringList CmdArgs;
|
||||||
bool NeedsKPIC = false;
|
bool NeedsKPIC = false;
|
||||||
@ -6770,11 +6767,11 @@ void openbsd::Assemble::ConstructJob(Compilation &C, const JobAction &JA,
|
|||||||
C.addCommand(llvm::make_unique<Command>(JA, *this, Exec, CmdArgs));
|
C.addCommand(llvm::make_unique<Command>(JA, *this, Exec, CmdArgs));
|
||||||
}
|
}
|
||||||
|
|
||||||
void openbsd::Link::ConstructJob(Compilation &C, const JobAction &JA,
|
void openbsd::Linker::ConstructJob(Compilation &C, const JobAction &JA,
|
||||||
const InputInfo &Output,
|
const InputInfo &Output,
|
||||||
const InputInfoList &Inputs,
|
const InputInfoList &Inputs,
|
||||||
const ArgList &Args,
|
const ArgList &Args,
|
||||||
const char *LinkingOutput) const {
|
const char *LinkingOutput) const {
|
||||||
const Driver &D = getToolChain().getDriver();
|
const Driver &D = getToolChain().getDriver();
|
||||||
ArgStringList CmdArgs;
|
ArgStringList CmdArgs;
|
||||||
|
|
||||||
@ -6902,11 +6899,11 @@ void openbsd::Link::ConstructJob(Compilation &C, const JobAction &JA,
|
|||||||
C.addCommand(llvm::make_unique<Command>(JA, *this, Exec, CmdArgs));
|
C.addCommand(llvm::make_unique<Command>(JA, *this, Exec, CmdArgs));
|
||||||
}
|
}
|
||||||
|
|
||||||
void bitrig::Assemble::ConstructJob(Compilation &C, const JobAction &JA,
|
void bitrig::Assembler::ConstructJob(Compilation &C, const JobAction &JA,
|
||||||
const InputInfo &Output,
|
const InputInfo &Output,
|
||||||
const InputInfoList &Inputs,
|
const InputInfoList &Inputs,
|
||||||
const ArgList &Args,
|
const ArgList &Args,
|
||||||
const char *LinkingOutput) const {
|
const char *LinkingOutput) const {
|
||||||
claimNoWarnArgs(Args);
|
claimNoWarnArgs(Args);
|
||||||
ArgStringList CmdArgs;
|
ArgStringList CmdArgs;
|
||||||
|
|
||||||
@ -6923,11 +6920,11 @@ void bitrig::Assemble::ConstructJob(Compilation &C, const JobAction &JA,
|
|||||||
C.addCommand(llvm::make_unique<Command>(JA, *this, Exec, CmdArgs));
|
C.addCommand(llvm::make_unique<Command>(JA, *this, Exec, CmdArgs));
|
||||||
}
|
}
|
||||||
|
|
||||||
void bitrig::Link::ConstructJob(Compilation &C, const JobAction &JA,
|
void bitrig::Linker::ConstructJob(Compilation &C, const JobAction &JA,
|
||||||
const InputInfo &Output,
|
const InputInfo &Output,
|
||||||
const InputInfoList &Inputs,
|
const InputInfoList &Inputs,
|
||||||
const ArgList &Args,
|
const ArgList &Args,
|
||||||
const char *LinkingOutput) const {
|
const char *LinkingOutput) const {
|
||||||
const Driver &D = getToolChain().getDriver();
|
const Driver &D = getToolChain().getDriver();
|
||||||
ArgStringList CmdArgs;
|
ArgStringList CmdArgs;
|
||||||
|
|
||||||
@ -7039,11 +7036,11 @@ void bitrig::Link::ConstructJob(Compilation &C, const JobAction &JA,
|
|||||||
C.addCommand(llvm::make_unique<Command>(JA, *this, Exec, CmdArgs));
|
C.addCommand(llvm::make_unique<Command>(JA, *this, Exec, CmdArgs));
|
||||||
}
|
}
|
||||||
|
|
||||||
void freebsd::Assemble::ConstructJob(Compilation &C, const JobAction &JA,
|
void freebsd::Assembler::ConstructJob(Compilation &C, const JobAction &JA,
|
||||||
const InputInfo &Output,
|
const InputInfo &Output,
|
||||||
const InputInfoList &Inputs,
|
const InputInfoList &Inputs,
|
||||||
const ArgList &Args,
|
const ArgList &Args,
|
||||||
const char *LinkingOutput) const {
|
const char *LinkingOutput) const {
|
||||||
claimNoWarnArgs(Args);
|
claimNoWarnArgs(Args);
|
||||||
ArgStringList CmdArgs;
|
ArgStringList CmdArgs;
|
||||||
|
|
||||||
@ -7122,11 +7119,11 @@ void freebsd::Assemble::ConstructJob(Compilation &C, const JobAction &JA,
|
|||||||
C.addCommand(llvm::make_unique<Command>(JA, *this, Exec, CmdArgs));
|
C.addCommand(llvm::make_unique<Command>(JA, *this, Exec, CmdArgs));
|
||||||
}
|
}
|
||||||
|
|
||||||
void freebsd::Link::ConstructJob(Compilation &C, const JobAction &JA,
|
void freebsd::Linker::ConstructJob(Compilation &C, const JobAction &JA,
|
||||||
const InputInfo &Output,
|
const InputInfo &Output,
|
||||||
const InputInfoList &Inputs,
|
const InputInfoList &Inputs,
|
||||||
const ArgList &Args,
|
const ArgList &Args,
|
||||||
const char *LinkingOutput) const {
|
const char *LinkingOutput) const {
|
||||||
const toolchains::FreeBSD &ToolChain =
|
const toolchains::FreeBSD &ToolChain =
|
||||||
static_cast<const toolchains::FreeBSD &>(getToolChain());
|
static_cast<const toolchains::FreeBSD &>(getToolChain());
|
||||||
const Driver &D = ToolChain.getDriver();
|
const Driver &D = ToolChain.getDriver();
|
||||||
@ -7306,7 +7303,7 @@ void freebsd::Link::ConstructJob(Compilation &C, const JobAction &JA,
|
|||||||
C.addCommand(llvm::make_unique<Command>(JA, *this, Exec, CmdArgs));
|
C.addCommand(llvm::make_unique<Command>(JA, *this, Exec, CmdArgs));
|
||||||
}
|
}
|
||||||
|
|
||||||
void netbsd::Assemble::ConstructJob(Compilation &C, const JobAction &JA,
|
void netbsd::Assembler::ConstructJob(Compilation &C, const JobAction &JA,
|
||||||
const InputInfo &Output,
|
const InputInfo &Output,
|
||||||
const InputInfoList &Inputs,
|
const InputInfoList &Inputs,
|
||||||
const ArgList &Args,
|
const ArgList &Args,
|
||||||
@ -7382,11 +7379,11 @@ void netbsd::Assemble::ConstructJob(Compilation &C, const JobAction &JA,
|
|||||||
C.addCommand(llvm::make_unique<Command>(JA, *this, Exec, CmdArgs));
|
C.addCommand(llvm::make_unique<Command>(JA, *this, Exec, CmdArgs));
|
||||||
}
|
}
|
||||||
|
|
||||||
void netbsd::Link::ConstructJob(Compilation &C, const JobAction &JA,
|
void netbsd::Linker::ConstructJob(Compilation &C, const JobAction &JA,
|
||||||
const InputInfo &Output,
|
const InputInfo &Output,
|
||||||
const InputInfoList &Inputs,
|
const InputInfoList &Inputs,
|
||||||
const ArgList &Args,
|
const ArgList &Args,
|
||||||
const char *LinkingOutput) const {
|
const char *LinkingOutput) const {
|
||||||
const Driver &D = getToolChain().getDriver();
|
const Driver &D = getToolChain().getDriver();
|
||||||
ArgStringList CmdArgs;
|
ArgStringList CmdArgs;
|
||||||
|
|
||||||
@ -7592,11 +7589,11 @@ void netbsd::Link::ConstructJob(Compilation &C, const JobAction &JA,
|
|||||||
C.addCommand(llvm::make_unique<Command>(JA, *this, Exec, CmdArgs));
|
C.addCommand(llvm::make_unique<Command>(JA, *this, Exec, CmdArgs));
|
||||||
}
|
}
|
||||||
|
|
||||||
void gnutools::Assemble::ConstructJob(Compilation &C, const JobAction &JA,
|
void gnutools::Assembler::ConstructJob(Compilation &C, const JobAction &JA,
|
||||||
const InputInfo &Output,
|
const InputInfo &Output,
|
||||||
const InputInfoList &Inputs,
|
const InputInfoList &Inputs,
|
||||||
const ArgList &Args,
|
const ArgList &Args,
|
||||||
const char *LinkingOutput) const {
|
const char *LinkingOutput) const {
|
||||||
claimNoWarnArgs(Args);
|
claimNoWarnArgs(Args);
|
||||||
|
|
||||||
ArgStringList CmdArgs;
|
ArgStringList CmdArgs;
|
||||||
@ -7973,11 +7970,11 @@ static const char *getLDMOption(const llvm::Triple &T, const ArgList &Args) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void gnutools::Link::ConstructJob(Compilation &C, const JobAction &JA,
|
void gnutools::Linker::ConstructJob(Compilation &C, const JobAction &JA,
|
||||||
const InputInfo &Output,
|
const InputInfo &Output,
|
||||||
const InputInfoList &Inputs,
|
const InputInfoList &Inputs,
|
||||||
const ArgList &Args,
|
const ArgList &Args,
|
||||||
const char *LinkingOutput) const {
|
const char *LinkingOutput) const {
|
||||||
const toolchains::Linux &ToolChain =
|
const toolchains::Linux &ToolChain =
|
||||||
static_cast<const toolchains::Linux &>(getToolChain());
|
static_cast<const toolchains::Linux &>(getToolChain());
|
||||||
const Driver &D = ToolChain.getDriver();
|
const Driver &D = ToolChain.getDriver();
|
||||||
@ -8189,11 +8186,11 @@ void gnutools::Link::ConstructJob(Compilation &C, const JobAction &JA,
|
|||||||
// for the various SFI requirements like register masking. The assembly tool
|
// for the various SFI requirements like register masking. The assembly tool
|
||||||
// inserts the file containing the macros as an input into all the assembly
|
// inserts the file containing the macros as an input into all the assembly
|
||||||
// jobs.
|
// jobs.
|
||||||
void nacltools::AssembleARM::ConstructJob(Compilation &C, const JobAction &JA,
|
void nacltools::AssemblerARM::ConstructJob(Compilation &C, const JobAction &JA,
|
||||||
const InputInfo &Output,
|
const InputInfo &Output,
|
||||||
const InputInfoList &Inputs,
|
const InputInfoList &Inputs,
|
||||||
const ArgList &Args,
|
const ArgList &Args,
|
||||||
const char *LinkingOutput) const {
|
const char *LinkingOutput) const {
|
||||||
const toolchains::NaCl_TC& ToolChain =
|
const toolchains::NaCl_TC& ToolChain =
|
||||||
static_cast<const toolchains::NaCl_TC&>(getToolChain());
|
static_cast<const toolchains::NaCl_TC&>(getToolChain());
|
||||||
InputInfo NaClMacros(ToolChain.GetNaClArmMacrosPath(), types::TY_PP_Asm,
|
InputInfo NaClMacros(ToolChain.GetNaClArmMacrosPath(), types::TY_PP_Asm,
|
||||||
@ -8201,20 +8198,19 @@ void nacltools::AssembleARM::ConstructJob(Compilation &C, const JobAction &JA,
|
|||||||
InputInfoList NewInputs;
|
InputInfoList NewInputs;
|
||||||
NewInputs.push_back(NaClMacros);
|
NewInputs.push_back(NaClMacros);
|
||||||
NewInputs.append(Inputs.begin(), Inputs.end());
|
NewInputs.append(Inputs.begin(), Inputs.end());
|
||||||
gnutools::Assemble::ConstructJob(C, JA, Output, NewInputs, Args,
|
gnutools::Assembler::ConstructJob(C, JA, Output, NewInputs, Args,
|
||||||
LinkingOutput);
|
LinkingOutput);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// This is quite similar to gnutools::link::ConstructJob with changes that
|
// This is quite similar to gnutools::link::ConstructJob with changes that
|
||||||
// we use static by default, do not yet support sanitizers or LTO, and a few
|
// we use static by default, do not yet support sanitizers or LTO, and a few
|
||||||
// others. Eventually we can support more of that and hopefully migrate back
|
// others. Eventually we can support more of that and hopefully migrate back
|
||||||
// to gnutools::link.
|
// to gnutools::link.
|
||||||
void nacltools::Link::ConstructJob(Compilation &C, const JobAction &JA,
|
void nacltools::Linker::ConstructJob(Compilation &C, const JobAction &JA,
|
||||||
const InputInfo &Output,
|
const InputInfo &Output,
|
||||||
const InputInfoList &Inputs,
|
const InputInfoList &Inputs,
|
||||||
const ArgList &Args,
|
const ArgList &Args,
|
||||||
const char *LinkingOutput) const {
|
const char *LinkingOutput) const {
|
||||||
|
|
||||||
const toolchains::NaCl_TC &ToolChain =
|
const toolchains::NaCl_TC &ToolChain =
|
||||||
static_cast<const toolchains::NaCl_TC &>(getToolChain());
|
static_cast<const toolchains::NaCl_TC &>(getToolChain());
|
||||||
@ -8348,12 +8344,11 @@ void nacltools::Link::ConstructJob(Compilation &C, const JobAction &JA,
|
|||||||
ToolChain.Linker.c_str(), CmdArgs));
|
ToolChain.Linker.c_str(), CmdArgs));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void minix::Assembler::ConstructJob(Compilation &C, const JobAction &JA,
|
||||||
void minix::Assemble::ConstructJob(Compilation &C, const JobAction &JA,
|
const InputInfo &Output,
|
||||||
const InputInfo &Output,
|
const InputInfoList &Inputs,
|
||||||
const InputInfoList &Inputs,
|
const ArgList &Args,
|
||||||
const ArgList &Args,
|
const char *LinkingOutput) const {
|
||||||
const char *LinkingOutput) const {
|
|
||||||
claimNoWarnArgs(Args);
|
claimNoWarnArgs(Args);
|
||||||
ArgStringList CmdArgs;
|
ArgStringList CmdArgs;
|
||||||
|
|
||||||
@ -8369,11 +8364,11 @@ void minix::Assemble::ConstructJob(Compilation &C, const JobAction &JA,
|
|||||||
C.addCommand(llvm::make_unique<Command>(JA, *this, Exec, CmdArgs));
|
C.addCommand(llvm::make_unique<Command>(JA, *this, Exec, CmdArgs));
|
||||||
}
|
}
|
||||||
|
|
||||||
void minix::Link::ConstructJob(Compilation &C, const JobAction &JA,
|
void minix::Linker::ConstructJob(Compilation &C, const JobAction &JA,
|
||||||
const InputInfo &Output,
|
const InputInfo &Output,
|
||||||
const InputInfoList &Inputs,
|
const InputInfoList &Inputs,
|
||||||
const ArgList &Args,
|
const ArgList &Args,
|
||||||
const char *LinkingOutput) const {
|
const char *LinkingOutput) const {
|
||||||
const Driver &D = getToolChain().getDriver();
|
const Driver &D = getToolChain().getDriver();
|
||||||
ArgStringList CmdArgs;
|
ArgStringList CmdArgs;
|
||||||
|
|
||||||
@ -8427,11 +8422,11 @@ void minix::Link::ConstructJob(Compilation &C, const JobAction &JA,
|
|||||||
|
|
||||||
// For now, DragonFly Assemble does just about the same as for
|
// For now, DragonFly Assemble does just about the same as for
|
||||||
// FreeBSD, but this may change soon.
|
// FreeBSD, but this may change soon.
|
||||||
void dragonfly::Assemble::ConstructJob(Compilation &C, const JobAction &JA,
|
void dragonfly::Assembler::ConstructJob(Compilation &C, const JobAction &JA,
|
||||||
const InputInfo &Output,
|
const InputInfo &Output,
|
||||||
const InputInfoList &Inputs,
|
const InputInfoList &Inputs,
|
||||||
const ArgList &Args,
|
const ArgList &Args,
|
||||||
const char *LinkingOutput) const {
|
const char *LinkingOutput) const {
|
||||||
claimNoWarnArgs(Args);
|
claimNoWarnArgs(Args);
|
||||||
ArgStringList CmdArgs;
|
ArgStringList CmdArgs;
|
||||||
|
|
||||||
@ -8452,11 +8447,11 @@ void dragonfly::Assemble::ConstructJob(Compilation &C, const JobAction &JA,
|
|||||||
C.addCommand(llvm::make_unique<Command>(JA, *this, Exec, CmdArgs));
|
C.addCommand(llvm::make_unique<Command>(JA, *this, Exec, CmdArgs));
|
||||||
}
|
}
|
||||||
|
|
||||||
void dragonfly::Link::ConstructJob(Compilation &C, const JobAction &JA,
|
void dragonfly::Linker::ConstructJob(Compilation &C, const JobAction &JA,
|
||||||
const InputInfo &Output,
|
const InputInfo &Output,
|
||||||
const InputInfoList &Inputs,
|
const InputInfoList &Inputs,
|
||||||
const ArgList &Args,
|
const ArgList &Args,
|
||||||
const char *LinkingOutput) const {
|
const char *LinkingOutput) const {
|
||||||
const Driver &D = getToolChain().getDriver();
|
const Driver &D = getToolChain().getDriver();
|
||||||
ArgStringList CmdArgs;
|
ArgStringList CmdArgs;
|
||||||
bool UseGCC47 = llvm::sys::fs::exists("/usr/lib/gcc47");
|
bool UseGCC47 = llvm::sys::fs::exists("/usr/lib/gcc47");
|
||||||
@ -8619,11 +8614,11 @@ static std::string FindVisualStudioExecutable(const ToolChain &TC,
|
|||||||
return Exe;
|
return Exe;
|
||||||
}
|
}
|
||||||
|
|
||||||
void visualstudio::Link::ConstructJob(Compilation &C, const JobAction &JA,
|
void visualstudio::Linker::ConstructJob(Compilation &C, const JobAction &JA,
|
||||||
const InputInfo &Output,
|
const InputInfo &Output,
|
||||||
const InputInfoList &Inputs,
|
const InputInfoList &Inputs,
|
||||||
const ArgList &Args,
|
const ArgList &Args,
|
||||||
const char *LinkingOutput) const {
|
const char *LinkingOutput) const {
|
||||||
ArgStringList CmdArgs;
|
ArgStringList CmdArgs;
|
||||||
const ToolChain &TC = getToolChain();
|
const ToolChain &TC = getToolChain();
|
||||||
|
|
||||||
@ -8763,15 +8758,15 @@ void visualstudio::Link::ConstructJob(Compilation &C, const JobAction &JA,
|
|||||||
C.addCommand(llvm::make_unique<Command>(JA, *this, Exec, CmdArgs));
|
C.addCommand(llvm::make_unique<Command>(JA, *this, Exec, CmdArgs));
|
||||||
}
|
}
|
||||||
|
|
||||||
void visualstudio::Compile::ConstructJob(Compilation &C, const JobAction &JA,
|
void visualstudio::Compiler::ConstructJob(Compilation &C, const JobAction &JA,
|
||||||
const InputInfo &Output,
|
const InputInfo &Output,
|
||||||
const InputInfoList &Inputs,
|
const InputInfoList &Inputs,
|
||||||
const ArgList &Args,
|
const ArgList &Args,
|
||||||
const char *LinkingOutput) const {
|
const char *LinkingOutput) const {
|
||||||
C.addCommand(GetCommand(C, JA, Output, Inputs, Args, LinkingOutput));
|
C.addCommand(GetCommand(C, JA, Output, Inputs, Args, LinkingOutput));
|
||||||
}
|
}
|
||||||
|
|
||||||
std::unique_ptr<Command> visualstudio::Compile::GetCommand(
|
std::unique_ptr<Command> visualstudio::Compiler::GetCommand(
|
||||||
Compilation &C, const JobAction &JA, const InputInfo &Output,
|
Compilation &C, const JobAction &JA, const InputInfo &Output,
|
||||||
const InputInfoList &Inputs, const ArgList &Args,
|
const InputInfoList &Inputs, const ArgList &Args,
|
||||||
const char *LinkingOutput) const {
|
const char *LinkingOutput) const {
|
||||||
@ -8859,15 +8854,14 @@ std::unique_ptr<Command> visualstudio::Compile::GetCommand(
|
|||||||
CmdArgs);
|
CmdArgs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// XCore Tools
|
/// XCore Tools
|
||||||
// We pass assemble and link construction to the xcc tool.
|
// We pass assemble and link construction to the xcc tool.
|
||||||
|
|
||||||
void XCore::Assemble::ConstructJob(Compilation &C, const JobAction &JA,
|
void XCore::Assembler::ConstructJob(Compilation &C, const JobAction &JA,
|
||||||
const InputInfo &Output,
|
const InputInfo &Output,
|
||||||
const InputInfoList &Inputs,
|
const InputInfoList &Inputs,
|
||||||
const ArgList &Args,
|
const ArgList &Args,
|
||||||
const char *LinkingOutput) const {
|
const char *LinkingOutput) const {
|
||||||
claimNoWarnArgs(Args);
|
claimNoWarnArgs(Args);
|
||||||
ArgStringList CmdArgs;
|
ArgStringList CmdArgs;
|
||||||
|
|
||||||
@ -8897,11 +8891,11 @@ void XCore::Assemble::ConstructJob(Compilation &C, const JobAction &JA,
|
|||||||
C.addCommand(llvm::make_unique<Command>(JA, *this, Exec, CmdArgs));
|
C.addCommand(llvm::make_unique<Command>(JA, *this, Exec, CmdArgs));
|
||||||
}
|
}
|
||||||
|
|
||||||
void XCore::Link::ConstructJob(Compilation &C, const JobAction &JA,
|
void XCore::Linker::ConstructJob(Compilation &C, const JobAction &JA,
|
||||||
const InputInfo &Output,
|
const InputInfo &Output,
|
||||||
const InputInfoList &Inputs,
|
const InputInfoList &Inputs,
|
||||||
const ArgList &Args,
|
const ArgList &Args,
|
||||||
const char *LinkingOutput) const {
|
const char *LinkingOutput) const {
|
||||||
ArgStringList CmdArgs;
|
ArgStringList CmdArgs;
|
||||||
|
|
||||||
if (Output.isFilename()) {
|
if (Output.isFilename()) {
|
||||||
@ -8923,11 +8917,11 @@ void XCore::Link::ConstructJob(Compilation &C, const JobAction &JA,
|
|||||||
C.addCommand(llvm::make_unique<Command>(JA, *this, Exec, CmdArgs));
|
C.addCommand(llvm::make_unique<Command>(JA, *this, Exec, CmdArgs));
|
||||||
}
|
}
|
||||||
|
|
||||||
void CrossWindows::Assemble::ConstructJob(Compilation &C, const JobAction &JA,
|
void CrossWindows::Assembler::ConstructJob(Compilation &C, const JobAction &JA,
|
||||||
const InputInfo &Output,
|
const InputInfo &Output,
|
||||||
const InputInfoList &Inputs,
|
const InputInfoList &Inputs,
|
||||||
const ArgList &Args,
|
const ArgList &Args,
|
||||||
const char *LinkingOutput) const {
|
const char *LinkingOutput) const {
|
||||||
claimNoWarnArgs(Args);
|
claimNoWarnArgs(Args);
|
||||||
const auto &TC =
|
const auto &TC =
|
||||||
static_cast<const toolchains::CrossWindowsToolChain &>(getToolChain());
|
static_cast<const toolchains::CrossWindowsToolChain &>(getToolChain());
|
||||||
@ -8961,11 +8955,11 @@ void CrossWindows::Assemble::ConstructJob(Compilation &C, const JobAction &JA,
|
|||||||
C.addCommand(llvm::make_unique<Command>(JA, *this, Exec, CmdArgs));
|
C.addCommand(llvm::make_unique<Command>(JA, *this, Exec, CmdArgs));
|
||||||
}
|
}
|
||||||
|
|
||||||
void CrossWindows::Link::ConstructJob(Compilation &C, const JobAction &JA,
|
void CrossWindows::Linker::ConstructJob(Compilation &C, const JobAction &JA,
|
||||||
const InputInfo &Output,
|
const InputInfo &Output,
|
||||||
const InputInfoList &Inputs,
|
const InputInfoList &Inputs,
|
||||||
const ArgList &Args,
|
const ArgList &Args,
|
||||||
const char *LinkingOutput) const {
|
const char *LinkingOutput) const {
|
||||||
const auto &TC =
|
const auto &TC =
|
||||||
static_cast<const toolchains::CrossWindowsToolChain &>(getToolChain());
|
static_cast<const toolchains::CrossWindowsToolChain &>(getToolChain());
|
||||||
const llvm::Triple &T = TC.getTriple();
|
const llvm::Triple &T = TC.getTriple();
|
||||||
@ -9101,11 +9095,11 @@ void CrossWindows::Link::ConstructJob(Compilation &C, const JobAction &JA,
|
|||||||
C.addCommand(llvm::make_unique<Command>(JA, *this, Exec, CmdArgs));
|
C.addCommand(llvm::make_unique<Command>(JA, *this, Exec, CmdArgs));
|
||||||
}
|
}
|
||||||
|
|
||||||
void tools::SHAVE::Compile::ConstructJob(Compilation &C, const JobAction &JA,
|
void tools::SHAVE::Compiler::ConstructJob(Compilation &C, const JobAction &JA,
|
||||||
const InputInfo &Output,
|
const InputInfo &Output,
|
||||||
const InputInfoList &Inputs,
|
const InputInfoList &Inputs,
|
||||||
const ArgList &Args,
|
const ArgList &Args,
|
||||||
const char *LinkingOutput) const {
|
const char *LinkingOutput) const {
|
||||||
|
|
||||||
ArgStringList CmdArgs;
|
ArgStringList CmdArgs;
|
||||||
|
|
||||||
@ -9146,12 +9140,11 @@ void tools::SHAVE::Compile::ConstructJob(Compilation &C, const JobAction &JA,
|
|||||||
llvm::make_unique<Command>(JA, *this, Args.MakeArgString(Exec), CmdArgs));
|
llvm::make_unique<Command>(JA, *this, Args.MakeArgString(Exec), CmdArgs));
|
||||||
}
|
}
|
||||||
|
|
||||||
void tools::SHAVE::Assemble::ConstructJob(Compilation &C,
|
void tools::SHAVE::Assembler::ConstructJob(Compilation &C, const JobAction &JA,
|
||||||
const JobAction &JA,
|
const InputInfo &Output,
|
||||||
const InputInfo &Output,
|
const InputInfoList &Inputs,
|
||||||
const InputInfoList &Inputs,
|
const ArgList &Args,
|
||||||
const ArgList &Args,
|
const char *LinkingOutput) const {
|
||||||
const char *LinkingOutput) const {
|
|
||||||
ArgStringList CmdArgs;
|
ArgStringList CmdArgs;
|
||||||
|
|
||||||
assert(Inputs.size() == 1);
|
assert(Inputs.size() == 1);
|
||||||
|
@ -32,7 +32,7 @@ namespace toolchains {
|
|||||||
namespace tools {
|
namespace tools {
|
||||||
|
|
||||||
namespace visualstudio {
|
namespace visualstudio {
|
||||||
class Compile;
|
class Compiler;
|
||||||
}
|
}
|
||||||
|
|
||||||
using llvm::opt::ArgStringList;
|
using llvm::opt::ArgStringList;
|
||||||
@ -86,11 +86,14 @@ using llvm::opt::ArgStringList;
|
|||||||
void AddClangCLArgs(const llvm::opt::ArgList &Args,
|
void AddClangCLArgs(const llvm::opt::ArgList &Args,
|
||||||
llvm::opt::ArgStringList &CmdArgs) const;
|
llvm::opt::ArgStringList &CmdArgs) const;
|
||||||
|
|
||||||
visualstudio::Compile *getCLFallback() const;
|
visualstudio::Compiler *getCLFallback() const;
|
||||||
|
|
||||||
mutable std::unique_ptr<visualstudio::Compile> CLFallback;
|
mutable std::unique_ptr<visualstudio::Compiler> CLFallback;
|
||||||
|
|
||||||
public:
|
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) {}
|
Clang(const ToolChain &TC) : Tool("clang", "clang frontend", TC, RF_Full) {}
|
||||||
|
|
||||||
bool hasGoodDiagnostics() const override { return true; }
|
bool hasGoodDiagnostics() const override { return true; }
|
||||||
@ -148,14 +151,14 @@ namespace gcc {
|
|||||||
/// RenderExtraToolArgs - Render any arguments necessary to force
|
/// RenderExtraToolArgs - Render any arguments necessary to force
|
||||||
/// the particular tool mode.
|
/// the particular tool mode.
|
||||||
virtual void
|
virtual void
|
||||||
RenderExtraToolArgs(const JobAction &JA,
|
RenderExtraToolArgs(const JobAction &JA,
|
||||||
llvm::opt::ArgStringList &CmdArgs) const = 0;
|
llvm::opt::ArgStringList &CmdArgs) const = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
class LLVM_LIBRARY_VISIBILITY Preprocess : public Common {
|
class LLVM_LIBRARY_VISIBILITY Preprocessor : public Common {
|
||||||
public:
|
public:
|
||||||
Preprocess(const ToolChain &TC) : Common("gcc::Preprocess",
|
Preprocessor(const ToolChain &TC)
|
||||||
"gcc preprocessor", TC) {}
|
: Common("gcc::Preprocessor", "gcc preprocessor", TC) {}
|
||||||
|
|
||||||
bool hasGoodDiagnostics() const override { return true; }
|
bool hasGoodDiagnostics() const override { return true; }
|
||||||
bool hasIntegratedCPP() const override { return false; }
|
bool hasIntegratedCPP() const override { return false; }
|
||||||
@ -164,10 +167,10 @@ namespace gcc {
|
|||||||
llvm::opt::ArgStringList &CmdArgs) const override;
|
llvm::opt::ArgStringList &CmdArgs) const override;
|
||||||
};
|
};
|
||||||
|
|
||||||
class LLVM_LIBRARY_VISIBILITY Compile : public Common {
|
class LLVM_LIBRARY_VISIBILITY Compiler : public Common {
|
||||||
public:
|
public:
|
||||||
Compile(const ToolChain &TC) : Common("gcc::Compile",
|
Compiler(const ToolChain &TC)
|
||||||
"gcc frontend", TC) {}
|
: Common("gcc::Compiler", "gcc frontend", TC) {}
|
||||||
|
|
||||||
bool hasGoodDiagnostics() const override { return true; }
|
bool hasGoodDiagnostics() const override { return true; }
|
||||||
bool hasIntegratedCPP() const override { return true; }
|
bool hasIntegratedCPP() const override { return true; }
|
||||||
@ -176,10 +179,10 @@ namespace gcc {
|
|||||||
llvm::opt::ArgStringList &CmdArgs) const override;
|
llvm::opt::ArgStringList &CmdArgs) const override;
|
||||||
};
|
};
|
||||||
|
|
||||||
class LLVM_LIBRARY_VISIBILITY Link : public Common {
|
class LLVM_LIBRARY_VISIBILITY Linker : public Common {
|
||||||
public:
|
public:
|
||||||
Link(const ToolChain &TC) : Common("gcc::Link",
|
Linker(const ToolChain &TC)
|
||||||
"linker (via gcc)", TC) {}
|
: Common("gcc::Linker", "linker (via gcc)", TC) {}
|
||||||
|
|
||||||
bool hasIntegratedCPP() const override { return false; }
|
bool hasIntegratedCPP() const override { return false; }
|
||||||
bool isLinkJob() const override { return true; }
|
bool isLinkJob() const override { return true; }
|
||||||
@ -190,14 +193,15 @@ namespace gcc {
|
|||||||
} // end namespace gcc
|
} // end namespace gcc
|
||||||
|
|
||||||
namespace hexagon {
|
namespace hexagon {
|
||||||
// For Hexagon, we do not need to instantiate tools for PreProcess, PreCompile and Compile.
|
// For Hexagon, we do not need to instantiate tools for PreProcess, PreCompile
|
||||||
// We simply use "clang -cc1" for those actions.
|
// and Compile.
|
||||||
class LLVM_LIBRARY_VISIBILITY Assemble : public GnuTool {
|
// We simply use "clang -cc1" for those actions.
|
||||||
public:
|
class LLVM_LIBRARY_VISIBILITY Assembler : public GnuTool {
|
||||||
Assemble(const ToolChain &TC) : GnuTool("hexagon::Assemble",
|
public:
|
||||||
"hexagon-as", TC) {}
|
Assembler(const ToolChain &TC)
|
||||||
|
: GnuTool("hexagon::Assembler", "hexagon-as", TC) {}
|
||||||
|
|
||||||
bool hasIntegratedCPP() const override { return false; }
|
bool hasIntegratedCPP() const override { return false; }
|
||||||
|
|
||||||
void RenderExtraToolArgs(const JobAction &JA,
|
void RenderExtraToolArgs(const JobAction &JA,
|
||||||
llvm::opt::ArgStringList &CmdArgs) const;
|
llvm::opt::ArgStringList &CmdArgs) const;
|
||||||
@ -205,14 +209,13 @@ namespace hexagon {
|
|||||||
const InputInfo &Output, const InputInfoList &Inputs,
|
const InputInfo &Output, const InputInfoList &Inputs,
|
||||||
const llvm::opt::ArgList &TCArgs,
|
const llvm::opt::ArgList &TCArgs,
|
||||||
const char *LinkingOutput) const override;
|
const char *LinkingOutput) const override;
|
||||||
};
|
};
|
||||||
|
|
||||||
class LLVM_LIBRARY_VISIBILITY Link : public GnuTool {
|
class LLVM_LIBRARY_VISIBILITY Linker : public GnuTool {
|
||||||
public:
|
public:
|
||||||
Link(const ToolChain &TC) : GnuTool("hexagon::Link",
|
Linker(const ToolChain &TC) : GnuTool("hexagon::Linker", "hexagon-ld", TC) {}
|
||||||
"hexagon-ld", TC) {}
|
|
||||||
|
|
||||||
bool hasIntegratedCPP() const override { return false; }
|
bool hasIntegratedCPP() const override { return false; }
|
||||||
bool isLinkJob() const override { return true; }
|
bool isLinkJob() const override { return true; }
|
||||||
|
|
||||||
virtual void RenderExtraToolArgs(const JobAction &JA,
|
virtual void RenderExtraToolArgs(const JobAction &JA,
|
||||||
@ -258,11 +261,11 @@ namespace ppc {
|
|||||||
bool hasPPCAbiArg(const llvm::opt::ArgList &Args, const char *Value);
|
bool hasPPCAbiArg(const llvm::opt::ArgList &Args, const char *Value);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// cloudabi -- Directly call GNU Binutils linker
|
/// cloudabi -- Directly call GNU Binutils linker
|
||||||
namespace cloudabi {
|
namespace cloudabi {
|
||||||
class LLVM_LIBRARY_VISIBILITY Link : public GnuTool {
|
class LLVM_LIBRARY_VISIBILITY Linker : public GnuTool {
|
||||||
public:
|
public:
|
||||||
Link(const ToolChain &TC) : GnuTool("cloudabi::Link", "linker", TC) {}
|
Linker(const ToolChain &TC) : GnuTool("cloudabi::Linker", "linker", TC) {}
|
||||||
|
|
||||||
bool hasIntegratedCPP() const override { return false; }
|
bool hasIntegratedCPP() const override { return false; }
|
||||||
bool isLinkJob() const override { return true; }
|
bool isLinkJob() const override { return true; }
|
||||||
@ -289,19 +292,19 @@ namespace darwin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
MachOTool(
|
MachOTool(
|
||||||
const char *Name, const char *ShortName, const ToolChain &TC,
|
const char *Name, const char *ShortName, const ToolChain &TC,
|
||||||
ResponseFileSupport ResponseSupport = RF_None,
|
ResponseFileSupport ResponseSupport = RF_None,
|
||||||
llvm::sys::WindowsEncodingMethod ResponseEncoding = llvm::sys::WEM_UTF8,
|
llvm::sys::WindowsEncodingMethod ResponseEncoding = llvm::sys::WEM_UTF8,
|
||||||
const char *ResponseFlag = "@")
|
const char *ResponseFlag = "@")
|
||||||
: Tool(Name, ShortName, TC, ResponseSupport, ResponseEncoding,
|
: Tool(Name, ShortName, TC, ResponseSupport, ResponseEncoding,
|
||||||
ResponseFlag) {}
|
ResponseFlag) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
class LLVM_LIBRARY_VISIBILITY Assemble : public MachOTool {
|
class LLVM_LIBRARY_VISIBILITY Assembler : public MachOTool {
|
||||||
public:
|
public:
|
||||||
Assemble(const ToolChain &TC) : MachOTool("darwin::Assemble",
|
Assembler(const ToolChain &TC)
|
||||||
"assembler", TC) {}
|
: MachOTool("darwin::Assembler", "assembler", TC) {}
|
||||||
|
|
||||||
bool hasIntegratedCPP() const override { return false; }
|
bool hasIntegratedCPP() const override { return false; }
|
||||||
|
|
||||||
@ -311,16 +314,16 @@ namespace darwin {
|
|||||||
const char *LinkingOutput) const override;
|
const char *LinkingOutput) const override;
|
||||||
};
|
};
|
||||||
|
|
||||||
class LLVM_LIBRARY_VISIBILITY Link : public MachOTool {
|
class LLVM_LIBRARY_VISIBILITY Linker : public MachOTool {
|
||||||
bool NeedsTempPath(const InputInfoList &Inputs) const;
|
bool NeedsTempPath(const InputInfoList &Inputs) const;
|
||||||
void AddLinkArgs(Compilation &C, const llvm::opt::ArgList &Args,
|
void AddLinkArgs(Compilation &C, const llvm::opt::ArgList &Args,
|
||||||
llvm::opt::ArgStringList &CmdArgs,
|
llvm::opt::ArgStringList &CmdArgs,
|
||||||
const InputInfoList &Inputs) const;
|
const InputInfoList &Inputs) const;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
Link(const ToolChain &TC) : MachOTool("darwin::Link", "linker", TC,
|
Linker(const ToolChain &TC)
|
||||||
RF_FileList, llvm::sys::WEM_UTF8,
|
: MachOTool("darwin::Linker", "linker", TC, RF_FileList,
|
||||||
"-filelist") {}
|
llvm::sys::WEM_UTF8, "-filelist") {}
|
||||||
|
|
||||||
bool hasIntegratedCPP() const override { return false; }
|
bool hasIntegratedCPP() const override { return false; }
|
||||||
bool isLinkJob() const override { return true; }
|
bool isLinkJob() const override { return true; }
|
||||||
@ -373,27 +376,26 @@ namespace darwin {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// openbsd -- Directly call GNU Binutils assembler and linker
|
/// openbsd -- Directly call GNU Binutils assembler and linker
|
||||||
namespace openbsd {
|
namespace openbsd {
|
||||||
class LLVM_LIBRARY_VISIBILITY Assemble : public GnuTool {
|
class LLVM_LIBRARY_VISIBILITY Assembler : public GnuTool {
|
||||||
public:
|
public:
|
||||||
Assemble(const ToolChain &TC) : GnuTool("openbsd::Assemble", "assembler",
|
Assembler(const ToolChain &TC)
|
||||||
TC) {}
|
: GnuTool("openbsd::Assembler", "assembler", TC) {}
|
||||||
|
|
||||||
bool hasIntegratedCPP() const override { return false; }
|
bool hasIntegratedCPP() const override { return false; }
|
||||||
|
|
||||||
void ConstructJob(Compilation &C, const JobAction &JA,
|
void ConstructJob(Compilation &C, const JobAction &JA,
|
||||||
const InputInfo &Output,
|
const InputInfo &Output, const InputInfoList &Inputs,
|
||||||
const InputInfoList &Inputs,
|
const llvm::opt::ArgList &TCArgs,
|
||||||
const llvm::opt::ArgList &TCArgs,
|
const char *LinkingOutput) const override;
|
||||||
const char *LinkingOutput) const override;
|
};
|
||||||
};
|
class LLVM_LIBRARY_VISIBILITY Linker : public GnuTool {
|
||||||
class LLVM_LIBRARY_VISIBILITY Link : public GnuTool {
|
public:
|
||||||
public:
|
Linker(const ToolChain &TC) : GnuTool("openbsd::Linker", "linker", TC) {}
|
||||||
Link(const ToolChain &TC) : GnuTool("openbsd::Link", "linker", TC) {}
|
|
||||||
|
|
||||||
bool hasIntegratedCPP() const override { return false; }
|
bool hasIntegratedCPP() const override { return false; }
|
||||||
bool isLinkJob() const override { return true; }
|
bool isLinkJob() const override { return true; }
|
||||||
|
|
||||||
void ConstructJob(Compilation &C, const JobAction &JA,
|
void ConstructJob(Compilation &C, const JobAction &JA,
|
||||||
const InputInfo &Output, const InputInfoList &Inputs,
|
const InputInfo &Output, const InputInfoList &Inputs,
|
||||||
@ -402,26 +404,26 @@ namespace openbsd {
|
|||||||
};
|
};
|
||||||
} // end namespace openbsd
|
} // end namespace openbsd
|
||||||
|
|
||||||
/// bitrig -- Directly call GNU Binutils assembler and linker
|
/// bitrig -- Directly call GNU Binutils assembler and linker
|
||||||
namespace bitrig {
|
namespace bitrig {
|
||||||
class LLVM_LIBRARY_VISIBILITY Assemble : public GnuTool {
|
class LLVM_LIBRARY_VISIBILITY Assembler : public GnuTool {
|
||||||
public:
|
public:
|
||||||
Assemble(const ToolChain &TC) : GnuTool("bitrig::Assemble", "assembler",
|
Assembler(const ToolChain &TC)
|
||||||
TC) {}
|
: GnuTool("bitrig::Assembler", "assembler", TC) {}
|
||||||
|
|
||||||
bool hasIntegratedCPP() const override { return false; }
|
bool hasIntegratedCPP() const override { return false; }
|
||||||
|
|
||||||
void ConstructJob(Compilation &C, const JobAction &JA,
|
void ConstructJob(Compilation &C, const JobAction &JA,
|
||||||
const InputInfo &Output, const InputInfoList &Inputs,
|
const InputInfo &Output, const InputInfoList &Inputs,
|
||||||
const llvm::opt::ArgList &TCArgs,
|
const llvm::opt::ArgList &TCArgs,
|
||||||
const char *LinkingOutput) const override;
|
const char *LinkingOutput) const override;
|
||||||
};
|
};
|
||||||
class LLVM_LIBRARY_VISIBILITY Link : public GnuTool {
|
class LLVM_LIBRARY_VISIBILITY Linker : public GnuTool {
|
||||||
public:
|
public:
|
||||||
Link(const ToolChain &TC) : GnuTool("bitrig::Link", "linker", TC) {}
|
Linker(const ToolChain &TC) : GnuTool("bitrig::Linker", "linker", TC) {}
|
||||||
|
|
||||||
bool hasIntegratedCPP() const override { return false; }
|
bool hasIntegratedCPP() const override { return false; }
|
||||||
bool isLinkJob() const override { return true; }
|
bool isLinkJob() const override { return true; }
|
||||||
|
|
||||||
void ConstructJob(Compilation &C, const JobAction &JA,
|
void ConstructJob(Compilation &C, const JobAction &JA,
|
||||||
const InputInfo &Output, const InputInfoList &Inputs,
|
const InputInfo &Output, const InputInfoList &Inputs,
|
||||||
@ -430,26 +432,26 @@ namespace bitrig {
|
|||||||
};
|
};
|
||||||
} // end namespace bitrig
|
} // end namespace bitrig
|
||||||
|
|
||||||
/// freebsd -- Directly call GNU Binutils assembler and linker
|
/// freebsd -- Directly call GNU Binutils assembler and linker
|
||||||
namespace freebsd {
|
namespace freebsd {
|
||||||
class LLVM_LIBRARY_VISIBILITY Assemble : public GnuTool {
|
class LLVM_LIBRARY_VISIBILITY Assembler : public GnuTool {
|
||||||
public:
|
public:
|
||||||
Assemble(const ToolChain &TC) : GnuTool("freebsd::Assemble", "assembler",
|
Assembler(const ToolChain &TC)
|
||||||
TC) {}
|
: GnuTool("freebsd::Assembler", "assembler", TC) {}
|
||||||
|
|
||||||
bool hasIntegratedCPP() const override { return false; }
|
bool hasIntegratedCPP() const override { return false; }
|
||||||
|
|
||||||
void ConstructJob(Compilation &C, const JobAction &JA,
|
void ConstructJob(Compilation &C, const JobAction &JA,
|
||||||
const InputInfo &Output, const InputInfoList &Inputs,
|
const InputInfo &Output, const InputInfoList &Inputs,
|
||||||
const llvm::opt::ArgList &TCArgs,
|
const llvm::opt::ArgList &TCArgs,
|
||||||
const char *LinkingOutput) const override;
|
const char *LinkingOutput) const override;
|
||||||
};
|
};
|
||||||
class LLVM_LIBRARY_VISIBILITY Link : public GnuTool {
|
class LLVM_LIBRARY_VISIBILITY Linker : public GnuTool {
|
||||||
public:
|
public:
|
||||||
Link(const ToolChain &TC) : GnuTool("freebsd::Link", "linker", TC) {}
|
Linker(const ToolChain &TC) : GnuTool("freebsd::Linker", "linker", TC) {}
|
||||||
|
|
||||||
bool hasIntegratedCPP() const override { return false; }
|
bool hasIntegratedCPP() const override { return false; }
|
||||||
bool isLinkJob() const override { return true; }
|
bool isLinkJob() const override { return true; }
|
||||||
|
|
||||||
void ConstructJob(Compilation &C, const JobAction &JA,
|
void ConstructJob(Compilation &C, const JobAction &JA,
|
||||||
const InputInfo &Output, const InputInfoList &Inputs,
|
const InputInfo &Output, const InputInfoList &Inputs,
|
||||||
@ -458,29 +460,28 @@ namespace freebsd {
|
|||||||
};
|
};
|
||||||
} // end namespace freebsd
|
} // end namespace freebsd
|
||||||
|
|
||||||
/// netbsd -- Directly call GNU Binutils assembler and linker
|
/// netbsd -- Directly call GNU Binutils assembler and linker
|
||||||
namespace netbsd {
|
namespace netbsd {
|
||||||
class LLVM_LIBRARY_VISIBILITY Assemble : public GnuTool {
|
class LLVM_LIBRARY_VISIBILITY Assembler : public GnuTool {
|
||||||
|
|
||||||
public:
|
public:
|
||||||
Assemble(const ToolChain &TC)
|
Assembler(const ToolChain &TC)
|
||||||
: GnuTool("netbsd::Assemble", "assembler", TC) {}
|
: GnuTool("netbsd::Assembler", "assembler", TC) {}
|
||||||
|
|
||||||
bool hasIntegratedCPP() const override { return false; }
|
bool hasIntegratedCPP() const override { return false; }
|
||||||
|
|
||||||
void ConstructJob(Compilation &C, const JobAction &JA,
|
void ConstructJob(Compilation &C, const JobAction &JA,
|
||||||
const InputInfo &Output, const InputInfoList &Inputs,
|
const InputInfo &Output, const InputInfoList &Inputs,
|
||||||
const llvm::opt::ArgList &TCArgs,
|
const llvm::opt::ArgList &TCArgs,
|
||||||
const char *LinkingOutput) const override;
|
const char *LinkingOutput) const override;
|
||||||
};
|
};
|
||||||
class LLVM_LIBRARY_VISIBILITY Link : public GnuTool {
|
class LLVM_LIBRARY_VISIBILITY Linker : public GnuTool {
|
||||||
|
|
||||||
public:
|
public:
|
||||||
Link(const ToolChain &TC)
|
Linker(const ToolChain &TC) : GnuTool("netbsd::Linker", "linker", TC) {}
|
||||||
: GnuTool("netbsd::Link", "linker", TC) {}
|
|
||||||
|
|
||||||
bool hasIntegratedCPP() const override { return false; }
|
bool hasIntegratedCPP() const override { return false; }
|
||||||
bool isLinkJob() const override { return true; }
|
bool isLinkJob() const override { return true; }
|
||||||
|
|
||||||
void ConstructJob(Compilation &C, const JobAction &JA,
|
void ConstructJob(Compilation &C, const JobAction &JA,
|
||||||
const InputInfo &Output, const InputInfoList &Inputs,
|
const InputInfo &Output, const InputInfoList &Inputs,
|
||||||
@ -489,13 +490,25 @@ namespace netbsd {
|
|||||||
};
|
};
|
||||||
} // end namespace netbsd
|
} // end namespace netbsd
|
||||||
|
|
||||||
/// Directly call GNU Binutils' assembler and linker.
|
/// Directly call GNU Binutils' assembler and linker.
|
||||||
namespace gnutools {
|
namespace gnutools {
|
||||||
class LLVM_LIBRARY_VISIBILITY Assemble : public GnuTool {
|
class LLVM_LIBRARY_VISIBILITY Assembler : public GnuTool {
|
||||||
public:
|
public:
|
||||||
Assemble(const ToolChain &TC) : GnuTool("GNU::Assemble", "assembler", TC) {}
|
Assembler(const ToolChain &TC) : GnuTool("GNU::Assembler", "assembler", TC) {}
|
||||||
|
|
||||||
bool hasIntegratedCPP() 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;
|
||||||
|
};
|
||||||
|
class LLVM_LIBRARY_VISIBILITY Linker : public GnuTool {
|
||||||
|
public:
|
||||||
|
Linker(const ToolChain &TC) : GnuTool("GNU::Linker", "linker", TC) {}
|
||||||
|
|
||||||
|
bool hasIntegratedCPP() const override { return false; }
|
||||||
|
bool isLinkJob() const override { return true; }
|
||||||
|
|
||||||
void ConstructJob(Compilation &C, const JobAction &JA,
|
void ConstructJob(Compilation &C, const JobAction &JA,
|
||||||
const InputInfo &Output,
|
const InputInfo &Output,
|
||||||
@ -503,35 +516,21 @@ namespace gnutools {
|
|||||||
const llvm::opt::ArgList &TCArgs,
|
const llvm::opt::ArgList &TCArgs,
|
||||||
const char *LinkingOutput) const override;
|
const char *LinkingOutput) const override;
|
||||||
};
|
};
|
||||||
class LLVM_LIBRARY_VISIBILITY Link : public GnuTool {
|
}
|
||||||
public:
|
|
||||||
Link(const ToolChain &TC) : GnuTool("GNU::Link", "linker", TC) {}
|
|
||||||
|
|
||||||
bool hasIntegratedCPP() const override { return false; }
|
namespace nacltools {
|
||||||
bool isLinkJob() const override { return true; }
|
class LLVM_LIBRARY_VISIBILITY AssemblerARM : public gnutools::Assembler {
|
||||||
|
public:
|
||||||
|
AssemblerARM(const ToolChain &TC) : gnutools::Assembler(TC) {}
|
||||||
|
|
||||||
void ConstructJob(Compilation &C, const JobAction &JA,
|
void ConstructJob(Compilation &C, const JobAction &JA,
|
||||||
const InputInfo &Output,
|
const InputInfo &Output, const InputInfoList &Inputs,
|
||||||
const InputInfoList &Inputs,
|
|
||||||
const llvm::opt::ArgList &TCArgs,
|
const llvm::opt::ArgList &TCArgs,
|
||||||
const char *LinkingOutput) const override;
|
const char *LinkingOutput) const override;
|
||||||
};
|
};
|
||||||
}
|
class LLVM_LIBRARY_VISIBILITY Linker : public Tool {
|
||||||
|
|
||||||
namespace nacltools {
|
|
||||||
class LLVM_LIBRARY_VISIBILITY AssembleARM : public gnutools::Assemble {
|
|
||||||
public:
|
public:
|
||||||
AssembleARM(const ToolChain &TC) : gnutools::Assemble(TC) {}
|
Linker(const ToolChain &TC) : Tool("NaCl::Linker", "linker", TC) {}
|
||||||
|
|
||||||
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 Link : public Tool {
|
|
||||||
public:
|
|
||||||
Link(const ToolChain &TC) : Tool("NaCl::Link", "linker", TC) {}
|
|
||||||
|
|
||||||
bool hasIntegratedCPP() const override { return false; }
|
bool hasIntegratedCPP() const override { return false; }
|
||||||
bool isLinkJob() const override { return true; }
|
bool isLinkJob() const override { return true; }
|
||||||
@ -544,27 +543,26 @@ namespace nacltools {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
/// minix -- Directly call GNU Binutils assembler and linker
|
/// minix -- Directly call GNU Binutils assembler and linker
|
||||||
namespace minix {
|
namespace minix {
|
||||||
class LLVM_LIBRARY_VISIBILITY Assemble : public GnuTool {
|
class LLVM_LIBRARY_VISIBILITY Assembler : public GnuTool {
|
||||||
public:
|
public:
|
||||||
Assemble(const ToolChain &TC) : GnuTool("minix::Assemble", "assembler",
|
Assembler(const ToolChain &TC)
|
||||||
TC) {}
|
: GnuTool("minix::Assembler", "assembler", TC) {}
|
||||||
|
|
||||||
bool hasIntegratedCPP() const override { return false; }
|
bool hasIntegratedCPP() const override { return false; }
|
||||||
|
|
||||||
void ConstructJob(Compilation &C, const JobAction &JA,
|
void ConstructJob(Compilation &C, const JobAction &JA,
|
||||||
const InputInfo &Output,
|
const InputInfo &Output, const InputInfoList &Inputs,
|
||||||
const InputInfoList &Inputs,
|
const llvm::opt::ArgList &TCArgs,
|
||||||
const llvm::opt::ArgList &TCArgs,
|
const char *LinkingOutput) const override;
|
||||||
const char *LinkingOutput) const override;
|
};
|
||||||
};
|
class LLVM_LIBRARY_VISIBILITY Linker : public GnuTool {
|
||||||
class LLVM_LIBRARY_VISIBILITY Link : public GnuTool {
|
public:
|
||||||
public:
|
Linker(const ToolChain &TC) : GnuTool("minix::Linker", "linker", TC) {}
|
||||||
Link(const ToolChain &TC) : GnuTool("minix::Link", "linker", TC) {}
|
|
||||||
|
|
||||||
bool hasIntegratedCPP() const override { return false; }
|
bool hasIntegratedCPP() const override { return false; }
|
||||||
bool isLinkJob() const override { return true; }
|
bool isLinkJob() const override { return true; }
|
||||||
|
|
||||||
void ConstructJob(Compilation &C, const JobAction &JA,
|
void ConstructJob(Compilation &C, const JobAction &JA,
|
||||||
const InputInfo &Output,
|
const InputInfo &Output,
|
||||||
@ -574,26 +572,26 @@ namespace minix {
|
|||||||
};
|
};
|
||||||
} // end namespace minix
|
} // end namespace minix
|
||||||
|
|
||||||
/// solaris -- Directly call Solaris assembler and linker
|
/// solaris -- Directly call Solaris assembler and linker
|
||||||
namespace solaris {
|
namespace solaris {
|
||||||
class LLVM_LIBRARY_VISIBILITY Assemble : public Tool {
|
class LLVM_LIBRARY_VISIBILITY Assembler : public Tool {
|
||||||
public:
|
public:
|
||||||
Assemble(const ToolChain &TC) : Tool("solaris::Assemble", "assembler",
|
Assembler(const ToolChain &TC)
|
||||||
TC) {}
|
: Tool("solaris::Assembler", "assembler", TC) {}
|
||||||
|
|
||||||
bool hasIntegratedCPP() const override { return false; }
|
bool hasIntegratedCPP() const override { return false; }
|
||||||
|
|
||||||
void ConstructJob(Compilation &C, const JobAction &JA,
|
void ConstructJob(Compilation &C, const JobAction &JA,
|
||||||
const InputInfo &Output, const InputInfoList &Inputs,
|
const InputInfo &Output, const InputInfoList &Inputs,
|
||||||
const llvm::opt::ArgList &TCArgs,
|
const llvm::opt::ArgList &TCArgs,
|
||||||
const char *LinkingOutput) const override;
|
const char *LinkingOutput) const override;
|
||||||
};
|
};
|
||||||
class LLVM_LIBRARY_VISIBILITY Link : public Tool {
|
class LLVM_LIBRARY_VISIBILITY Linker : public Tool {
|
||||||
public:
|
public:
|
||||||
Link(const ToolChain &TC) : Tool("solaris::Link", "linker", TC) {}
|
Linker(const ToolChain &TC) : Tool("solaris::Linker", "linker", TC) {}
|
||||||
|
|
||||||
bool hasIntegratedCPP() const override { return false; }
|
bool hasIntegratedCPP() const override { return false; }
|
||||||
bool isLinkJob() const override { return true; }
|
bool isLinkJob() const override { return true; }
|
||||||
|
|
||||||
void ConstructJob(Compilation &C, const JobAction &JA,
|
void ConstructJob(Compilation &C, const JobAction &JA,
|
||||||
const InputInfo &Output, const InputInfoList &Inputs,
|
const InputInfo &Output, const InputInfoList &Inputs,
|
||||||
@ -602,26 +600,26 @@ namespace solaris {
|
|||||||
};
|
};
|
||||||
} // end namespace solaris
|
} // end namespace solaris
|
||||||
|
|
||||||
/// dragonfly -- Directly call GNU Binutils assembler and linker
|
/// dragonfly -- Directly call GNU Binutils assembler and linker
|
||||||
namespace dragonfly {
|
namespace dragonfly {
|
||||||
class LLVM_LIBRARY_VISIBILITY Assemble : public GnuTool {
|
class LLVM_LIBRARY_VISIBILITY Assembler : public GnuTool {
|
||||||
public:
|
public:
|
||||||
Assemble(const ToolChain &TC) : GnuTool("dragonfly::Assemble", "assembler",
|
Assembler(const ToolChain &TC)
|
||||||
TC) {}
|
: GnuTool("dragonfly::Assembler", "assembler", TC) {}
|
||||||
|
|
||||||
bool hasIntegratedCPP() const override { return false; }
|
bool hasIntegratedCPP() const override { return false; }
|
||||||
|
|
||||||
void ConstructJob(Compilation &C, const JobAction &JA,
|
void ConstructJob(Compilation &C, const JobAction &JA,
|
||||||
const InputInfo &Output, const InputInfoList &Inputs,
|
const InputInfo &Output, const InputInfoList &Inputs,
|
||||||
const llvm::opt::ArgList &TCArgs,
|
const llvm::opt::ArgList &TCArgs,
|
||||||
const char *LinkingOutput) const override;
|
const char *LinkingOutput) const override;
|
||||||
};
|
};
|
||||||
class LLVM_LIBRARY_VISIBILITY Link : public GnuTool {
|
class LLVM_LIBRARY_VISIBILITY Linker : public GnuTool {
|
||||||
public:
|
public:
|
||||||
Link(const ToolChain &TC) : GnuTool("dragonfly::Link", "linker", TC) {}
|
Linker(const ToolChain &TC) : GnuTool("dragonfly::Linker", "linker", TC) {}
|
||||||
|
|
||||||
bool hasIntegratedCPP() const override { return false; }
|
bool hasIntegratedCPP() const override { return false; }
|
||||||
bool isLinkJob() const override { return true; }
|
bool isLinkJob() const override { return true; }
|
||||||
|
|
||||||
void ConstructJob(Compilation &C, const JobAction &JA,
|
void ConstructJob(Compilation &C, const JobAction &JA,
|
||||||
const InputInfo &Output,
|
const InputInfo &Output,
|
||||||
@ -633,30 +631,31 @@ namespace dragonfly {
|
|||||||
|
|
||||||
/// Visual studio tools.
|
/// Visual studio tools.
|
||||||
namespace visualstudio {
|
namespace visualstudio {
|
||||||
VersionTuple getMSVCVersion(const Driver *D, const llvm::Triple &Triple,
|
VersionTuple getMSVCVersion(const Driver *D, const llvm::Triple &Triple,
|
||||||
const llvm::opt::ArgList &Args,
|
const llvm::opt::ArgList &Args, bool IsWindowsMSVC);
|
||||||
bool IsWindowsMSVC);
|
|
||||||
|
|
||||||
class LLVM_LIBRARY_VISIBILITY Link : public Tool {
|
class LLVM_LIBRARY_VISIBILITY Linker : public Tool {
|
||||||
public:
|
public:
|
||||||
Link(const ToolChain &TC) : Tool("visualstudio::Link", "linker", TC,
|
Linker(const ToolChain &TC)
|
||||||
RF_Full, llvm::sys::WEM_UTF16) {}
|
: Tool("visualstudio::Linker", "linker", TC, RF_Full,
|
||||||
|
llvm::sys::WEM_UTF16) {}
|
||||||
|
|
||||||
bool hasIntegratedCPP() const override { return false; }
|
bool hasIntegratedCPP() const override { return false; }
|
||||||
bool isLinkJob() const override { return true; }
|
bool isLinkJob() const override { return true; }
|
||||||
|
|
||||||
void ConstructJob(Compilation &C, const JobAction &JA,
|
void ConstructJob(Compilation &C, const JobAction &JA,
|
||||||
const InputInfo &Output, const InputInfoList &Inputs,
|
const InputInfo &Output, const InputInfoList &Inputs,
|
||||||
const llvm::opt::ArgList &TCArgs,
|
const llvm::opt::ArgList &TCArgs,
|
||||||
const char *LinkingOutput) const override;
|
const char *LinkingOutput) const override;
|
||||||
};
|
};
|
||||||
|
|
||||||
class LLVM_LIBRARY_VISIBILITY Compile : public Tool {
|
class LLVM_LIBRARY_VISIBILITY Compiler : public Tool {
|
||||||
public:
|
public:
|
||||||
Compile(const ToolChain &TC) : Tool("visualstudio::Compile", "compiler", TC,
|
Compiler(const ToolChain &TC)
|
||||||
RF_Full, llvm::sys::WEM_UTF16) {}
|
: Tool("visualstudio::Compiler", "compiler", TC, RF_Full,
|
||||||
|
llvm::sys::WEM_UTF16) {}
|
||||||
|
|
||||||
bool hasIntegratedAssembler() const override { return true; }
|
bool hasIntegratedAssembler() const override { return true; }
|
||||||
bool hasIntegratedCPP() const override { return true; }
|
bool hasIntegratedCPP() const override { return true; }
|
||||||
bool isLinkJob() const override { return false; }
|
bool isLinkJob() const override { return false; }
|
||||||
|
|
||||||
@ -678,53 +677,54 @@ namespace arm {
|
|||||||
const llvm::Triple &Triple);
|
const llvm::Triple &Triple);
|
||||||
}
|
}
|
||||||
namespace XCore {
|
namespace XCore {
|
||||||
// For XCore, we do not need to instantiate tools for PreProcess, PreCompile and Compile.
|
// For XCore, we do not need to instantiate tools for PreProcess, PreCompile and
|
||||||
// We simply use "clang -cc1" for those actions.
|
// Compile.
|
||||||
class LLVM_LIBRARY_VISIBILITY Assemble : public Tool {
|
// We simply use "clang -cc1" for those actions.
|
||||||
public:
|
class LLVM_LIBRARY_VISIBILITY Assembler : public Tool {
|
||||||
Assemble(const ToolChain &TC) : Tool("XCore::Assemble",
|
|
||||||
"XCore-as", 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 Link : public Tool {
|
|
||||||
public:
|
|
||||||
Link(const ToolChain &TC) : Tool("XCore::Link",
|
|
||||||
"XCore-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 XCore.
|
|
||||||
|
|
||||||
namespace CrossWindows {
|
|
||||||
class LLVM_LIBRARY_VISIBILITY Assemble : public Tool {
|
|
||||||
public:
|
public:
|
||||||
Assemble(const ToolChain &TC) : Tool("CrossWindows::Assemble", "as", TC) { }
|
Assembler(const ToolChain &TC) : Tool("XCore::Assembler", "XCore-as", TC) {}
|
||||||
|
|
||||||
bool hasIntegratedCPP() const override { return false; }
|
bool hasIntegratedCPP() const override { return false; }
|
||||||
|
|
||||||
void ConstructJob(Compilation &C, const JobAction &JA,
|
void ConstructJob(Compilation &C, const JobAction &JA,
|
||||||
const InputInfo &Output, const InputInfoList &Inputs,
|
const InputInfo &Output, const InputInfoList &Inputs,
|
||||||
const llvm::opt::ArgList &TCArgs,
|
const llvm::opt::ArgList &TCArgs,
|
||||||
const char *LinkingOutput) const override;
|
const char *LinkingOutput) const override;
|
||||||
};
|
};
|
||||||
|
|
||||||
class LLVM_LIBRARY_VISIBILITY Link : public Tool {
|
class LLVM_LIBRARY_VISIBILITY Linker : public Tool {
|
||||||
public:
|
public:
|
||||||
Link(const ToolChain &TC) : Tool("CrossWindows::Link", "ld", TC, RF_Full) {}
|
Linker(const ToolChain &TC) : Tool("XCore::Linker", "XCore-ld", TC) {}
|
||||||
|
|
||||||
bool hasIntegratedCPP() const override { return false; }
|
bool hasIntegratedCPP() const override { return false; }
|
||||||
bool isLinkJob() const override { return true; }
|
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.
|
||||||
|
|
||||||
|
namespace CrossWindows {
|
||||||
|
class LLVM_LIBRARY_VISIBILITY Assembler : public Tool {
|
||||||
|
public:
|
||||||
|
Assembler(const ToolChain &TC)
|
||||||
|
: Tool("CrossWindows::Assembler", "as", 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("CrossWindows::Linker", "ld", TC, RF_Full) {}
|
||||||
|
|
||||||
|
bool hasIntegratedCPP() const override { return false; }
|
||||||
|
bool isLinkJob() const override { return true; }
|
||||||
|
|
||||||
void ConstructJob(Compilation &C, const JobAction &JA,
|
void ConstructJob(Compilation &C, const JobAction &JA,
|
||||||
const InputInfo &Output, const InputInfoList &Inputs,
|
const InputInfo &Output, const InputInfoList &Inputs,
|
||||||
@ -735,9 +735,9 @@ public:
|
|||||||
|
|
||||||
/// SHAVE tools -- Directly call moviCompile and moviAsm
|
/// SHAVE tools -- Directly call moviCompile and moviAsm
|
||||||
namespace SHAVE {
|
namespace SHAVE {
|
||||||
class LLVM_LIBRARY_VISIBILITY Compile : public Tool {
|
class LLVM_LIBRARY_VISIBILITY Compiler : public Tool {
|
||||||
public:
|
public:
|
||||||
Compile(const ToolChain &TC) : Tool("moviCompile", "movicompile", TC) {}
|
Compiler(const ToolChain &TC) : Tool("moviCompile", "movicompile", TC) {}
|
||||||
|
|
||||||
bool hasIntegratedCPP() const override { return true; }
|
bool hasIntegratedCPP() const override { return true; }
|
||||||
|
|
||||||
@ -747,9 +747,9 @@ public:
|
|||||||
const char *LinkingOutput) const override;
|
const char *LinkingOutput) const override;
|
||||||
};
|
};
|
||||||
|
|
||||||
class LLVM_LIBRARY_VISIBILITY Assemble : public Tool {
|
class LLVM_LIBRARY_VISIBILITY Assembler : public Tool {
|
||||||
public:
|
public:
|
||||||
Assemble(const ToolChain &TC) : Tool("moviAsm", "moviAsm", TC) {}
|
Assembler(const ToolChain &TC) : Tool("moviAsm", "moviAsm", TC) {}
|
||||||
|
|
||||||
bool hasIntegratedCPP() const override { return false; } // not sure.
|
bool hasIntegratedCPP() const override { return false; } // not sure.
|
||||||
|
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
// Basic binding.
|
// Basic binding.
|
||||||
// RUN: %clang -target i386-unknown-unknown -ccc-print-bindings -no-integrated-as %s 2>&1 | FileCheck %s --check-prefix=CHECK01
|
// RUN: %clang -target i386-unknown-unknown -ccc-print-bindings -no-integrated-as %s 2>&1 | FileCheck %s --check-prefix=CHECK01
|
||||||
// CHECK01: "clang", inputs: ["{{.*}}bindings.c"], output: "{{.*}}.s"
|
// CHECK01: "clang", inputs: ["{{.*}}bindings.c"], output: "{{.*}}.s"
|
||||||
// CHECK01: "GNU::Assemble", inputs: ["{{.*}}.s"], output: "{{.*}}.o"
|
// CHECK01: "GNU::Assembler", inputs: ["{{.*}}.s"], output: "{{.*}}.o"
|
||||||
// CHECK01: "gcc::Link", inputs: ["{{.*}}.o"], output: "a.out"
|
// CHECK01: "gcc::Linker", inputs: ["{{.*}}.o"], output: "a.out"
|
||||||
|
|
||||||
// Clang control options
|
// Clang control options
|
||||||
|
|
||||||
@ -21,5 +21,5 @@
|
|||||||
// Darwin bindings
|
// Darwin bindings
|
||||||
// RUN: %clang -target i386-apple-darwin9 -no-integrated-as -ccc-print-bindings %s 2>&1 | FileCheck %s --check-prefix=CHECK14
|
// RUN: %clang -target i386-apple-darwin9 -no-integrated-as -ccc-print-bindings %s 2>&1 | FileCheck %s --check-prefix=CHECK14
|
||||||
// CHECK14: "clang", inputs: ["{{.*}}bindings.c"], output: "{{.*}}.s"
|
// CHECK14: "clang", inputs: ["{{.*}}bindings.c"], output: "{{.*}}.s"
|
||||||
// CHECK14: "darwin::Assemble", inputs: ["{{.*}}.s"], output: "{{.*}}.o"
|
// CHECK14: "darwin::Assembler", inputs: ["{{.*}}.s"], output: "{{.*}}.o"
|
||||||
// CHECK14: "darwin::Link", inputs: ["{{.*}}.o"], output: "a.out"
|
// CHECK14: "darwin::Linker", inputs: ["{{.*}}.o"], output: "a.out"
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
// RUN: -o foo %s -g 2> %t
|
// RUN: -o foo %s -g 2> %t
|
||||||
// RUN: FileCheck -check-prefix=CHECK-OUTPUT-NAME < %t %s
|
// RUN: FileCheck -check-prefix=CHECK-OUTPUT-NAME < %t %s
|
||||||
//
|
//
|
||||||
// CHECK-OUTPUT-NAME: "x86_64-apple-darwin10" - "darwin::Link", inputs: [{{.*}}], output: "foo"
|
// CHECK-OUTPUT-NAME: "x86_64-apple-darwin10" - "darwin::Linker", inputs: [{{.*}}], output: "foo"
|
||||||
// CHECK-OUTPUT-NAME: "x86_64-apple-darwin10" - "darwin::Dsymutil", inputs: ["foo"], output: "foo.dSYM"
|
// CHECK-OUTPUT-NAME: "x86_64-apple-darwin10" - "darwin::Dsymutil", inputs: ["foo"], output: "foo.dSYM"
|
||||||
|
|
||||||
// Check that we only use dsymutil when needed.
|
// Check that we only use dsymutil when needed.
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
// RUN: --verify-debug-info -o foo %s -g 2> %t
|
// RUN: --verify-debug-info -o foo %s -g 2> %t
|
||||||
// RUN: FileCheck -check-prefix=CHECK-OUTPUT-NAME < %t %s
|
// RUN: FileCheck -check-prefix=CHECK-OUTPUT-NAME < %t %s
|
||||||
//
|
//
|
||||||
// CHECK-OUTPUT-NAME: "x86_64-apple-darwin10" - "darwin::Link", inputs: [{{.*}}], output: "foo"
|
// CHECK-OUTPUT-NAME: "x86_64-apple-darwin10" - "darwin::Linker", inputs: [{{.*}}], output: "foo"
|
||||||
// CHECK-OUTPUT-NAME: "x86_64-apple-darwin10" - "darwin::Dsymutil", inputs: ["foo"], output: "foo.dSYM"
|
// CHECK-OUTPUT-NAME: "x86_64-apple-darwin10" - "darwin::Dsymutil", inputs: ["foo"], output: "foo.dSYM"
|
||||||
// CHECK-OUTPUT-NAME: "x86_64-apple-darwin10" - "darwin::VerifyDebug", inputs: ["foo.dSYM"], output: (nothing)
|
// CHECK-OUTPUT-NAME: "x86_64-apple-darwin10" - "darwin::VerifyDebug", inputs: ["foo.dSYM"], output: (nothing)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user