diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/llc/Android.mk | 132 | ||||
-rw-r--r-- | tools/llvm-as/Android.mk | 28 | ||||
-rw-r--r-- | tools/llvm-dis/Android.mk | 25 | ||||
-rw-r--r-- | tools/llvm-link/Android.mk | 48 | ||||
-rw-r--r-- | tools/opt/Android.mk | 79 |
5 files changed, 312 insertions, 0 deletions
diff --git a/tools/llc/Android.mk b/tools/llc/Android.mk new file mode 100644 index 0000000..af1f75a --- /dev/null +++ b/tools/llc/Android.mk @@ -0,0 +1,132 @@ +LOCAL_PATH := $(call my-dir) + +LLVM_ROOT_PATH := $(LOCAL_PATH)/../.. + + +#===---------------------------------------------------------------=== +# llc command line tool (common) +#===---------------------------------------------------------------=== + +llvm_llc_SRC_FILES := \ + llc.cpp + +llvm_llc_mips_STATIC_LIBRARIES := \ + libLLVMMipsAsmParser \ + libLLVMMipsInfo \ + libLLVMMipsCodeGen \ + libLLVMMipsDesc \ + libLLVMMipsAsmPrinter \ + +llvm_llc_x86_STATIC_LIBRARIES := \ + libLLVMX86Info \ + libLLVMX86AsmParser \ + libLLVMX86CodeGen \ + libLLVMX86Disassembler \ + libLLVMX86Desc \ + libLLVMX86AsmPrinter \ + libLLVMX86Utils + +llvm_llc_arm_STATIC_LIBRARIES := \ + libLLVMARMCodeGen \ + libLLVMARMDisassembler \ + libLLVMARMAsmParser \ + libLLVMARMAsmPrinter \ + libLLVMARMDesc \ + libLLVMARMInfo + +llvm_llc_STATIC_LIBRARIES := \ + libLLVMAsmPrinter \ + libLLVMIRReader \ + libLLVMAsmParser \ + libLLVMBitReader \ + libLLVMBitWriter \ + libLLVMSelectionDAG \ + libLLVMInstCombine \ + libLLVMInstrumentation \ + libLLVMCodeGen \ + libLLVMObject \ + libLLVMipo \ + libLLVMipa \ + libLLVMLinker \ + libLLVMMC \ + libLLVMMCParser \ + libLLVMScalarOpts \ + libLLVMTransformUtils \ + libLLVMVectorize \ + libLLVMAnalysis \ + libLLVMTarget \ + libLLVMCore \ + libLLVMSupport + + +#===---------------------------------------------------------------=== +# llc command line tool (host) +#===---------------------------------------------------------------=== + +include $(CLEAR_VARS) + +LOCAL_MODULE := llc +LOCAL_MODULE_TAGS := optional +LOCAL_MODULE_CLASS := EXECUTABLES +LOCAL_IS_HOST_MODULE := true + +LOCAL_SRC_FILES := $(llvm_llc_SRC_FILES) + +LOCAL_STATIC_LIBRARIES := \ + $(llvm_llc_arm_STATIC_LIBRARIES) \ + $(llvm_llc_mips_STATIC_LIBRARIES) \ + $(llvm_llc_x86_STATIC_LIBRARIES) \ + $(llvm_llc_STATIC_LIBRARIES) + +LOCAL_LDLIBS += -lpthread -lm -ldl +LOCAL_C_INCLUDES += external/llvm/include + +include $(LLVM_ROOT_PATH)/llvm.mk +include $(LLVM_HOST_BUILD_MK) +include $(LLVM_GEN_INTRINSICS_MK) +include $(BUILD_HOST_EXECUTABLE) + + +#===---------------------------------------------------------------=== +# llc command line tool (target) +#===---------------------------------------------------------------=== + +#TODOArm64: Enable llc build +#TODOMips64: Enable llc build +ifeq ($(filter $(TARGET_ARCH),arm64 mips64),) +include $(CLEAR_VARS) + +LOCAL_MODULE := llc +LOCAL_MODULE_TAGS := optional +LOCAL_MODULE_CLASS := EXECUTABLES + +LOCAL_SRC_FILES := $(llvm_llc_SRC_FILES) +LOCAL_C_INCLUDES += external/llvm/include + +ifeq ($(TARGET_ARCH),arm) + LOCAL_STATIC_LIBRARIES := $(llvm_llc_arm_STATIC_LIBRARIES) +else + ifeq ($(TARGET_ARCH),mips) + LOCAL_STATIC_LIBRARIES := $(llvm_llc_mips_STATIC_LIBRARIES) + else + ifeq ($(TARGET_ARCH),$(filter $(TARGET_ARCH),x86 x86_64 x32)) + LOCAL_STATIC_LIBRARIES := $(llvm_llc_x86_STATIC_LIBRARIES) + else + $(error "Unsupport llc target $(TARGET_ARCH)") + endif + endif +endif + +LOCAL_STATIC_LIBRARIES += $(llvm_llc_STATIC_LIBRARIES) + +LOCAL_SHARED_LIBRARIES := \ + libcutils \ + libdl \ + libstlport + +include $(LLVM_ROOT_PATH)/llvm.mk +include $(LLVM_DEVICE_BUILD_MK) +include $(LLVM_GEN_INTRINSICS_MK) +include $(BUILD_EXECUTABLE) + +endif # !(arm64 || mips64) diff --git a/tools/llvm-as/Android.mk b/tools/llvm-as/Android.mk new file mode 100644 index 0000000..e58868b --- /dev/null +++ b/tools/llvm-as/Android.mk @@ -0,0 +1,28 @@ +LOCAL_PATH:= $(call my-dir) + +llvm_as_SRC_FILES := \ + llvm-as.cpp + +include $(CLEAR_VARS) + +LOCAL_MODULE := llvm-as +LOCAL_MODULE_TAGS := optional +LOCAL_SRC_FILES := $(llvm_as_SRC_FILES) +LOCAL_LDLIBS += -lm +ifdef USE_MINGW +LOCAL_LDLIBS += -limagehlp +else +LOCAL_LDLIBS += -lpthread -ldl +endif + +REQUIRES_EH := 1 +REQUIRES_RTTI := 1 + +LOCAL_STATIC_LIBRARIES := \ + libLLVMAsmParser \ + libLLVMBitWriter \ + libLLVMCore \ + libLLVMSupport + +include $(LLVM_HOST_BUILD_MK) +include $(BUILD_HOST_EXECUTABLE) diff --git a/tools/llvm-dis/Android.mk b/tools/llvm-dis/Android.mk new file mode 100644 index 0000000..22d44fd --- /dev/null +++ b/tools/llvm-dis/Android.mk @@ -0,0 +1,25 @@ +LOCAL_PATH:= $(call my-dir) + +llvm_dis_SRC_FILES := \ + llvm-dis.cpp + +include $(CLEAR_VARS) + +LOCAL_MODULE := llvm-dis +LOCAL_MODULE_CLASS := EXECUTABLES +LOCAL_MODULE_TAGS := optional +LOCAL_SRC_FILES := $(llvm_dis_SRC_FILES) +LOCAL_LDLIBS += -lpthread -lm -ldl + +REQUIRES_EH := 1 +REQUIRES_RTTI := 1 + +LOCAL_STATIC_LIBRARIES := \ + libLLVMAnalysis \ + libLLVMBitReader \ + libLLVMCore \ + libLLVMSupport + +include $(LLVM_HOST_BUILD_MK) +include $(LLVM_GEN_INTRINSICS_MK) +include $(BUILD_HOST_EXECUTABLE) diff --git a/tools/llvm-link/Android.mk b/tools/llvm-link/Android.mk new file mode 100644 index 0000000..db8f2af --- /dev/null +++ b/tools/llvm-link/Android.mk @@ -0,0 +1,48 @@ +LOCAL_PATH:= $(call my-dir) + +llvm_link_SRC_FILES := \ + llvm-link.cpp + +llvm_link_STATIC_LIBRARIES := \ + libLLVMLinker \ + libLLVMIRReader \ + libLLVMBitReader \ + libLLVMBitWriter \ + libLLVMAsmParser \ + libLLVMTransformUtils \ + libLLVMAnalysis \ + libLLVMTarget \ + libLLVMCore \ + libLLVMSupport + +#===---------------------------------------------------------------=== +# llvm-link command line tool (host) +#===---------------------------------------------------------------=== + +include $(CLEAR_VARS) + +LOCAL_MODULE := llvm-link +LOCAL_MODULE_TAGS := optional +LOCAL_SRC_FILES := $(llvm_link_SRC_FILES) +LOCAL_STATIC_LIBRARIES := $(llvm_link_STATIC_LIBRARIES) +LOCAL_LDLIBS += -lpthread -lm -ldl + +include $(LLVM_HOST_BUILD_MK) +include $(BUILD_HOST_EXECUTABLE) + +#===---------------------------------------------------------------=== +# llvm-link command line tool (target) +#===---------------------------------------------------------------=== + +include $(CLEAR_VARS) + +LOCAL_MODULE := llvm-link +LOCAL_MODULE_TAGS := optional +LOCAL_SRC_FILES := $(llvm_link_SRC_FILES) +LOCAL_STATIC_LIBRARIES := $(llvm_link_STATIC_LIBRARIES) +LOCAL_SHARED_LIBRARIES := \ + libcutils \ + libstlport + +include $(LLVM_DEVICE_BUILD_MK) +include $(BUILD_EXECUTABLE) diff --git a/tools/opt/Android.mk b/tools/opt/Android.mk new file mode 100644 index 0000000..77183aa --- /dev/null +++ b/tools/opt/Android.mk @@ -0,0 +1,79 @@ +LOCAL_PATH := $(call my-dir) + +LLVM_ROOT_PATH := $(LOCAL_PATH)/../.. + + +#===---------------------------------------------------------------=== +# opt command line tool (common) +#===---------------------------------------------------------------=== + +llvm_opt_SRC_FILES := \ + AnalysisWrappers.cpp \ + GraphPrinters.cpp \ + PrintSCC.cpp \ + opt.cpp + +llvm_opt_STATIC_LIBRARIES := \ + libLLVMScalarOpts \ + libLLVMInstCombine \ + libLLVMInstrumentation \ + libLLVMMCParser \ + libLLVMMC \ + libLLVMAsmParser \ + libLLVMBitWriter \ + libLLVMBitReader \ + libLLVMipa \ + libLLVMipo \ + libLLVMTransformUtils \ + libLLVMVectorize \ + libLLVMAnalysis \ + libLLVMTarget \ + libLLVMCore \ + libLLVMSupport + + +#===---------------------------------------------------------------=== +# opt command line tool (host) +#===---------------------------------------------------------------=== + +include $(CLEAR_VARS) + +LOCAL_MODULE := opt +LOCAL_MODULE_TAGS := optional +LOCAL_MODULE_CLASS := EXECUTABLES +LOCAL_IS_HOST_MODULE := true + +LOCAL_SRC_FILES := $(llvm_opt_SRC_FILES) +LOCAL_STATIC_LIBRARIES := $(llvm_opt_STATIC_LIBRARIES) +LOCAL_LDLIBS += -lpthread -lm -ldl +LOCAL_C_INCLUDES += external/llvm/include + +include $(LLVM_ROOT_PATH)/llvm.mk +include $(LLVM_HOST_BUILD_MK) +include $(LLVM_GEN_INTRINSICS_MK) +include $(BUILD_HOST_EXECUTABLE) + + +#===---------------------------------------------------------------=== +# opt command line tool (target) +#===---------------------------------------------------------------=== + +include $(CLEAR_VARS) + +LOCAL_MODULE := opt +LOCAL_MODULE_TAGS := optional +LOCAL_MODULE_CLASS := EXECUTABLES + +LOCAL_SRC_FILES := $(llvm_opt_SRC_FILES) +LOCAL_C_INCLUDES += external/llvm/include +LOCAL_STATIC_LIBRARIES := $(llvm_opt_STATIC_LIBRARIES) +LOCAL_SHARED_LIBRARIES := \ + libcutils \ + libdl \ + libstlport + + +include $(LLVM_ROOT_PATH)/llvm.mk +include $(LLVM_DEVICE_BUILD_MK) +include $(LLVM_GEN_INTRINSICS_MK) +include $(BUILD_EXECUTABLE) |