mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 20:32:21 +00:00
Fix a fixme; don't take binaries from the working directory.
This fixes clang on non-darwin platforms if a file called 'ld' or 'as' is in the working directory. Based on patch by Pawel Worach! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77379 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
3755bec950
commit
b0facb18df
@ -45,9 +45,9 @@ Program::FindProgramByName(const std::string& progName) {
|
|||||||
Path temp;
|
Path temp;
|
||||||
if (!temp.set(progName)) // invalid name
|
if (!temp.set(progName)) // invalid name
|
||||||
return Path();
|
return Path();
|
||||||
// FIXME: have to check for absolute filename - we cannot assume anything
|
// Use the given path verbatim if it contains any slashes; this matches
|
||||||
// about "." being in $PATH
|
// the behavior of sh(1) and friends.
|
||||||
if (temp.canExecute()) // already executable as is
|
if (progName.find('/') != std::string::npos && temp.canExecute())
|
||||||
return temp;
|
return temp;
|
||||||
|
|
||||||
// At this point, the file name is valid and its not executable
|
// At this point, the file name is valid and its not executable
|
||||||
|
Loading…
Reference in New Issue
Block a user