blob: 81e9b1ef0ffba92a838f283158166ae3fb800326 [file] [log] [blame]
Shih-wei Liaoea285162010-06-04 12:34:56 -07001LOCAL_CFLAGS := \
2 -pedantic \
3 -Wcast-qual \
4 -Wno-long-long \
5 $(LOCAL_CFLAGS)
6
Logan9c64df22011-02-15 06:27:21 +08007LOCAL_CPPFLAGS := \
8 -Wno-sign-promo \
9 $(LOCAL_CPPFLAGS)
10
Shih-wei Liaoea285162010-06-04 12:34:56 -070011# Make sure bionic is first so we can include system headers.
12LOCAL_C_INCLUDES := \
13 $(CLANG_ROOT_PATH)/include \
Stephen Hines6bcf27b2014-05-29 04:14:42 -070014 $(CLANG_ROOT_PATH)/lib/CodeGen \
Shih-wei Liaoea285162010-06-04 12:34:56 -070015 $(LOCAL_C_INCLUDES)
16
Ying Wangc69ce362010-09-09 21:44:22 -070017LLVM_ROOT_PATH := external/llvm
18include $(LLVM_ROOT_PATH)/llvm.mk
19
Shih-wei Liaoea285162010-06-04 12:34:56 -070020ifneq ($(LLVM_HOST_BUILD_MK),)
21include $(LLVM_HOST_BUILD_MK)
22endif
Logan Chienfe6bd6d2011-10-21 15:03:07 +080023
24###########################################################
25## Commands for running tblgen to compile a td file
26###########################################################
27define transform-host-clang-td-to-out
28@mkdir -p $(dir $@)
Logan Chien93e534a2011-12-16 17:39:13 +080029@echo "Host Clang TableGen: $(TBLGEN_LOCAL_MODULE) (gen-$(1)) <= $<"
Logan Chienfe6bd6d2011-10-21 15:03:07 +080030$(hide) $(CLANG_TBLGEN) \
31 -I $(dir $<) \
32 -I $(LLVM_ROOT_PATH)/include \
33 -I $(LLVM_ROOT_PATH)/host/include \
34 -I $(LLVM_ROOT_PATH)/lib/Target \
35 $(if $(strip $(CLANG_ROOT_PATH)),-I $(CLANG_ROOT_PATH)/include,) \
36 -gen-$(strip $(1)) \
37 -o $@ $<
38endef