1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 03:23:01 +02:00
llvm-mirror/lib/Support/Unix
Reid Kleckner a7f7730d9b ScanDirForExecutable on Windows fails to find executables with the "exe" extension in name
When the driver tries to locate a program by its name, e.g. a linker, it
scans the paths provided by the toolchain using the ScanDirForExecutable
function. If the lookup fails, the driver uses
llvm::sys::findProgramByName. Unlike llvm::sys::findProgramByName,
ScanDirForExecutable is not aware of file extensions. If the program has
the "exe" extension in its name, which is very common on Windows,
ScanDirForExecutable won't find it under the toolchain-provided paths.

This patch changes the Windows version of the "`can_execute`" function
called by ScanDirForExecutable to respect file extensions, similarly to
llvm::sys::findProgramByName.

Patch by Oleg Ranevskyy

Reviewers: rnk

Differential Revision: http://reviews.llvm.org/D12711

llvm-svn: 247358
2015-09-10 23:28:06 +00:00
..
COM.inc Fix build broken by incorrect class name. 2015-04-27 17:22:30 +00:00
Host.inc Triple: refactor redundant code. 2015-02-12 15:12:13 +00:00
Memory.inc [mips] Use __clear_cache builtin instead of cacheflush() 2015-01-27 23:30:18 +00:00
Mutex.inc
Path.inc ScanDirForExecutable on Windows fails to find executables with the "exe" extension in name 2015-09-10 23:28:06 +00:00
Process.inc Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
Program.inc Remove the configure and cmake checks for sys/wait.h 2015-08-04 06:29:58 +00:00
README.txt
RWMutex.inc Update the non-pthreads fallback for RWMutex on Unix 2014-10-31 17:02:30 +00:00
Signals.inc Remove unnecessary in C++11 c_str() calls 2015-07-23 05:49:29 +00:00
ThreadLocal.inc Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
TimeValue.inc Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
Unix.h Remove the configure and cmake checks for sys/wait.h 2015-08-04 06:29:58 +00:00
Watchdog.inc Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00

llvm/lib/Support/Unix README
===========================

This directory provides implementations of the lib/System classes that
are common to two or more variants of UNIX. For example, the directory
structure underneath this directory could look like this:

Unix           - only code that is truly generic to all UNIX platforms
  Posix        - code that is specific to Posix variants of UNIX
  SUS          - code that is specific to the Single Unix Specification
  SysV         - code that is specific to System V variants of UNIX

As a rule, only those directories actually needing to be created should be
created. Also, further subdirectories could be created to reflect versions of
the various standards. For example, under SUS there could be v1, v2, and v3
subdirectories to reflect the three major versions of SUS.