Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 83f69eb5 authored by Ying Wang's avatar Ying Wang
Browse files

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
parent 4477db78
Loading
Loading
Loading
Loading
+8 −3
Original line number Diff line number Diff line
@@ -62,7 +62,12 @@ include $(BUILD_COMBOS)/$(combo_target)$(combo_os_arch).mk

ifneq ($(USE_CCACHE),)
  ccache := prebuilt/$(HOST_PREBUILT_TAG)/ccache/ccache
  # prepend ccache if necessary
  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 =
endif