mirror of
https://github.com/RGBCube/serenity
synced 2025-06-12 17:32:07 +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:
parent
7576761543
commit
0b47ea408c
1 changed files with 6 additions and 2 deletions
|
@ -23,8 +23,12 @@ maybe_source() {
|
||||||
|
|
||||||
enable_ccache() {
|
enable_ccache() {
|
||||||
if command -v ccache &>/dev/null; then
|
if command -v ccache &>/dev/null; then
|
||||||
export CC="ccache ${CC}"
|
ccache_tooldir="${SERENITY_BUILD_DIR}/ccache"
|
||||||
export CXX="ccache ${CXX}"
|
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
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue