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:
parent
7576761543
commit
0b47ea408c
1 changed files with 6 additions and 2 deletions
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue