Skip to content

Commit 960d207

Browse files
committed
[flang-rt] Using get_toolchain_os_dirname for AIX to get lib path instead of changing get_toolchain_arch_dirname.
1 parent 0644e33 commit 960d207

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

flang-rt/cmake/modules/GetToolchainDirs.cmake

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,9 @@
3434
function (get_toolchain_library_subdir outvar)
3535
set(outval "lib")
3636

37-
if (APPLE)
37+
if (APPLE OR (UNIX AND CMAKE_SYSTEM_NAME MATCHES "AIX"))
3838
# Required to be "darwin" for MachO toolchain.
39+
# AIX uses lib/${os_dir} as if LLVM_ENABLE_PER_TARGET_RUNTIME_DIR=OFF
3940
get_toolchain_os_dirname(os_dirname)
4041
set(outval "${outval}/${os_dirname}")
4142
else ()
@@ -118,9 +119,6 @@ function (get_toolchain_arch_dirname outvar)
118119
set(target "amdgcn-amd-amdhsa")
119120
elseif("${arch}" MATCHES "^nvptx")
120121
set(target "nvptx64-nvidia-cuda")
121-
elseif(UNIX AND CMAKE_SYSTEM_NAME MATCHES "AIX")
122-
# Put at lib/aix to be consistent with clang on AIX.
123-
string(TOLOWER "${CMAKE_SYSTEM_NAME}" target)
124122
else()
125123
set(target "${arch}${triple_suffix}")
126124
endif()

0 commit comments

Comments
 (0)