1 ifeq ($(FORCE_BUILD_LLVM_DEBUG),true)
2 local_optflags = -O0 -g
9 -D__STDC_LIMIT_MACROS \
11 -fomit-frame-pointer \
14 -Wno-unused-parameter \
15 -Wno-maybe-uninitialized \
16 -Wno-missing-field-initializers \
22 LOCAL_CFLAGS_darwin += -Wno-error=deprecated-declarations
24 # Disable certain warnings as errors for use with mingw.
25 # We also must undefine WIN32_LEAN_AND_MEAN, since it is being passed globally
26 # on the command line, and LLVM defines this internally itself.
27 LOCAL_CFLAGS_windows += -Wno-error=array-bounds \
29 -Wno-error=return-type \
32 ifeq ($(FORCE_BUILD_LLVM_DISABLE_NDEBUG),true)
39 ifneq ($(REQUIRES_EH),1)
40 LOCAL_CFLAGS += -fno-exceptions
43 LOCAL_CFLAGS += -fexceptions
46 ifneq ($(REQUIRES_RTTI),1)
47 LOCAL_CPPFLAGS += -fno-rtti
54 -Woverloaded-virtual \
58 # Make sure bionic is first so we can include system headers.
61 $(LLVM_ROOT_PATH)/include \
62 $(LLVM_ROOT_PATH)/host/include \
65 # Add on ncurses to have support for terminfo
66 LOCAL_LDLIBS_darwin += -lncurses
67 LOCAL_LDLIBS_linux += -lncurses
68 LOCAL_LDLIBS_linux += -lgcc_s
70 LOCAL_IS_HOST_MODULE := true
72 ifeq ($(HOST_PREFER_32_BIT),true)
75 LOCAL_MULTILIB := first
78 ###########################################################
79 ## Commands for running tblgen to compile a td file
80 ###########################################################
81 define transform-host-td-to-out
83 @echo "Host TableGen: $(TBLGEN_LOCAL_MODULE) (gen-$(1)) <= $<"
84 $(hide) $(LLVM_TBLGEN) \
86 -I $(LLVM_ROOT_PATH)/include \
87 -I $(LLVM_ROOT_PATH)/host/include \
88 -I $(LLVM_ROOT_PATH)/lib/Target \
89 $(if $(strip $(CLANG_ROOT_PATH)),-I $(CLANG_ROOT_PATH)/include,) \