[llvm] bb0a95d - [CMake] handle the AIX form of the lto cache dir option (#168868)
Wael Yehia via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 20 07:22:34 PST 2025
Author: David Tenty
Date: 2025-11-20T15:27:45Z
New Revision: bb0a95d5b16dabd8e64c6672ec381215a144d92d
URL: https://github.com/llvm/llvm-project/commit/bb0a95d5b16dabd8e64c6672ec381215a144d92d
DIFF: https://github.com/llvm/llvm-project/commit/bb0a95d5b16dabd8e64c6672ec381215a144d92d.diff
LOG: [CMake] handle the AIX form of the lto cache dir option (#168868)
This handles the AIX form of the thinLTO cache dir option, which get's
turned on when thinLTO is enabled.
Added:
Modified:
llvm/cmake/modules/HandleLLVMOptions.cmake
Removed:
################################################################################
diff --git a/llvm/cmake/modules/HandleLLVMOptions.cmake b/llvm/cmake/modules/HandleLLVMOptions.cmake
index fdd3509f03f59..2d78626d953c9 100644
--- a/llvm/cmake/modules/HandleLLVMOptions.cmake
+++ b/llvm/cmake/modules/HandleLLVMOptions.cmake
@@ -1339,6 +1339,9 @@ if(uppercase_LLVM_ENABLE_LTO STREQUAL "THIN")
if(APPLE)
append("-Wl,-cache_path_lto,${LLVM_THINLTO_CACHE_PATH}"
CMAKE_EXE_LINKER_FLAGS CMAKE_SHARED_LINKER_FLAGS)
+ elseif("${CMAKE_SYSTEM_NAME}" MATCHES "AIX")
+ append("-bplugin_opt:-legacy-thinlto-cache-dir=${LLVM_THINLTO_CACHE_PATH}"
+ CMAKE_EXE_LINKER_FLAGS CMAKE_SHARED_LINKER_FLAGS)
elseif((UNIX OR MINGW) AND LLVM_USE_LINKER STREQUAL "lld")
append("-Wl,--thinlto-cache-dir=${LLVM_THINLTO_CACHE_PATH}"
CMAKE_EXE_LINKER_FLAGS CMAKE_SHARED_LINKER_FLAGS)
More information about the llvm-commits
mailing list