blob: 2580e076260a95c5a542e6a7d399884711279c1a [file] [log] [blame]
Tim Murray9e8bf2c2013-03-06 10:12:22 -08001# Don't build the library in unbundled branches.
2ifeq (,$(TARGET_BUILD_APPS))
3
Stephen Hinesf71d14a2013-02-27 13:34:21 -08004LOCAL_PATH:= $(call my-dir)
5
Tong Shene5599602014-09-19 12:02:00 -07006clang_whole_static_libraries := \
Stephen Hinesf71d14a2013-02-27 13:34:21 -08007 libclangAnalysis \
Stephen Hinesf71d14a2013-02-27 13:34:21 -08008 libclangAST \
Tao Baodb719ce2015-02-19 14:45:44 -08009 libclangASTMatchers \
Stephen Hinesf71d14a2013-02-27 13:34:21 -080010 libclangBasic \
Tao Baodb719ce2015-02-19 14:45:44 -080011 libclangCodeGen \
12 libclangDriver \
13 libclangEdit \
14 libclangFormat \
15 libclangFrontend \
16 libclangIndex \
17 libclangLex \
18 libclangLibclang \
19 libclangParse \
Stephen Hines176edba2014-12-01 14:53:08 -080020 libclangRewrite \
Todd Fiala3313f882013-10-22 16:11:47 -070021 libclangRewriteFrontend \
Tao Baodb719ce2015-02-19 14:45:44 -080022 libclangSema \
23 libclangSerialization \
24 libclangTooling
Stephen Hinesf71d14a2013-02-27 13:34:21 -080025
Tong Shene5599602014-09-19 12:02:00 -070026# host
27include $(CLEAR_VARS)
28
29LOCAL_IS_HOST_MODULE := true
30LOCAL_MODULE:= libclang
31LOCAL_MODULE_TAGS := optional
32LOCAL_WHOLE_STATIC_LIBRARIES := $(clang_whole_static_libraries)
Stephen Hinesf71d14a2013-02-27 13:34:21 -080033
Dan Willemsen2d2dc9f2015-08-18 17:06:48 -070034LOCAL_SHARED_LIBRARIES := libLLVM
35
36LOCAL_LDLIBS_windows := -limagehlp -lpsapi
37
38LOCAL_SHARED_LIBRARIES_darwin := libc++
39LOCAL_SHARED_LIBRARIES_linux := libc++
40LOCAL_LDLIBS_darwin := -ldl -lpthread
41LOCAL_LDLIBS_linux := -ldl -lpthread
Stephen Hinesf71d14a2013-02-27 13:34:21 -080042
43include $(CLANG_HOST_BUILD_MK)
Tim Murray9e8bf2c2013-03-06 10:12:22 -080044
Dan Willemsen2d2dc9f2015-08-18 17:06:48 -070045# Don't build the library unless forced to. We don't
46# have prebuilts for windows.
47ifneq (true,$(FORCE_BUILD_LLVM_COMPONENTS))
48LOCAL_MODULE_HOST_OS := windows
Dan Willemsen2d2dc9f2015-08-18 17:06:48 -070049else
50LOCAL_MODULE_HOST_OS := darwin linux windows
Dan Willemsen2d2dc9f2015-08-18 17:06:48 -070051endif
52
Dan Willemsenf1f1bc32015-09-02 13:30:48 -070053include $(BUILD_HOST_SHARED_LIBRARY)
Dan Willemsen2d2dc9f2015-08-18 17:06:48 -070054
55# Don't build the library unless forced to.
56ifeq (true,$(FORCE_BUILD_LLVM_COMPONENTS))
Tong Shene5599602014-09-19 12:02:00 -070057# device
58include $(CLEAR_VARS)
59
60LOCAL_MODULE:= libclang
61LOCAL_MODULE_TAGS := optional
62LOCAL_WHOLE_STATIC_LIBRARIES := $(clang_whole_static_libraries)
63
64LOCAL_SHARED_LIBRARIES := libLLVM libc++
65LOCAL_LDLIBS := -ldl
66
67include $(CLANG_DEVICE_BUILD_MK)
68include $(BUILD_SHARED_LIBRARY)
Dan Willemsen2d2dc9f2015-08-18 17:06:48 -070069endif # don't build unless forced to
Tong Shene5599602014-09-19 12:02:00 -070070
Stephen Hinesce5d5dc2013-09-06 16:53:40 -070071endif # don't build in unbundled branches