From 0b47ea408c1d4cb2c367f97fec1715da87bb726c Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Tue, 27 Apr 2021 17:10:18 +0200 Subject: Ports: Change how we invoke ccache because some ports didn't use it This prepends ccache to the PATH instead of setting CC/CXX. Doing it this way ensures all ports use ccache because some of them didn't before. --- Ports/.port_include.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'Ports') diff --git a/Ports/.port_include.sh b/Ports/.port_include.sh index 3b86adafd2..9a1c1bd8a8 100755 --- a/Ports/.port_include.sh +++ b/Ports/.port_include.sh @@ -23,8 +23,12 @@ maybe_source() { enable_ccache() { if command -v ccache &>/dev/null; then - export CC="ccache ${CC}" - export CXX="ccache ${CXX}" + 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 + export PATH="${ccache_tooldir}:$PATH" fi } -- cgit v1.2.3