• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Don't build the library in unbundled branches.
2ifeq (,$(TARGET_BUILD_APPS))
3
4LOCAL_PATH:= $(call my-dir)
5
6llvm_pre_static_libraries := \
7  libLLVMLinker \
8  libLLVMipo \
9  libLLVMIRReader \
10  libLLVMBitWriter \
11  libLLVMBitReader
12
13llvm_arm_static_libraries := \
14  libLLVMARMCodeGen \
15  libLLVMARMAsmParser \
16  libLLVMARMAsmPrinter \
17  libLLVMARMInfo \
18  libLLVMARMDesc \
19  libLLVMARMDisassembler
20
21llvm_x86_static_libraries := \
22  libLLVMX86CodeGen \
23  libLLVMX86Info \
24  libLLVMX86Desc \
25  libLLVMX86AsmParser \
26  libLLVMX86AsmPrinter \
27  libLLVMX86Utils \
28  libLLVMX86Disassembler
29
30llvm_mips_static_libraries := \
31  libLLVMMipsCodeGen \
32  libLLVMMipsInfo \
33  libLLVMMipsDesc \
34  libLLVMMipsAsmParser \
35  libLLVMMipsAsmPrinter \
36  libLLVMMipsDisassembler
37
38llvm_post_static_libraries := \
39  libLLVMAsmPrinter \
40  libLLVMSelectionDAG \
41  libLLVMCodeGen \
42  libLLVMObject \
43  libLLVMScalarOpts \
44  libLLVMInstCombine \
45  libLLVMInstrumentation \
46  libLLVMTransformObjCARC \
47  libLLVMTransformUtils \
48  libLLVMipa \
49  libLLVMAnalysis \
50  libLLVMTarget \
51  libLLVMMC \
52  libLLVMMCParser \
53  libLLVMCore \
54  libLLVMAsmParser \
55  libLLVMOption \
56  libLLVMSupport \
57  libLLVMVectorize
58
59# HOST LLVM shared library build
60include $(CLEAR_VARS)
61LOCAL_IS_HOST_MODULE := true
62
63LOCAL_MODULE:= libLLVM
64
65LOCAL_MODULE_TAGS := optional
66
67# Host build pulls in all ARM, Mips, X86 components.
68LOCAL_WHOLE_STATIC_LIBRARIES := \
69  $(llvm_pre_static_libraries) \
70  $(llvm_arm_static_libraries) \
71  $(llvm_x86_static_libraries) \
72  $(llvm_mips_static_libraries) \
73  $(llvm_post_static_libraries)
74
75ifeq ($(HOST_OS),windows)
76  LOCAL_LDLIBS := -limagehlp -lpsapi
77else
78  LOCAL_LDLIBS := -ldl -lpthread
79endif
80
81include $(LLVM_HOST_BUILD_MK)
82include $(BUILD_HOST_SHARED_LIBRARY)
83
84
85# DEVICE LLVM shared library build
86include $(CLEAR_VARS)
87
88LOCAL_MODULE:= libLLVM
89
90LOCAL_MODULE_TAGS := optional
91
92# Device build selectively pulls in ARM, Mips, X86 components.
93LOCAL_WHOLE_STATIC_LIBRARIES := \
94  $(llvm_pre_static_libraries)
95
96ifeq ($(TARGET_ARCH),arm)
97  LOCAL_WHOLE_STATIC_LIBRARIES += $(llvm_arm_static_libraries)
98else
99  ifeq ($(TARGET_ARCH),x86)
100    LOCAL_WHOLE_STATIC_LIBRARIES += $(llvm_x86_static_libraries)
101  else
102    ifeq ($(TARGET_ARCH),mips)
103      LOCAL_WHOLE_STATIC_LIBRARIES += $(llvm_mips_static_libraries)
104    else
105      $(error Unsupported architecture $(TARGET_ARCH))
106    endif
107  endif
108endif
109
110LOCAL_WHOLE_STATIC_LIBRARIES += $(llvm_post_static_libraries)
111
112#LOCAL_LDLIBS := -ldl -lpthread
113LOCAL_SHARED_LIBRARIES := libcutils libdl libstlport
114
115include $(LLVM_DEVICE_BUILD_MK)
116include $(BUILD_SHARED_LIBRARY)
117
118endif # don't build in unbundled branches
119