diff --git a/llvm/cmake/modules/LLVMExternalProjectUtils.cmake b/llvm/cmake/modules/LLVMExternalProjectUtils.cmake --- a/llvm/cmake/modules/LLVMExternalProjectUtils.cmake +++ b/llvm/cmake/modules/LLVMExternalProjectUtils.cmake @@ -53,14 +53,18 @@ endforeach() if(NOT ARG_TOOLCHAIN_TOOLS) - set(ARG_TOOLCHAIN_TOOLS clang lld llvm-ar llvm-ranlib llvm-nm llvm-objdump) - if(_cmake_system_name STREQUAL Darwin) - list(APPEND ARG_TOOLCHAIN_TOOLS llvm-libtool-darwin llvm-lipo) - elseif(_cmake_system_name STREQUAL Windows) - list(APPEND ARG_TOOLCHAIN_TOOLS llvm-lib) - else() - # TODO: These tools don't fully support Mach-O format yet. - list(APPEND ARG_TOOLCHAIN_TOOLS llvm-objcopy llvm-strip) + set(ARG_TOOLCHAIN_TOOLS clang) + # 64-bit XCOFF and big AR format is not yet supported in some of these tools. + if(NOT _cmake_system_name MATCHES AIX) + list(APPEND ARG_TOOLCHAIN_TOOLS lld llvm-ar llvm-lipo llvm-ranlib llvm-nm llvm-objdump) + if(_cmake_system_name STREQUAL Darwin) + list(APPEND ARG_TOOLCHAIN_TOOLS llvm-libtool-darwin llvm-lipo) + elseif(_cmake_system_name STREQUAL Windows) + list(APPEND ARG_TOOLCHAIN_TOOLS llvm-lib) + else() + # TODO: These tools don't fully support Mach-O format yet. + list(APPEND ARG_TOOLCHAIN_TOOLS llvm-objcopy llvm-strip) + endif() endif() endif() foreach(tool ${ARG_TOOLCHAIN_TOOLS})