blob: e9bedb578f32f7ed562013b5dbaf899e43a1f3a3 (
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
133
134
135
136
137
138
139
|
LOCAL_PATH:= $(call my-dir)
llvm_pre_static_libraries := \
libLLVMLinker \
libLLVMipo \
libLLVMDebugInfo \
libLLVMIRReader \
libLLVMBitWriter \
libLLVMBitReader
llvm_arm_static_libraries := \
libLLVMARMCodeGen \
libLLVMARMAsmParser \
libLLVMARMAsmPrinter \
libLLVMARMInfo \
libLLVMARMDesc \
libLLVMARMDisassembler
llvm_x86_static_libraries := \
libLLVMX86CodeGen \
libLLVMX86Info \
libLLVMX86Desc \
libLLVMX86AsmParser \
libLLVMX86AsmPrinter \
libLLVMX86Utils \
libLLVMX86Disassembler
llvm_mips_static_libraries := \
libLLVMMipsCodeGen \
libLLVMMipsInfo \
libLLVMMipsDesc \
libLLVMMipsAsmParser \
libLLVMMipsAsmPrinter \
libLLVMMipsDisassembler
llvm_aarch64_static_libraries := \
libLLVMAArch64CodeGen \
libLLVMAArch64Info \
libLLVMAArch64Desc \
libLLVMAArch64AsmParser \
libLLVMAArch64AsmPrinter \
libLLVMAArch64Utils \
libLLVMAArch64Disassembler
llvm_post_static_libraries := \
libLLVMAsmPrinter \
libLLVMSelectionDAG \
libLLVMCodeGen \
libLLVMObject \
libLLVMScalarOpts \
libLLVMInstCombine \
libLLVMInstrumentation \
libLLVMTransformObjCARC \
libLLVMTransformUtils \
libLLVMipa \
libLLVMAnalysis \
libLLVMTarget \
libLLVMMCDisassembler \
libLLVMMC \
libLLVMMCParser \
libLLVMCore \
libLLVMAsmParser \
libLLVMOption \
libLLVMSupport \
libLLVMVectorize \
libLLVMProfileData
llvm_host_static_libraries := \
libLLVMExecutionEngine \
libLLVMRuntimeDyld \
libLLVMMCJIT
ifeq (true,$(FORCE_BUILD_LLVM_COMPONENTS))
# HOST LLVM shared library build
include $(CLEAR_VARS)
LOCAL_IS_HOST_MODULE := true
LOCAL_MODULE:= libLLVM
LOCAL_MODULE_TAGS := optional
# Host build pulls in all ARM, Mips, X86 components.
LOCAL_WHOLE_STATIC_LIBRARIES := \
$(llvm_pre_static_libraries) \
$(llvm_arm_static_libraries) \
$(llvm_x86_static_libraries) \
$(llvm_mips_static_libraries) \
$(llvm_aarch64_static_libraries) \
$(llvm_host_static_libraries) \
$(llvm_post_static_libraries)
ifeq ($(HOST_OS),windows)
LOCAL_LDLIBS := -limagehlp -lpsapi
else
LOCAL_LDLIBS := -ldl -lpthread
endif
include $(LLVM_HOST_BUILD_MK)
include $(BUILD_HOST_SHARED_LIBRARY)
endif
ifeq (,$(filter $(TARGET_ARCH),$(LLVM_SUPPORTED_ARCH)))
$(warning TODO $(TARGET_ARCH): Enable llvm build)
endif
ifneq (true,$(DISABLE_LLVM_DEVICE_BUILDS))
# DEVICE LLVM shared library build
include $(CLEAR_VARS)
LOCAL_MODULE:= libLLVM
LOCAL_MODULE_TAGS := optional
# Device build selectively pulls in ARM, Mips, X86 components.
LOCAL_WHOLE_STATIC_LIBRARIES := \
$(llvm_pre_static_libraries)
LOCAL_WHOLE_STATIC_LIBRARIES_arm += $(llvm_arm_static_libraries)
LOCAL_WHOLE_STATIC_LIBRARIES_x86 += $(llvm_x86_static_libraries)
LOCAL_WHOLE_STATIC_LIBRARIES_x86_64 += $(llvm_x86_static_libraries)
LOCAL_WHOLE_STATIC_LIBRARIES_mips += $(llvm_mips_static_libraries)
LOCAL_WHOLE_STATIC_LIBRARIES_mips64 += $(llvm_mips_static_libraries)
LOCAL_WHOLE_STATIC_LIBRARIES_arm64 += $(llvm_aarch64_static_libraries)
LOCAL_WHOLE_STATIC_LIBRARIES_arm64 += $(llvm_arm_static_libraries)
ifeq ($(BUILD_ARM_FOR_X86),true)
LOCAL_WHOLE_STATIC_LIBRARIES_x86 += $(llvm_arm_static_libraries)
LOCAL_WHOLE_STATIC_LIBRARIES_x86_64 += $(llvm_arm_static_libraries)
endif
LOCAL_WHOLE_STATIC_LIBRARIES += $(llvm_post_static_libraries)
#LOCAL_LDLIBS := -ldl -lpthread
LOCAL_SHARED_LIBRARIES := libcutils libdl libc++
include $(LLVM_DEVICE_BUILD_MK)
include $(BUILD_SHARED_LIBRARY)
endif
|