mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-23 09:51:57 -05:00
Ports: Enable ccache for SERENITY_TOOLCHAIN=Clang
This commit is contained in:
parent
9b34ffd964
commit
f123fd7af6
1 changed files with 9 additions and 3 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue