From f123fd7af6a23aa63562c046978a489c9bd02489 Mon Sep 17 00:00:00 2001 From: Daniel Bertalan Date: Sat, 30 Apr 2022 11:59:41 +0200 Subject: [PATCH] Ports: Enable ccache for SERENITY_TOOLCHAIN=Clang --- Ports/.port_include.sh | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/Ports/.port_include.sh b/Ports/.port_include.sh index e31a13fc08..73db129f12 100755 --- a/Ports/.port_include.sh +++ b/Ports/.port_include.sh @@ -22,9 +22,15 @@ enable_ccache() { if command -v ccache &>/dev/null; then ccache_tooldir="${SERENITY_BUILD_DIR}/ccache" mkdir -p "$ccache_tooldir" - for tool in gcc g++ c++; do - ln -sf "$(command -v ccache)" "${ccache_tooldir}/${SERENITY_ARCH}-pc-serenity-${tool}" - done + if [ "$SERENITY_TOOLCHAIN" = "Clang" ]; then + for tool in clang clang++; do + ln -sf "$(command -v ccache)" "${ccache_tooldir}/$tool" + done + else + for tool in gcc g++ c++; do + ln -sf "$(command -v ccache)" "${ccache_tooldir}/${SERENITY_ARCH}-pc-serenity-${tool}" + done + fi export PATH="${ccache_tooldir}:$PATH" fi }