mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-03-01 00:35:43 +00:00
llvmc: Fix tool finding logic.
llvm-svn: 118056
This commit is contained in:
parent
b34a5f1d02
commit
e41fe39fe7
@ -53,18 +53,18 @@ namespace {
|
||||
#endif
|
||||
}
|
||||
|
||||
int ExecuteProgram (const std::string& name,
|
||||
const StrVector& args) {
|
||||
int ExecuteProgram (const std::string& name, const StrVector& args) {
|
||||
sys::Path prog(name);
|
||||
|
||||
if (!prog.isAbsolute())
|
||||
if (!prog.isAbsolute()) {
|
||||
prog = FindExecutable(name, ProgramName, (void *)(intptr_t)&Main);
|
||||
|
||||
if (prog.isEmpty()) {
|
||||
prog = sys::Program::FindProgramByName(name);
|
||||
if (prog.isEmpty()) {
|
||||
PrintError("Can't find program '" + name + "'");
|
||||
return -1;
|
||||
if (!prog.canExecute()) {
|
||||
prog = sys::Program::FindProgramByName(name);
|
||||
if (prog.isEmpty()) {
|
||||
PrintError("Can't find program '" + name + "'");
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!prog.canExecute()) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user