diff options
| author | Hubert Tong <hubert.reinterpretcast@gmail.com> | 2019-03-13 00:12:43 +0000 |
|---|---|---|
| committer | Hubert Tong <hubert.reinterpretcast@gmail.com> | 2019-03-13 00:12:43 +0000 |
| commit | 72db2abcc794feccfb482d4ae9e500c91c8bcb45 (patch) | |
| tree | cfbffcbaadca3bf47a9eb10da935d89f76215f3d /llvm/cmake/modules/GetHostTriple.cmake | |
| parent | 22c660cc131cc6990d81d53ba3f2a8aed186f543 (diff) | |
| download | bcm5719-llvm-72db2abcc794feccfb482d4ae9e500c91c8bcb45.tar.gz bcm5719-llvm-72db2abcc794feccfb482d4ae9e500c91c8bcb45.zip | |
Use AIX version detection at LLVM run-time
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
Diffstat (limited to 'llvm/cmake/modules/GetHostTriple.cmake')
| -rw-r--r-- | llvm/cmake/modules/GetHostTriple.cmake | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/cmake/modules/GetHostTriple.cmake b/llvm/cmake/modules/GetHostTriple.cmake index 7b842450b72..9a74ad6c04a 100644 --- a/llvm/cmake/modules/GetHostTriple.cmake +++ b/llvm/cmake/modules/GetHostTriple.cmake @@ -23,7 +23,8 @@ function( get_host_triple var ) if( NOT TT_RV EQUAL 0 ) message(FATAL_ERROR "Failed to execute ${config_guess}") endif( NOT TT_RV EQUAL 0 ) - set( value ${TT_OUT} ) + # Defer to dynamic detection of the host AIX version. + string(REGEX REPLACE "-aix[0-9][^-]*" "-aix" value ${TT_OUT}) endif( MSVC ) set( ${var} ${value} PARENT_SCOPE ) endfunction( get_host_triple var ) |

