Merge pull request #7204 from HiassofT/le11-local-cc2

options: automatically use ccache on build host if it's available
This commit is contained in:
CvH 2022-12-05 09:34:28 +01:00 committed by GitHub
commit 927f7246dc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 16 additions and 0 deletions

View File

@ -134,6 +134,18 @@ if [ -f "${HOME}/.libreelec/options" ]; then
. "${HOME}/.libreelec/options"
fi
if [ "${LOCAL_CCACHE_SUPPORT}" = "yes" ] && [ -z "${CCACHE_DISABLE}" ]; then
# like LOCAL_CC check for local ccache only on the very first
# call to config/options, before toolchain has been added to the path,
# otherwise we might pick up ccache from toolchain/bin here
if [ -z "${LOCAL_CCACHE}" ] && [ "${LOCAL_CCACHE_CHECKED}" != "yes" ]; then
export LOCAL_CCACHE="$(command -v ccache)"
export LOCAL_CCACHE_CHECKED="yes"
fi
else
export LOCAL_CCACHE=""
fi
# overwrite OEM_SUPPORT via commandline
if [ "${OEM}" = "yes" -o "${OEM}" = "no" ]; then
OEM_SUPPORT="${OEM}"

View File

@ -37,6 +37,7 @@ show_config() {
config_message+="\n - DEBUG:\t\t\t\t ${DEBUG:-no}"
config_message+="\n - CFLAGS:\t\t\t\t ${TARGET_CFLAGS}"
config_message+="\n - LDFLAGS:\t\t\t\t ${TARGET_LDFLAGS}"
config_message+="\n - Local ccache:\t\t\t ${LOCAL_CCACHE:-no}"
# Misc. hardware configuration

View File

@ -44,6 +44,9 @@
# Default supported get handlers (archive, git, file etc.)
GET_HANDLER_SUPPORT="archive"
# use local ccache on build host, if available, for early package
# builds before ccache has been built
LOCAL_CCACHE_SUPPORT="yes"
### OS CONFIGURATION ###