blob: 3594cc4f8562739134a582b44005fe37b658089b [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
Pirama Arumuga Nainar57786f72015-02-23 09:53:16 -080011ifeq ($(CLANG_ENABLE_ASSERTION),true)
12LOCAL_CFLAGS := \
13 $(LOCAL_CFLAGS) \
14 -D_DEBUG \
15 -UNDEBUG
16endif
17
Shih-wei Liaoea285162010-06-04 12:34:56 -070018# Make sure bionic is first so we can include system headers.
19LOCAL_C_INCLUDES := \
20 $(CLANG_ROOT_PATH)/include \
Stephen Hines6bcf27b2014-05-29 04:14:42 -070021 $(CLANG_ROOT_PATH)/lib/CodeGen \
Shih-wei Liaoea285162010-06-04 12:34:56 -070022 $(LOCAL_C_INCLUDES)
23
Ying Wangc69ce362010-09-09 21:44:22 -070024LLVM_ROOT_PATH := external/llvm
25include $(LLVM_ROOT_PATH)/llvm.mk
26
Shih-wei Liaoea285162010-06-04 12:34:56 -070027ifneq ($(LLVM_HOST_BUILD_MK),)
28include $(LLVM_HOST_BUILD_MK)
29endif
Logan Chienfe6bd6d2011-10-21 15:03:07 +080030
31###########################################################
32## Commands for running tblgen to compile a td file
33###########################################################
34define transform-host-clang-td-to-out
35@mkdir -p $(dir $@)
Logan Chien93e534a2011-12-16 17:39:13 +080036@echo "Host Clang TableGen: $(TBLGEN_LOCAL_MODULE) (gen-$(1)) <= $<"
Logan Chienfe6bd6d2011-10-21 15:03:07 +080037$(hide) $(CLANG_TBLGEN) \
38 -I $(dir $<) \
39 -I $(LLVM_ROOT_PATH)/include \
40 -I $(LLVM_ROOT_PATH)/host/include \
41 -I $(LLVM_ROOT_PATH)/lib/Target \
42 $(if $(strip $(CLANG_ROOT_PATH)),-I $(CLANG_ROOT_PATH)/include,) \
43 -gen-$(strip $(1)) \
44 -o $@ $<
45endef