OSDN Git Service

am 917ae8fb: Fix LLVM version number (3.3).
[android-x86/external-llvm.git] / shared_llvm.mk
1 # Don't build the library in unbundled branches.
2 ifeq (,$(TARGET_BUILD_APPS))
3
4 LOCAL_PATH:= $(call my-dir)
5
6 llvm_pre_static_libraries := \
7   libLLVMLinker \
8   libLLVMipo \
9   libLLVMIRReader \
10   libLLVMBitWriter \
11   libLLVMBitReader
12
13 llvm_arm_static_libraries := \
14   libLLVMARMCodeGen \
15   libLLVMARMAsmParser \
16   libLLVMARMAsmPrinter \
17   libLLVMARMInfo \
18   libLLVMARMDesc \
19   libLLVMARMDisassembler
20
21 llvm_x86_static_libraries := \
22   libLLVMX86CodeGen \
23   libLLVMX86Info \
24   libLLVMX86Desc \
25   libLLVMX86AsmParser \
26   libLLVMX86AsmPrinter \
27   libLLVMX86Utils \
28   libLLVMX86Disassembler
29
30 llvm_mips_static_libraries := \
31   libLLVMMipsCodeGen \
32   libLLVMMipsInfo \
33   libLLVMMipsDesc \
34   libLLVMMipsAsmParser \
35   libLLVMMipsAsmPrinter \
36   libLLVMMipsDisassembler
37
38 llvm_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
60 include $(CLEAR_VARS)
61 LOCAL_IS_HOST_MODULE := true
62
63 LOCAL_MODULE:= libLLVM
64
65 LOCAL_MODULE_TAGS := optional
66
67 # Host build pulls in all ARM, Mips, X86 components.
68 LOCAL_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
75 ifeq ($(HOST_OS),windows)
76   LOCAL_LDLIBS := -limagehlp -lpsapi
77 else
78   LOCAL_LDLIBS := -ldl -lpthread
79 endif
80
81 include $(LLVM_HOST_BUILD_MK)
82 include $(BUILD_HOST_SHARED_LIBRARY)
83
84 ifeq (,$(filter $(TARGET_ARCH),$(LLVM_SUPPORTED_ARCH)))
85 $(warning TODO $(TARGET_ARCH): Enable llvm build)
86 endif
87
88 # DEVICE LLVM shared library build
89 include $(CLEAR_VARS)
90
91 LOCAL_MODULE:= libLLVM
92
93 LOCAL_MODULE_TAGS := optional
94
95 # Device build selectively pulls in ARM, Mips, X86 components.
96 LOCAL_WHOLE_STATIC_LIBRARIES := \
97   $(llvm_pre_static_libraries)
98
99 LOCAL_WHOLE_STATIC_LIBRARIES_arm += $(llvm_arm_static_libraries)
100 LOCAL_WHOLE_STATIC_LIBRARIES_x86 += $(llvm_x86_static_libraries)
101 LOCAL_WHOLE_STATIC_LIBRARIES_x86_64 += $(llvm_x86_static_libraries)
102 LOCAL_WHOLE_STATIC_LIBRARIES_mips += $(llvm_mips_static_libraries)
103
104 LOCAL_WHOLE_STATIC_LIBRARIES += $(llvm_post_static_libraries)
105
106 #LOCAL_LDLIBS := -ldl -lpthread
107 LOCAL_SHARED_LIBRARIES := libcutils libdl libstlport
108
109 include $(LLVM_DEVICE_BUILD_MK)
110 include $(BUILD_SHARED_LIBRARY)
111
112 endif # don't build in unbundled branches