Skip to content

Commit d2e6e27

Browse files
daltentygithub-actions[bot]
authored andcommitted
Automerge: [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.
2 parents 6f74455 + bb0a95d commit d2e6e27

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

llvm/cmake/modules/HandleLLVMOptions.cmake

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1339,6 +1339,9 @@ if(uppercase_LLVM_ENABLE_LTO STREQUAL "THIN")
13391339
if(APPLE)
13401340
append("-Wl,-cache_path_lto,${LLVM_THINLTO_CACHE_PATH}"
13411341
CMAKE_EXE_LINKER_FLAGS CMAKE_SHARED_LINKER_FLAGS)
1342+
elseif("${CMAKE_SYSTEM_NAME}" MATCHES "AIX")
1343+
append("-bplugin_opt:-legacy-thinlto-cache-dir=${LLVM_THINLTO_CACHE_PATH}"
1344+
CMAKE_EXE_LINKER_FLAGS CMAKE_SHARED_LINKER_FLAGS)
13421345
elseif((UNIX OR MINGW) AND LLVM_USE_LINKER STREQUAL "lld")
13431346
append("-Wl,--thinlto-cache-dir=${LLVM_THINLTO_CACHE_PATH}"
13441347
CMAKE_EXE_LINKER_FLAGS CMAKE_SHARED_LINKER_FLAGS)

0 commit comments

Comments
 (0)