| cc_defaults { |
| name: "llvm80-defaults", |
| defaults: ["llvm80-defaults-no-generated-headers"], |
| header_libs: ["llvm80-headers"], |
| } |
| |
| // This module defines all of the defaults used to compiled llvm, except for |
| // the generated headers. It is necessary to avoid a circular dependency |
| // from the tblgen tool used to generate the headers to the generated headers. |
| llvm_defaults { |
| name: "llvm80-defaults-no-generated-headers", |
| |
| host_supported: true, |
| clang: true, |
| |
| cflags: [ |
| "-D_GNU_SOURCE", |
| "-D__STDC_LIMIT_MACROS", |
| "-D__STDC_CONSTANT_MACROS", |
| "-D__STDC_FORMAT_MACROS", |
| "-fomit-frame-pointer", |
| "-Wall", |
| "-W", |
| "-Wno-sign-compare", |
| "-Wno-unused-parameter", |
| "-Wno-maybe-uninitialized", |
| "-Wno-missing-field-initializers", |
| "-Wwrite-strings", |
| "-Werror", |
| "-Dsprintf=sprintf", |
| ], |
| |
| cppflags: [ |
| "-Wno-sign-promo", |
| "-std=c++11", |
| ], |
| |
| clang_cflags: [ |
| // Temporarily suppress the warnings http://b/37867503 |
| "-Wno-error=unused-lambda-capture", |
| "-Wno-error=user-defined-warnings", |
| ], |
| |
| header_libs: ["llvm80-headers-no-generated-headers"], |
| |
| target: { |
| android: { |
| cflags: [ |
| "-finline-functions", |
| ], |
| cppflags: [ |
| "-Woverloaded-virtual", |
| ], |
| }, |
| host: { |
| cppflags: [ |
| "-fno-rtti", |
| "-fno-exceptions", |
| ], |
| }, |
| windows: { |
| // Disable certain warnings for use with mingw. |
| // We also must undefine WIN32_LEAN_AND_MEAN, since it is being passed globally |
| // on the command line, and LLVM defines this internally itself. |
| cflags: [ |
| "-Wno-array-bounds", |
| "-Wno-comment", |
| "-UWIN32_LEAN_AND_MEAN", |
| ], |
| |
| host_ldlibs: ["-luuid"], |
| }, |
| linux: { |
| cppflags: ["-Woverloaded-virtual"], |
| |
| // Add on ncurses to have support for terminfo |
| host_ldlibs: [ |
| "-ldl", |
| "-lncurses", |
| "-lgcc_s", |
| ], |
| }, |
| darwin: { |
| cppflags: [ |
| "-Wno-deprecated-declarations", |
| "-Woverloaded-virtual", |
| ], |
| |
| // Add on ncurses to have support for terminfo |
| host_ldlibs: [ |
| "-ldl", |
| "-lncurses", |
| ], |
| }, |
| }, |
| } |
| |
| cc_library_headers { |
| name: "llvm80-headers-no-generated-headers", |
| vendor_available: true, |
| host_supported: true, |
| export_include_dirs: ["include"], |
| target: { |
| android: { |
| export_include_dirs: ["device/include"], |
| }, |
| host: { |
| export_include_dirs: ["host/include"], |
| }, |
| linux_bionic: { |
| enabled: true, |
| }, |
| windows: { |
| enabled: true, |
| }, |
| }, |
| } |
| |
| cc_library_headers { |
| name: "llvm80-headers", |
| vendor_available: true, |
| host_supported: true, |
| header_libs: ["llvm80-headers-no-generated-headers"], |
| export_header_lib_headers: ["llvm80-headers-no-generated-headers"], |
| generated_headers: [ |
| "llvm80-gen-attributes", |
| "llvm80-gen-intrinsics", |
| "llvm80-gen-revision", |
| ], |
| export_generated_headers: [ |
| "llvm80-gen-attributes", |
| "llvm80-gen-intrinsics", |
| "llvm80-gen-revision", |
| ], |
| target: { |
| windows: { |
| enabled: true, |
| }, |
| }, |
| } |
| |
| llvm80_tblgen { |
| name: "llvm80-gen-attributes", |
| in: "include/llvm/IR/Attributes.td", |
| outs: ["llvm/IR/Attributes.inc"], |
| } |
| |
| llvm80_tblgen { |
| name: "llvm80-gen-intrinsics", |
| in: "include/llvm/IR/Intrinsics.td", |
| outs: [ |
| "llvm/IR/IntrinsicEnums.inc", |
| "llvm/IR/IntrinsicImpl.inc", |
| ], |
| } |
| |
| genrule { |
| name: "llvm80-gen-revision", |
| out: ["llvm/Support/VCSRevision.h"], |
| srcs: [".git/logs/HEAD*"], |
| tool_files: ["git_sha1_gen.py"], |
| cmd: "python $(location git_sha1_gen.py) --output $(out)", |
| } |
| |
| force_build_llvm80_components_defaults { |
| name: "force_build_llvm80_components", |
| // Host build disabled by soong/llvm.go unless FORCE_BUILD_LLVM_COMPONENTS |
| // environment variable is set |
| } |
| |
| // LLVM shared library build |
| |
| llvm_arm_static_libraries = [ |
| "libLLVM80ARMCodeGen", |
| "libLLVM80ARMAsmParser", |
| "libLLVM80ARMAsmPrinter", |
| "libLLVM80ARMInfo", |
| "libLLVM80ARMDesc", |
| "libLLVM80ARMDisassembler", |
| "libLLVM80ARMUtils", |
| ] |
| |
| llvm_x86_static_libraries = [ |
| "libLLVM80X86CodeGen", |
| "libLLVM80X86Info", |
| "libLLVM80X86Desc", |
| "libLLVM80X86AsmParser", |
| "libLLVM80X86AsmPrinter", |
| "libLLVM80X86Utils", |
| "libLLVM80X86Disassembler", |
| ] |
| |
| llvm_mips_static_libraries = [ |
| "libLLVM80MipsCodeGen", |
| "libLLVM80MipsInfo", |
| "libLLVM80MipsDesc", |
| "libLLVM80MipsAsmParser", |
| "libLLVM80MipsAsmPrinter", |
| "libLLVM80MipsDisassembler", |
| ] |
| |
| llvm_aarch64_static_libraries = [ |
| "libLLVM80AArch64CodeGen", |
| "libLLVM80AArch64Info", |
| "libLLVM80AArch64Desc", |
| "libLLVM80AArch64AsmParser", |
| "libLLVM80AArch64AsmPrinter", |
| "libLLVM80AArch64Utils", |
| "libLLVM80AArch64Disassembler", |
| ] |
| |
| llvm_amdgpu_static_libraries = [ |
| "libLLVM80AMDGPUCodeGen", |
| "libLLVM80AMDGPUInfo", |
| "libLLVM80AMDGPUDesc", |
| "libLLVM80AMDGPUAsmParser", |
| "libLLVM80AMDGPUAsmPrinter", |
| "libLLVM80AMDGPUUtils", |
| "libLLVM80AMDGPUDisassembler", |
| ] |
| |
| |
| cc_library_shared { |
| host_supported: true, |
| name: "libLLVM80", |
| defaults: [ |
| "llvm80-defaults", |
| "force_build_llvm80_components", |
| ], |
| |
| whole_static_libs: [ |
| // pre static libraries |
| "libLLVM80Linker", |
| "libLLVM80ipo", |
| "libLLVM80DebugInfoDWARF", |
| "libLLVM80DebugInfoMSF", |
| "libLLVM80DebugInfoPDB", |
| "libLLVM80Symbolize", |
| "libLLVM80IRReader", |
| "libLLVM80BitWriter", |
| "libLLVM80BitReader", |
| "libLLVM80Passes", |
| "libLLVM80Demangle", |
| |
| // post static libraries |
| "libLLVM80LTO", |
| "libLLVM80AsmPrinter", |
| "libLLVM80SelectionDAG", |
| "libLLVM80CodeGen", |
| "libLLVM80DebugInfoCodeView", |
| "libLLVM80Object", |
| "libLLVM80ScalarOpts", |
| "libLLVM80AggressiveInstCombine", |
| "libLLVM80InstCombine", |
| "libLLVM80Instrumentation", |
| "libLLVM80TransformObjCARC", |
| "libLLVM80TransformUtils", |
| "libLLVM80Analysis", |
| "libLLVM80Target", |
| "libLLVM80GlobalISel", |
| "libLLVM80MCDisassembler", |
| "libLLVM80MC", |
| "libLLVM80MCParser", |
| "libLLVM80Core", |
| "libLLVM80AsmParser", |
| "libLLVM80Option", |
| "libLLVM80Support", |
| "libLLVM80Vectorize", |
| "libLLVM80ProfileData", |
| "libLLVM80ProfileDataCoverage", |
| "libLLVM80LibDriver", |
| "libLLVM80ExecutionEngine", |
| "libLLVM80RuntimeDyld", |
| "libLLVM80MCJIT", |
| "libLLVM80OrcJIT", |
| "libLLVM80BinaryFormat", |
| "libLLVM80Coroutines", |
| ], |
| |
| export_include_dirs: ["include"], |
| |
| target: { |
| host: { |
| // Host build pulls in all ARM, Mips, X86 components. |
| whole_static_libs: llvm_arm_static_libraries + |
| llvm_aarch64_static_libraries + |
| llvm_mips_static_libraries + |
| llvm_x86_static_libraries, |
| export_include_dirs: ["host/include"], |
| }, |
| windows: { |
| enabled: true, |
| host_ldlibs: [ |
| "-limagehlp", |
| "-lpsapi", |
| "-lole32", |
| "-lversion", |
| ], |
| }, |
| darwin: { |
| host_ldlibs: [ |
| "-ldl", |
| "-lpthread", |
| ], |
| }, |
| linux: { |
| host_ldlibs: [ |
| "-ldl", |
| "-lpthread", |
| ], |
| }, |
| android: { |
| export_include_dirs: ["device/include"], |
| whole_static_libs: llvm_amdgpu_static_libraries, |
| }, |
| android_arm: { |
| whole_static_libs: llvm_arm_static_libraries, |
| }, |
| android_x86: { |
| whole_static_libs: llvm_x86_static_libraries + |
| llvm_arm_static_libraries + |
| llvm_aarch64_static_libraries, |
| }, |
| android_x86_64: { |
| whole_static_libs: llvm_x86_static_libraries + |
| llvm_arm_static_libraries + |
| llvm_aarch64_static_libraries, |
| }, |
| android_mips: { |
| whole_static_libs: llvm_mips_static_libraries, |
| }, |
| android_mips64: { |
| whole_static_libs: llvm_mips_static_libraries, |
| }, |
| android_arm64: { |
| whole_static_libs: llvm_aarch64_static_libraries + |
| llvm_arm_static_libraries, |
| }, |
| }, |
| } |
| |
| subdirs = [ |
| "soong", |
| "lib", |
| "utils/TableGen", |
| ] |