1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 09:58:11 +00:00

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.
This commit is contained in:
Gunnar Beutner 2021-04-27 17:10:18 +02:00 committed by Linus Groh
parent 7576761543
commit 0b47ea408c

View file

@ -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
}