1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 11:13:28 +01:00
llvm-mirror/lib/Support/Unix
Petr Hosek 5f84b3720a [Support] Avoid normalization in sys::getDefaultTargetTriple
The return value of sys::getDefaultTargetTriple, which is derived from
-DLLVM_DEFAULT_TRIPLE, is used to construct tool names, default target,
and in the future also to control the search path directly; as such it
should be used textually, without interpretation by LLVM.

Normalization of this value may lead to unexpected results, for example
if we configure LLVM with -DLLVM_DEFAULT_TARGET_TRIPLE=x86_64-linux-gnu,
normalization will transform that value to x86_64--linux-gnu. Driver will
use that value to search for tools prefixed with x86_64--linux-gnu- which
may be confusing. This is also inconsistent with the behavior of the
--target flag which is taken as-is without any normalization and overrides
the value of LLVM_DEFAULT_TARGET_TRIPLE.

Users of sys::getDefaultTargetTriple already perform their own
normalization as needed, so this change shouldn't impact existing logic.

Differential Revision: https://reviews.llvm.org/D46910

llvm-svn: 332750
2018-05-18 18:33:07 +00:00
..
COM.inc
DynamicLibrary.inc
Host.inc [Support] Avoid normalization in sys::getDefaultTargetTriple 2018-05-18 18:33:07 +00:00
Memory.inc IWYU for llvm-config.h in llvm, additions. 2018-04-30 14:59:11 +00:00
Mutex.inc
Path.inc [Support] Support building LLVM for Fuchsia 2018-05-03 01:38:49 +00:00
Process.inc IWYU for llvm-config.h in llvm, additions. 2018-04-30 14:59:11 +00:00
Program.inc [Unix] Indent ChangeStd{in,out}ToBinary. 2018-05-16 06:43:27 +00:00
README.txt
RWMutex.inc
Signals.inc Signal handling should be signal-safe 2018-05-16 17:25:35 +00:00
Threading.inc Remove a dead #ifdef. 2018-04-30 00:08:06 +00:00
ThreadLocal.inc IWYU for llvm-config.h in llvm, additions. 2018-04-30 14:59:11 +00:00
Unix.h Remove @brief commands from doxygen comments, too. 2018-05-01 16:10:38 +00:00
Watchdog.inc IWYU for llvm-config.h in llvm, additions. 2018-04-30 14:59:11 +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.