blob: 151a626ea4d57075459c49785fe9c3407945257a [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 libclangAnalysis \
Stephen Hinesf71d14a2013-02-27 13:34:21 -080010 libclangAST \
Tao Baodb719ce2015-02-19 14:45:44 -080011 libclangASTMatchers \
Stephen Hinesf71d14a2013-02-27 13:34:21 -080012 libclangBasic \
Tao Baodb719ce2015-02-19 14:45:44 -080013 libclangCodeGen \
14 libclangDriver \
15 libclangEdit \
16 libclangFormat \
17 libclangFrontend \
18 libclangIndex \
19 libclangLex \
20 libclangLibclang \
21 libclangParse \
Stephen Hines176edba2014-12-01 14:53:08 -080022 libclangRewrite \
Todd Fiala3313f882013-10-22 16:11:47 -070023 libclangRewriteFrontend \
Tao Baodb719ce2015-02-19 14:45:44 -080024 libclangSema \
25 libclangSerialization \
26 libclangTooling
Stephen Hinesf71d14a2013-02-27 13:34:21 -080027
Tong Shene5599602014-09-19 12:02:00 -070028# host
29include $(CLEAR_VARS)
30
31LOCAL_IS_HOST_MODULE := true
32LOCAL_MODULE:= libclang
33LOCAL_MODULE_TAGS := optional
34LOCAL_WHOLE_STATIC_LIBRARIES := $(clang_whole_static_libraries)
Stephen Hinesf71d14a2013-02-27 13:34:21 -080035
Stephen Hinesf553c8d2013-02-27 17:04:46 -080036ifeq ($(HOST_OS),windows)
Logan Chien68350212014-06-11 02:29:45 +080037 LOCAL_SHARED_LIBRARIES := libLLVM
Stephen Hinesf553c8d2013-02-27 17:04:46 -080038 LOCAL_LDLIBS := -limagehlp -lpsapi
39else
Logan Chien68350212014-06-11 02:29:45 +080040 LOCAL_SHARED_LIBRARIES := libLLVM libc++
Stephen Hinesf553c8d2013-02-27 17:04:46 -080041 LOCAL_LDLIBS := -ldl -lpthread
42endif
Stephen Hinesf71d14a2013-02-27 13:34:21 -080043
44include $(CLANG_HOST_BUILD_MK)
45include $(BUILD_HOST_SHARED_LIBRARY)
Tim Murray9e8bf2c2013-03-06 10:12:22 -080046
Tong Shene5599602014-09-19 12:02:00 -070047# device
48include $(CLEAR_VARS)
49
50LOCAL_MODULE:= libclang
51LOCAL_MODULE_TAGS := optional
52LOCAL_WHOLE_STATIC_LIBRARIES := $(clang_whole_static_libraries)
53
54LOCAL_SHARED_LIBRARIES := libLLVM libc++
55LOCAL_LDLIBS := -ldl
56
57include $(CLANG_DEVICE_BUILD_MK)
58include $(BUILD_SHARED_LIBRARY)
59
Stephen Hinesce5d5dc2013-09-06 16:53:40 -070060endif # don't build in unbundled branches
61endif # don't build unless forced to