This reverts commit
a4f84fdfed9a805d69b37de997512cd0616b3ff8.
Added "export CCACHE_CPP2 := true" to work around ccache bug with clang.
See:
http://petereisentraut.blogspot.com/2011/09/ccache-and-clang-part-2.html
Change-Id: I2b1fa8fd59c3a113c4028a92a1d16018133c9792
CLANG_TBLGEN := $(HOST_OUT_EXECUTABLES)/clang-tblgen$(BUILD_EXECUTABLE_SUFFIX)
LLVM_TBLGEN := $(HOST_OUT_EXECUTABLES)/llvm-tblgen$(BUILD_EXECUTABLE_SUFFIX)
+# The C/C++ compiler can be wrapped by setting the CC/CXX_WRAPPER vars.
+ifdef CC_WRAPPER
+ ifneq ($(CC_WRAPPER),$(firstword $(CLANG)))
+ CLANG := $(CC_WRAPPER) $(CLANG)
+ endif
+endif
+ifdef CXX_WRAPPER
+ ifneq ($(CXX_WRAPPER),$(firstword $(CLANG_CXX)))
+ CLANG_CXX := $(CXX_WRAPPER) $(CLANG_CXX)
+ endif
+endif
# Clang flags for all host or target rules
CLANG_CONFIG_EXTRA_ASFLAGS :=
# on a workstation.
export CCACHE_BASEDIR := /
+ # Workaround for ccache with clang.
+ # See http://petereisentraut.blogspot.com/2011/09/ccache-and-clang-part-2.html
+ export CCACHE_CPP2 := true
+
CCACHE_HOST_TAG := $(HOST_PREBUILT_TAG)
# If we are cross-compiling Windows binaries on Linux
# then use the linux ccache binary instead.