Skip to content

Commit 89f34f1

Browse files
lum1n0usclaude
andcommitted
feat: disable ccache by default, enable with --use-ccache flag
This change modifies the LLVM build process to disable ccache by default and only enable it when the --use-ccache flag is explicitly passed. This reduces CI storage consumption while still allowing developers to opt-in to ccache for faster incremental builds. Changes: - Modified build_llvm() to accept use_ccache parameter (defaults to False) - Updated ccache logic to only enable when use_ccache=True and platform is not Windows - Pass options.use_ccache from main() to build_llvm() call Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent bf9612c commit 89f34f1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

build-scripts/build_llvm.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def query_llvm_version(llvm_info):
4848
return response['sha']
4949

5050

51-
def build_llvm(llvm_dir, platform, backends, projects, use_clang=False, extra_flags=''):
51+
def build_llvm(llvm_dir, platform, backends, projects, use_clang=False, extra_flags='', use_ccache=False):
5252
LLVM_COMPILE_OPTIONS = [
5353
'-DCMAKE_BUILD_TYPE:STRING="Release"',
5454
"-DCMAKE_EXPORT_COMPILE_COMMANDS=ON",
@@ -68,8 +68,8 @@ def build_llvm(llvm_dir, platform, backends, projects, use_clang=False, extra_fl
6868
"-DLLVM_OPTIMIZED_TABLEGEN:BOOL=ON",
6969
]
7070

71-
# ccache is not available on Windows
72-
if not "windows" == platform:
71+
# ccache is opt-in via --use-ccache flag
72+
if not "windows" == platform and use_ccache:
7373
LLVM_COMPILE_OPTIONS.append("-DLLVM_CCACHE_BUILD:BOOL=ON")
7474
# perf support is available on Linux only
7575
if "linux" == platform:
@@ -339,7 +339,7 @@ def main():
339339
if (
340340
build_llvm(
341341
llvm_dir, platform, options.arch, options.project, options.use_clang,
342-
options.extra_cmake_flags
342+
options.extra_cmake_flags, options.use_ccache
343343
)
344344
is not None
345345
):

0 commit comments

Comments
 (0)