diff options
-rw-r--r-- | core/clang/config.mk | 11 | ||||
-rw-r--r-- | core/combo/select.mk | 4 |
2 files changed, 15 insertions, 0 deletions
diff --git a/core/clang/config.mk b/core/clang/config.mk index 1de46f0..c1625f2 100644 --- a/core/clang/config.mk +++ b/core/clang/config.mk @@ -17,6 +17,17 @@ LLVM_LINK := $(LLVM_PREBUILTS_PATH)/llvm-link$(BUILD_EXECUTABLE_SUFFIX) 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 := diff --git a/core/combo/select.mk b/core/combo/select.mk index e18cb1b..d495c6f 100644 --- a/core/combo/select.mk +++ b/core/combo/select.mk @@ -82,6 +82,10 @@ ifneq ($(USE_CCACHE),) # 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. |