Don't prepend ccache if it's already there
Bug: 3069576
Change-Id: I8345209c5c885ed7ed8e043e051884d64008961c
diff --git a/Makefile.android b/Makefile.android
index c057585..c9ed595 100644
--- a/Makefile.android
+++ b/Makefile.android
@@ -86,7 +86,11 @@
ifneq ($(BUILD_STANDALONE_EMULATOR),true)
ifneq ($(USE_CCACHE),)
- MY_CC := prebuilt/$(HOST_PREBUILT_TAG)/ccache/ccache $(MY_CC)
+ ccache := prebuilt/$(HOST_PREBUILT_TAG)/ccache/ccache
+ ifneq ($(ccache),$(firstword $(MY_CC)))
+ MY_CC := $(ccache) $(MY_CC)
+ endif
+ ccache :=
endif
endif