diff options
author | Gunnar Beutner <gbeutner@serenityos.org> | 2021-04-27 17:10:18 +0200 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2021-04-27 18:01:43 +0200 |
commit | 0b47ea408c1d4cb2c367f97fec1715da87bb726c (patch) | |
tree | a4ee6be258840e87aa087e60e85e08345825003a /Ports/.port_include.sh | |
parent | 7576761543cb05df7743c31d6f53f9cf0e77e20d (diff) | |
download | serenity-0b47ea408c1d4cb2c367f97fec1715da87bb726c.zip |
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.
Diffstat (limited to 'Ports/.port_include.sh')
-rwxr-xr-x | Ports/.port_include.sh | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Ports/.port_include.sh b/Ports/.port_include.sh index 3b86adafd2..9a1c1bd8a8 100755 --- a/Ports/.port_include.sh +++ b/Ports/.port_include.sh @@ -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 } |