5757 ref : ${{ steps.vars.outputs.ref }}
5858 upload : ${{ steps.vars.outputs.upload }}
5959 target-cmake-flags : ${{ steps.vars.outputs.target-cmake-flags }}
60+ ccache : ${{ steps.vars.outputs.ccache }}
6061 build-flang : ${{ steps.vars.outputs.build-flang }}
6162 enable-pgo : ${{ steps.vars.outputs.enable-pgo }}
6263 release-binary-basename : ${{ steps.vars.outputs.release-binary-basename }}
@@ -123,6 +124,15 @@ jobs:
123124
124125 # Detect necessary CMake flags
125126 target="${{ runner.os }}-${{ runner.arch }}"
127+
128+ # The hendrikmuhs/ccache-action action does not support installing sccache
129+ # on arm64 Linux.
130+ if [ "$target" = "Linux-ARM64" ];
131+ echo ccache=ccache >> $GITHUB_OUTPUT
132+ else
133+ echo ccache=sccache >> $GITHUB_OUTPUT
134+ fi
135+
126136 if [ "${{ runner.os }}" = "Linux" ]; then
127137 echo "enable-pgo=true" >> $GITHUB_OUTPUT
128138 else
@@ -216,8 +226,8 @@ jobs:
216226 with :
217227 # Default to 2G to workaround: https://github.com/hendrikmuhs/ccache-action/issues/174
218228 max-size : 2G
219- key : sccache -${{ runner.os }}-${{ runner.arch }}-release
220- variant : sccache
229+ key : ${{ needs.prepare.outputs.ccache }} -${{ runner.os }}-${{ runner.arch }}-release
230+ variant : ${{ needs.prepare.outputs.ccache }}
221231
222232 - name : Configure Stage 1 Clang
223233 id : build
@@ -230,8 +240,8 @@ jobs:
230240 -C clang/cmake/caches/Release.cmake \
231241 -DBOOTSTRAP_LLVM_PARALLEL_LINK_JOBS=1 \
232242 -DBOOTSTRAP_CPACK_PACKAGE_FILE_NAME="${{ needs.prepare.outputs.release-binary-basename }}" \
233- -DCMAKE_C_COMPILER_LAUNCHER=sccache \
234- -DCMAKE_CXX_COMPILER_LAUNCHER=sccache
243+ -DCMAKE_C_COMPILER_LAUNCHER=${{ needs.prepare.outputs.ccache }} \
244+ -DCMAKE_CXX_COMPILER_LAUNCHER=${{ needs.prepare.outputs.ccache }}
235245 - name : Build Stage 1 Clang
236246 shell : bash
237247 run : |
@@ -552,8 +562,8 @@ jobs:
552562 with :
553563 # Default to 2G to workaround: https://github.com/hendrikmuhs/ccache-action/issues/174
554564 max-size : 2G
555- key : sccache -${{ runner.os }}-${{ runner.arch }}-release
556- variant : sccache
565+ key : ${{ needs.prepare.outputs.ccache }} -${{ runner.os }}-${{ runner.arch }}-release
566+ variant : ${{ needs.prepare.outputs.ccache }}
557567
558568 - name : Run Tests
559569 shell : bash
0 commit comments