summaryrefslogtreecommitdiffstats
path: root/core/combo
diff options
context:
space:
mode:
authorMatt Mower <mowerm@gmail.com>2015-06-09 19:35:53 -0500
committerAdnan Begovic <adnan@cyngn.com>2015-10-09 17:12:18 -0700
commitf8ff73e0c2cc289642ea825f60eca351512446e4 (patch)
tree3d600da5b17d648cd5ca0e981749112e1ff9a45a /core/combo
parentb3d9a57bdf47b5c4f8319ca897957adee5d4bb88 (diff)
downloadbuild-f8ff73e0c2cc289642ea825f60eca351512446e4.zip
build-f8ff73e0c2cc289642ea825f60eca351512446e4.tar.gz
build-f8ff73e0c2cc289642ea825f60eca351512446e4.tar.bz2
build: Enable custom ccache cache dir for Android
During lunch, check environment variables for ANDROID_CCACHE_DIR. If it is specified, CCACHE_DIR is set to match. Prevents issues with multiple versions of ccache writing to the same cache dir. ANDROID_CCACHE_SIZE should also be specified, allowing for a distinct cache directory size from the default. Syntax for ANDROID_CCACHE_SIZE is the same as applied in the command: 'ccache -M$ANDROID_CCACHE_SIZE' Change-Id: I17497a6f56347850e0fa7b8ebd4de0b5a0b13e55
Diffstat (limited to 'core/combo')
-rw-r--r--core/combo/select.mk6
1 files changed, 6 insertions, 0 deletions
diff --git a/core/combo/select.mk b/core/combo/select.mk
index 5842705..7c80c5f 100644
--- a/core/combo/select.mk
+++ b/core/combo/select.mk
@@ -88,7 +88,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