blob: 8b81d168d3617c9ea71345578c00c66693542acb [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
49# BUILD_HOST_SHARED_LIBRARY can be moved out once
50# LOCAL_MODULE_HOST_OS is enforced.
51ifeq ($(HOST_OS),windows)
52include $(BUILD_HOST_SHARED_LIBRARY)
53endif
54else
55LOCAL_MODULE_HOST_OS := darwin linux windows
56include $(BUILD_HOST_SHARED_LIBRARY)
57endif
58
59
60# Don't build the library unless forced to.
61ifeq (true,$(FORCE_BUILD_LLVM_COMPONENTS))
Tong Shene5599602014-09-19 12:02:00 -070062# device
63include $(CLEAR_VARS)
64
65LOCAL_MODULE:= libclang
66LOCAL_MODULE_TAGS := optional
67LOCAL_WHOLE_STATIC_LIBRARIES := $(clang_whole_static_libraries)
68
69LOCAL_SHARED_LIBRARIES := libLLVM libc++
70LOCAL_LDLIBS := -ldl
71
72include $(CLANG_DEVICE_BUILD_MK)
73include $(BUILD_SHARED_LIBRARY)
Dan Willemsen2d2dc9f2015-08-18 17:06:48 -070074endif # don't build unless forced to
Tong Shene5599602014-09-19 12:02:00 -070075
Stephen Hinesce5d5dc2013-09-06 16:53:40 -070076endif # don't build in unbundled branches