blob: 6850a2e2dfb59243e38016f5629ec469b080d28a [file] [log] [blame]
Stephen Hinesce5d5dc2013-09-06 16:53:40 -07001# Don't build the library unless forced to.
2ifeq (true,$(FORCE_BUILD_LLVM_COMPONENTS))
Tim Murray9e8bf2c2013-03-06 10:12:22 -08003# Don't build the library in unbundled branches.
4ifeq (,$(TARGET_BUILD_APPS))
5
Stephen Hinesf71d14a2013-02-27 13:34:21 -08006LOCAL_PATH:= $(call my-dir)
7
Tong Shene5599602014-09-19 12:02:00 -07008clang_whole_static_libraries := \
Stephen Hinesf71d14a2013-02-27 13:34:21 -08009 libclangDriver \
10 libclangParse \
11 libclangSema \
12 libclangAnalysis \
13 libclangCodeGen \
14 libclangAST \
15 libclangEdit \
16 libclangLex \
17 libclangFrontend \
18 libclangBasic \
Stephen Hines176edba2014-12-01 14:53:08 -080019 libclangRewrite \
Todd Fiala3313f882013-10-22 16:11:47 -070020 libclangRewriteFrontend \
Stephen Hinesf71d14a2013-02-27 13:34:21 -080021 libclangSerialization
22
Tong Shene5599602014-09-19 12:02:00 -070023# host
24include $(CLEAR_VARS)
25
26LOCAL_IS_HOST_MODULE := true
27LOCAL_MODULE:= libclang
28LOCAL_MODULE_TAGS := optional
29LOCAL_WHOLE_STATIC_LIBRARIES := $(clang_whole_static_libraries)
Stephen Hinesf71d14a2013-02-27 13:34:21 -080030
Stephen Hinesf553c8d2013-02-27 17:04:46 -080031ifeq ($(HOST_OS),windows)
Logan Chien68350212014-06-11 02:29:45 +080032 LOCAL_SHARED_LIBRARIES := libLLVM
Stephen Hinesf553c8d2013-02-27 17:04:46 -080033 LOCAL_LDLIBS := -limagehlp -lpsapi
34else
Logan Chien68350212014-06-11 02:29:45 +080035 LOCAL_SHARED_LIBRARIES := libLLVM libc++
Stephen Hinesf553c8d2013-02-27 17:04:46 -080036 LOCAL_LDLIBS := -ldl -lpthread
37endif
Stephen Hinesf71d14a2013-02-27 13:34:21 -080038
39include $(CLANG_HOST_BUILD_MK)
40include $(BUILD_HOST_SHARED_LIBRARY)
Tim Murray9e8bf2c2013-03-06 10:12:22 -080041
Tong Shene5599602014-09-19 12:02:00 -070042# device
43include $(CLEAR_VARS)
44
45LOCAL_MODULE:= libclang
46LOCAL_MODULE_TAGS := optional
47LOCAL_WHOLE_STATIC_LIBRARIES := $(clang_whole_static_libraries)
48
49LOCAL_SHARED_LIBRARIES := libLLVM libc++
50LOCAL_LDLIBS := -ldl
51
52include $(CLANG_DEVICE_BUILD_MK)
53include $(BUILD_SHARED_LIBRARY)
54
Stephen Hinesce5d5dc2013-09-06 16:53:40 -070055endif # don't build in unbundled branches
56endif # don't build unless forced to