diff options
| author | Daniel Dunbar <daniel@zuster.org> | 2009-07-01 21:36:28 +0000 |
|---|---|---|
| committer | Daniel Dunbar <daniel@zuster.org> | 2009-07-01 21:36:28 +0000 |
| commit | 8c217fd2a27263a3d76d3fc053d32ea5ef2a2d9a (patch) | |
| tree | 06223e0c2f7de83b6663bc94fd12acdad9835bf3 /lib/Support | |
| parent | 0f1ed7ea87fb0f706217a95e855502dee19f967b (diff) | |
| download | external_llvm-8c217fd2a27263a3d76d3fc053d32ea5ef2a2d9a.zip external_llvm-8c217fd2a27263a3d76d3fc053d32ea5ef2a2d9a.tar.gz external_llvm-8c217fd2a27263a3d76d3fc053d32ea5ef2a2d9a.tar.bz2 | |
Tweak FindExecutable so that relative executable paths work as well.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74645 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support')
| -rw-r--r-- | lib/Support/SystemUtils.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Support/SystemUtils.cpp b/lib/Support/SystemUtils.cpp index 5dcd334..c8c3238 100644 --- a/lib/Support/SystemUtils.cpp +++ b/lib/Support/SystemUtils.cpp @@ -43,9 +43,10 @@ bool llvm::CheckBitcodeOutputToConsole(std::ostream* stream_to_check, #undef FindExecutable // needed on windows :( sys::Path llvm::FindExecutable(const std::string &ExeName, const std::string &ProgramPath) { - // First check if the given name is a fully qualified path to an executable + // First check if the given name is already a valid path to an executable. sys::Path Result(ExeName); - if (Result.isAbsolute() && Result.canExecute()) + Result.makeAbsolute(); + if (Result.canExecute()) return Result; // Otherwise check the directory that the calling program is in. We can do |
