1LOCAL_PATH := $(call my-dir) 2 3LLVM_ROOT_PATH := $(LOCAL_PATH)/../.. 4 5 6#===---------------------------------------------------------------=== 7# opt command line tool 8#===---------------------------------------------------------------=== 9 10llvm_opt_SRC_FILES := \ 11 AnalysisWrappers.cpp \ 12 BreakpointPrinter.cpp \ 13 GraphPrinters.cpp \ 14 NewPMDriver.cpp \ 15 PassPrinters.cpp \ 16 PrintSCC.cpp \ 17 opt.cpp \ 18 19llvm_opt_STATIC_LIBRARIES := \ 20 libLLVMIRReader \ 21 libLLVMBitReader \ 22 libLLVMBitWriter \ 23 libLLVMARMCodeGen \ 24 libLLVMARMInfo \ 25 libLLVMARMDesc \ 26 libLLVMARMAsmPrinter \ 27 libLLVMARMDisassembler \ 28 libLLVMAArch64CodeGen \ 29 libLLVMAArch64Info \ 30 libLLVMAArch64Desc \ 31 libLLVMAArch64AsmPrinter \ 32 libLLVMAArch64Utils \ 33 libLLVMAArch64Disassembler \ 34 libLLVMMipsCodeGen \ 35 libLLVMMipsInfo \ 36 libLLVMMipsDesc \ 37 libLLVMMipsAsmPrinter \ 38 libLLVMMipsDisassembler \ 39 libLLVMX86CodeGen \ 40 libLLVMX86Info \ 41 libLLVMX86Desc \ 42 libLLVMX86AsmPrinter \ 43 libLLVMX86Utils \ 44 libLLVMX86Disassembler \ 45 libLLVMAsmPrinter \ 46 libLLVMSelectionDAG \ 47 libLLVMCodeGen \ 48 libLLVMInstrumentation \ 49 libLLVMTransformObjCARC \ 50 libLLVMVectorize \ 51 libLLVMScalarOpts \ 52 libLLVMPasses \ 53 libLLVMAnalysis \ 54 libLLVMipo \ 55 libLLVMipa \ 56 libLLVMInstCombine \ 57 libLLVMTransformUtils \ 58 libLLVMTarget \ 59 libLLVMMC \ 60 libLLVMMCParser \ 61 libLLVMObject \ 62 libLLVMProfileData \ 63 libLLVMCore \ 64 libLLVMAsmParser \ 65 libLLVMOption \ 66 libLLVMSupport \ 67 libLLVMMCDisassembler \ 68 69include $(CLEAR_VARS) 70 71LOCAL_MODULE := opt 72LOCAL_MODULE_TAGS := optional 73LOCAL_MODULE_CLASS := EXECUTABLES 74LOCAL_IS_HOST_MODULE := true 75 76LOCAL_SRC_FILES := $(llvm_opt_SRC_FILES) 77LOCAL_STATIC_LIBRARIES := $(llvm_opt_STATIC_LIBRARIES) 78LOCAL_LDLIBS += -lpthread -lm -ldl 79ifeq ($(HOST_OS),darwin) 80LOCAL_LDFLAGS += -Wl,-export_dynamic 81else 82LOCAL_LDFLAGS += -Wl,--export-dynamic 83endif 84 85include $(LLVM_ROOT_PATH)/llvm.mk 86include $(LLVM_HOST_BUILD_MK) 87include $(LLVM_GEN_INTRINSICS_MK) 88include $(BUILD_HOST_EXECUTABLE) 89 90 91include $(CLEAR_VARS) 92 93LOCAL_MODULE := opt 94LOCAL_MODULE_TAGS := optional 95LOCAL_MODULE_CLASS := EXECUTABLES 96 97LOCAL_SRC_FILES := $(llvm_opt_SRC_FILES) 98LOCAL_STATIC_LIBRARIES := $(llvm_opt_STATIC_LIBRARIES) 99LOCAL_SHARED_LIBRARIES := libdl 100 101include $(LLVM_ROOT_PATH)/llvm.mk 102include $(LLVM_DEVICE_BUILD_MK) 103include $(LLVM_GEN_INTRINSICS_MK) 104include $(BUILD_EXECUTABLE) 105