blob: af1f75abe0ce357a411fc969be34a51a7d5e6235 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
|
LOCAL_PATH := $(call my-dir)
LLVM_ROOT_PATH := $(LOCAL_PATH)/../..
#===---------------------------------------------------------------===
# llc command line tool (common)
#===---------------------------------------------------------------===
llvm_llc_SRC_FILES := \
llc.cpp
llvm_llc_mips_STATIC_LIBRARIES := \
libLLVMMipsAsmParser \
libLLVMMipsInfo \
libLLVMMipsCodeGen \
libLLVMMipsDesc \
libLLVMMipsAsmPrinter \
llvm_llc_x86_STATIC_LIBRARIES := \
libLLVMX86Info \
libLLVMX86AsmParser \
libLLVMX86CodeGen \
libLLVMX86Disassembler \
libLLVMX86Desc \
libLLVMX86AsmPrinter \
libLLVMX86Utils
llvm_llc_arm_STATIC_LIBRARIES := \
libLLVMARMCodeGen \
libLLVMARMDisassembler \
libLLVMARMAsmParser \
libLLVMARMAsmPrinter \
libLLVMARMDesc \
libLLVMARMInfo
llvm_llc_STATIC_LIBRARIES := \
libLLVMAsmPrinter \
libLLVMIRReader \
libLLVMAsmParser \
libLLVMBitReader \
libLLVMBitWriter \
libLLVMSelectionDAG \
libLLVMInstCombine \
libLLVMInstrumentation \
libLLVMCodeGen \
libLLVMObject \
libLLVMipo \
libLLVMipa \
libLLVMLinker \
libLLVMMC \
libLLVMMCParser \
libLLVMScalarOpts \
libLLVMTransformUtils \
libLLVMVectorize \
libLLVMAnalysis \
libLLVMTarget \
libLLVMCore \
libLLVMSupport
#===---------------------------------------------------------------===
# llc command line tool (host)
#===---------------------------------------------------------------===
include $(CLEAR_VARS)
LOCAL_MODULE := llc
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_CLASS := EXECUTABLES
LOCAL_IS_HOST_MODULE := true
LOCAL_SRC_FILES := $(llvm_llc_SRC_FILES)
LOCAL_STATIC_LIBRARIES := \
$(llvm_llc_arm_STATIC_LIBRARIES) \
$(llvm_llc_mips_STATIC_LIBRARIES) \
$(llvm_llc_x86_STATIC_LIBRARIES) \
$(llvm_llc_STATIC_LIBRARIES)
LOCAL_LDLIBS += -lpthread -lm -ldl
LOCAL_C_INCLUDES += external/llvm/include
include $(LLVM_ROOT_PATH)/llvm.mk
include $(LLVM_HOST_BUILD_MK)
include $(LLVM_GEN_INTRINSICS_MK)
include $(BUILD_HOST_EXECUTABLE)
#===---------------------------------------------------------------===
# llc command line tool (target)
#===---------------------------------------------------------------===
#TODOArm64: Enable llc build
#TODOMips64: Enable llc build
ifeq ($(filter $(TARGET_ARCH),arm64 mips64),)
include $(CLEAR_VARS)
LOCAL_MODULE := llc
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_CLASS := EXECUTABLES
LOCAL_SRC_FILES := $(llvm_llc_SRC_FILES)
LOCAL_C_INCLUDES += external/llvm/include
ifeq ($(TARGET_ARCH),arm)
LOCAL_STATIC_LIBRARIES := $(llvm_llc_arm_STATIC_LIBRARIES)
else
ifeq ($(TARGET_ARCH),mips)
LOCAL_STATIC_LIBRARIES := $(llvm_llc_mips_STATIC_LIBRARIES)
else
ifeq ($(TARGET_ARCH),$(filter $(TARGET_ARCH),x86 x86_64 x32))
LOCAL_STATIC_LIBRARIES := $(llvm_llc_x86_STATIC_LIBRARIES)
else
$(error "Unsupport llc target $(TARGET_ARCH)")
endif
endif
endif
LOCAL_STATIC_LIBRARIES += $(llvm_llc_STATIC_LIBRARIES)
LOCAL_SHARED_LIBRARIES := \
libcutils \
libdl \
libstlport
include $(LLVM_ROOT_PATH)/llvm.mk
include $(LLVM_DEVICE_BUILD_MK)
include $(LLVM_GEN_INTRINSICS_MK)
include $(BUILD_EXECUTABLE)
endif # !(arm64 || mips64)
|