summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/Unix/Host.inc
Commit message (Collapse)AuthorAgeFilesLines
* Use AIX version detection at LLVM run-timeHubert Tong2019-03-131-0/+17
| | | | | | | | | | | | | | | | | | | | | | | Summary: AIX compilers define macros based on the version of the operating system. This patch implements updating of versionless AIX triples to include the host AIX version. Also, the host triple detection in the build system is adjusted to strip the AIX version information so that the run-time detection is preferred. Reviewers: xingxue, stefanp, nemanjai, jasonliu Reviewed By: xingxue Subscribers: mgorny, kristina, jdoerfert, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D58798 llvm-svn: 355995
* Update the file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-191-4/+3
| | | | | | | | | | | | | | | | | to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636
* [Support] Avoid normalization in sys::getDefaultTargetTriplePetr Hosek2018-05-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | 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/D47153 llvm-svn: 333307
* Revert 332750, llvm part (see comment on D46910).Nico Weber2018-05-201-1/+1
| | | | llvm-svn: 332823
* [Support] Avoid normalization in sys::getDefaultTargetTriplePetr Hosek2018-05-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | 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
* [Support] sys::getProcessTriple should return a macOS triple usingAlex Lorenz2017-07-071-6/+19
| | | | | | | | | | | | | | | the system's version of macOS sys::getProcessTriple returns LLVM_HOST_TRIPLE, whose system version might not be the actual version of the system on which the compiler running. This commit ensures that, for macOS, sys::getProcessTriple returns a triple with the system's macOS version. rdar://33177551 Differential Revision: https://reviews.llvm.org/D34446 llvm-svn: 307372
* [CMake] Introduce LLVM_TARGET_TRIPLE_ENV as an option to override ↵NAKAMURA Takumi2017-06-171-0/+6
| | | | | | | | | | | | | | | | | | | LLVM_DEFAULT_TARGET_TRIPLE at runtime. No behavior is changed if LLVM_TARGET_TRIPLE_ENV is blank or undefined. If LLVM_TARGET_TRIPLE_ENV is "TEST_TARGET_TRIPLE" and $TEST_TARGET_TRIPLE is not blank, llvm::sys::getDefaultTargetTriple() returns $TEST_TARGET_TRIPLE. Lit resets config.target_triple and config.environment[LLVM_TARGET_TRIPLE_ENV] to change the default target. Without changing LLVM_DEFAULT_TARGET_TRIPLE nor rebuilding, lit can be run; TEST_TARGET_TRIPLE=i686-pc-win32 bin/llvm-lit -sv path/to/test/ TEST_TARGET_TRIPLE=i686-pc-win32 ninja check-clang-tools Differential Revision: https://reviews.llvm.org/D33662 llvm-svn: 305632
* Triple: refactor redundant code.Tim Northover2015-02-121-19/+5
| | | | | | | | | | Should be no functional change, since most of the logic removed was completely pointless (after some previous refactoring) and the rest duplicated elsewhere. Patch by Kamil Rytarowski. llvm-svn: 228926
* [cleanup] Re-sort all the #include lines in LLVM usingChandler Carruth2015-01-141-3/+3
| | | | | | | | | | | utils/sort_includes.py. I clearly haven't done this in a while, so more changed than usual. This even uncovered a missing include from the InstrProf library that I've added. No functionality changed here, just mechanical cleanup of the include order. llvm-svn: 225974
* Unix/Host.inc: Remove <cstdlib>. It has been unused for a long time.NAKAMURA Takumi2014-09-241-1/+0
| | | | llvm-svn: 218373
* Unix/Host.inc: Wrap a comment line in 80-col.NAKAMURA Takumi2014-09-241-1/+2
| | | | llvm-svn: 218371
* Unix/Host.inc: Remove leading whitespace. It had been here since r56942!NAKAMURA Takumi2014-09-241-1/+1
| | | | llvm-svn: 218370
* Support: normalize the default triple on UnixSaleem Abdulrasool2014-03-301-1/+1
| | | | | | | | | | This will fix cross-compiling buildbots (e.g. cygwin). This is in the same vein as SVN r205070. Apply this to fix the cross-compiling scenario, even though the preferred solution is to update the build system to normalize the embedded triple rather than perform this at runtime every time. This is meant to tide us over until that approach is fleshed out and applied. llvm-svn: 205120
* revert r147542 after comments from Joerg SonnenbergerSebastian Pop2012-01-051-12/+6
| | | | llvm-svn: 147608
* use getHostTriple instead of getDefaultTargetTriple in getClosestTargetForJITSebastian Pop2012-01-041-6/+12
| | | | | | | | | | Get back getHostTriple. For JIT compilation, use the host triple instead of the default target: this fixes some JIT testcases that used to fail when the compiler has been configured as a cross compiler. llvm-svn: 147542
* rename getHostTriple into getDefaultTargetTripleSebastian Pop2011-11-011-5/+5
| | | | llvm-svn: 143502
* rename LLVM_HOSTTRIPLE into LLVM_DEFAULT_TARGET_TRIPLESebastian Pop2011-11-011-4/+1
| | | | llvm-svn: 143501
* Remove the hack to check UNAME_RELEASE when identifying the Darwin version.Bob Wilson2011-09-201-9/+0
| | | | | | | | | This was only needed to locate llvm-gcc's installation directory when clang falls back to run llvm-gcc for i386 kexts. As of clang svn r140187, we're now just searching paths with several different Darwin versions on either side of the current version, so this is no longer needed. llvm-svn: 140188
* Clarify a comment.Bob Wilson2011-08-101-1/+3
| | | | llvm-svn: 137204
* Put Darwin-specific code inside an __APPLE__ ifdef.Bob Wilson2011-08-091-0/+2
| | | | llvm-svn: 137137
* Recognize the UNAME_RELEASE environment variable to match Darwin's uname.Bob Wilson2011-08-091-0/+6
| | | | | | | | When this variable is set, "uname -r" will return its value instead of the real OS version. Make this affect LLVM's triple for consistency. <rdar://problem/9919167> llvm-svn: 137111
* Don't include information about the build into the information returned byRafael Espindola2011-05-171-29/+0
| | | | | | getHostTriple. This fixes a 32 bit clang running on a 64 bit ubuntu. llvm-svn: 131463
* sys/Host: Change getHostTriple() to return the full Darwin version on OS X.Daniel Dunbar2011-04-201-4/+1
| | | | llvm-svn: 129852
* Add missing standard headers. Patch by Joerg Sonnenberger!Nick Lewycky2010-12-191-0/+1
| | | | llvm-svn: 122193
* Now to chant the magical incantation that will exorcise the System libraryCharles Davis2010-11-291-1/+1
| | | | | | | | from LLVM forever: grep -lR "llvm/System" * | grep -v .svn | xargs sed -ie 's#llvm/System#llvm/Support#g' llvm-svn: 120314
* Merge System into Support.Michael J. Spencer2010-11-291-0/+96
llvm-svn: 120298
OpenPOWER on IntegriCloud