mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 12:19:54 +00:00
Ports: Enable ccache for SERENITY_TOOLCHAIN=Clang
This commit is contained in:
parent
9b34ffd964
commit
f123fd7af6
Notes:
sideshowbarker
2024-07-17 12:00:24 +09:00
Author: https://github.com/BertalanD
Commit: f123fd7af6
Pull-request: https://github.com/SerenityOS/serenity/pull/13954
Reviewed-by: https://github.com/ADKaster
Reviewed-by: https://github.com/EWouters
Reviewed-by: https://github.com/timschumi ✅
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
Add a link
Reference in a new issue