summaryrefslogtreecommitdiffstats
path: root/core/clang
diff options
context:
space:
mode:
authorYing Wang <wangying@android.com>2014-07-26 00:43:50 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2014-07-23 18:04:01 +0000
commit45040bdbb8c3a543746538b1e08b5ac53c427099 (patch)
tree444b6bed43fbdd6b0a05a322fcea71a9d4c114a8 /core/clang
parent970d053c975e9ee38e61fc00506362a76fcc153d (diff)
parent3b7a4d811df5b326e714984edd7dd3e2b11e16d5 (diff)
downloadbuild-45040bdbb8c3a543746538b1e08b5ac53c427099.zip
build-45040bdbb8c3a543746538b1e08b5ac53c427099.tar.gz
build-45040bdbb8c3a543746538b1e08b5ac53c427099.tar.bz2
Merge "Introduce CC/CXX/JAVAC_WRAPPER to wrap the calls to clang."
Diffstat (limited to 'core/clang')
-rw-r--r--core/clang/config.mk11
1 files changed, 11 insertions, 0 deletions
diff --git a/core/clang/config.mk b/core/clang/config.mk
index 59cb38e..76293c5 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 :=