[PATCH] D74256: [AIX] Change host detection to return correct 32/64-bit triple

David Tenty via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 7 14:16:22 PST 2020


daltenty created this revision.
Herald added subscribers: llvm-commits, mgorny.
Herald added a project: LLVM.
daltenty added reviewers: hubert.reinterpretcast, DiggerLin, stevewan.

as config_guess does not return the correct version.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D74256

Files:
  llvm/cmake/modules/GetHostTriple.cmake


Index: llvm/cmake/modules/GetHostTriple.cmake
===================================================================
--- llvm/cmake/modules/GetHostTriple.cmake
+++ 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 )


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D74256.243284.patch
Type: text/x-patch
Size: 968 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200207/ff530828/attachment.bin>


More information about the llvm-commits mailing list