Stephen Hines | 7de4ee9 | 2013-02-27 21:49:16 -0800 | [diff] [blame] | 1 | LOCAL_PATH:= $(call my-dir) |
| 2 | |
| 3 | llvm_pre_static_libraries := \ |
| 4 | libLLVMLinker \ |
| 5 | libLLVMipo \ |
Stephen Hines | ebe69fe | 2015-03-23 12:10:34 -0700 | [diff] [blame] | 6 | libLLVMDebugInfoDWARF \ |
| 7 | libLLVMDebugInfoPDB \ |
Stephen Hines | 9dbeb69 | 2013-05-03 13:11:35 -0700 | [diff] [blame] | 8 | libLLVMIRReader \ |
Stephen Hines | 7de4ee9 | 2013-02-27 21:49:16 -0800 | [diff] [blame] | 9 | libLLVMBitWriter \ |
| 10 | libLLVMBitReader |
| 11 | |
| 12 | llvm_arm_static_libraries := \ |
| 13 | libLLVMARMCodeGen \ |
| 14 | libLLVMARMAsmParser \ |
| 15 | libLLVMARMAsmPrinter \ |
| 16 | libLLVMARMInfo \ |
Stephen Hines | 227a4a4 | 2013-02-28 22:26:45 -0800 | [diff] [blame] | 17 | libLLVMARMDesc \ |
| 18 | libLLVMARMDisassembler |
Stephen Hines | 7de4ee9 | 2013-02-27 21:49:16 -0800 | [diff] [blame] | 19 | |
| 20 | llvm_x86_static_libraries := \ |
| 21 | libLLVMX86CodeGen \ |
| 22 | libLLVMX86Info \ |
| 23 | libLLVMX86Desc \ |
| 24 | libLLVMX86AsmParser \ |
| 25 | libLLVMX86AsmPrinter \ |
Stephen Hines | 227a4a4 | 2013-02-28 22:26:45 -0800 | [diff] [blame] | 26 | libLLVMX86Utils \ |
| 27 | libLLVMX86Disassembler |
Stephen Hines | 7de4ee9 | 2013-02-27 21:49:16 -0800 | [diff] [blame] | 28 | |
| 29 | llvm_mips_static_libraries := \ |
| 30 | libLLVMMipsCodeGen \ |
| 31 | libLLVMMipsInfo \ |
| 32 | libLLVMMipsDesc \ |
| 33 | libLLVMMipsAsmParser \ |
Stephen Hines | 227a4a4 | 2013-02-28 22:26:45 -0800 | [diff] [blame] | 34 | libLLVMMipsAsmPrinter \ |
| 35 | libLLVMMipsDisassembler |
Stephen Hines | 7de4ee9 | 2013-02-27 21:49:16 -0800 | [diff] [blame] | 36 | |
Chris Wailes | 7cfe7b8 | 2014-06-04 15:16:35 -0700 | [diff] [blame] | 37 | llvm_aarch64_static_libraries := \ |
| 38 | libLLVMAArch64CodeGen \ |
| 39 | libLLVMAArch64Info \ |
| 40 | libLLVMAArch64Desc \ |
| 41 | libLLVMAArch64AsmParser \ |
| 42 | libLLVMAArch64AsmPrinter \ |
| 43 | libLLVMAArch64Utils \ |
| 44 | libLLVMAArch64Disassembler |
Tim Murray | 8aa5ce8 | 2014-03-07 13:15:57 -0800 | [diff] [blame] | 45 | |
Stephen Hines | 7de4ee9 | 2013-02-27 21:49:16 -0800 | [diff] [blame] | 46 | llvm_post_static_libraries := \ |
| 47 | libLLVMAsmPrinter \ |
| 48 | libLLVMSelectionDAG \ |
| 49 | libLLVMCodeGen \ |
Stephen Hines | b497f3f | 2013-03-25 00:08:26 -0700 | [diff] [blame] | 50 | libLLVMObject \ |
Stephen Hines | 7de4ee9 | 2013-02-27 21:49:16 -0800 | [diff] [blame] | 51 | libLLVMScalarOpts \ |
| 52 | libLLVMInstCombine \ |
| 53 | libLLVMInstrumentation \ |
Stephen Hines | 2123c1c | 2013-03-05 23:29:52 -0800 | [diff] [blame] | 54 | libLLVMTransformObjCARC \ |
Stephen Hines | 7de4ee9 | 2013-02-27 21:49:16 -0800 | [diff] [blame] | 55 | libLLVMTransformUtils \ |
| 56 | libLLVMipa \ |
| 57 | libLLVMAnalysis \ |
| 58 | libLLVMTarget \ |
Stephen Hines | 37ed9c1 | 2014-12-01 14:51:49 -0800 | [diff] [blame] | 59 | libLLVMMCDisassembler \ |
Stephen Hines | 7de4ee9 | 2013-02-27 21:49:16 -0800 | [diff] [blame] | 60 | libLLVMMC \ |
| 61 | libLLVMMCParser \ |
| 62 | libLLVMCore \ |
Stephen Hines | 7de4ee9 | 2013-02-27 21:49:16 -0800 | [diff] [blame] | 63 | libLLVMAsmParser \ |
Stephen Hines | ead8d02 | 2013-08-07 19:25:16 -0700 | [diff] [blame] | 64 | libLLVMOption \ |
Stephen Hines | 7de4ee9 | 2013-02-27 21:49:16 -0800 | [diff] [blame] | 65 | libLLVMSupport \ |
Stephen Hines | dce4a40 | 2014-05-29 02:49:00 -0700 | [diff] [blame] | 66 | libLLVMVectorize \ |
Tong Shen | 07711a9 | 2014-09-19 11:59:15 -0700 | [diff] [blame] | 67 | libLLVMProfileData |
Stephen Hines | 7de4ee9 | 2013-02-27 21:49:16 -0800 | [diff] [blame] | 68 | |
Todd Fiala | ba309b0 | 2013-10-18 15:22:40 -0700 | [diff] [blame] | 69 | llvm_host_static_libraries := \ |
| 70 | libLLVMExecutionEngine \ |
Todd Fiala | ba309b0 | 2013-10-18 15:22:40 -0700 | [diff] [blame] | 71 | libLLVMRuntimeDyld \ |
Stephen Hines | ebe69fe | 2015-03-23 12:10:34 -0700 | [diff] [blame] | 72 | libLLVMMCJIT \ |
| 73 | libLLVMOrcJIT |
Todd Fiala | ba309b0 | 2013-10-18 15:22:40 -0700 | [diff] [blame] | 74 | |
Stephen Hines | 5ed5257 | 2013-09-06 16:55:14 -0700 | [diff] [blame] | 75 | ifeq (true,$(FORCE_BUILD_LLVM_COMPONENTS)) |
Stephen Hines | 7de4ee9 | 2013-02-27 21:49:16 -0800 | [diff] [blame] | 76 | # HOST LLVM shared library build |
| 77 | include $(CLEAR_VARS) |
| 78 | LOCAL_IS_HOST_MODULE := true |
| 79 | |
| 80 | LOCAL_MODULE:= libLLVM |
| 81 | |
| 82 | LOCAL_MODULE_TAGS := optional |
| 83 | |
| 84 | # Host build pulls in all ARM, Mips, X86 components. |
| 85 | LOCAL_WHOLE_STATIC_LIBRARIES := \ |
| 86 | $(llvm_pre_static_libraries) \ |
| 87 | $(llvm_arm_static_libraries) \ |
| 88 | $(llvm_x86_static_libraries) \ |
| 89 | $(llvm_mips_static_libraries) \ |
Chris Wailes | 7cfe7b8 | 2014-06-04 15:16:35 -0700 | [diff] [blame] | 90 | $(llvm_aarch64_static_libraries) \ |
Todd Fiala | ba309b0 | 2013-10-18 15:22:40 -0700 | [diff] [blame] | 91 | $(llvm_host_static_libraries) \ |
Stephen Hines | 7de4ee9 | 2013-02-27 21:49:16 -0800 | [diff] [blame] | 92 | $(llvm_post_static_libraries) |
| 93 | |
| 94 | ifeq ($(HOST_OS),windows) |
| 95 | LOCAL_LDLIBS := -limagehlp -lpsapi |
| 96 | else |
| 97 | LOCAL_LDLIBS := -ldl -lpthread |
| 98 | endif |
| 99 | |
| 100 | include $(LLVM_HOST_BUILD_MK) |
| 101 | include $(BUILD_HOST_SHARED_LIBRARY) |
Stephen Hines | 5ed5257 | 2013-09-06 16:55:14 -0700 | [diff] [blame] | 102 | endif |
Stephen Hines | 7de4ee9 | 2013-02-27 21:49:16 -0800 | [diff] [blame] | 103 | |
Colin Cross | b7325c3 | 2014-02-04 16:26:26 -0800 | [diff] [blame] | 104 | ifeq (,$(filter $(TARGET_ARCH),$(LLVM_SUPPORTED_ARCH))) |
| 105 | $(warning TODO $(TARGET_ARCH): Enable llvm build) |
| 106 | endif |
| 107 | |
Stephen Hines | 36b5688 | 2014-04-23 16:57:46 -0700 | [diff] [blame] | 108 | ifneq (true,$(DISABLE_LLVM_DEVICE_BUILDS)) |
Stephen Hines | 7de4ee9 | 2013-02-27 21:49:16 -0800 | [diff] [blame] | 109 | # DEVICE LLVM shared library build |
| 110 | include $(CLEAR_VARS) |
| 111 | |
| 112 | LOCAL_MODULE:= libLLVM |
| 113 | |
| 114 | LOCAL_MODULE_TAGS := optional |
| 115 | |
| 116 | # Device build selectively pulls in ARM, Mips, X86 components. |
| 117 | LOCAL_WHOLE_STATIC_LIBRARIES := \ |
| 118 | $(llvm_pre_static_libraries) |
| 119 | |
Colin Cross | b7325c3 | 2014-02-04 16:26:26 -0800 | [diff] [blame] | 120 | LOCAL_WHOLE_STATIC_LIBRARIES_arm += $(llvm_arm_static_libraries) |
| 121 | LOCAL_WHOLE_STATIC_LIBRARIES_x86 += $(llvm_x86_static_libraries) |
| 122 | LOCAL_WHOLE_STATIC_LIBRARIES_x86_64 += $(llvm_x86_static_libraries) |
| 123 | LOCAL_WHOLE_STATIC_LIBRARIES_mips += $(llvm_mips_static_libraries) |
Duane Sand | 10c02dd | 2014-06-04 13:07:53 -0700 | [diff] [blame] | 124 | LOCAL_WHOLE_STATIC_LIBRARIES_mips64 += $(llvm_mips_static_libraries) |
Colin Cross | efe6bad | 2014-06-04 18:30:13 -0700 | [diff] [blame] | 125 | LOCAL_WHOLE_STATIC_LIBRARIES_arm64 += $(llvm_aarch64_static_libraries) |
| 126 | LOCAL_WHOLE_STATIC_LIBRARIES_arm64 += $(llvm_arm_static_libraries) |
Stephen Hines | 7de4ee9 | 2013-02-27 21:49:16 -0800 | [diff] [blame] | 127 | |
Tim Murray | b86aaa7 | 2014-10-15 14:05:57 -0700 | [diff] [blame] | 128 | ifeq ($(BUILD_ARM_FOR_X86),true) |
| 129 | LOCAL_WHOLE_STATIC_LIBRARIES_x86 += $(llvm_arm_static_libraries) |
| 130 | LOCAL_WHOLE_STATIC_LIBRARIES_x86_64 += $(llvm_arm_static_libraries) |
| 131 | endif |
| 132 | |
Stephen Hines | 7de4ee9 | 2013-02-27 21:49:16 -0800 | [diff] [blame] | 133 | LOCAL_WHOLE_STATIC_LIBRARIES += $(llvm_post_static_libraries) |
| 134 | |
| 135 | #LOCAL_LDLIBS := -ldl -lpthread |
Stephen Hines | 36b5688 | 2014-04-23 16:57:46 -0700 | [diff] [blame] | 136 | LOCAL_SHARED_LIBRARIES := libcutils libdl libc++ |
Stephen Hines | 7de4ee9 | 2013-02-27 21:49:16 -0800 | [diff] [blame] | 137 | |
| 138 | include $(LLVM_DEVICE_BUILD_MK) |
| 139 | include $(BUILD_SHARED_LIBRARY) |
Tim Murray | d2ba544 | 2013-03-06 10:12:07 -0800 | [diff] [blame] | 140 | |
Stephen Hines | 36b5688 | 2014-04-23 16:57:46 -0700 | [diff] [blame] | 141 | endif |