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 ifeq ($(FORCE_BUILD_LLVM_GLOBAL_ISEL),true)
24 -DLLVM_BUILD_GLOBAL_ISEL
27 # Disable certain warnings for use with mingw.
28 # We also must undefine WIN32_LEAN_AND_MEAN, since it is being passed globally
29 # on the command line, and LLVM defines this internally itself.
30 LOCAL_CFLAGS_windows += -Wno-array-bounds \
34 ifeq ($(FORCE_BUILD_LLVM_DISABLE_NDEBUG),true)
41 ifneq ($(REQUIRES_EH),1)
42 LOCAL_CFLAGS += -fno-exceptions
45 LOCAL_CFLAGS += -fexceptions
48 ifneq ($(REQUIRES_RTTI),1)
49 LOCAL_CPPFLAGS += -fno-rtti
59 LOCAL_CPPFLAGS_linux := \
62 LOCAL_CPPFLAGS_darwin += \
63 -Wno-deprecated-declarations \
66 # Make sure bionic is first so we can include system headers.
69 $(LLVM70_ROOT_PATH)/include \
70 $(LLVM70_ROOT_PATH)/host/include \
73 # Add on ncurses to have support for terminfo
74 LOCAL_LDLIBS_darwin += -lncurses
75 LOCAL_LDLIBS_linux += -lncurses
76 LOCAL_LDLIBS_linux += -lgcc_s
78 LOCAL_IS_HOST_MODULE := true
80 ifeq ($(HOST_PREFER_32_BIT),true)
83 ifeq (libLLVM70, $(filter libLLVM70,$(LOCAL_SHARED_LIBRARIES)$(LOCAL_SHARED_LIBRARIES_$(HOST_OS))))
84 # Skip building a 32-bit shared object if they are using libLLVM70.
85 LOCAL_MULTILIB := first
89 ###########################################################
90 ## Commands for running tblgen to compile a td file
91 ###########################################################
92 define transform-host-td-to-out70
94 @echo "Host TableGen: $(TBLGEN_LOCAL_MODULE) (gen-$(1)) <= $<"
95 $(hide) $(LLVM70_TBLGEN) \
97 -I $(LLVM70_ROOT_PATH)/include \
98 -I $(LLVM70_ROOT_PATH)/host/include \
99 -I $(LLVM70_ROOT_PATH)/lib/Target \
100 $(if $(strip $(CLANG_ROOT_PATH)),-I $(CLANG_ROOT_PATH)/include,) \