forked from OSchip/llvm-project
Change Get{File,Program}Path to return an std::string (instead of a sys::Path).
llvm-svn: 81389
This commit is contained in:
parent
1c28f1e17c
commit
1ce81538f1
|
@ -195,8 +195,9 @@ public:
|
||||||
///
|
///
|
||||||
/// \arg TC - The tool chain for additional information on
|
/// \arg TC - The tool chain for additional information on
|
||||||
/// directories to search.
|
/// directories to search.
|
||||||
|
//
|
||||||
// FIXME: This should be in CompilationInfo.
|
// FIXME: This should be in CompilationInfo.
|
||||||
llvm::sys::Path GetFilePath(const char *Name, const ToolChain &TC) const;
|
std::string GetFilePath(const char *Name, const ToolChain &TC) const;
|
||||||
|
|
||||||
/// GetProgramPath - Lookup \arg Name in the list of program search
|
/// GetProgramPath - Lookup \arg Name in the list of program search
|
||||||
/// paths.
|
/// paths.
|
||||||
|
@ -206,9 +207,10 @@ public:
|
||||||
///
|
///
|
||||||
/// \arg WantFile - False when searching for an executable file, otherwise
|
/// \arg WantFile - False when searching for an executable file, otherwise
|
||||||
/// true. Defaults to false.
|
/// true. Defaults to false.
|
||||||
|
//
|
||||||
// FIXME: This should be in CompilationInfo.
|
// FIXME: This should be in CompilationInfo.
|
||||||
llvm::sys::Path GetProgramPath(const char *Name, const ToolChain &TC,
|
std::string GetProgramPath(const char *Name, const ToolChain &TC,
|
||||||
bool WantFile = false) const;
|
bool WantFile = false) const;
|
||||||
|
|
||||||
/// HandleImmediateArgs - Handle any arguments which should be
|
/// HandleImmediateArgs - Handle any arguments which should be
|
||||||
/// treated before building actions or binding tools.
|
/// treated before building actions or binding tools.
|
||||||
|
|
|
@ -80,9 +80,9 @@ public:
|
||||||
|
|
||||||
// Helper methods
|
// Helper methods
|
||||||
|
|
||||||
llvm::sys::Path GetFilePath(const Compilation &C, const char *Name) const;
|
std::string GetFilePath(const Compilation &C, const char *Name) const;
|
||||||
llvm::sys::Path GetProgramPath(const Compilation &C, const char *Name,
|
std::string GetProgramPath(const Compilation &C, const char *Name,
|
||||||
bool WantFile = false) const;
|
bool WantFile = false) const;
|
||||||
|
|
||||||
// Platform defaults information
|
// Platform defaults information
|
||||||
|
|
||||||
|
|
|
@ -487,19 +487,17 @@ bool Driver::HandleImmediateArgs(const Compilation &C) {
|
||||||
// FIXME: The following handlers should use a callback mechanism, we don't
|
// FIXME: The following handlers should use a callback mechanism, we don't
|
||||||
// know what the client would like to do.
|
// know what the client would like to do.
|
||||||
if (Arg *A = C.getArgs().getLastArg(options::OPT_print_file_name_EQ)) {
|
if (Arg *A = C.getArgs().getLastArg(options::OPT_print_file_name_EQ)) {
|
||||||
llvm::outs() << GetFilePath(A->getValue(C.getArgs()), TC).str()
|
llvm::outs() << GetFilePath(A->getValue(C.getArgs()), TC) << "\n";
|
||||||
<< "\n";
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Arg *A = C.getArgs().getLastArg(options::OPT_print_prog_name_EQ)) {
|
if (Arg *A = C.getArgs().getLastArg(options::OPT_print_prog_name_EQ)) {
|
||||||
llvm::outs() << GetProgramPath(A->getValue(C.getArgs()), TC).str()
|
llvm::outs() << GetProgramPath(A->getValue(C.getArgs()), TC) << "\n";
|
||||||
<< "\n";
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (C.getArgs().hasArg(options::OPT_print_libgcc_file_name)) {
|
if (C.getArgs().hasArg(options::OPT_print_libgcc_file_name)) {
|
||||||
llvm::outs() << GetFilePath("libgcc.a", TC).str() << "\n";
|
llvm::outs() << GetFilePath("libgcc.a", TC) << "\n";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1180,38 +1178,36 @@ const char *Driver::GetNamedOutputPath(Compilation &C,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
llvm::sys::Path Driver::GetFilePath(const char *Name,
|
std::string Driver::GetFilePath(const char *Name, const ToolChain &TC) const {
|
||||||
const ToolChain &TC) const {
|
|
||||||
const ToolChain::path_list &List = TC.getFilePaths();
|
const ToolChain::path_list &List = TC.getFilePaths();
|
||||||
for (ToolChain::path_list::const_iterator
|
for (ToolChain::path_list::const_iterator
|
||||||
it = List.begin(), ie = List.end(); it != ie; ++it) {
|
it = List.begin(), ie = List.end(); it != ie; ++it) {
|
||||||
llvm::sys::Path P(*it);
|
llvm::sys::Path P(*it);
|
||||||
P.appendComponent(Name);
|
P.appendComponent(Name);
|
||||||
if (P.exists())
|
if (P.exists())
|
||||||
return P;
|
return P.str();
|
||||||
}
|
}
|
||||||
|
|
||||||
return llvm::sys::Path(Name);
|
return Name;
|
||||||
}
|
}
|
||||||
|
|
||||||
llvm::sys::Path Driver::GetProgramPath(const char *Name,
|
std::string Driver::GetProgramPath(const char *Name, const ToolChain &TC,
|
||||||
const ToolChain &TC,
|
bool WantFile) const {
|
||||||
bool WantFile) const {
|
|
||||||
const ToolChain::path_list &List = TC.getProgramPaths();
|
const ToolChain::path_list &List = TC.getProgramPaths();
|
||||||
for (ToolChain::path_list::const_iterator
|
for (ToolChain::path_list::const_iterator
|
||||||
it = List.begin(), ie = List.end(); it != ie; ++it) {
|
it = List.begin(), ie = List.end(); it != ie; ++it) {
|
||||||
llvm::sys::Path P(*it);
|
llvm::sys::Path P(*it);
|
||||||
P.appendComponent(Name);
|
P.appendComponent(Name);
|
||||||
if (WantFile ? P.exists() : P.canExecute())
|
if (WantFile ? P.exists() : P.canExecute())
|
||||||
return P;
|
return P.str();
|
||||||
}
|
}
|
||||||
|
|
||||||
// If all else failed, search the path.
|
// If all else failed, search the path.
|
||||||
llvm::sys::Path P(llvm::sys::Program::FindProgramByName(Name));
|
llvm::sys::Path P(llvm::sys::Program::FindProgramByName(Name));
|
||||||
if (!P.empty())
|
if (!P.empty())
|
||||||
return P;
|
return P.str();
|
||||||
|
|
||||||
return llvm::sys::Path(Name);
|
return Name;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string Driver::GetTemporaryPath(const char *Suffix) const {
|
std::string Driver::GetTemporaryPath(const char *Suffix) const {
|
||||||
|
|
|
@ -22,14 +22,14 @@ ToolChain::ToolChain(const HostInfo &_Host, const llvm::Triple &_Triple)
|
||||||
ToolChain::~ToolChain() {
|
ToolChain::~ToolChain() {
|
||||||
}
|
}
|
||||||
|
|
||||||
llvm::sys::Path ToolChain::GetFilePath(const Compilation &C,
|
std::string ToolChain::GetFilePath(const Compilation &C,
|
||||||
const char *Name) const {
|
const char *Name) const {
|
||||||
return Host.getDriver().GetFilePath(Name, *this);
|
return Host.getDriver().GetFilePath(Name, *this);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
llvm::sys::Path ToolChain::GetProgramPath(const Compilation &C,
|
std::string ToolChain::GetProgramPath(const Compilation &C,
|
||||||
const char *Name,
|
const char *Name,
|
||||||
bool WantFile) const {
|
bool WantFile) const {
|
||||||
return Host.getDriver().GetProgramPath(Name, *this, WantFile);
|
return Host.getDriver().GetProgramPath(Name, *this, WantFile);
|
||||||
}
|
}
|
||||||
|
|
|
@ -665,7 +665,7 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *Exec =
|
const char *Exec =
|
||||||
Args.MakeArgString(getToolChain().GetProgramPath(C, "clang-cc").str());
|
Args.MakeArgString(getToolChain().GetProgramPath(C, "clang-cc"));
|
||||||
Dest.addCommand(new Command(JA, Exec, CmdArgs));
|
Dest.addCommand(new Command(JA, Exec, CmdArgs));
|
||||||
|
|
||||||
// Explicitly warn that these options are unsupported, even though
|
// Explicitly warn that these options are unsupported, even though
|
||||||
|
@ -799,7 +799,7 @@ void gcc::Common::ConstructJob(Compilation &C, const JobAction &JA,
|
||||||
const char *GCCName =
|
const char *GCCName =
|
||||||
getToolChain().getHost().getDriver().CCCGenericGCCName.c_str();
|
getToolChain().getHost().getDriver().CCCGenericGCCName.c_str();
|
||||||
const char *Exec =
|
const char *Exec =
|
||||||
Args.MakeArgString(getToolChain().GetProgramPath(C, GCCName).str());
|
Args.MakeArgString(getToolChain().GetProgramPath(C, GCCName));
|
||||||
Dest.addCommand(new Command(JA, Exec, CmdArgs));
|
Dest.addCommand(new Command(JA, Exec, CmdArgs));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1162,7 +1162,7 @@ void darwin::Preprocess::ConstructJob(Compilation &C, const JobAction &JA,
|
||||||
|
|
||||||
const char *CC1Name = getCC1Name(Inputs[0].getType());
|
const char *CC1Name = getCC1Name(Inputs[0].getType());
|
||||||
const char *Exec =
|
const char *Exec =
|
||||||
Args.MakeArgString(getToolChain().GetProgramPath(C, CC1Name).str());
|
Args.MakeArgString(getToolChain().GetProgramPath(C, CC1Name));
|
||||||
Dest.addCommand(new Command(JA, Exec, CmdArgs));
|
Dest.addCommand(new Command(JA, Exec, CmdArgs));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1256,7 +1256,7 @@ void darwin::Compile::ConstructJob(Compilation &C, const JobAction &JA,
|
||||||
|
|
||||||
const char *CC1Name = getCC1Name(Inputs[0].getType());
|
const char *CC1Name = getCC1Name(Inputs[0].getType());
|
||||||
const char *Exec =
|
const char *Exec =
|
||||||
Args.MakeArgString(getToolChain().GetProgramPath(C, CC1Name).str());
|
Args.MakeArgString(getToolChain().GetProgramPath(C, CC1Name));
|
||||||
Dest.addCommand(new Command(JA, Exec, CmdArgs));
|
Dest.addCommand(new Command(JA, Exec, CmdArgs));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1311,7 +1311,7 @@ void darwin::Assemble::ConstructJob(Compilation &C, const JobAction &JA,
|
||||||
// asm_final spec is empty.
|
// asm_final spec is empty.
|
||||||
|
|
||||||
const char *Exec =
|
const char *Exec =
|
||||||
Args.MakeArgString(getToolChain().GetProgramPath(C, "as").str());
|
Args.MakeArgString(getToolChain().GetProgramPath(C, "as"));
|
||||||
Dest.addCommand(new Command(JA, Exec, CmdArgs));
|
Dest.addCommand(new Command(JA, Exec, CmdArgs));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1693,7 +1693,7 @@ void darwin::Link::ConstructJob(Compilation &C, const JobAction &JA,
|
||||||
!Args.hasArg(options::OPT_miphoneos_version_min_EQ) &&
|
!Args.hasArg(options::OPT_miphoneos_version_min_EQ) &&
|
||||||
isMacosxVersionLT(MacosxVersion, 10, 5)) {
|
isMacosxVersionLT(MacosxVersion, 10, 5)) {
|
||||||
const char *Str =
|
const char *Str =
|
||||||
Args.MakeArgString(getToolChain().GetFilePath(C, "crt3.o").str());
|
Args.MakeArgString(getToolChain().GetFilePath(C, "crt3.o"));
|
||||||
CmdArgs.push_back(Str);
|
CmdArgs.push_back(Str);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1807,7 +1807,7 @@ void darwin::Link::ConstructJob(Compilation &C, const JobAction &JA,
|
||||||
Args.AddAllArgs(CmdArgs, options::OPT_F);
|
Args.AddAllArgs(CmdArgs, options::OPT_F);
|
||||||
|
|
||||||
const char *Exec =
|
const char *Exec =
|
||||||
Args.MakeArgString(getToolChain().GetProgramPath(C, "ld").str());
|
Args.MakeArgString(getToolChain().GetProgramPath(C, "ld"));
|
||||||
Dest.addCommand(new Command(JA, Exec, CmdArgs));
|
Dest.addCommand(new Command(JA, Exec, CmdArgs));
|
||||||
|
|
||||||
// Find the first non-empty base input (we want to ignore linker
|
// Find the first non-empty base input (we want to ignore linker
|
||||||
|
@ -1835,7 +1835,7 @@ void darwin::Link::ConstructJob(Compilation &C, const JobAction &JA,
|
||||||
const char *Suffix = strrchr(BaseInput, '.');
|
const char *Suffix = strrchr(BaseInput, '.');
|
||||||
if (Suffix && isSourceSuffix(Suffix + 1)) {
|
if (Suffix && isSourceSuffix(Suffix + 1)) {
|
||||||
const char *Exec =
|
const char *Exec =
|
||||||
Args.MakeArgString(getToolChain().GetProgramPath(C, "dsymutil").str());
|
Args.MakeArgString(getToolChain().GetProgramPath(C, "dsymutil"));
|
||||||
ArgStringList CmdArgs;
|
ArgStringList CmdArgs;
|
||||||
CmdArgs.push_back(Output.getFilename());
|
CmdArgs.push_back(Output.getFilename());
|
||||||
C.getJobs().addCommand(new Command(JA, Exec, CmdArgs));
|
C.getJobs().addCommand(new Command(JA, Exec, CmdArgs));
|
||||||
|
@ -1863,7 +1863,7 @@ void darwin::Lipo::ConstructJob(Compilation &C, const JobAction &JA,
|
||||||
CmdArgs.push_back(II.getFilename());
|
CmdArgs.push_back(II.getFilename());
|
||||||
}
|
}
|
||||||
const char *Exec =
|
const char *Exec =
|
||||||
Args.MakeArgString(getToolChain().GetProgramPath(C, "lipo").str());
|
Args.MakeArgString(getToolChain().GetProgramPath(C, "lipo"));
|
||||||
Dest.addCommand(new Command(JA, Exec, CmdArgs));
|
Dest.addCommand(new Command(JA, Exec, CmdArgs));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1893,7 +1893,7 @@ void auroraux::Assemble::ConstructJob(Compilation &C, const JobAction &JA,
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *Exec =
|
const char *Exec =
|
||||||
Args.MakeArgString(getToolChain().GetProgramPath(C, "as").str());
|
Args.MakeArgString(getToolChain().GetProgramPath(C, "as"));
|
||||||
Dest.addCommand(new Command(JA, Exec, CmdArgs));
|
Dest.addCommand(new Command(JA, Exec, CmdArgs));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1937,10 +1937,10 @@ void auroraux::Link::ConstructJob(Compilation &C, const JobAction &JA,
|
||||||
if (!Args.hasArg(options::OPT_nostdlib) &&
|
if (!Args.hasArg(options::OPT_nostdlib) &&
|
||||||
!Args.hasArg(options::OPT_nostartfiles)) {
|
!Args.hasArg(options::OPT_nostartfiles)) {
|
||||||
if (!Args.hasArg(options::OPT_shared)) {
|
if (!Args.hasArg(options::OPT_shared)) {
|
||||||
CmdArgs.push_back(Args.MakeArgString(getToolChain().GetFilePath(C, "crt0.o").str()));
|
CmdArgs.push_back(Args.MakeArgString(getToolChain().GetFilePath(C, "crt0.o")));
|
||||||
CmdArgs.push_back(Args.MakeArgString(getToolChain().GetFilePath(C, "crtbegin.o").str()));
|
CmdArgs.push_back(Args.MakeArgString(getToolChain().GetFilePath(C, "crtbegin.o")));
|
||||||
} else {
|
} else {
|
||||||
CmdArgs.push_back(Args.MakeArgString(getToolChain().GetFilePath(C, "crtbeginS.o").str()));
|
CmdArgs.push_back(Args.MakeArgString(getToolChain().GetFilePath(C, "crtbeginS.o")));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1985,13 +1985,13 @@ void auroraux::Link::ConstructJob(Compilation &C, const JobAction &JA,
|
||||||
if (!Args.hasArg(options::OPT_nostdlib) &&
|
if (!Args.hasArg(options::OPT_nostdlib) &&
|
||||||
!Args.hasArg(options::OPT_nostartfiles)) {
|
!Args.hasArg(options::OPT_nostartfiles)) {
|
||||||
if (!Args.hasArg(options::OPT_shared))
|
if (!Args.hasArg(options::OPT_shared))
|
||||||
CmdArgs.push_back(Args.MakeArgString(getToolChain().GetFilePath(C, "crtend.o").str()));
|
CmdArgs.push_back(Args.MakeArgString(getToolChain().GetFilePath(C, "crtend.o")));
|
||||||
else
|
else
|
||||||
CmdArgs.push_back(Args.MakeArgString(getToolChain().GetFilePath(C, "crtendS.o").str()));
|
CmdArgs.push_back(Args.MakeArgString(getToolChain().GetFilePath(C, "crtendS.o")));
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *Exec =
|
const char *Exec =
|
||||||
Args.MakeArgString(getToolChain().GetProgramPath(C, "ld").str());
|
Args.MakeArgString(getToolChain().GetProgramPath(C, "ld"));
|
||||||
Dest.addCommand(new Command(JA, Exec, CmdArgs));
|
Dest.addCommand(new Command(JA, Exec, CmdArgs));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2021,7 +2021,7 @@ void openbsd::Assemble::ConstructJob(Compilation &C, const JobAction &JA,
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *Exec =
|
const char *Exec =
|
||||||
Args.MakeArgString(getToolChain().GetProgramPath(C, "as").str());
|
Args.MakeArgString(getToolChain().GetProgramPath(C, "as"));
|
||||||
Dest.addCommand(new Command(JA, Exec, CmdArgs));
|
Dest.addCommand(new Command(JA, Exec, CmdArgs));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2065,10 +2065,10 @@ void openbsd::Link::ConstructJob(Compilation &C, const JobAction &JA,
|
||||||
if (!Args.hasArg(options::OPT_nostdlib) &&
|
if (!Args.hasArg(options::OPT_nostdlib) &&
|
||||||
!Args.hasArg(options::OPT_nostartfiles)) {
|
!Args.hasArg(options::OPT_nostartfiles)) {
|
||||||
if (!Args.hasArg(options::OPT_shared)) {
|
if (!Args.hasArg(options::OPT_shared)) {
|
||||||
CmdArgs.push_back(Args.MakeArgString(getToolChain().GetFilePath(C, "crt0.o").str()));
|
CmdArgs.push_back(Args.MakeArgString(getToolChain().GetFilePath(C, "crt0.o")));
|
||||||
CmdArgs.push_back(Args.MakeArgString(getToolChain().GetFilePath(C, "crtbegin.o").str()));
|
CmdArgs.push_back(Args.MakeArgString(getToolChain().GetFilePath(C, "crtbegin.o")));
|
||||||
} else {
|
} else {
|
||||||
CmdArgs.push_back(Args.MakeArgString(getToolChain().GetFilePath(C, "crtbeginS.o").str()));
|
CmdArgs.push_back(Args.MakeArgString(getToolChain().GetFilePath(C, "crtbeginS.o")));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2113,13 +2113,13 @@ void openbsd::Link::ConstructJob(Compilation &C, const JobAction &JA,
|
||||||
if (!Args.hasArg(options::OPT_nostdlib) &&
|
if (!Args.hasArg(options::OPT_nostdlib) &&
|
||||||
!Args.hasArg(options::OPT_nostartfiles)) {
|
!Args.hasArg(options::OPT_nostartfiles)) {
|
||||||
if (!Args.hasArg(options::OPT_shared))
|
if (!Args.hasArg(options::OPT_shared))
|
||||||
CmdArgs.push_back(Args.MakeArgString(getToolChain().GetFilePath(C, "crtend.o").str()));
|
CmdArgs.push_back(Args.MakeArgString(getToolChain().GetFilePath(C, "crtend.o")));
|
||||||
else
|
else
|
||||||
CmdArgs.push_back(Args.MakeArgString(getToolChain().GetFilePath(C, "crtendS.o").str()));
|
CmdArgs.push_back(Args.MakeArgString(getToolChain().GetFilePath(C, "crtendS.o")));
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *Exec =
|
const char *Exec =
|
||||||
Args.MakeArgString(getToolChain().GetProgramPath(C, "ld").str());
|
Args.MakeArgString(getToolChain().GetProgramPath(C, "ld"));
|
||||||
Dest.addCommand(new Command(JA, Exec, CmdArgs));
|
Dest.addCommand(new Command(JA, Exec, CmdArgs));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2154,7 +2154,7 @@ void freebsd::Assemble::ConstructJob(Compilation &C, const JobAction &JA,
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *Exec =
|
const char *Exec =
|
||||||
Args.MakeArgString(getToolChain().GetProgramPath(C, "as").str());
|
Args.MakeArgString(getToolChain().GetProgramPath(C, "as"));
|
||||||
Dest.addCommand(new Command(JA, Exec, CmdArgs));
|
Dest.addCommand(new Command(JA, Exec, CmdArgs));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2198,12 +2198,12 @@ void freebsd::Link::ConstructJob(Compilation &C, const JobAction &JA,
|
||||||
if (!Args.hasArg(options::OPT_nostdlib) &&
|
if (!Args.hasArg(options::OPT_nostdlib) &&
|
||||||
!Args.hasArg(options::OPT_nostartfiles)) {
|
!Args.hasArg(options::OPT_nostartfiles)) {
|
||||||
if (!Args.hasArg(options::OPT_shared)) {
|
if (!Args.hasArg(options::OPT_shared)) {
|
||||||
CmdArgs.push_back(Args.MakeArgString(getToolChain().GetFilePath(C, "crt1.o").str()));
|
CmdArgs.push_back(Args.MakeArgString(getToolChain().GetFilePath(C, "crt1.o")));
|
||||||
CmdArgs.push_back(Args.MakeArgString(getToolChain().GetFilePath(C, "crti.o").str()));
|
CmdArgs.push_back(Args.MakeArgString(getToolChain().GetFilePath(C, "crti.o")));
|
||||||
CmdArgs.push_back(Args.MakeArgString(getToolChain().GetFilePath(C, "crtbegin.o").str()));
|
CmdArgs.push_back(Args.MakeArgString(getToolChain().GetFilePath(C, "crtbegin.o")));
|
||||||
} else {
|
} else {
|
||||||
CmdArgs.push_back(Args.MakeArgString(getToolChain().GetFilePath(C, "crti.o").str()));
|
CmdArgs.push_back(Args.MakeArgString(getToolChain().GetFilePath(C, "crti.o")));
|
||||||
CmdArgs.push_back(Args.MakeArgString(getToolChain().GetFilePath(C, "crtbeginS.o").str()));
|
CmdArgs.push_back(Args.MakeArgString(getToolChain().GetFilePath(C, "crtbeginS.o")));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2258,14 +2258,14 @@ void freebsd::Link::ConstructJob(Compilation &C, const JobAction &JA,
|
||||||
if (!Args.hasArg(options::OPT_nostdlib) &&
|
if (!Args.hasArg(options::OPT_nostdlib) &&
|
||||||
!Args.hasArg(options::OPT_nostartfiles)) {
|
!Args.hasArg(options::OPT_nostartfiles)) {
|
||||||
if (!Args.hasArg(options::OPT_shared))
|
if (!Args.hasArg(options::OPT_shared))
|
||||||
CmdArgs.push_back(Args.MakeArgString(getToolChain().GetFilePath(C, "crtend.o").str()));
|
CmdArgs.push_back(Args.MakeArgString(getToolChain().GetFilePath(C, "crtend.o")));
|
||||||
else
|
else
|
||||||
CmdArgs.push_back(Args.MakeArgString(getToolChain().GetFilePath(C, "crtendS.o").str()));
|
CmdArgs.push_back(Args.MakeArgString(getToolChain().GetFilePath(C, "crtendS.o")));
|
||||||
CmdArgs.push_back(Args.MakeArgString(getToolChain().GetFilePath(C, "crtn.o").str()));
|
CmdArgs.push_back(Args.MakeArgString(getToolChain().GetFilePath(C, "crtn.o")));
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *Exec =
|
const char *Exec =
|
||||||
Args.MakeArgString(getToolChain().GetProgramPath(C, "ld").str());
|
Args.MakeArgString(getToolChain().GetProgramPath(C, "ld"));
|
||||||
Dest.addCommand(new Command(JA, Exec, CmdArgs));
|
Dest.addCommand(new Command(JA, Exec, CmdArgs));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2304,7 +2304,7 @@ void dragonfly::Assemble::ConstructJob(Compilation &C, const JobAction &JA,
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *Exec =
|
const char *Exec =
|
||||||
Args.MakeArgString(getToolChain().GetProgramPath(C, "as").str());
|
Args.MakeArgString(getToolChain().GetProgramPath(C, "as"));
|
||||||
Dest.addCommand(new Command(JA, Exec, CmdArgs));
|
Dest.addCommand(new Command(JA, Exec, CmdArgs));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2347,12 +2347,12 @@ void dragonfly::Link::ConstructJob(Compilation &C, const JobAction &JA,
|
||||||
if (!Args.hasArg(options::OPT_nostdlib) &&
|
if (!Args.hasArg(options::OPT_nostdlib) &&
|
||||||
!Args.hasArg(options::OPT_nostartfiles)) {
|
!Args.hasArg(options::OPT_nostartfiles)) {
|
||||||
if (!Args.hasArg(options::OPT_shared)) {
|
if (!Args.hasArg(options::OPT_shared)) {
|
||||||
CmdArgs.push_back(Args.MakeArgString(getToolChain().GetFilePath(C, "crt1.o").str()));
|
CmdArgs.push_back(Args.MakeArgString(getToolChain().GetFilePath(C, "crt1.o")));
|
||||||
CmdArgs.push_back(Args.MakeArgString(getToolChain().GetFilePath(C, "crti.o").str()));
|
CmdArgs.push_back(Args.MakeArgString(getToolChain().GetFilePath(C, "crti.o")));
|
||||||
CmdArgs.push_back(Args.MakeArgString(getToolChain().GetFilePath(C, "crtbegin.o").str()));
|
CmdArgs.push_back(Args.MakeArgString(getToolChain().GetFilePath(C, "crtbegin.o")));
|
||||||
} else {
|
} else {
|
||||||
CmdArgs.push_back(Args.MakeArgString(getToolChain().GetFilePath(C, "crti.o").str()));
|
CmdArgs.push_back(Args.MakeArgString(getToolChain().GetFilePath(C, "crti.o")));
|
||||||
CmdArgs.push_back(Args.MakeArgString(getToolChain().GetFilePath(C, "crtbeginS.o").str()));
|
CmdArgs.push_back(Args.MakeArgString(getToolChain().GetFilePath(C, "crtbeginS.o")));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2421,13 +2421,13 @@ void dragonfly::Link::ConstructJob(Compilation &C, const JobAction &JA,
|
||||||
if (!Args.hasArg(options::OPT_nostdlib) &&
|
if (!Args.hasArg(options::OPT_nostdlib) &&
|
||||||
!Args.hasArg(options::OPT_nostartfiles)) {
|
!Args.hasArg(options::OPT_nostartfiles)) {
|
||||||
if (!Args.hasArg(options::OPT_shared))
|
if (!Args.hasArg(options::OPT_shared))
|
||||||
CmdArgs.push_back(Args.MakeArgString(getToolChain().GetFilePath(C, "crtend.o").str()));
|
CmdArgs.push_back(Args.MakeArgString(getToolChain().GetFilePath(C, "crtend.o")));
|
||||||
else
|
else
|
||||||
CmdArgs.push_back(Args.MakeArgString(getToolChain().GetFilePath(C, "crtendS.o").str()));
|
CmdArgs.push_back(Args.MakeArgString(getToolChain().GetFilePath(C, "crtendS.o")));
|
||||||
CmdArgs.push_back(Args.MakeArgString(getToolChain().GetFilePath(C, "crtn.o").str()));
|
CmdArgs.push_back(Args.MakeArgString(getToolChain().GetFilePath(C, "crtn.o")));
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *Exec =
|
const char *Exec =
|
||||||
Args.MakeArgString(getToolChain().GetProgramPath(C, "ld").str());
|
Args.MakeArgString(getToolChain().GetProgramPath(C, "ld"));
|
||||||
Dest.addCommand(new Command(JA, Exec, CmdArgs));
|
Dest.addCommand(new Command(JA, Exec, CmdArgs));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue