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 # Disable certain warnings for use with mingw.
23 # We also must undefine WIN32_LEAN_AND_MEAN, since it is being passed globally
24 # on the command line, and LLVM defines this internally itself.
25 LOCAL_CFLAGS_windows += -Wno-array-bounds \
29 ifeq ($(FORCE_BUILD_LLVM_DISABLE_NDEBUG),true)
36 ifneq ($(REQUIRES_EH),1)
37 LOCAL_CFLAGS += -fno-exceptions
40 LOCAL_CFLAGS += -fexceptions
43 ifneq ($(REQUIRES_RTTI),1)
44 LOCAL_CPPFLAGS += -fno-rtti
54 LOCAL_CPPFLAGS_linux := \
57 LOCAL_CPPFLAGS_darwin += \
58 -Wno-deprecated-declarations \
61 # Make sure bionic is first so we can include system headers.
64 $(LLVM_ROOT_PATH)/include \
65 $(LLVM_ROOT_PATH)/host/include \
68 # Add on ncurses to have support for terminfo
69 LOCAL_LDLIBS_darwin += -lncurses
70 LOCAL_LDLIBS_linux += -lncurses
71 LOCAL_LDLIBS_linux += -lgcc_s
73 LOCAL_IS_HOST_MODULE := true
75 ifeq ($(HOST_PREFER_32_BIT),true)
78 ifeq (libLLVM, $(filter libLLVM,$(LOCAL_SHARED_LIBRARIES)$(LOCAL_SHARED_LIBRARIES_$(HOST_OS))))
79 # Skip building a 32-bit shared object if they are using libLLVM.
80 LOCAL_MULTILIB := first
84 ###########################################################
85 ## Commands for running tblgen to compile a td file
86 ###########################################################
87 define transform-host-td-to-out
89 @echo "Host TableGen: $(TBLGEN_LOCAL_MODULE) (gen-$(1)) <= $<"
90 $(hide) $(LLVM_TBLGEN) \
92 -I $(LLVM_ROOT_PATH)/include \
93 -I $(LLVM_ROOT_PATH)/host/include \
94 -I $(LLVM_ROOT_PATH)/lib/Target \
95 $(if $(strip $(CLANG_ROOT_PATH)),-I $(CLANG_ROOT_PATH)/include,) \