• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1LOCAL_PATH := $(call my-dir)
2LLVM_ROOT_PATH := external/llvm
3CLANG_ROOT_PATH := external/clang
4llvm_static_libs_needed := \
5	libLLVMLinker   \
6	libLLVMipo	\
7	libLLVMBitWriter	\
8	libLLVMBitReader	\
9	libLLVMARMCodeGen	\
10	libLLVMARMAsmPrinter	\
11	libLLVMARMInfo	\
12	libLLVMX86CodeGen	\
13	libLLVMX86AsmPrinter	\
14	libLLVMX86Info	\
15	libLLVMX86Utils	\
16	libLLVMAsmPrinter	\
17	libLLVMSelectionDAG	\
18	libLLVMCodeGen	\
19	libLLVMScalarOpts	\
20	libLLVMInstCombine	\
21	libLLVMTransformUtils	\
22	libLLVMInstrumentation	\
23	libLLVMipa	\
24	libLLVMAnalysis	\
25	libLLVMTarget	\
26	libLLVMMC	\
27	libLLVMMCParser	\
28	libLLVMCore	\
29	libclangParse	\
30	libclangSema	\
31	libclangAnalysis	\
32	libclangAST	\
33	libclangFrontend	\
34	libclangLex	\
35	libclangCodeGen	\
36	libclangBasic	\
37	libLLVMSupport
38
39# ========================================================
40# Static library libndkpc for host
41# ========================================================
42include $(CLEAR_VARS)
43include $(CLEAR_TBLGEN_VARS)
44
45include $(CLANG_ROOT_PATH)/clang.mk
46
47LOCAL_MODULE := libndkpc
48LOCAL_MODULE_TAGS := optional
49
50LOCAL_CFLAGS += -Wno-sign-promo
51ifneq ($(TARGET_BUILD_VARIANT),eng)
52LOCAL_CFLAGS += -D__DISABLE_ASSERTS
53endif
54
55TBLGEN_TABLES :=    \
56	AttrList.inc	\
57	Attrs.inc	\
58	DeclNodes.inc	\
59	DiagnosticCommonKinds.inc	\
60	DiagnosticFrontendKinds.inc	\
61	DiagnosticSemaKinds.inc	\
62	StmtNodes.inc
63
64LOCAL_SRC_FILES :=	\
65	Compiler.cpp	\
66	Backend.cpp
67
68LOCAL_LDLIBS := -ldl -lpthread
69
70include $(CLANG_HOST_BUILD_MK)
71include $(CLANG_TBLGEN_RULES_MK)
72include $(LLVM_GEN_INTRINSICS_MK)
73include $(BUILD_HOST_STATIC_LIBRARY)
74
75# ========================================================
76# Executable llvm-ndk-cc for host
77# ========================================================
78include $(CLEAR_VARS)
79include $(CLEAR_TBLGEN_VARS)
80
81LOCAL_IS_HOST_MODULE := true
82LOCAL_MODULE := llvm-ndk-cc
83LOCAL_MODULE_TAGS := optional
84
85LOCAL_MODULE_CLASS := EXECUTABLES
86
87LOCAL_CFLAGS += -Wno-sign-promo
88ifneq ($(TARGET_BUILD_VARIANT),eng)
89LOCAL_CFLAGS += -D__DISABLE_ASSERTS
90endif
91
92TBLGEN_TABLES :=    \
93	AttrList.inc    \
94	Attrs.inc    \
95	DeclNodes.inc    \
96	DiagnosticCommonKinds.inc   \
97	DiagnosticDriverKinds.inc \
98	DiagnosticFrontendKinds.inc	\
99	DiagnosticSemaKinds.inc	\
100	StmtNodes.inc
101
102LOCAL_SRC_FILES :=	\
103	llvm-ndk-cc.cpp
104
105LOCAL_STATIC_LIBRARIES :=	\
106	libclangDriver libndkpc \
107	$(llvm_static_libs_needed)
108
109ifeq ($(HOST_OS),windows)
110  LOCAL_LDLIBS := -limagehlp -lpsapi
111else
112  LOCAL_LDLIBS := -ldl -lpthread
113endif
114
115include $(CLANG_HOST_BUILD_MK)
116include $(CLANG_TBLGEN_RULES_MK)
117include $(BUILD_HOST_EXECUTABLE)
118
119# ========================================================
120# Executable llvm-ndk-link for host
121# ========================================================
122include $(CLEAR_VARS)
123
124LOCAL_IS_HOST_MODULE := true
125LOCAL_MODULE := llvm-ndk-link
126LOCAL_MODULE_TAGS := optional
127LOCAL_MODULE_CLASS := EXECUTABLES
128
129LOCAL_SRC_FILES := llvm-ndk-link.cpp
130
131LOCAL_LDLIBS := -ldl -lpthread
132
133LOCAL_STATIC_LIBRARIES := \
134  $(llvm_static_libs_needed)
135
136include $(CLANG_ROOT_PATH)/clang.mk
137include $(CLANG_HOST_BUILD_MK)
138include $(LLVM_ROOT_PATH)/llvm.mk
139include $(LLVM_HOST_BUILD_MK)
140
141include $(BUILD_HOST_EXECUTABLE)
142