diff --git a/core/combo/select.mk b/core/combo/select.mk index d66156c16cd..ec10dd2fe14 100644 --- a/core/combo/select.mk +++ b/core/combo/select.mk @@ -104,7 +104,13 @@ ifneq ($(USE_CCACHE),) ifndef CXX_WRAPPER CXX_WRAPPER := $(ccache) endif + ifeq ($(ANDROID_CCACHE_DIR), $(CCACHE_DIR)) + ifneq ($(ANDROID_CCACHE_SIZE),) + ACCSIZE_RESULT := $(shell $(ccache) -M$(ANDROID_CCACHE_SIZE)) + endif + endif ccache = + ACCSIZE_RESULT = endif endif diff --git a/envsetup.sh b/envsetup.sh index 43d2fca9b6a..3a6967af19f 100644 --- a/envsetup.sh +++ b/envsetup.sh @@ -228,6 +228,10 @@ function setpaths() unset ANDROID_HOST_OUT export ANDROID_HOST_OUT=$(get_abs_build_var HOST_OUT) + if [ -n "$ANDROID_CCACHE_DIR" ]; then + export CCACHE_DIR=$ANDROID_CCACHE_DIR + fi + # needed for building linux on MacOS # TODO: fix the path #export HOST_EXTRACFLAGS="-I "$T/system/kernel_headers/host_include