Shih-wei Liao | ea28516 | 2010-06-04 12:34:56 -0700 | [diff] [blame] | 1 | LOCAL_CFLAGS := \ |
| 2 | -pedantic \ |
| 3 | -Wcast-qual \ |
| 4 | -Wno-long-long \ |
| 5 | $(LOCAL_CFLAGS) |
| 6 | |
Logan | 9c64df2 | 2011-02-15 06:27:21 +0800 | [diff] [blame] | 7 | LOCAL_CPPFLAGS := \ |
| 8 | -Wno-sign-promo \ |
| 9 | $(LOCAL_CPPFLAGS) |
| 10 | |
Shih-wei Liao | ea28516 | 2010-06-04 12:34:56 -0700 | [diff] [blame] | 11 | # Make sure bionic is first so we can include system headers. |
| 12 | LOCAL_C_INCLUDES := \ |
| 13 | $(CLANG_ROOT_PATH)/include \ |
Stephen Hines | 6bcf27b | 2014-05-29 04:14:42 -0700 | [diff] [blame] | 14 | $(CLANG_ROOT_PATH)/lib/CodeGen \ |
Shih-wei Liao | ea28516 | 2010-06-04 12:34:56 -0700 | [diff] [blame] | 15 | $(LOCAL_C_INCLUDES) |
| 16 | |
Ying Wang | c69ce36 | 2010-09-09 21:44:22 -0700 | [diff] [blame] | 17 | LLVM_ROOT_PATH := external/llvm |
| 18 | include $(LLVM_ROOT_PATH)/llvm.mk |
| 19 | |
Shih-wei Liao | ea28516 | 2010-06-04 12:34:56 -0700 | [diff] [blame] | 20 | ifneq ($(LLVM_HOST_BUILD_MK),) |
| 21 | include $(LLVM_HOST_BUILD_MK) |
| 22 | endif |
Logan Chien | fe6bd6d | 2011-10-21 15:03:07 +0800 | [diff] [blame] | 23 | |
| 24 | ########################################################### |
| 25 | ## Commands for running tblgen to compile a td file |
| 26 | ########################################################### |
| 27 | define transform-host-clang-td-to-out |
| 28 | @mkdir -p $(dir $@) |
Logan Chien | 93e534a | 2011-12-16 17:39:13 +0800 | [diff] [blame] | 29 | @echo "Host Clang TableGen: $(TBLGEN_LOCAL_MODULE) (gen-$(1)) <= $<" |
Logan Chien | fe6bd6d | 2011-10-21 15:03:07 +0800 | [diff] [blame] | 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 $@ $< |
| 38 | endef |