From de97c74ae504be446a73546f608a71f617e10ae1 Mon Sep 17 00:00:00 2001 From: Lane Jennison Date: Mon, 20 Jan 2025 19:15:46 -0500 Subject: [PATCH] disable ccache in a friendly way --- lib/functions/configuration/compilation-config.sh | 4 +++- lib/functions/configuration/main-config.sh | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/functions/configuration/compilation-config.sh b/lib/functions/configuration/compilation-config.sh index 99cfb71029b6..8b416d0e547a 100644 --- a/lib/functions/configuration/compilation-config.sh +++ b/lib/functions/configuration/compilation-config.sh @@ -9,7 +9,9 @@ function prepare_compilation_vars() { # moved from config: rpardini: ccache belongs in compilation, not config. I think. - if [[ $USE_CCACHE != no ]]; then + if [[ $USE_CCACHE == yes || ${PRIVATE_CCACHE} == yes ]]; then + display_alert "using CCACHE" "USE_CCACHE or PRIVATE_CCACHE is set to yes" "warn" + CCACHE=ccache export PATH="/usr/lib/ccache:$PATH" # this actually needs export'ing # private ccache directory to avoid permission issues when using build script with "sudo" diff --git a/lib/functions/configuration/main-config.sh b/lib/functions/configuration/main-config.sh index a2c5878fa996..498caa28f638 100644 --- a/lib/functions/configuration/main-config.sh +++ b/lib/functions/configuration/main-config.sh @@ -60,6 +60,7 @@ function do_main_configuration() { display_alert "DEST_LANG..." "DEST_LANG: ${DEST_LANG}" "debug" declare -g SKIP_EXTERNAL_TOOLCHAINS="${SKIP_EXTERNAL_TOOLCHAINS:-yes}" # don't use any external toolchains, by default. + declare -g USE_CCACHE="${USE_CCACHE:-no}" # stop using ccache as our worktree is more effective # Armbian config is central tool used in all builds. As its build externally, we have moved it to extension. Enable it here. enable_extension "armbian-config"