Home | History | Annotate | Download | only in llvm
      1 # Don't build the library in unbundled branches.
      2 ifeq (,$(TARGET_BUILD_APPS))
      3 
      4 LOCAL_PATH:= $(call my-dir)
      5 
      6 llvm_pre_static_libraries := \
      7   libLLVMLinker \
      8   libLLVMipo \
      9   libLLVMIRReader \
     10   libLLVMBitWriter \
     11   libLLVMBitReader
     12 
     13 llvm_arm_static_libraries := \
     14   libLLVMARMCodeGen \
     15   libLLVMARMAsmParser \
     16   libLLVMARMAsmPrinter \
     17   libLLVMARMInfo \
     18   libLLVMARMDesc \
     19   libLLVMARMDisassembler
     20 
     21 llvm_x86_static_libraries := \
     22   libLLVMX86CodeGen \
     23   libLLVMX86Info \
     24   libLLVMX86Desc \
     25   libLLVMX86AsmParser \
     26   libLLVMX86AsmPrinter \
     27   libLLVMX86Utils \
     28   libLLVMX86Disassembler
     29 
     30 llvm_mips_static_libraries := \
     31   libLLVMMipsCodeGen \
     32   libLLVMMipsInfo \
     33   libLLVMMipsDesc \
     34   libLLVMMipsAsmParser \
     35   libLLVMMipsAsmPrinter \
     36   libLLVMMipsDisassembler
     37 
     38 llvm_post_static_libraries := \
     39   libLLVMAsmPrinter \
     40   libLLVMSelectionDAG \
     41   libLLVMCodeGen \
     42   libLLVMObject \
     43   libLLVMScalarOpts \
     44   libLLVMInstCombine \
     45   libLLVMInstrumentation \
     46   libLLVMTransformObjCARC \
     47   libLLVMTransformUtils \
     48   libLLVMipa \
     49   libLLVMAnalysis \
     50   libLLVMTarget \
     51   libLLVMMC \
     52   libLLVMMCParser \
     53   libLLVMCore \
     54   libLLVMAsmParser \
     55   libLLVMOption \
     56   libLLVMSupport \
     57   libLLVMVectorize
     58 
     59 # HOST LLVM shared library build
     60 include $(CLEAR_VARS)
     61 LOCAL_IS_HOST_MODULE := true
     62 
     63 LOCAL_MODULE:= libLLVM
     64 
     65 LOCAL_MODULE_TAGS := optional
     66 
     67 # Host build pulls in all ARM, Mips, X86 components.
     68 LOCAL_WHOLE_STATIC_LIBRARIES := \
     69   $(llvm_pre_static_libraries) \
     70   $(llvm_arm_static_libraries) \
     71   $(llvm_x86_static_libraries) \
     72   $(llvm_mips_static_libraries) \
     73   $(llvm_post_static_libraries)
     74 
     75 ifeq ($(HOST_OS),windows)
     76   LOCAL_LDLIBS := -limagehlp -lpsapi
     77 else
     78   LOCAL_LDLIBS := -ldl -lpthread
     79 endif
     80 
     81 include $(LLVM_HOST_BUILD_MK)
     82 include $(BUILD_HOST_SHARED_LIBRARY)
     83 
     84 
     85 # DEVICE LLVM shared library build
     86 include $(CLEAR_VARS)
     87 
     88 LOCAL_MODULE:= libLLVM
     89 
     90 LOCAL_MODULE_TAGS := optional
     91 
     92 # Device build selectively pulls in ARM, Mips, X86 components.
     93 LOCAL_WHOLE_STATIC_LIBRARIES := \
     94   $(llvm_pre_static_libraries)
     95 
     96 ifeq ($(TARGET_ARCH),arm)
     97   LOCAL_WHOLE_STATIC_LIBRARIES += $(llvm_arm_static_libraries)
     98 else
     99   ifeq ($(TARGET_ARCH),x86)
    100     LOCAL_WHOLE_STATIC_LIBRARIES += $(llvm_x86_static_libraries)
    101   else
    102     ifeq ($(TARGET_ARCH),mips)
    103       LOCAL_WHOLE_STATIC_LIBRARIES += $(llvm_mips_static_libraries)
    104     else
    105       $(error Unsupported architecture $(TARGET_ARCH))
    106     endif
    107   endif
    108 endif
    109 
    110 LOCAL_WHOLE_STATIC_LIBRARIES += $(llvm_post_static_libraries)
    111 
    112 #LOCAL_LDLIBS := -ldl -lpthread
    113 LOCAL_SHARED_LIBRARIES := libcutils libdl libstlport
    114 
    115 include $(LLVM_DEVICE_BUILD_MK)
    116 include $(BUILD_SHARED_LIBRARY)
    117 
    118 endif # don't build in unbundled branches
    119