From 5bbd5e7322f107aae5e62983b5c50c0d01163d57 Mon Sep 17 00:00:00 2001 From: Tim Schumacher Date: Thu, 7 Jul 2022 19:22:44 +0200 Subject: [PATCH] Ports: Don't create ccache symlinks for tools we don't have --- Ports/.port_include.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Ports/.port_include.sh b/Ports/.port_include.sh index df4f525bf3..8829994f61 100755 --- a/Ports/.port_include.sh +++ b/Ports/.port_include.sh @@ -29,7 +29,11 @@ enable_ccache() { ccache_tooldir="${SERENITY_BUILD_DIR}/ccache" mkdir -p "$ccache_tooldir" for tool in cc clang gcc c++ clang++ g++; do - ln -sf "$(command -v ccache)" "${ccache_tooldir}/${SERENITY_ARCH}-pc-serenity-${tool}" + name="${SERENITY_ARCH}-pc-serenity-${tool}" + if ! command -v "${name}" >/dev/null; then + continue + fi + ln -sf "$(command -v ccache)" "${ccache_tooldir}/${name}" done export PATH="${ccache_tooldir}:$PATH" fi