diff --git a/llvm/cmake/modules/GetHostTriple.cmake b/llvm/cmake/modules/GetHostTriple.cmake --- a/llvm/cmake/modules/GetHostTriple.cmake +++ b/llvm/cmake/modules/GetHostTriple.cmake @@ -14,6 +14,12 @@ else() set( value "i686-pc-windows-gnu" ) endif() + elseif( CMAKE_HOST_SYSTEM_NAME STREQUAL AIX ) + if( CMAKE_SIZEOF_VOID_P EQUAL 8 ) + set( value "powerpc64-ibm-aix" ) + else() + set( value "powerpc-ibm-aix" ) + endif() else( MSVC ) if(CMAKE_HOST_SYSTEM_NAME STREQUAL Windows AND NOT MSYS) message(WARNING "unable to determine host target triple") @@ -26,8 +32,6 @@ if( NOT TT_RV EQUAL 0 ) message(FATAL_ERROR "Failed to execute ${config_guess}") endif( NOT TT_RV EQUAL 0 ) - # Defer to dynamic detection of the host AIX version. - string(REGEX REPLACE "-aix[0-9][^-]*" "-aix" value ${TT_OUT}) endif() endif( MSVC ) set( ${var} ${value} PARENT_SCOPE )