1 LOCAL_PATH:= $(call my-dir) 2 3 # For the host only 4 # ===================================================== 5 include $(CLEAR_VARS) 6 include $(CLEAR_TBLGEN_VARS) 7 8 LOCAL_MODULE := clang 9 10 LOCAL_MODULE_CLASS := EXECUTABLES 11 12 TBLGEN_TABLES := \ 13 DiagnosticCommonKinds.inc \ 14 DiagnosticDriverKinds.inc \ 15 DiagnosticFrontendKinds.inc \ 16 CC1Options.inc \ 17 CC1AsOptions.inc 18 19 clang_SRC_FILES := \ 20 cc1_main.cpp \ 21 cc1as_main.cpp \ 22 driver.cpp 23 24 LOCAL_SRC_FILES := $(clang_SRC_FILES) 25 26 LOCAL_STATIC_LIBRARIES := \ 27 libclangFrontendTool \ 28 libclangFrontend \ 29 libclangARCMigrate \ 30 libclangDriver \ 31 libclangSerialization \ 32 libclangCodeGen \ 33 libclangRewriteFrontend \ 34 libclangRewriteCore \ 35 libclangParse \ 36 libclangSema \ 37 libclangStaticAnalyzerFrontend \ 38 libclangStaticAnalyzerCheckers \ 39 libclangStaticAnalyzerCore \ 40 libclangAnalysis \ 41 libclangEdit \ 42 libclangAST \ 43 libclangLex \ 44 libclangBasic \ 45 libLLVMARMAsmParser \ 46 libLLVMARMCodeGen \ 47 libLLVMARMAsmPrinter \ 48 libLLVMARMDisassembler \ 49 libLLVMARMDesc \ 50 libLLVMARMInfo \ 51 libLLVMMipsAsmParser \ 52 libLLVMMipsCodeGen \ 53 libLLVMMipsDisassembler \ 54 libLLVMMipsAsmPrinter \ 55 libLLVMMipsDesc \ 56 libLLVMMipsInfo \ 57 libLLVMX86Info \ 58 libLLVMX86AsmParser \ 59 libLLVMX86CodeGen \ 60 libLLVMX86Disassembler \ 61 libLLVMX86Desc \ 62 libLLVMX86AsmPrinter \ 63 libLLVMX86Utils \ 64 libLLVMIRReader \ 65 libLLVMAsmParser \ 66 libLLVMAsmPrinter \ 67 libLLVMBitReader \ 68 libLLVMBitWriter \ 69 libLLVMSelectionDAG \ 70 libLLVMipo \ 71 libLLVMipa \ 72 libLLVMInstCombine \ 73 libLLVMInstrumentation \ 74 libLLVMCodeGen \ 75 libLLVMObject \ 76 libLLVMLinker \ 77 libLLVMMC \ 78 libLLVMMCParser \ 79 libLLVMScalarOpts \ 80 libLLVMTransformObjCARC \ 81 libLLVMTransformUtils \ 82 libLLVMVectorize \ 83 libLLVMAnalysis \ 84 libLLVMCore \ 85 libLLVMOption \ 86 libLLVMSupport \ 87 libLLVMTarget 88 89 LOCAL_LDLIBS += -lm 90 ifdef USE_MINGW 91 LOCAL_LDLIBS += -limagehlp 92 else 93 LOCAL_LDLIBS += -lpthread -ldl 94 endif 95 96 include $(CLANG_HOST_BUILD_MK) 97 include $(CLANG_TBLGEN_RULES_MK) 98 include $(BUILD_HOST_EXECUTABLE) 99 100 # Make sure if clang (i.e. $(LOCAL_MODULE)) get installed, 101 # clang++ will get installed as well. 102 ALL_MODULES.$(LOCAL_MODULE).INSTALLED := \ 103 $(ALL_MODULES.$(LOCAL_MODULE).INSTALLED) $(CLANG_CXX) 104 # the additional dependency is needed when you run mm/mmm. 105 $(LOCAL_MODULE) : $(CLANG_CXX) 106 107 # Symlink for clang++ 108 $(CLANG_CXX) : $(LOCAL_INSTALLED_MODULE) 109 @echo "Symlink $@ -> $<" 110 $(hide) ln -sf $(notdir $<) $@ 111