mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-03-02 22:32:08 +00:00
llvmc: Fix tool finding logic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118056 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
d138d7034e
commit
6674b77ada
@ -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