[libc++][ci] Use ccache in the jobs that build Clang
authorLouis Dionne <ldionne.2@gmail.com>
Thu, 18 May 2023 21:16:24 +0000 (14:16 -0700)
committerLouis Dionne <ldionne.2@gmail.com>
Tue, 30 May 2023 20:10:03 +0000 (13:10 -0700)
This is an attempt to reduce the time taken by the Bootstrapping
build job and the Clang CI job that builds the compiler from scratch.

Differential Revision: https://reviews.llvm.org/D150908

libcxx/utils/ci/buildkite-pipeline-clang.yml
libcxx/utils/ci/run-buildbot

index 40bb80a..323f4cf 100644 (file)
@@ -23,8 +23,9 @@ steps:
       # We use Release here to avoid including debug information. Otherwise, the clang binary is very large, which
       # is problematic because we need to upload the artifacts for other jobs to use. This may seem like nothing,
       # but with the number of jobs we run daily, this can result in thousands of GB of network I/O.
-      - "cmake -S llvm -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=install -DLLVM_ENABLE_PROJECTS=\"clang;compiler-rt\""
+      - "cmake -S llvm -B build -G Ninja -DCMAKE_CXX_COMPILER_LAUNCHER="ccache" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=install -DLLVM_ENABLE_PROJECTS=\"clang;compiler-rt\""
       - "ninja -C build install-clang install-clang-resource-headers"
+      - "ccache -s"
       - "tar -cJvf install.tar.xz install/"
       - "buildkite-agent artifact upload --debug install.tar.xz"
     env:
index 420dfde..6502012 100755 (executable)
@@ -340,6 +340,7 @@ bootstrapping-build)
           -S "${MONOREPO_ROOT}/llvm" \
           -B "${BUILD_DIR}" \
           -GNinja -DCMAKE_MAKE_PROGRAM="${NINJA}" \
+          -DCMAKE_CXX_COMPILER_LAUNCHER="ccache" \
           -DCMAKE_BUILD_TYPE=RelWithDebInfo \
           -DCMAKE_INSTALL_PREFIX="${INSTALL_DIR}" \
           -DLLVM_ENABLE_PROJECTS="clang" \