blob: e116c0260bc500326ffc9732bc36f5fdda662ad1 [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
Stephen Hines6bcf27b2014-05-29 04:14:42 -070020include external/libcxx/libcxx.mk
21
Shih-wei Liaoea285162010-06-04 12:34:56 -070022ifneq ($(LLVM_HOST_BUILD_MK),)
23include $(LLVM_HOST_BUILD_MK)
24endif
Logan Chienfe6bd6d2011-10-21 15:03:07 +080025
26###########################################################
27## Commands for running tblgen to compile a td file
28###########################################################
29define transform-host-clang-td-to-out
30@mkdir -p $(dir $@)
Logan Chien93e534a2011-12-16 17:39:13 +080031@echo "Host Clang TableGen: $(TBLGEN_LOCAL_MODULE) (gen-$(1)) <= $<"
Logan Chienfe6bd6d2011-10-21 15:03:07 +080032$(hide) $(CLANG_TBLGEN) \
33 -I $(dir $<) \
34 -I $(LLVM_ROOT_PATH)/include \
35 -I $(LLVM_ROOT_PATH)/host/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 $@ $<
40endef