[llvm] [AIX] Using `ccache-swig` as the `ccache` Binary (PR #90624)

Qiongsi Wu via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 30 08:58:52 PDT 2024


https://github.com/qiongsiwu created https://github.com/llvm/llvm-project/pull/90624

The AIX toolbox offers `ccache-swig`. This PR teaches llvm to recognize and use it. 

>From 474ca27ca961fa795b2f27a573ffe54617a606d5 Mon Sep 17 00:00:00 2001
From: Qiongsi Wu <qwu at ibm.com>
Date: Tue, 30 Apr 2024 10:56:03 -0400
Subject: [PATCH] Using ccache-swig on AIX

---
 llvm/CMakeLists.txt | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/llvm/CMakeLists.txt b/llvm/CMakeLists.txt
index 43181af3bc1953..d0a4222009e9fa 100644
--- a/llvm/CMakeLists.txt
+++ b/llvm/CMakeLists.txt
@@ -256,7 +256,12 @@ unset(SHOULD_ENABLE_PROJECT)
 # Build llvm with ccache if the package is present
 set(LLVM_CCACHE_BUILD OFF CACHE BOOL "Set to ON for a ccache enabled build")
 if(LLVM_CCACHE_BUILD)
-  find_program(CCACHE_PROGRAM ccache)
+  if(${CMAKE_SYSTEM_NAME} MATCHES "AIX")
+    set(ccache_bin_name ccache-swig)
+  else()
+    set(ccache_bin_name ccache)
+  endif()
+  find_program(CCACHE_PROGRAM ${ccache_bin_name})
   if(CCACHE_PROGRAM)
     set(LLVM_CCACHE_MAXSIZE "" CACHE STRING "Size of ccache")
     set(LLVM_CCACHE_DIR "" CACHE STRING "Directory to keep ccached data")



More information about the llvm-commits mailing list