[llvm] [flang-rt] replace the triple dir to 'aix' for flang-rt to be consistent with clang on AIX. (PR #130875)

Daniel Chen via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 14 10:38:15 PDT 2025


https://github.com/DanielCChen updated https://github.com/llvm/llvm-project/pull/130875

>From 0644e33b675a2d5c3f8541bff4f04c854d697dfc Mon Sep 17 00:00:00 2001
From: Daniel Chen <cdchen at ca.ibm.com>
Date: Tue, 11 Mar 2025 21:29:51 -0400
Subject: [PATCH] [flang-rt] replace the triple dir to 'aix' for flang-rt to be
 consistent with clang on AIX.

---
 flang-rt/cmake/modules/GetToolchainDirs.cmake | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/flang-rt/cmake/modules/GetToolchainDirs.cmake b/flang-rt/cmake/modules/GetToolchainDirs.cmake
index fba12502b5946..9d05007d34123 100644
--- a/flang-rt/cmake/modules/GetToolchainDirs.cmake
+++ b/flang-rt/cmake/modules/GetToolchainDirs.cmake
@@ -118,6 +118,9 @@ function (get_toolchain_arch_dirname outvar)
     set(target "amdgcn-amd-amdhsa")
   elseif("${arch}" MATCHES "^nvptx")
     set(target "nvptx64-nvidia-cuda")
+  elseif(UNIX AND CMAKE_SYSTEM_NAME MATCHES "AIX")
+    # Put at lib/aix to be consistent with clang on AIX.
+    string(TOLOWER "${CMAKE_SYSTEM_NAME}" target)
   else()
     set(target "${arch}${triple_suffix}")
   endif()



More information about the llvm-commits mailing list