1# Don't build the library unless forced to. 2ifeq (true,$(FORCE_BUILD_LLVM_COMPONENTS)) 3# Don't build the library in unbundled branches. 4ifeq (,$(TARGET_BUILD_APPS)) 5 6LOCAL_PATH:= $(call my-dir) 7 8clang_whole_static_libraries := \ 9 libclangAnalysis \ 10 libclangAST \ 11 libclangASTMatchers \ 12 libclangBasic \ 13 libclangCodeGen \ 14 libclangDriver \ 15 libclangEdit \ 16 libclangFormat \ 17 libclangFrontend \ 18 libclangIndex \ 19 libclangLex \ 20 libclangLibclang \ 21 libclangParse \ 22 libclangRewrite \ 23 libclangRewriteFrontend \ 24 libclangSema \ 25 libclangSerialization \ 26 libclangTooling 27 28# 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) 35 36ifeq ($(HOST_OS),windows) 37 LOCAL_SHARED_LIBRARIES := libLLVM 38 LOCAL_LDLIBS := -limagehlp -lpsapi 39else 40 LOCAL_SHARED_LIBRARIES := libLLVM libc++ 41 LOCAL_LDLIBS := -ldl -lpthread 42endif 43 44include $(CLANG_HOST_BUILD_MK) 45include $(BUILD_HOST_SHARED_LIBRARY) 46 47# 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 60endif # don't build in unbundled branches 61endif # don't build unless forced to 62