Prepend ccache to CC/CXX if necessary.
In case TARGET_CC is assigned with HOST_CC (eg, simulator build), ccache will be prepended twice before this CL. Bug: 3069576 Change-Id: I2ee44faea3a2795cf389ad6f80e4066a02b43be9
This commit is contained in:
@@ -50,7 +50,7 @@ $(combo_target)RELEASE_CFLAGS := -O2 -g -fno-strict-aliasing
|
|||||||
$(combo_target)GLOBAL_LDFLAGS :=
|
$(combo_target)GLOBAL_LDFLAGS :=
|
||||||
$(combo_target)GLOBAL_ARFLAGS := crsP
|
$(combo_target)GLOBAL_ARFLAGS := crsP
|
||||||
|
|
||||||
$(combo_target)EXECUTABLE_SUFFIX :=
|
$(combo_target)EXECUTABLE_SUFFIX :=
|
||||||
$(combo_target)SHLIB_SUFFIX := .so
|
$(combo_target)SHLIB_SUFFIX := .so
|
||||||
$(combo_target)JNILIB_SUFFIX := $($(combo_target)SHLIB_SUFFIX)
|
$(combo_target)JNILIB_SUFFIX := $($(combo_target)SHLIB_SUFFIX)
|
||||||
$(combo_target)STATIC_LIB_SUFFIX := .a
|
$(combo_target)STATIC_LIB_SUFFIX := .a
|
||||||
@@ -62,7 +62,12 @@ include $(BUILD_COMBOS)/$(combo_target)$(combo_os_arch).mk
|
|||||||
|
|
||||||
ifneq ($(USE_CCACHE),)
|
ifneq ($(USE_CCACHE),)
|
||||||
ccache := prebuilt/$(HOST_PREBUILT_TAG)/ccache/ccache
|
ccache := prebuilt/$(HOST_PREBUILT_TAG)/ccache/ccache
|
||||||
$(combo_target)CC := $(ccache) $($(combo_target)CC)
|
# prepend ccache if necessary
|
||||||
$(combo_target)CXX := $(ccache) $($(combo_target)CXX)
|
ifneq ($(ccache),$(firstword $($(combo_target)CC)))
|
||||||
|
$(combo_target)CC := $(ccache) $($(combo_target)CC)
|
||||||
|
endif
|
||||||
|
ifneq ($(ccache),$(firstword $($(combo_target)CXX)))
|
||||||
|
$(combo_target)CXX := $(ccache) $($(combo_target)CXX)
|
||||||
|
endif
|
||||||
ccache =
|
ccache =
|
||||||
endif
|
endif
|
||||||
|
Reference in New Issue
Block a user