1 # Don't build the library in unbundled branches. 2 ifeq (,$(TARGET_BUILD_APPS)) 3 4 LOCAL_PATH:= $(call my-dir) 5 6 clang_whole_static_libraries := \ 7 libclangAnalysis \ 8 libclangAST \ 9 libclangASTMatchers \ 10 libclangBasic \ 11 libclangCodeGen \ 12 libclangDriver \ 13 libclangEdit \ 14 libclangFormat \ 15 libclangFrontend \ 16 libclangIndex \ 17 libclangLex \ 18 libclangLibclang \ 19 libclangParse \ 20 libclangRewrite \ 21 libclangRewriteFrontend \ 22 libclangSema \ 23 libclangSerialization \ 24 libclangTooling 25 26 # host 27 include $(CLEAR_VARS) 28 29 LOCAL_IS_HOST_MODULE := true 30 LOCAL_MODULE:= libclang 31 LOCAL_MODULE_TAGS := optional 32 LOCAL_WHOLE_STATIC_LIBRARIES := $(clang_whole_static_libraries) 33 34 LOCAL_SHARED_LIBRARIES := libLLVM 35 36 LOCAL_LDLIBS_windows := -limagehlp -lpsapi 37 38 LOCAL_SHARED_LIBRARIES_darwin := libc++ 39 LOCAL_SHARED_LIBRARIES_linux := libc++ 40 LOCAL_LDLIBS_darwin := -ldl -lpthread 41 LOCAL_LDLIBS_linux := -ldl -lpthread 42 43 include $(CLANG_HOST_BUILD_MK) 44 45 # Don't build the library unless forced to. We don't 46 # have prebuilts for windows. 47 ifneq (true,$(FORCE_BUILD_LLVM_COMPONENTS)) 48 LOCAL_MODULE_HOST_OS := windows 49 else 50 LOCAL_MODULE_HOST_OS := darwin linux windows 51 endif 52 53 include $(BUILD_HOST_SHARED_LIBRARY) 54 55 # Don't build the library unless forced to. 56 ifeq (true,$(FORCE_BUILD_LLVM_COMPONENTS)) 57 # device 58 include $(CLEAR_VARS) 59 60 LOCAL_MODULE:= libclang 61 LOCAL_MODULE_TAGS := optional 62 LOCAL_WHOLE_STATIC_LIBRARIES := $(clang_whole_static_libraries) 63 64 LOCAL_SHARED_LIBRARIES := libLLVM libc++ 65 LOCAL_LDLIBS := -ldl 66 67 include $(CLANG_DEVICE_BUILD_MK) 68 include $(BUILD_SHARED_LIBRARY) 69 endif # don't build unless forced to 70 71 endif # don't build in unbundled branches 72