1LOCAL_CFLAGS := \ 2 -pedantic \ 3 -Wcast-qual \ 4 -Wno-long-long \ 5 $(LOCAL_CFLAGS) 6 7LOCAL_CPPFLAGS := \ 8 -Wno-sign-promo \ 9 $(LOCAL_CPPFLAGS) 10 11# Make sure bionic is first so we can include system headers. 12LOCAL_C_INCLUDES := \ 13 $(CLANG_ROOT_PATH)/include \ 14 $(CLANG_ROOT_PATH)/lib/CodeGen \ 15 $(LOCAL_C_INCLUDES) 16 17LLVM_ROOT_PATH := external/llvm 18include $(LLVM_ROOT_PATH)/llvm.mk 19 20ifneq ($(LLVM_HOST_BUILD_MK),) 21include $(LLVM_HOST_BUILD_MK) 22endif 23 24########################################################### 25## Commands for running tblgen to compile a td file 26########################################################### 27define transform-host-clang-td-to-out 28@mkdir -p $(dir $@) 29@echo "Host Clang TableGen: $(TBLGEN_LOCAL_MODULE) (gen-$(1)) <= $<" 30$(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 39