[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 14:37:21 PDT 2024
https://github.com/qiongsiwu updated https://github.com/llvm/llvm-project/pull/90624
>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 1/2] 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")
>From cdbfc8f0902a9b86cce437c30b8d7fb8f2daf3b0 Mon Sep 17 00:00:00 2001
From: Qiongsi Wu <qwu at ibm.com>
Date: Tue, 30 Apr 2024 17:00:44 -0400
Subject: [PATCH 2/2] Address review comments.
---
llvm/CMakeLists.txt | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/llvm/CMakeLists.txt b/llvm/CMakeLists.txt
index d0a4222009e9fa..3ada38df09bab7 100644
--- a/llvm/CMakeLists.txt
+++ b/llvm/CMakeLists.txt
@@ -256,12 +256,11 @@ 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)
- if(${CMAKE_SYSTEM_NAME} MATCHES "AIX")
- set(ccache_bin_name ccache-swig)
- else()
- set(ccache_bin_name ccache)
+ find_program(CCACHE_PROGRAM ccache)
+ if (NOT CCACHE_PROGRAM)
+ find_program(CCACHE_PROGRAM ccache-swig)
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