Tong Shen | e559960 | 2014-09-19 12:02:00 -0700 | [diff] [blame] | 1 | LOCAL_CFLAGS := \ |
| 2 | -pedantic \ |
| 3 | -Wcast-qual \ |
| 4 | -Wno-long-long \ |
| 5 | $(LOCAL_CFLAGS) |
| 6 | |
| 7 | LOCAL_CPPFLAGS := \ |
| 8 | -Wno-sign-promo \ |
| 9 | $(LOCAL_CPPFLAGS) |
| 10 | |
| 11 | # Make sure bionic is first so we can include system headers. |
| 12 | LOCAL_C_INCLUDES := \ |
| 13 | $(CLANG_ROOT_PATH)/include \ |
| 14 | $(CLANG_ROOT_PATH)/lib/CodeGen \ |
| 15 | $(LOCAL_C_INCLUDES) |
| 16 | |
| 17 | LLVM_ROOT_PATH := external/llvm |
| 18 | include $(LLVM_ROOT_PATH)/llvm.mk |
| 19 | |
| 20 | include external/libcxx/libcxx.mk |
| 21 | |
| 22 | ifneq ($(LLVM_DEVICE_BUILD_MK),) |
| 23 | include $(LLVM_DEVICE_BUILD_MK) |
| 24 | endif |
| 25 | |
| 26 | ########################################################### |
| 27 | ## Commands for running tblgen to compile a td file |
| 28 | ########################################################### |
| 29 | define transform-device-clang-td-to-out |
| 30 | @mkdir -p $(dir $@) |
| 31 | @echo "Device Clang TableGen: $(TBLGEN_LOCAL_MODULE) (gen-$(1)) <= $<" |
| 32 | $(hide) $(CLANG_TBLGEN) \ |
| 33 | -I $(dir $<) \ |
| 34 | -I $(LLVM_ROOT_PATH)/include \ |
| 35 | -I $(LLVM_ROOT_PATH)/device/include \ |
| 36 | -I $(LLVM_ROOT_PATH)/lib/Target \ |
| 37 | $(if $(strip $(CLANG_ROOT_PATH)),-I $(CLANG_ROOT_PATH)/include,) \ |
| 38 | -gen-$(strip $(1)) \ |
| 39 | -o $@ $< |
| 40 | endef |