OSDN Git Service

android: add soong building rules
authorMauro Rossi <issor.oruam@gmail.com>
Sat, 25 Aug 2018 10:44:44 +0000 (12:44 +0200)
committerMauro Rossi <issor.oruam@gmail.com>
Sat, 8 Sep 2018 07:29:41 +0000 (09:29 +0200)
Android.bp and building rules including Android specific .go files
are imported from oreo-x86 llvm 3.9 branch to the release_70 branch

cd ~/oreo-x86_kernel/external
git clone https://github.com/llvm-mirror/llvm llvm70
cd ~/oreo-x86_kernel/external/llvm70
git reset --hard
git fetch llvm-mirror release_70
git checkout FETCH_HEAD
git clean -dxf

cd ~/oreo-x86_kernel/external/llvm
find . -name 'Android.bp' -exec cp -v --parents {} ~/oreo-x86_kernel/external/llvm70 \;
find . -name 'Android.bp' -exec git -C /home/utente/oreo-x86_kernel/external/llvm70 add {} \;

find . -name 'llvm.go' -exec cp -v --parents {} ~/oreo-x86_kernel/external/llvm70 \;
find . -name 'llvm.go' -exec git -C /home/utente/oreo-x86_kernel/external/llvm70 add {} \;

find . -name 'tblgen.go' -exec cp -v --parents {} ~/oreo-x86_kernel/external/llvm70 \;
find . -name 'tblgen.go' -exec git -C /home/utente/oreo-x86_kernel/external/llvm70 add {} \;

find . -name 'android_test.sh' -exec cp -v --parents {} ~/oreo-x86_kernel/external/llvm70 \;
find . -name 'android_test.sh' -exec git -C /home/utente/oreo-x86_kernel/external/llvm70 add {} \;

find . -name 'AsmParsers.def' -exec cp -v --parents {} ~/oreo-x86_kernel/external/llvm70 \;
find . -name 'AsmParsers.def' -exec git -C /home/utente/oreo-x86_kernel/external/llvm70 add {} \;

find . -name 'AsmPrinters.def' -exec cp -v --parents {} ~/oreo-x86_kernel/external/llvm70 \;
find . -name 'AsmPrinters.def' -exec git -C /home/utente/oreo-x86_kernel/external/llvm70 add {} \;

find . -name 'Disassemblers.def' -exec cp -v --parents {} ~/oreo-x86_kernel/external/llvm70 \;
find . -name 'Disassemblers.def' -exec git -C /home/utente/oreo-x86_kernel/external/llvm70 add {} \;

find . -name 'Targets.def' -exec cp -v --parents {} ~/oreo-x86_kernel/external/llvm70 \;
find . -name 'Targets.def' -exec git -C /home/utente/oreo-x86_kernel/external/llvm70 add {} \;

find . -name 'config.h' -exec cp -v --parents {} ~/oreo-x86_kernel/external/llvm70 \;
find . -name 'config.h' -exec git -C /home/utente/oreo-x86_kernel/external/llvm70 add {} \;

find . -name 'llvm-config.h' -exec cp -v --parents {} ~/oreo-x86_kernel/external/llvm70 \;
find . -name 'llvm-config.h' -exec git -C /home/utente/oreo-x86_kernel/external/llvm70 add {} \;

cd ~/oreo-x86_kernel/external/llvm70

141 files changed:
Android.bp [new file with mode: 0644]
android_test.sh [new file with mode: 0755]
device/include/llvm/Config/AsmParsers.def [new file with mode: 0755]
device/include/llvm/Config/AsmPrinters.def [new file with mode: 0755]
device/include/llvm/Config/Disassemblers.def [new file with mode: 0755]
device/include/llvm/Config/Targets.def [new file with mode: 0755]
device/include/llvm/Config/config.h [new file with mode: 0644]
device/include/llvm/Config/llvm-config.h [new file with mode: 0644]
host/include/llvm/Config/AsmParsers.def [new file with mode: 0644]
host/include/llvm/Config/AsmPrinters.def [new file with mode: 0644]
host/include/llvm/Config/Disassemblers.def [new file with mode: 0644]
host/include/llvm/Config/Targets.def [new file with mode: 0644]
host/include/llvm/Config/config.h [new file with mode: 0644]
host/include/llvm/Config/llvm-config.h [new file with mode: 0644]
lib/Analysis/Android.bp [new file with mode: 0644]
lib/Android.bp [new file with mode: 0644]
lib/AsmParser/Android.bp [new file with mode: 0644]
lib/Bitcode/Android.bp [new file with mode: 0644]
lib/Bitcode/Reader/Android.bp [new file with mode: 0644]
lib/Bitcode/Writer/Android.bp [new file with mode: 0644]
lib/CodeGen/Android.bp [new file with mode: 0644]
lib/CodeGen/AsmPrinter/Android.bp [new file with mode: 0644]
lib/CodeGen/GlobalISel/Android.bp [new file with mode: 0644]
lib/CodeGen/MIRParser/Android.bp [new file with mode: 0644]
lib/CodeGen/SelectionDAG/Android.bp [new file with mode: 0644]
lib/DebugInfo/Android.bp [new file with mode: 0644]
lib/DebugInfo/CodeView/Android.bp [new file with mode: 0644]
lib/DebugInfo/DWARF/Android.bp [new file with mode: 0644]
lib/DebugInfo/PDB/Android.bp [new file with mode: 0644]
lib/DebugInfo/Symbolize/Android.bp [new file with mode: 0644]
lib/ExecutionEngine/Android.bp [new file with mode: 0644]
lib/ExecutionEngine/Interpreter/Android.bp [new file with mode: 0644]
lib/ExecutionEngine/MCJIT/Android.bp [new file with mode: 0644]
lib/ExecutionEngine/Orc/Android.bp [new file with mode: 0644]
lib/ExecutionEngine/RuntimeDyld/Android.bp [new file with mode: 0644]
lib/Fuzzer/Android.bp [new file with mode: 0644]
lib/IR/Android.bp [new file with mode: 0644]
lib/IRReader/Android.bp [new file with mode: 0644]
lib/LTO/Android.bp [new file with mode: 0644]
lib/LibDriver/Android.bp [new file with mode: 0644]
lib/Linker/Android.bp [new file with mode: 0644]
lib/MC/Android.bp [new file with mode: 0644]
lib/MC/MCDisassembler/Android.bp [new file with mode: 0644]
lib/MC/MCParser/Android.bp [new file with mode: 0644]
lib/Object/Android.bp [new file with mode: 0644]
lib/ObjectYAML/Android.bp [new file with mode: 0644]
lib/Option/Android.bp [new file with mode: 0644]
lib/Passes/Android.bp [new file with mode: 0644]
lib/ProfileData/Android.bp [new file with mode: 0644]
lib/ProfileData/Coverage/Android.bp [new file with mode: 0644]
lib/Support/Android.bp [new file with mode: 0644]
lib/TableGen/Android.bp [new file with mode: 0644]
lib/Target/AArch64/Android.bp [new file with mode: 0644]
lib/Target/AArch64/AsmParser/Android.bp [new file with mode: 0644]
lib/Target/AArch64/Disassembler/Android.bp [new file with mode: 0644]
lib/Target/AArch64/InstPrinter/Android.bp [new file with mode: 0644]
lib/Target/AArch64/MCTargetDesc/Android.bp [new file with mode: 0644]
lib/Target/AArch64/TargetInfo/Android.bp [new file with mode: 0644]
lib/Target/AArch64/Utils/Android.bp [new file with mode: 0644]
lib/Target/AMDGPU/Android.bp [new file with mode: 0644]
lib/Target/AMDGPU/AsmParser/Android.bp [new file with mode: 0644]
lib/Target/AMDGPU/InstPrinter/Android.bp [new file with mode: 0644]
lib/Target/AMDGPU/MCTargetDesc/Android.bp [new file with mode: 0644]
lib/Target/AMDGPU/TargetInfo/Android.bp [new file with mode: 0644]
lib/Target/AMDGPU/Utils/Android.bp [new file with mode: 0644]
lib/Target/ARM/Android.bp [new file with mode: 0644]
lib/Target/ARM/AsmParser/Android.bp [new file with mode: 0644]
lib/Target/ARM/Disassembler/Android.bp [new file with mode: 0644]
lib/Target/ARM/InstPrinter/Android.bp [new file with mode: 0644]
lib/Target/ARM/MCTargetDesc/Android.bp [new file with mode: 0644]
lib/Target/ARM/TargetInfo/Android.bp [new file with mode: 0644]
lib/Target/Android.bp [new file with mode: 0644]
lib/Target/Mips/Android.bp [new file with mode: 0644]
lib/Target/Mips/AsmParser/Android.bp [new file with mode: 0644]
lib/Target/Mips/Disassembler/Android.bp [new file with mode: 0644]
lib/Target/Mips/InstPrinter/Android.bp [new file with mode: 0644]
lib/Target/Mips/MCTargetDesc/Android.bp [new file with mode: 0644]
lib/Target/Mips/TargetInfo/Android.bp [new file with mode: 0644]
lib/Target/X86/Android.bp [new file with mode: 0644]
lib/Target/X86/AsmParser/Android.bp [new file with mode: 0644]
lib/Target/X86/Disassembler/Android.bp [new file with mode: 0644]
lib/Target/X86/InstPrinter/Android.bp [new file with mode: 0644]
lib/Target/X86/MCTargetDesc/Android.bp [new file with mode: 0644]
lib/Target/X86/TargetInfo/Android.bp [new file with mode: 0644]
lib/Target/X86/Utils/Android.bp [new file with mode: 0644]
lib/Transforms/Android.bp [new file with mode: 0644]
lib/Transforms/Hello/Android.bp [new file with mode: 0644]
lib/Transforms/IPO/Android.bp [new file with mode: 0644]
lib/Transforms/InstCombine/Android.bp [new file with mode: 0644]
lib/Transforms/Instrumentation/Android.bp [new file with mode: 0644]
lib/Transforms/ObjCARC/Android.bp [new file with mode: 0644]
lib/Transforms/Scalar/Android.bp [new file with mode: 0644]
lib/Transforms/Utils/Android.bp [new file with mode: 0644]
lib/Transforms/Vectorize/Android.bp [new file with mode: 0644]
soong/Android.bp [new file with mode: 0644]
soong/llvm.go [new file with mode: 0644]
soong/tblgen.go [new file with mode: 0644]
tools/bugpoint-passes/Android.bp [new file with mode: 0644]
tools/bugpoint/Android.bp [new file with mode: 0644]
tools/dsymutil/Android.bp [new file with mode: 0644]
tools/gold/Android.bp [new file with mode: 0644]
tools/llc/Android.bp [new file with mode: 0644]
tools/lli/Android.bp [new file with mode: 0644]
tools/lli/ChildTarget/Android.bp [new file with mode: 0644]
tools/llvm-ar/Android.bp [new file with mode: 0644]
tools/llvm-as/Android.bp [new file with mode: 0644]
tools/llvm-bcanalyzer/Android.bp [new file with mode: 0644]
tools/llvm-c-test/Android.bp [new file with mode: 0644]
tools/llvm-config/Android.bp [new file with mode: 0644]
tools/llvm-cov/Android.bp [new file with mode: 0644]
tools/llvm-cxxdump/Android.bp [new file with mode: 0644]
tools/llvm-diff/Android.bp [new file with mode: 0644]
tools/llvm-dis/Android.bp [new file with mode: 0644]
tools/llvm-dwarfdump/Android.bp [new file with mode: 0644]
tools/llvm-dwp/Android.bp [new file with mode: 0644]
tools/llvm-extract/Android.bp [new file with mode: 0644]
tools/llvm-link/Android.bp [new file with mode: 0644]
tools/llvm-lto/Android.bp [new file with mode: 0644]
tools/llvm-mc/Android.bp [new file with mode: 0644]
tools/llvm-mcmarkup/Android.bp [new file with mode: 0644]
tools/llvm-nm/Android.bp [new file with mode: 0644]
tools/llvm-objdump/Android.bp [new file with mode: 0644]
tools/llvm-pdbdump/Android.bp [new file with mode: 0644]
tools/llvm-profdata/Android.bp [new file with mode: 0644]
tools/llvm-readobj/Android.bp [new file with mode: 0644]
tools/llvm-rtdyld/Android.bp [new file with mode: 0644]
tools/llvm-size/Android.bp [new file with mode: 0644]
tools/llvm-split/Android.bp [new file with mode: 0644]
tools/llvm-symbolizer/Android.bp [new file with mode: 0644]
tools/lto/Android.bp [new file with mode: 0644]
tools/obj2yaml/Android.bp [new file with mode: 0644]
tools/opt/Android.bp [new file with mode: 0644]
tools/sancov/Android.bp [new file with mode: 0644]
tools/sanstats/Android.bp [new file with mode: 0644]
tools/verify-uselistorder/Android.bp [new file with mode: 0644]
tools/yaml2obj/Android.bp [new file with mode: 0644]
utils/FileCheck/Android.bp [new file with mode: 0644]
utils/TableGen/Android.bp [new file with mode: 0644]
utils/count/Android.bp [new file with mode: 0644]
utils/not/Android.bp [new file with mode: 0644]
utils/yaml-bench/Android.bp [new file with mode: 0644]

diff --git a/Android.bp b/Android.bp
new file mode 100644 (file)
index 0000000..94a6ab3
--- /dev/null
@@ -0,0 +1,326 @@
+cc_defaults {
+    name: "llvm-defaults",
+    defaults: ["llvm-defaults-no-generated-headers"],
+    header_libs: ["llvm-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: "llvm-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: ["llvm-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: "llvm-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: "llvm-headers",
+    vendor_available: true,
+    host_supported: true,
+    header_libs: ["llvm-headers-no-generated-headers"],
+    export_header_lib_headers: ["llvm-headers-no-generated-headers"],
+    generated_headers: [
+        "llvm-gen-attributes",
+        "llvm-gen-intrinsics",
+    ],
+    export_generated_headers: [
+        "llvm-gen-attributes",
+        "llvm-gen-intrinsics",
+    ],
+    target: {
+        windows: {
+            enabled: true,
+        },
+    },
+}
+
+llvm_tblgen {
+    name: "llvm-gen-attributes",
+    in: "include/llvm/IR/Attributes.td",
+    outs: ["llvm/IR/Attributes.inc"],
+}
+
+llvm_tblgen {
+    name: "llvm-gen-intrinsics",
+    in: "include/llvm/IR/Intrinsics.td",
+    outs: ["llvm/IR/Intrinsics.gen"],
+}
+
+force_build_llvm_components_defaults {
+    name: "force_build_llvm_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 = [
+    "libLLVMARMCodeGen",
+    "libLLVMARMAsmParser",
+    "libLLVMARMAsmPrinter",
+    "libLLVMARMInfo",
+    "libLLVMARMDesc",
+    "libLLVMARMDisassembler",
+]
+
+llvm_x86_static_libraries = [
+    "libLLVMX86CodeGen",
+    "libLLVMX86Info",
+    "libLLVMX86Desc",
+    "libLLVMX86AsmParser",
+    "libLLVMX86AsmPrinter",
+    "libLLVMX86Utils",
+    "libLLVMX86Disassembler",
+]
+
+llvm_mips_static_libraries = [
+    "libLLVMMipsCodeGen",
+    "libLLVMMipsInfo",
+    "libLLVMMipsDesc",
+    "libLLVMMipsAsmParser",
+    "libLLVMMipsAsmPrinter",
+    "libLLVMMipsDisassembler",
+]
+
+llvm_aarch64_static_libraries = [
+    "libLLVMAArch64CodeGen",
+    "libLLVMAArch64Info",
+    "libLLVMAArch64Desc",
+    "libLLVMAArch64AsmParser",
+    "libLLVMAArch64AsmPrinter",
+    "libLLVMAArch64Utils",
+    "libLLVMAArch64Disassembler",
+]
+
+llvm_amdgpu_static_libraries = [
+    "libLLVMAMDGPUCodeGen",
+    "libLLVMAMDGPUInfo",
+    "libLLVMAMDGPUDesc",
+    "libLLVMAMDGPUAsmParser",
+    "libLLVMAMDGPUAsmPrinter",
+    "libLLVMAMDGPUUtils",
+]
+
+
+cc_library_shared {
+    host_supported: true,
+    name: "libLLVM",
+    defaults: [
+        "llvm-defaults",
+        "force_build_llvm_components",
+    ],
+
+    whole_static_libs: [
+        // pre static libraries
+        "libLLVMLinker",
+        "libLLVMipo",
+        "libLLVMDebugInfoDWARF",
+        "libLLVMDebugInfoPDB",
+        "libLLVMSymbolize",
+        "libLLVMIRReader",
+        "libLLVMBitWriter",
+        "libLLVMBitReader",
+
+        // post static libraries
+        "libLLVMLTO",
+        "libLLVMAsmPrinter",
+        "libLLVMSelectionDAG",
+        "libLLVMCodeGen",
+        "libLLVMDebugInfoCodeView",
+        "libLLVMObject",
+        "libLLVMScalarOpts",
+        "libLLVMInstCombine",
+        "libLLVMInstrumentation",
+        "libLLVMTransformObjCARC",
+        "libLLVMTransformUtils",
+        "libLLVMAnalysis",
+        "libLLVMTarget",
+        "libLLVMGlobalISel",
+        "libLLVMMCDisassembler",
+        "libLLVMMC",
+        "libLLVMMCParser",
+        "libLLVMCore",
+        "libLLVMAsmParser",
+        "libLLVMOption",
+        "libLLVMSupport",
+        "libLLVMVectorize",
+        "libLLVMProfileData",
+        "libLLVMProfileDataCoverage",
+        "libLLVMLibDriver",
+        "libLLVMExecutionEngine",
+        "libLLVMRuntimeDyld",
+        "libLLVMMCJIT",
+        "libLLVMOrcJIT",
+    ],
+
+    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",
+    "tools/*",
+    "utils/*",
+]
diff --git a/android_test.sh b/android_test.sh
new file mode 100755 (executable)
index 0000000..15ffa81
--- /dev/null
@@ -0,0 +1,20 @@
+#!/bin/bash
+
+# Android-specific configuration details are kept in test/lit.site.cfg
+
+# Set resource limits
+ulimit -t 600
+ulimit -d 512000
+ulimit -m 512000
+ulimit -s 8192
+
+if [ -z $ANDROID_BUILD_TOP ]; then
+# Use this script's location to determine the actual top-level directory.
+export ANDROID_BUILD_TOP="$( cd "$( dirname "${BASH_SOURCE[0]}" )"/../../ && pwd )"
+fi
+
+if [ ! -d $ANDROID_BUILD_TOP/out/test/host/linux-x86/obj/test_llvm ]; then
+  mkdir -p $ANDROID_BUILD_TOP/out/test/host/linux-x86/obj/test_llvm
+fi
+
+python ./utils/lit/lit.py -s -v ./test
diff --git a/device/include/llvm/Config/AsmParsers.def b/device/include/llvm/Config/AsmParsers.def
new file mode 100755 (executable)
index 0000000..3e6c25d
--- /dev/null
@@ -0,0 +1,50 @@
+//===- llvm/Config/AsmParsers.def - LLVM Assembly Parsers -------*- C++ -*-===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// This file enumerates all of the assembly-language parsers
+// supported by this build of LLVM. Clients of this file should define
+// the LLVM_ASM_PARSER macro to be a function-like macro with a
+// single parameter (the name of the target whose assembly can be
+// generated); including this file will then enumerate all of the
+// targets with assembly parsers.
+//
+// The set of targets supported by LLVM is generated at configuration
+// time, at which point this header is generated. Do not modify this
+// header directly.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_ASM_PARSER
+#  error Please define the macro LLVM_ASM_PARSER(TargetName)
+#endif
+
+#if defined(__arm__)
+  LLVM_ASM_PARSER(ARM)
+#elif defined(__mips__)
+  LLVM_ASM_PARSER(Mips)
+#elif defined(__i386__) || defined(__x86_64__)
+  LLVM_ASM_PARSER(X86)
+
+#if defined(FORCE_BUILD_AMDGPU)
+  LLVM_ASM_PARSER(AMDGPU)
+#endif
+
+#if defined(FORCE_BUILD_ARM)
+  LLVM_ASM_PARSER(ARM)
+  LLVM_ASM_PARSER(AArch64)
+#endif
+
+#elif defined(__aarch64__)
+  LLVM_ASM_PARSER(ARM)
+  LLVM_ASM_PARSER(AArch64)
+#else
+#  error Unsupported TARGET_ARCH for LLVM_ASM_PARSER
+#endif
+
+#undef LLVM_ASM_PARSER
diff --git a/device/include/llvm/Config/AsmPrinters.def b/device/include/llvm/Config/AsmPrinters.def
new file mode 100755 (executable)
index 0000000..1d8d9ea
--- /dev/null
@@ -0,0 +1,50 @@
+//===- llvm/Config/AsmPrinters.def - LLVM Assembly Printers -----*- C++ -*-===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// This file enumerates all of the assembly-language printers
+// supported by this build of LLVM. Clients of this file should define
+// the LLVM_ASM_PRINTER macro to be a function-like macro with a
+// single parameter (the name of the target whose assembly can be
+// generated); including this file will then enumerate all of the
+// targets with assembly printers.
+//
+// The set of targets supported by LLVM is generated at configuration
+// time, at which point this header is generated. Do not modify this
+// header directly.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_ASM_PRINTER
+#  error Please define the macro LLVM_ASM_PRINTER(TargetName)
+#endif
+
+#if defined(__arm__)
+  LLVM_ASM_PRINTER(ARM)
+#elif defined(__mips__)
+  LLVM_ASM_PRINTER(Mips)
+#elif defined(__i386__) || defined(__x86_64__)
+  LLVM_ASM_PRINTER(X86)
+
+#if defined(FORCE_BUILD_AMDGPU)
+  LLVM_ASM_PRINTER(AMDGPU)
+#endif
+
+#if defined(FORCE_BUILD_ARM)
+  LLVM_ASM_PRINTER(ARM)
+  LLVM_ASM_PRINTER(AArch64)
+#endif
+
+#elif defined(__aarch64__)
+  LLVM_ASM_PRINTER(ARM)
+  LLVM_ASM_PRINTER(AArch64)
+#else
+#  error Unsupported TARGET_ARCH for LLVM_ASM_PRINTER
+#endif
+
+#undef LLVM_ASM_PRINTER
diff --git a/device/include/llvm/Config/Disassemblers.def b/device/include/llvm/Config/Disassemblers.def
new file mode 100755 (executable)
index 0000000..a1ae811
--- /dev/null
@@ -0,0 +1,46 @@
+//===- llvm/Config/Disassemblers.def - LLVM Assembly Parsers ----*- C++ -*-===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// This file enumerates all of the assembly-language parsers
+// supported by this build of LLVM. Clients of this file should define
+// the LLVM_ASM_PARSER macro to be a function-like macro with a
+// single parameter (the name of the target whose assembly can be
+// generated); including this file will then enumerate all of the
+// targets with assembly parsers.
+//
+// The set of targets supported by LLVM is generated at configuration
+// time, at which point this header is generated. Do not modify this
+// header directly.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_DISASSEMBLER
+#  error Please define the macro LLVM_DISASSEMBLER(TargetName)
+#endif
+
+#if defined(__arm__)
+  LLVM_DISASSEMBLER(ARM)
+#elif defined(__mips__)
+  LLVM_DISASSEMBLER(Mips)
+#elif defined(__i386__) || defined(__x86_64__)
+  LLVM_DISASSEMBLER(X86)
+
+#if defined(FORCE_BUILD_ARM)
+  LLVM_DISASSEMBLER(ARM)
+  LLVM_DISASSEMBLER(AArch64)
+#endif
+
+#elif defined(__aarch64__)
+  LLVM_DISASSEMBLER(ARM)
+  LLVM_DISASSEMBLER(AArch64)
+#else
+#  error Unsupported TARGET_ARCH for LLVM_DISASSEMBLER
+#endif
+
+#undef LLVM_DISASSEMBLER
diff --git a/device/include/llvm/Config/Targets.def b/device/include/llvm/Config/Targets.def
new file mode 100755 (executable)
index 0000000..faac965
--- /dev/null
@@ -0,0 +1,49 @@
+/*===- llvm/Config/Targets.def - LLVM Target Architectures ------*- C++ -*-===*\
+|*                                                                            *|
+|*                     The LLVM Compiler Infrastructure                       *|
+|*                                                                            *|
+|* This file is distributed under the University of Illinois Open Source      *|
+|* License. See LICENSE.TXT for details.                                      *|
+|*                                                                            *|
+|*===----------------------------------------------------------------------===*|
+|*                                                                            *|
+|* This file enumerates all of the target architectures supported by          *|
+|* this build of LLVM. Clients of this file should define the                 *|
+|* LLVM_TARGET macro to be a function-like macro with a single                *|
+|* parameter (the name of the target); including this file will then          *|
+|* enumerate all of the targets.                                              *|
+|*                                                                            *|
+|* The set of targets supported by LLVM is generated at configuration         *|
+|* time, at which point this header is generated. Do not modify this          *|
+|* header directly.                                                           *|
+|*                                                                            *|
+\*===----------------------------------------------------------------------===*/
+
+#ifndef LLVM_TARGET
+#  error Please define the macro LLVM_TARGET(TargetName)
+#endif
+
+#if defined(__arm__)
+  LLVM_TARGET(ARM)
+#elif defined(__mips__)
+  LLVM_TARGET(Mips)
+#elif defined(__i386__) || defined(__x86_64__)
+  LLVM_TARGET(X86)
+
+#if defined(FORCE_BUILD_AMDGPU)
+  LLVM_TARGET(AMDGPU)
+#endif
+
+#if defined(FORCE_BUILD_ARM)
+  LLVM_TARGET(ARM)
+  LLVM_TARGET(AArch64)
+#endif
+
+#elif defined(__aarch64__)
+  LLVM_TARGET(ARM)
+  LLVM_TARGET(AArch64)
+#else
+#  error Unsupported TARGET_ARCH for LLVM_TARGET
+#endif
+
+#undef LLVM_TARGET
diff --git a/device/include/llvm/Config/config.h b/device/include/llvm/Config/config.h
new file mode 100644 (file)
index 0000000..316b1c5
--- /dev/null
@@ -0,0 +1,692 @@
+/* include/llvm/Config/config.h.  Generated from config.h.in by configure.  */
+/* include/llvm/Config/config.h.in.  Generated from autoconf/configure.ac by autoheader.  */
+
+#ifndef CONFIG_H
+#define CONFIG_H
+
+/* Bug report URL. */
+#define BUG_REPORT_URL "http://llvm.org/bugs/"
+
+/* Relative directory for resource files */
+#define CLANG_RESOURCE_DIR ""
+
+/* Directories clang will search for headers */
+#define C_INCLUDE_DIRS ""
+
+/* Default <path> to all compiler invocations for --sysroot=<path>. */
+#define DEFAULT_SYSROOT ""
+
+/* Define if position independent code is enabled */
+#define ENABLE_PIC 1
+
+/* Define if timestamp information (e.g., __DATE___) is allowed */
+/* #undef ENABLE_TIMESTAMPS */
+
+/* Directory where gcc is installed. */
+#define GCC_INSTALL_PREFIX ""
+
+/* Define to 1 if you have the `argz_append' function. */
+/* #undef HAVE_ARGZ_APPEND */
+
+/* Define to 1 if you have the `argz_create_sep' function. */
+/* #undef HAVE_ARGZ_CREATE_SEP */
+
+/* Define to 1 if you have the <argz.h> header file. */
+/* #undef HAVE_ARGZ_H */
+
+/* Define to 1 if you have the `argz_insert' function. */
+/* #undef HAVE_ARGZ_INSERT */
+
+/* Define to 1 if you have the `argz_next' function. */
+/* #undef HAVE_ARGZ_NEXT */
+
+/* Define to 1 if you have the `argz_stringify' function. */
+/* #undef HAVE_ARGZ_STRINGIFY */
+
+/* Define to 1 if you have the <assert.h> header file. */
+#define HAVE_ASSERT_H 1
+
+/* Define to 1 if you have the `backtrace' function. */
+#if defined(HAVE_BACKTRACE) && HAVE_BACKTRACE == 0
+/* Defined by AndroidConfig.h as 0 */
+#undef HAVE_BACKTRACE
+#endif
+
+/* Define to 1 if you have the `bcopy' function. */
+/* #undef HAVE_BCOPY */
+
+/* Define to 1 if you have the `ceilf' function. */
+#define HAVE_CEILF 1
+
+/* Define if the neat program is available */
+/* #undef HAVE_CIRCO */
+
+/* Define to 1 if you have the `closedir' function. */
+#define HAVE_CLOSEDIR 1
+
+/* Define to 1 if you have the <CrashReporterClient.h> header file. */
+/* #undef HAVE_CRASHREPORTERCLIENT_H */
+
+/* Define if __crashreporter_info__ exists. */
+/* #undef HAVE_CRASHREPORTER_INFO */
+
+/* Define to 1 if you have the <ctype.h> header file. */
+#define HAVE_CTYPE_H 1
+
+/* Define to 1 if you have the <cxxabi.h> header file. */
+#define HAVE_CXXABI_H 0
+
+/* Define to 1 if you have the declaration of `strerror_s', and to 0 if you
+   don't. */
+#define HAVE_DECL_STRERROR_S 0
+
+/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
+   */
+#define HAVE_DIRENT_H 1
+
+/* Define if you have the GNU dld library. */
+/* #undef HAVE_DLD */
+
+/* Define to 1 if you have the <dld.h> header file. */
+/* #undef HAVE_DLD_H */
+
+/* Define to 1 if you have the `dlerror' function. */
+#define HAVE_DLERROR 1
+
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#define HAVE_DLFCN_H 1
+
+/* Define if dlopen() is available on this platform. */
+#define HAVE_DLOPEN 1
+
+/* Define to 1 if you have the <dl.h> header file. */
+/* #undef HAVE_DL_H */
+
+/* Define if the dot program is available */
+/* #undef HAVE_DOT */
+
+/* Define if the dotty program is available */
+/* #undef HAVE_DOTTY */
+
+/* Define if you have the _dyld_func_lookup function. */
+/* #undef HAVE_DYLD */
+
+/* Define to 1 if you have the <errno.h> header file. */
+#define HAVE_ERRNO_H 1
+
+/* Define to 1 if the system has the type `error_t'. */
+#define HAVE_ERROR_T 1
+
+/* Define to 1 if you have the <execinfo.h> header file. */
+#define HAVE_EXECINFO_H 0
+
+/* Define to 1 if you have the <fcntl.h> header file. */
+#define HAVE_FCNTL_H 1
+
+/* Define if the neat program is available */
+/* #undef HAVE_FDP */
+
+/* Define to 1 if you have the <fenv.h> header file. */
+#define HAVE_FENV_H 1
+
+/* Define if libffi is available on this platform. */
+/* #undef HAVE_FFI_CALL */
+
+/* Define to 1 if you have the <ffi/ffi.h> header file. */
+/* #undef HAVE_FFI_FFI_H */
+
+/* Define to 1 if you have the <ffi.h> header file. */
+/* #undef HAVE_FFI_H */
+
+/* Set to 1 if the finite function is found in <ieeefp.h> */
+/* #undef HAVE_FINITE_IN_IEEEFP_H */
+
+/* Define to 1 if you have the `floorf' function. */
+#define HAVE_FLOORF 1
+
+/* Define to 1 if you have the `fmodf' function. */
+#define HAVE_FMODF 1
+
+/* Define to 1 if you have the `futimens' function. */
+#define HAVE_FUTIMENS 1
+
+/* Define to 1 if you have the `getcwd' function. */
+#define HAVE_GETCWD 1
+
+/* Define to 1 if you have the `getpagesize' function. */
+#define HAVE_GETPAGESIZE 1
+
+/* Define to 1 if you have the `getrlimit' function. */
+#define HAVE_GETRLIMIT 1
+
+/* Define to 1 if you have the `getrusage' function. */
+#define HAVE_GETRUSAGE 1
+
+/* Define to 1 if you have the `gettimeofday' function. */
+#define HAVE_GETTIMEOFDAY 1
+
+/* Define if the Graphviz program is available */
+/* #undef HAVE_GRAPHVIZ */
+
+/* Define if the gv program is available */
+/* #undef HAVE_GV */
+
+/* Define to 1 if you have the `index' function. */
+/* #undef HAVE_INDEX */
+
+/* Define to 1 if the system has the type `int64_t'. */
+#define HAVE_INT64_T 1
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#define HAVE_INTTYPES_H 1
+
+/* Define to 1 if you have the `isatty' function. */
+#define HAVE_ISATTY 1
+
+/* Set to 1 if the isinf function is found in <cmath> */
+#define HAVE_ISINF_IN_CMATH 1
+
+/* Set to 1 if the isinf function is found in <math.h> */
+#define HAVE_ISINF_IN_MATH_H 1
+
+/* Set to 1 if the isnan function is found in <cmath> */
+#define HAVE_ISNAN_IN_CMATH 1
+
+/* Set to 1 if the isnan function is found in <math.h> */
+#define HAVE_ISNAN_IN_MATH_H 1
+
+/* Define if you have the libdl library or equivalent. */
+#define HAVE_LIBDL 1
+
+/* Define to 1 if you have the `imagehlp' library (-limagehlp). */
+/* #undef HAVE_LIBIMAGEHLP */
+
+/* Define to 1 if you have the `m' library (-lm). */
+#define HAVE_LIBM 1
+
+/* Define to 1 if you have the `psapi' library (-lpsapi). */
+/* #undef HAVE_LIBPSAPI */
+
+/* Define to 1 if you have the `pthread' library (-lpthread). */
+#define HAVE_LIBPTHREAD 1
+
+/* Define to 1 if you have the `udis86' library (-ludis86). */
+/* #undef HAVE_LIBUDIS86 */
+
+/* Define to 1 if you have the <limits.h> header file. */
+#define HAVE_LIMITS_H 1
+
+/* Define if you can use -Wl,-export-dynamic. */
+#define HAVE_LINK_EXPORT_DYNAMIC 1
+
+/* Define to 1 if you have the <link.h> header file. */
+#define HAVE_LINK_H 1
+
+/* Define if you can use -Wl,-R. to pass -R. to the linker, in order to add
+   the current directory to the dynamic linker search path. */
+#define HAVE_LINK_R 1
+
+/* Define to 1 if you have the `longjmp' function. */
+#define HAVE_LONGJMP 1
+
+/* Define to 1 if you have the <mach/mach.h> header file. */
+/* #undef HAVE_MACH_MACH_H */
+
+/* Define to 1 if you have the <mach-o/dyld.h> header file. */
+/* #undef HAVE_MACH_O_DYLD_H */
+
+/* Define if mallinfo() is available on this platform. */
+#define HAVE_MALLINFO 1
+
+/* Define to 1 if you have the <malloc.h> header file. */
+#define HAVE_MALLOC_H 1
+
+/* Define to 1 if you have the <malloc/malloc.h> header file. */
+/* #undef HAVE_MALLOC_MALLOC_H */
+
+/* Define to 1 if you have the `malloc_zone_statistics' function. */
+/* #undef HAVE_MALLOC_ZONE_STATISTICS */
+
+/* Define to 1 if you have the `memcpy' function. */
+#define HAVE_MEMCPY 1
+
+/* Define to 1 if you have the `memmove' function. */
+#define HAVE_MEMMOVE 1
+
+/* Define to 1 if you have the <memory.h> header file. */
+#define HAVE_MEMORY_H 1
+
+/* Define to 1 if you have the `mkdtemp' function. */
+#define HAVE_MKDTEMP 0
+
+/* Define to 1 if you have the `mkstemp' function. */
+#define HAVE_MKSTEMP 1
+
+/* Define to 1 if you have the `mktemp' function. */
+#define HAVE_MKTEMP 1
+
+/* Define to 1 if you have a working `mmap' system call. */
+#define HAVE_MMAP 1
+
+/* Define if mmap() uses MAP_ANONYMOUS to map anonymous pages, or undefine if
+   it uses MAP_ANON */
+#define HAVE_MMAP_ANONYMOUS 1
+
+/* Define if mmap() can map files into memory */
+#define HAVE_MMAP_FILE
+
+/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
+/* #undef HAVE_NDIR_H */
+
+/* Define to 1 if you have the `nearbyintf' function. */
+#define HAVE_NEARBYINTF 1
+
+/* Define if the neat program is available */
+/* #undef HAVE_NEATO */
+
+/* Define to 1 if you have the `opendir' function. */
+#define HAVE_OPENDIR 1
+
+/* Define to 1 if you have the `posix_spawn' function. */
+/* #undef HAVE_POSIX_SPAWN */
+
+/* Define to 1 if you have the `powf' function. */
+#define HAVE_POWF 1
+
+/* Define to 1 if you have the `pread' function. */
+#define HAVE_PREAD 1
+
+/* Define if libtool can extract symbol lists from object files. */
+#define HAVE_PRELOADED_SYMBOLS 1
+
+/* Define to have the %a format string */
+#define HAVE_PRINTF_A 1
+
+/* Have pthread_getspecific */
+#define HAVE_PTHREAD_GETSPECIFIC 1
+
+/* Define to 1 if you have the <pthread.h> header file. */
+#define HAVE_PTHREAD_H 1
+
+/* Have pthread_mutex_lock */
+#define HAVE_PTHREAD_MUTEX_LOCK 1
+
+/* Have pthread_rwlock_init */
+#define HAVE_PTHREAD_RWLOCK_INIT 1
+
+/* Define to 1 if srand48/lrand48/drand48 exist in <stdlib.h> */
+#define HAVE_RAND48 1
+
+/* Define to 1 if you have the `readdir' function. */
+#define HAVE_READDIR 1
+
+/* Define to 1 if you have the `realpath' function. */
+#define HAVE_REALPATH 1
+
+/* Define to 1 if you have the `rindex' function. */
+/* #undef HAVE_RINDEX */
+
+/* Define to 1 if you have the `rintf' function. */
+#define HAVE_RINTF 1
+
+/* Define to 1 if you have the `round' function. */
+#define HAVE_ROUND 1
+
+/* Define to 1 if you have the `roundf' function. */
+#define HAVE_ROUNDF 1
+
+/* Define to 1 if you have the `sbrk' function. */
+#define HAVE_SBRK 1
+
+/* Define to 1 if you have the `setenv' function. */
+#define HAVE_SETENV 1
+
+/* Define to 1 if you have the `setjmp' function. */
+#define HAVE_SETJMP 1
+
+/* Define to 1 if you have the <setjmp.h> header file. */
+#define HAVE_SETJMP_H 1
+
+/* Define to 1 if you have the `setrlimit' function. */
+#define HAVE_SETRLIMIT 1
+
+/* Define if you have the shl_load function. */
+/* #undef HAVE_SHL_LOAD */
+
+/* Define to 1 if you have the `siglongjmp' function. */
+#define HAVE_SIGLONGJMP 1
+
+/* Define to 1 if you have the <signal.h> header file. */
+#define HAVE_SIGNAL_H 1
+
+/* Define to 1 if you have the `sigsetjmp' function. */
+/* #undef HAVE_SIGSETJMP */
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#define HAVE_STDINT_H 1
+
+/* Define to 1 if you have the <stdio.h> header file. */
+#define HAVE_STDIO_H 1
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#define HAVE_STDLIB_H 1
+
+/* Set to 1 if the std::isinf function is found in <cmath> */
+/* #undef HAVE_STD_ISINF_IN_CMATH */
+
+/* Set to 1 if the std::isnan function is found in <cmath> */
+#define HAVE_STD_ISNAN_IN_CMATH 1
+
+/* Define to 1 if you have the `strchr' function. */
+#define HAVE_STRCHR 1
+
+/* Define to 1 if you have the `strcmp' function. */
+#define HAVE_STRCMP 1
+
+/* Define to 1 if you have the `strdup' function. */
+#define HAVE_STRDUP 1
+
+/* Define to 1 if you have the `strerror' function. */
+#define HAVE_STRERROR 1
+
+/* Define to 1 if you have the `strerror_r' function. */
+#ifndef USE_MINGW
+#define HAVE_STRERROR_R 1
+#endif
+
+/* Define to 1 if you have the <strings.h> header file. */
+#define HAVE_STRINGS_H 1
+
+/* Define to 1 if you have the <string.h> header file. */
+#define HAVE_STRING_H 1
+
+/* Define to 1 if you have the `strrchr' function. */
+#define HAVE_STRRCHR 1
+
+/* Define to 1 if you have the `strtof' function. */
+#define HAVE_STRTOF 1
+
+/* Define to 1 if you have the `strtoll' function. */
+#define HAVE_STRTOLL 1
+
+/* Define to 1 if you have the `strtoq' function. */
+#define HAVE_STRTOQ 1
+
+/* Define to 1 if you have the `sysconf' function. */
+#define HAVE_SYSCONF 1
+
+/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
+   */
+/* #undef HAVE_SYS_DIR_H */
+
+/* Define to 1 if you have the <sys/dl.h> header file. */
+/* #undef HAVE_SYS_DL_H */
+
+/* Define to 1 if you have the <sys/ioctl.h> header file. */
+#define HAVE_SYS_IOCTL_H 1
+
+/* Define to 1 if you have the <sys/mman.h> header file. */
+#define HAVE_SYS_MMAN_H 1
+
+/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
+   */
+/* #undef HAVE_SYS_NDIR_H */
+
+/* Define to 1 if you have the <sys/param.h> header file. */
+#define HAVE_SYS_PARAM_H 1
+
+/* Define to 1 if you have the <sys/resource.h> header file. */
+#define HAVE_SYS_RESOURCE_H 1
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#define HAVE_SYS_STAT_H 1
+
+/* Define to 1 if you have the <sys/time.h> header file. */
+#define HAVE_SYS_TIME_H 1
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#define HAVE_SYS_TYPES_H 1
+
+/* Define to 1 if you have the <sys/uio.h> header file. */
+#define HAVE_SYS_UIO_H 1
+
+/* Define to 1 if you have <sys/wait.h> that is POSIX.1 compatible. */
+#define HAVE_SYS_WAIT_H 1
+
+/* Define to 1 if you have the <termios.h> header file. */
+#define HAVE_TERMIOS_H 1
+
+/* Define if the neat program is available */
+/* #undef HAVE_TWOPI */
+
+/* Define to 1 if the system has the type `uint64_t'. */
+#define HAVE_UINT64_T 1
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#define HAVE_UNISTD_H 1
+
+/* Define to 1 if you have the <utime.h> header file. */
+#define HAVE_UTIME_H 1
+
+/* Define to 1 if the system has the type `u_int64_t'. */
+/* #undef HAVE_U_INT64_T */
+
+/* Define to 1 if you have the <valgrind/valgrind.h> header file. */
+/* #undef HAVE_VALGRIND_VALGRIND_H */
+
+/* Define to 1 if you have the <windows.h> header file. */
+/* #undef HAVE_WINDOWS_H */
+
+/* Define to 1 if you have the `writev' function. */
+#define HAVE_WRITEV 1
+
+/* Define if the xdot.py program is available */
+/* #undef HAVE_XDOT_PY */
+
+/* Have host's _alloca */
+/* #undef HAVE__ALLOCA */
+
+/* Have host's __alloca */
+/* #undef HAVE___ALLOCA */
+
+/* Have host's __ashldi3 */
+/* #undef HAVE___ASHLDI3 */
+
+/* Have host's __ashrdi3 */
+/* #undef HAVE___ASHRDI3 */
+
+/* Have host's __chkstk */
+/* #undef HAVE___CHKSTK */
+
+/* Have host's __cmpdi2 */
+/* #undef HAVE___CMPDI2 */
+
+/* Have host's __divdi3 */
+/* #undef HAVE___DIVDI3 */
+
+/* Define to 1 if you have the `__dso_handle' function. */
+#define HAVE___DSO_HANDLE 1
+
+/* Have host's __fixdfdi */
+/* #undef HAVE___FIXDFDI */
+
+/* Have host's __fixsfdi */
+/* #undef HAVE___FIXSFDI */
+
+/* Have host's __floatdidf */
+/* #undef HAVE___FLOATDIDF */
+
+/* Have host's __lshrdi3 */
+/* #undef HAVE___LSHRDI3 */
+
+/* Have host's __main */
+/* #undef HAVE___MAIN */
+
+/* Have host's __moddi3 */
+/* #undef HAVE___MODDI3 */
+
+/* Have host's __udivdi3 */
+/* #undef HAVE___UDIVDI3 */
+
+/* Have host's __umoddi3 */
+/* #undef HAVE___UMODDI3 */
+
+/* Have host's ___chkstk */
+/* #undef HAVE____CHKSTK */
+
+/* Linker version detected at compile time. */
+#define HOST_LINK_VERSION "2.20.1"
+
+/* Installation directory for binary executables */
+#define LLVM_BINDIR "/opt/llvm-android/bin"
+
+/* Time at which LLVM was configured */
+#define LLVM_CONFIGTIME "Tue May  8 14:22:45 CST 2012"
+
+/* Installation directory for data files */
+#define LLVM_DATADIR "/opt/llvm-android/share/llvm"
+
+/* Target triple LLVM will generate code for by default */
+#define LLVM_DEFAULT_TARGET_TRIPLE "i386-unknown-linux"
+
+/* Installation directory for documentation */
+#define LLVM_DOCSDIR "/opt/llvm-android/share/doc/llvm"
+
+/* Define if threads enabled */
+#define LLVM_ENABLE_THREADS 1
+
+/* Installation directory for config files */
+#define LLVM_ETCDIR "/opt/llvm-android/etc/llvm"
+
+/* Has gcc/MSVC atomic intrinsics */
+#define LLVM_HAS_ATOMICS 1
+
+/* Installation directory for include files */
+#define LLVM_INCLUDEDIR "/opt/llvm-android/include"
+
+/* Installation directory for .info files */
+#define LLVM_INFODIR "/opt/llvm-android/info"
+
+/* Installation directory for libraries */
+#define LLVM_LIBDIR "/opt/llvm-android/lib"
+
+/* Installation directory for man pages */
+#define LLVM_MANDIR "/opt/llvm-android/man"
+
+/* Define to path to circo program if found or 'echo circo' otherwise */
+/* #undef LLVM_PATH_CIRCO */
+
+/* Define to path to dot program if found or 'echo dot' otherwise */
+/* #undef LLVM_PATH_DOT */
+
+/* Define to path to dotty program if found or 'echo dotty' otherwise */
+/* #undef LLVM_PATH_DOTTY */
+
+/* Define to path to fdp program if found or 'echo fdp' otherwise */
+/* #undef LLVM_PATH_FDP */
+
+/* Define to path to Graphviz program if found or 'echo Graphviz' otherwise */
+/* #undef LLVM_PATH_GRAPHVIZ */
+
+/* Define to path to gv program if found or 'echo gv' otherwise */
+/* #undef LLVM_PATH_GV */
+
+/* Define to path to neato program if found or 'echo neato' otherwise */
+/* #undef LLVM_PATH_NEATO */
+
+/* Define to path to twopi program if found or 'echo twopi' otherwise */
+/* #undef LLVM_PATH_TWOPI */
+
+/* Define to path to xdot.py program if found or 'echo xdot.py' otherwise */
+/* #undef LLVM_PATH_XDOT_PY */
+
+/* Installation prefix directory */
+#define LLVM_PREFIX "/opt/llvm-android"
+
+/* Define if we have the Intel JIT API runtime support library */
+#define LLVM_USE_INTEL_JITEVENTS 0
+
+/* Define if we have the oprofile JIT-support library */
+#define LLVM_USE_OPROFILE 0
+
+/* Major version of the LLVM API */
+#define LLVM_VERSION_MAJOR 3
+
+/* Minor version of the LLVM API */
+#define LLVM_VERSION_MINOR 8
+
+/* Patch version of the LLVM API */
+#define LLVM_VERSION_PATCH 275480
+
+/* Define if the OS needs help to load dependent libraries for dlopen(). */
+/* #undef LTDL_DLOPEN_DEPLIBS */
+
+/* Define to the sub-directory in which libtool stores uninstalled libraries.
+   */
+#define LTDL_OBJDIR ".libs/"
+
+/* Define to the name of the environment variable that determines the dynamic
+   library search path. */
+#define LTDL_SHLIBPATH_VAR "LD_LIBRARY_PATH"
+
+/* Define to the extension used for shared libraries, say, ".so". */
+#define LTDL_SHLIB_EXT ".so"
+
+/* Define to the system default library search path. */
+#define LTDL_SYSSEARCHPATH "/lib:/usr/lib:/usr/local/lib:/lib:/usr/lib:/lib64:/usr/lib64:/usr/local/lib64:/lib32:/usr/lib32:/usr/local/lib32:/usr/x86_64-pc-linux-gnu/lib:/usr/lib/gcc/x86_64-pc-linux-gnu/4.3.4:/usr/lib/gcc/x86_64-pc-linux-gnu/4.3.4/32:/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2:/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/32"
+
+/* Define if /dev/zero should be used when mapping RWX memory, or undefine if
+   its not necessary */
+/* #undef NEED_DEV_ZERO_FOR_MMAP */
+
+/* Define if dlsym() requires a leading underscore in symbol names. */
+/* #undef NEED_USCORE */
+
+/* Define to the address where bug reports for this package should be sent. */
+#define PACKAGE_BUGREPORT "http://llvm.org/bugs/"
+
+/* Define to the full name of this package. */
+#define PACKAGE_NAME "LLVM"
+
+/* Define to the full name and version of this package. */
+#define PACKAGE_STRING "LLVM 3.8.275480"
+
+/* Define to the one symbol short name of this package. */
+#define PACKAGE_TARNAME "llvm"
+
+/* Define to the version of this package. */
+#define PACKAGE_VERSION "3.8.275480"
+
+/* Define as the return type of signal handlers (`int' or `void'). */
+#define RETSIGTYPE void
+
+/* Define to 1 if the `S_IS*' macros in <sys/stat.h> do not work properly. */
+/* #undef STAT_MACROS_BROKEN */
+
+/* Define to 1 if you have the ANSI C header files. */
+#define STDC_HEADERS 1
+
+/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
+#define TIME_WITH_SYS_TIME 1
+
+/* Define to 1 if your <sys/time.h> declares `struct tm'. */
+/* #undef TM_IN_SYS_TIME */
+
+/* Define if use udis86 library */
+#define USE_UDIS86 0
+
+/* Define to empty if `const' does not conform to ANSI C. */
+/* #undef const */
+
+/* Define to a type to use for `error_t' if it is not otherwise available. */
+/* #undef error_t */
+
+/* Define to `int' if <sys/types.h> does not define. */
+/* #undef pid_t */
+
+/* Define to `unsigned int' if <sys/types.h> does not define. */
+/* #undef size_t */
+
+#include "llvm/Config/llvm-platform-config.h"
+
+#endif
diff --git a/device/include/llvm/Config/llvm-config.h b/device/include/llvm/Config/llvm-config.h
new file mode 100644 (file)
index 0000000..dc0af20
--- /dev/null
@@ -0,0 +1,100 @@
+/* include/llvm/Config/llvm-config.h.  Generated from llvm-config.h.in by configure.  */
+/*===-- llvm/config/llvm-config.h - llvm configure variable -------*- C -*-===*/
+/*                                                                            */
+/*                     The LLVM Compiler Infrastructure                       */
+/*                                                                            */
+/* This file is distributed under the University of Illinois Open Source      */
+/* License. See LICENSE.TXT for details.                                      */
+/*                                                                            */
+/*===----------------------------------------------------------------------===*/
+
+/* This file enumerates all of the llvm variables from configure so that
+   they can be in exported headers and won't override package specific
+   directives.  This is a C file so we can include it in the llvm-c headers.  */
+
+/* To avoid multiple inclusions of these variables when we include the exported
+   headers and config.h, conditionally include these.  */
+/* TODO: This is a bit of a hack.  */
+#ifndef CONFIG_H
+
+/* Installation directory for binary executables */
+#define LLVM_BINDIR "/opt/llvm-android/bin"
+
+/* Time at which LLVM was configured */
+#define LLVM_CONFIGTIME "Tue May  8 14:22:45 CST 2012"
+
+/* Installation directory for data files */
+#define LLVM_DATADIR "/opt/llvm-android/share/llvm"
+
+/* Target triple LLVM will generate code for by default */
+#define LLVM_DEFAULT_TARGET_TRIPLE "i386-unknown-linux"
+
+/* Installation directory for documentation */
+#define LLVM_DOCSDIR "/opt/llvm-android/share/doc/llvm"
+
+/* Define if threads enabled */
+#define LLVM_ENABLE_THREADS 1
+
+/* Installation directory for config files */
+#define LLVM_ETCDIR "/opt/llvm-android/etc/llvm"
+
+/* Has gcc/MSVC atomic intrinsics */
+#define LLVM_HAS_ATOMICS 1
+
+/* Installation directory for include files */
+#define LLVM_INCLUDEDIR "/opt/llvm-android/include"
+
+/* Installation directory for .info files */
+#define LLVM_INFODIR "/opt/llvm-android/info"
+
+/* Installation directory for libraries */
+#define LLVM_LIBDIR "/opt/llvm-android/lib"
+
+/* Installation directory for man pages */
+#define LLVM_MANDIR "/opt/llvm-android/man"
+
+/* Define to path to circo program if found or 'echo circo' otherwise */
+/* #undef LLVM_PATH_CIRCO */
+
+/* Define to path to dot program if found or 'echo dot' otherwise */
+/* #undef LLVM_PATH_DOT */
+
+/* Define to path to dotty program if found or 'echo dotty' otherwise */
+/* #undef LLVM_PATH_DOTTY */
+
+/* Define to path to fdp program if found or 'echo fdp' otherwise */
+/* #undef LLVM_PATH_FDP */
+
+/* Define to path to Graphviz program if found or 'echo Graphviz' otherwise */
+/* #undef LLVM_PATH_GRAPHVIZ */
+
+/* Define to path to gv program if found or 'echo gv' otherwise */
+/* #undef LLVM_PATH_GV */
+
+/* Define to path to neato program if found or 'echo neato' otherwise */
+/* #undef LLVM_PATH_NEATO */
+
+/* Define to path to twopi program if found or 'echo twopi' otherwise */
+/* #undef LLVM_PATH_TWOPI */
+
+/* Define to path to xdot.py program if found or 'echo xdot.py' otherwise */
+/* #undef LLVM_PATH_XDOT_PY */
+
+/* Installation prefix directory */
+#define LLVM_PREFIX "/opt/llvm-android"
+
+/* Major version of the LLVM API */
+#define LLVM_VERSION_MAJOR 3
+
+/* Minor version of the LLVM API */
+#define LLVM_VERSION_MINOR 8
+
+/* Patch version of the LLVM API */
+#define LLVM_VERSION_PATCH 275480
+
+/* LLVM version string */
+#define LLVM_VERSION_STRING "3.8.275480"
+
+#include "llvm/Config/llvm-platform-config.h"
+
+#endif
diff --git a/host/include/llvm/Config/AsmParsers.def b/host/include/llvm/Config/AsmParsers.def
new file mode 100644 (file)
index 0000000..8fd67da
--- /dev/null
@@ -0,0 +1,32 @@
+//===- llvm/Config/AsmParsers.def - LLVM Assembly Parsers -------*- C++ -*-===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// This file enumerates all of the assembly-language parsers
+// supported by this build of LLVM. Clients of this file should define
+// the LLVM_ASM_PARSER macro to be a function-like macro with a
+// single parameter (the name of the target whose assembly can be
+// generated); including this file will then enumerate all of the
+// targets with assembly parsers.
+//
+// The set of targets supported by LLVM is generated at configuration
+// time, at which point this header is generated. Do not modify this
+// header directly.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_ASM_PARSER
+#  error Please define the macro LLVM_ASM_PARSER(TargetName)
+#endif
+
+LLVM_ASM_PARSER(ARM)
+LLVM_ASM_PARSER(Mips)
+LLVM_ASM_PARSER(X86)
+LLVM_ASM_PARSER(AArch64)
+
+#undef LLVM_ASM_PARSER
diff --git a/host/include/llvm/Config/AsmPrinters.def b/host/include/llvm/Config/AsmPrinters.def
new file mode 100644 (file)
index 0000000..07f6adf
--- /dev/null
@@ -0,0 +1,32 @@
+//===- llvm/Config/AsmPrinters.def - LLVM Assembly Printers -----*- C++ -*-===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// This file enumerates all of the assembly-language printers
+// supported by this build of LLVM. Clients of this file should define
+// the LLVM_ASM_PRINTER macro to be a function-like macro with a
+// single parameter (the name of the target whose assembly can be
+// generated); including this file will then enumerate all of the
+// targets with assembly printers.
+//
+// The set of targets supported by LLVM is generated at configuration
+// time, at which point this header is generated. Do not modify this
+// header directly.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_ASM_PRINTER
+#  error Please define the macro LLVM_ASM_PRINTER(TargetName)
+#endif
+
+LLVM_ASM_PRINTER(ARM)
+LLVM_ASM_PRINTER(Mips)
+LLVM_ASM_PRINTER(X86)
+LLVM_ASM_PRINTER(AArch64)
+
+#undef LLVM_ASM_PRINTER
diff --git a/host/include/llvm/Config/Disassemblers.def b/host/include/llvm/Config/Disassemblers.def
new file mode 100644 (file)
index 0000000..18557af
--- /dev/null
@@ -0,0 +1,32 @@
+//===- llvm/Config/Disassemblers.def - LLVM Assembly Parsers ----*- C++ -*-===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// This file enumerates all of the assembly-language parsers
+// supported by this build of LLVM. Clients of this file should define
+// the LLVM_ASM_PARSER macro to be a function-like macro with a
+// single parameter (the name of the target whose assembly can be
+// generated); including this file will then enumerate all of the
+// targets with assembly parsers.
+//
+// The set of targets supported by LLVM is generated at configuration
+// time, at which point this header is generated. Do not modify this
+// header directly.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_DISASSEMBLER
+#  error Please define the macro LLVM_DISASSEMBLER(TargetName)
+#endif
+
+LLVM_DISASSEMBLER(ARM)
+LLVM_DISASSEMBLER(Mips)
+LLVM_DISASSEMBLER(X86)
+LLVM_DISASSEMBLER(AArch64)
+
+#undef LLVM_DISASSEMBLER
diff --git a/host/include/llvm/Config/Targets.def b/host/include/llvm/Config/Targets.def
new file mode 100644 (file)
index 0000000..2985cf3
--- /dev/null
@@ -0,0 +1,31 @@
+/*===- llvm/Config/Targets.def - LLVM Target Architectures ------*- C++ -*-===*\
+|*                                                                            *|
+|*                     The LLVM Compiler Infrastructure                       *|
+|*                                                                            *|
+|* This file is distributed under the University of Illinois Open Source      *|
+|* License. See LICENSE.TXT for details.                                      *|
+|*                                                                            *|
+|*===----------------------------------------------------------------------===*|
+|*                                                                            *|
+|* This file enumerates all of the target architectures supported by          *|
+|* this build of LLVM. Clients of this file should define the                 *|
+|* LLVM_TARGET macro to be a function-like macro with a single                *|
+|* parameter (the name of the target); including this file will then          *|
+|* enumerate all of the targets.                                              *|
+|*                                                                            *|
+|* The set of targets supported by LLVM is generated at configuration         *|
+|* time, at which point this header is generated. Do not modify this          *|
+|* header directly.                                                           *|
+|*                                                                            *|
+\*===----------------------------------------------------------------------===*/
+
+#ifndef LLVM_TARGET
+#  error Please define the macro LLVM_TARGET(TargetName)
+#endif
+
+LLVM_TARGET(ARM)
+LLVM_TARGET(Mips)
+LLVM_TARGET(X86)
+LLVM_TARGET(AArch64)
+
+#undef LLVM_TARGET
diff --git a/host/include/llvm/Config/config.h b/host/include/llvm/Config/config.h
new file mode 100644 (file)
index 0000000..9563335
--- /dev/null
@@ -0,0 +1,763 @@
+/* include/llvm/Config/config.h.  Generated from config.h.in by configure.  */
+/* include/llvm/Config/config.h.in.  Generated from autoconf/configure.ac by autoheader.  */
+
+#ifndef CONFIG_H
+#define CONFIG_H
+
+/* Bug report URL. */
+#define BUG_REPORT_URL "http://llvm.org/bugs/"
+
+/* Relative directory for resource files */
+#define CLANG_RESOURCE_DIR ""
+
+/* Directories clang will search for headers */
+#define C_INCLUDE_DIRS ""
+
+/* Default <path> to all compiler invocations for --sysroot=<path>. */
+#define DEFAULT_SYSROOT ""
+
+/* Define if position independent code is enabled */
+#define ENABLE_PIC 1
+
+/* Define if timestamp information (e.g., __DATE___) is allowed */
+/* #undef ENABLE_TIMESTAMPS */
+
+/* Directory where gcc is installed. */
+#define GCC_INSTALL_PREFIX ""
+
+/* Define to 1 if you have the `argz_append' function. */
+/* #undef HAVE_ARGZ_APPEND */
+
+/* Define to 1 if you have the `argz_create_sep' function. */
+/* #undef HAVE_ARGZ_CREATE_SEP */
+
+/* Define to 1 if you have the <argz.h> header file. */
+/* #undef HAVE_ARGZ_H */
+
+/* Define to 1 if you have the `argz_insert' function. */
+/* #undef HAVE_ARGZ_INSERT */
+
+/* Define to 1 if you have the `argz_next' function. */
+/* #undef HAVE_ARGZ_NEXT */
+
+/* Define to 1 if you have the `argz_stringify' function. */
+/* #undef HAVE_ARGZ_STRINGIFY */
+
+/* Define to 1 if you have the <assert.h> header file. */
+#define HAVE_ASSERT_H 1
+
+/* Define to 1 if you have the `backtrace' function. */
+/* #define HAVE_BACKTRACE 1 */ /* Defined by AndroidConfig.h */
+
+/* Define to 1 if you have the `bcopy' function. */
+/* #undef HAVE_BCOPY */
+
+/* Define to 1 if you have the `ceilf' function. */
+#define HAVE_CEILF 1
+
+/* Define if the neat program is available */
+/* #undef HAVE_CIRCO */
+
+/* Define to 1 if you have the `closedir' function. */
+#define HAVE_CLOSEDIR 1
+
+/* Define to 1 if you have the <CrashReporterClient.h> header file. */
+/* #undef HAVE_CRASHREPORTERCLIENT_H */
+
+/* Define if __crashreporter_info__ exists. */
+#define HAVE_CRASHREPORTER_INFO 0
+
+/* Define to 1 if you have the <ctype.h> header file. */
+#define HAVE_CTYPE_H 1
+
+/* Define to 1 if you have the <cxxabi.h> header file. */
+#define HAVE_CXXABI_H 0
+
+/* Define to 1 if you have the declaration of `strerror_s', and to 0 if you
+   don't. */
+#define HAVE_DECL_STRERROR_S 0
+
+/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
+   */
+#define HAVE_DIRENT_H 1
+
+/* Define if you have the GNU dld library. */
+/* #undef HAVE_DLD */
+
+/* Define to 1 if you have the <dld.h> header file. */
+/* #undef HAVE_DLD_H */
+
+/* Define to 1 if you have the `dlerror' function. */
+#define HAVE_DLERROR 1
+
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#define HAVE_DLFCN_H 1
+
+/* Define if dlopen() is available on this platform. */
+#define HAVE_DLOPEN 1
+
+/* Define to 1 if you have the <dl.h> header file. */
+/* #undef HAVE_DL_H */
+
+/* Define if the dot program is available */
+/* #undef HAVE_DOT */
+
+/* Define if the dotty program is available */
+/* #undef HAVE_DOTTY */
+
+/* Define if you have the _dyld_func_lookup function. */
+/* #undef HAVE_DYLD */
+
+/* Define to 1 if you have the <errno.h> header file. */
+#define HAVE_ERRNO_H 1
+
+/* Define to 1 if the system has the type `error_t'. */
+#define HAVE_ERROR_T 1
+
+/* Define to 1 if you have the <execinfo.h> header file. */
+#ifndef __BIONIC__
+#define HAVE_EXECINFO_H 1
+#endif
+
+/* Define to 1 if you have the <fcntl.h> header file. */
+#define HAVE_FCNTL_H 1
+
+/* Define if the neat program is available */
+/* #undef HAVE_FDP */
+
+/* Define to 1 if you have the <fenv.h> header file. */
+#define HAVE_FENV_H 1
+
+/* Define if libffi is available on this platform. */
+/* #undef HAVE_FFI_CALL */
+
+/* Define to 1 if you have the <ffi/ffi.h> header file. */
+/* #undef HAVE_FFI_FFI_H */
+
+/* Define to 1 if you have the <ffi.h> header file. */
+/* #undef HAVE_FFI_H */
+
+/* Set to 1 if the finite function is found in <ieeefp.h> */
+/* #undef HAVE_FINITE_IN_IEEEFP_H */
+
+/* Define to 1 if you have the `floorf' function. */
+#define HAVE_FLOORF 1
+
+/* Define to 1 if you have the `fmodf' function. */
+#define HAVE_FMODF 1
+
+#ifdef __APPLE__
+/* Define to 1 if you have the `futimes' function. */
+#define HAVE_FUTIMES 1
+#else
+/* Define to 1 if you have the `futimens' function. */
+#define HAVE_FUTIMENS 1
+#endif  // __APPLE__
+
+/* Define to 1 if you have the `getcwd' function. */
+#define HAVE_GETCWD 1
+
+/* Define to 1 if you have the `getpagesize' function. */
+#define HAVE_GETPAGESIZE 1
+
+/* Define to 1 if you have the `getrlimit' function. */
+#define HAVE_GETRLIMIT 1
+
+/* Define to 1 if you have the `getrusage' function. */
+#define HAVE_GETRUSAGE 1
+
+/* Define to 1 if you have the `gettimeofday' function. */
+#define HAVE_GETTIMEOFDAY 1
+
+/* Define if the Graphviz program is available */
+/* #undef HAVE_GRAPHVIZ */
+
+/* Define if the gv program is available */
+/* #undef HAVE_GV */
+
+/* Define to 1 if you have the `index' function. */
+/* #undef HAVE_INDEX */
+
+/* Define to 1 if the system has the type `int64_t'. */
+#define HAVE_INT64_T 1
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#define HAVE_INTTYPES_H 1
+
+/* Define to 1 if you have the `isatty' function. */
+#define HAVE_ISATTY 1
+
+/* Set to 1 if the isinf function is found in <cmath> */
+#define HAVE_ISINF_IN_CMATH 1
+
+/* Set to 1 if the isinf function is found in <math.h> */
+#define HAVE_ISINF_IN_MATH_H 1
+
+/* Set to 1 if the isnan function is found in <cmath> */
+#define HAVE_ISNAN_IN_CMATH 1
+
+/* Set to 1 if the isnan function is found in <math.h> */
+#define HAVE_ISNAN_IN_MATH_H 1
+
+/* Define if you have the libdl library or equivalent. */
+#define HAVE_LIBDL 1
+
+/* Define to 1 if you have the `imagehlp' library (-limagehlp). */
+/* #undef HAVE_LIBIMAGEHLP */
+
+/* Define to 1 if you have the `m' library (-lm). */
+#define HAVE_LIBM 1
+
+/* Define to 1 if you have the `psapi' library (-lpsapi). */
+/* #undef HAVE_LIBPSAPI */
+
+/* Define to 1 if you have the `pthread' library (-lpthread). */
+#define HAVE_LIBPTHREAD 1
+
+/* Define to 1 if you have the `shell32' library (-lshell32). */
+#define HAVE_LIBSHELL32 1
+
+/* Define to 1 if you have the `udis86' library (-ludis86). */
+/* #undef HAVE_LIBUDIS86 */
+
+/* Define to 1 if you have the <limits.h> header file. */
+#define HAVE_LIMITS_H 1
+
+/* Define if you can use -Wl,-export-dynamic. */
+#define HAVE_LINK_EXPORT_DYNAMIC 1
+
+/* Define to 1 if you have the <link.h> header file. */
+#if defined(__APPLE__)
+/* #undef HAVE_LINK_H */
+#else
+#define HAVE_LINK_H 1
+#endif
+
+/* Define if you can use -Wl,-R. to pass -R. to the linker, in order to add
+   the current directory to the dynamic linker search path. */
+#define HAVE_LINK_R 1
+
+/* Define to 1 if you have the `longjmp' function. */
+#define HAVE_LONGJMP 1
+
+/* Define to 1 if you have the <mach/mach.h> header file. */
+/* #undef HAVE_MACH_MACH_H */
+
+/* Define to 1 if you have the <mach-o/dyld.h> header file. */
+/* #undef HAVE_MACH_O_DYLD_H */
+
+/* Define if mallinfo() is available on this platform. */
+#if !defined(__APPLE__)
+#define HAVE_MALLINFO 1
+#else
+/* #undef HAVE_MALLINFO */
+#endif
+
+/* Define to 1 if you have the <malloc.h> header file. */
+#if !defined(__APPLE__)
+#define HAVE_MALLOC_H 1
+#else
+/* #undef HAVE_MALLOC_H */
+#endif
+
+/* Define to 1 if you have the <malloc/malloc.h> header file. */
+/* #undef HAVE_MALLOC_MALLOC_H */
+
+/* Define to 1 if you have the `malloc_zone_statistics' function. */
+/* #undef HAVE_MALLOC_ZONE_STATISTICS */
+
+/* Define to 1 if you have the `memcpy' function. */
+#define HAVE_MEMCPY 1
+
+/* Define to 1 if you have the `memmove' function. */
+#define HAVE_MEMMOVE 1
+
+/* Define to 1 if you have the <memory.h> header file. */
+#define HAVE_MEMORY_H 1
+
+/* Define to 1 if you have the `mkdtemp' function. */
+#define HAVE_MKDTEMP 1
+
+/* Define to 1 if you have the `mkstemp' function. */
+#define HAVE_MKSTEMP 1
+
+/* Define to 1 if you have the `mktemp' function. */
+#define HAVE_MKTEMP 1
+
+/* Define to 1 if you have a working `mmap' system call. */
+#define HAVE_MMAP 1
+
+/* Define if mmap() uses MAP_ANONYMOUS to map anonymous pages, or undefine if
+   it uses MAP_ANON */
+#if !defined(__APPLE__)
+#define HAVE_MMAP_ANONYMOUS
+#else
+/* #undef HAVE_MMAP_ANONYMOUS */
+#endif
+
+/* Define if mmap() can map files into memory */
+#define HAVE_MMAP_FILE
+
+/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
+/* #undef HAVE_NDIR_H */
+
+/* Define to 1 if you have the `nearbyintf' function. */
+#define HAVE_NEARBYINTF 1
+
+/* Define if the neat program is available */
+/* #undef HAVE_NEATO */
+
+/* Define to 1 if you have the `opendir' function. */
+#define HAVE_OPENDIR 1
+
+/* Define to 1 if you have the `posix_spawn' function. */
+#ifndef __BIONIC__
+#define HAVE_POSIX_SPAWN 1
+#endif
+
+/* Define to 1 if you have the `powf' function. */
+#define HAVE_POWF 1
+
+/* Define to 1 if you have the `pread' function. */
+#if !defined(_WIN32) && !defined(_WIN64)
+#define HAVE_PREAD 1
+#endif
+
+/* Define if libtool can extract symbol lists from object files. */
+#define HAVE_PRELOADED_SYMBOLS 1
+
+/* Define to have the %a format string */
+#define HAVE_PRINTF_A 1
+
+#if !defined(_WIN32) && !defined(_WIN64)
+
+/* Have pthread_getspecific */
+#define HAVE_PTHREAD_GETSPECIFIC 1
+
+/* Define to 1 if you have the <pthread.h> header file. */
+#define HAVE_PTHREAD_H 1
+
+/* Have pthread_mutex_lock */
+#define HAVE_PTHREAD_MUTEX_LOCK 1
+
+/* Have pthread_rwlock_init */
+#define HAVE_PTHREAD_RWLOCK_INIT 1
+
+#endif /* !defined(_WIN32) && !defined(_WIN64) */
+
+/* Define to 1 if srand48/lrand48/drand48 exist in <stdlib.h> */
+#define HAVE_RAND48 1
+
+/* Define to 1 if you have the `readdir' function. */
+#define HAVE_READDIR 1
+
+/* Define to 1 if you have the `realpath' function. */
+#if !defined(_WIN32) && !defined(_WIN64)
+#define HAVE_REALPATH 1
+#else
+// Do not define HAVE_REALPATH
+#endif
+
+/* Define to 1 if you have the `rindex' function. */
+/* #undef HAVE_RINDEX */
+
+/* Define to 1 if you have the `rintf' function. */
+#define HAVE_RINTF 1
+
+/* Define to 1 if you have the `round' function. */
+#define HAVE_ROUND 1
+
+/* Define to 1 if you have the `roundf' function. */
+#define HAVE_ROUNDF 1
+
+/* Define to 1 if you have the `sbrk' function. */
+#define HAVE_SBRK 1
+
+/* Define to 1 if you have the `setenv' function. */
+#define HAVE_SETENV 1
+
+/* Define to 1 if you have the `setjmp' function. */
+#define HAVE_SETJMP 1
+
+/* Define to 1 if you have the <setjmp.h> header file. */
+#define HAVE_SETJMP_H 1
+
+/* Define to 1 if you have the `setrlimit' function. */
+#define HAVE_SETRLIMIT 1
+
+/* Define if you have the shl_load function. */
+/* #undef HAVE_SHL_LOAD */
+
+/* Define to 1 if you have the `siglongjmp' function. */
+#define HAVE_SIGLONGJMP 1
+
+/* Define to 1 if you have the <signal.h> header file. */
+#define HAVE_SIGNAL_H 1
+
+/* Define to 1 if you have the `sigsetjmp' function. */
+/* #undef HAVE_SIGSETJMP */
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#define HAVE_STDINT_H 1
+
+/* Define to 1 if you have the <stdio.h> header file. */
+#define HAVE_STDIO_H 1
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#define HAVE_STDLIB_H 1
+
+/* Set to 1 if the std::isinf function is found in <cmath> */
+#define HAVE_STD_ISINF_IN_CMATH 1
+
+/* Set to 1 if the std::isnan function is found in <cmath> */
+#define HAVE_STD_ISNAN_IN_CMATH 1
+
+/* Define to 1 if you have the `strchr' function. */
+#define HAVE_STRCHR 1
+
+/* Define to 1 if you have the `strcmp' function. */
+#define HAVE_STRCMP 1
+
+/* Define to 1 if you have the `strdup' function. */
+#define HAVE_STRDUP 1
+
+/* Define to 1 if you have the `strerror' function. */
+#define HAVE_STRERROR 1
+
+/* Define to 1 if you have the `strerror_r' function. */
+#ifndef USE_MINGW
+#define HAVE_STRERROR_R 1
+#endif
+
+/* Define to 1 if you have the <strings.h> header file. */
+#define HAVE_STRINGS_H 1
+
+/* Define to 1 if you have the <string.h> header file. */
+#define HAVE_STRING_H 1
+
+/* Define to 1 if you have the `strrchr' function. */
+#define HAVE_STRRCHR 1
+
+/* Define to 1 if you have the `strtof' function. */
+#define HAVE_STRTOF 1
+
+/* Define to 1 if you have the `strtoll' function. */
+#define HAVE_STRTOLL 1
+
+/* Define to 1 if you have the `strtoq' function. */
+#define HAVE_STRTOQ 1
+
+/* Define to 1 if you have the `sysconf' function. */
+#define HAVE_SYSCONF 1
+
+/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
+   */
+/* #undef HAVE_SYS_DIR_H */
+
+/* Define to 1 if you have the <sys/dl.h> header file. */
+/* #undef HAVE_SYS_DL_H */
+
+/* Define to 1 if you have the <sys/ioctl.h> header file. */
+#define HAVE_SYS_IOCTL_H 1
+
+/* Define to 1 if you have the <sys/mman.h> header file. */
+#define HAVE_SYS_MMAN_H 1
+
+/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
+   */
+/* #undef HAVE_SYS_NDIR_H */
+
+/* Define to 1 if you have the <sys/param.h> header file. */
+#define HAVE_SYS_PARAM_H 1
+
+/* Define to 1 if you have the <sys/resource.h> header file. */
+#define HAVE_SYS_RESOURCE_H 1
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#define HAVE_SYS_STAT_H 1
+
+/* Define to 1 if you have the <sys/time.h> header file. */
+#define HAVE_SYS_TIME_H 1
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#define HAVE_SYS_TYPES_H 1
+
+/* Define to 1 if you have the <sys/uio.h> header file. */
+#define HAVE_SYS_UIO_H 1
+
+/* Define to 1 if you have <sys/wait.h> that is POSIX.1 compatible. */
+#define HAVE_SYS_WAIT_H 1
+
+/* Define if the setupterm() function is supported this platform. */
+#ifndef __BIONIC__
+#define HAVE_TERMINFO 1
+#endif
+
+/* Define to 1 if you have the <termios.h> header file. */
+#define HAVE_TERMIOS_H 1
+
+/* Define if the neat program is available */
+/* #undef HAVE_TWOPI */
+
+/* Define to 1 if the system has the type `uint64_t'. */
+#define HAVE_UINT64_T 1
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#define HAVE_UNISTD_H 1
+
+/* Define to 1 if you have the <utime.h> header file. */
+#define HAVE_UTIME_H 1
+
+/* Define to 1 if the system has the type `u_int64_t'. */
+/* #undef HAVE_U_INT64_T */
+
+/* Define to 1 if you have the <valgrind/valgrind.h> header file. */
+/* #undef HAVE_VALGRIND_VALGRIND_H */
+
+#if defined(_WIN32) || defined(_WIN64)
+/* Define to 1 if you have the <windows.h> header file. */
+#define HAVE_WINDOWS_H 1
+
+/* Define to 1 if you have the `writev' function. */
+/* #undef HAVE_WRITEV */
+
+#else
+/* Define to 1 if you have the <windows.h> header file. */
+/* #undef HAVE_WINDOWS_H */
+
+/* Define to 1 if you have the `writev' function. */
+#define HAVE_WRITEV 1
+#endif
+
+/* Define if the xdot.py program is available */
+/* #undef HAVE_XDOT_PY */
+
+/* Have host's _alloca */
+/* #undef HAVE__ALLOCA */
+
+/* Have host's __alloca */
+/* #undef HAVE___ALLOCA */
+
+/* Have host's __ashldi3 */
+/* #undef HAVE___ASHLDI3 */
+
+/* Have host's __ashrdi3 */
+/* #undef HAVE___ASHRDI3 */
+
+/* Have host's __chkstk */
+/* #undef HAVE___CHKSTK */
+
+/* Have host's __cmpdi2 */
+/* #undef HAVE___CMPDI2 */
+
+/* Have host's __divdi3 */
+/* #undef HAVE___DIVDI3 */
+
+/* Define to 1 if you have the `__dso_handle' function. */
+/* #undef HAVE___DSO_HANDLE */
+
+/* Have host's __fixdfdi */
+/* #undef HAVE___FIXDFDI */
+
+/* Have host's __fixsfdi */
+/* #undef HAVE___FIXSFDI */
+
+/* Have host's __floatdidf */
+/* #undef HAVE___FLOATDIDF */
+
+/* Have host's __lshrdi3 */
+/* #undef HAVE___LSHRDI3 */
+
+/* Have host's __main */
+/* #undef HAVE___MAIN */
+
+/* Have host's __moddi3 */
+/* #undef HAVE___MODDI3 */
+
+/* Have host's __udivdi3 */
+/* #undef HAVE___UDIVDI3 */
+
+/* Have host's __umoddi3 */
+/* #undef HAVE___UMODDI3 */
+
+/* Have host's ___chkstk */
+/* #undef HAVE____CHKSTK */
+
+/* Linker version detected at compile time. */
+#define HOST_LINK_VERSION "2.20.1"
+
+/* Installation directory for binary executables */
+#define LLVM_BINDIR "/opt/llvm-android/bin"
+
+/* Time at which LLVM was configured */
+#define LLVM_CONFIGTIME "Tue May  8 14:22:45 CST 2012"
+
+/* Installation directory for data files */
+#define LLVM_DATADIR "/opt/llvm-android/share/llvm"
+
+/* Target triple LLVM will generate code for by default */
+#if defined(__APPLE__)
+#define LLVM_DEFAULT_TARGET_TRIPLE "x86_64-apple-darwin"
+#else
+#define LLVM_DEFAULT_TARGET_TRIPLE "x86_64-unknown-linux"
+#endif
+
+/* Installation directory for documentation */
+#define LLVM_DOCSDIR "/opt/llvm-android/share/doc/llvm"
+
+/* Define if threads enabled */
+#if !defined(_WIN32) && !defined(_WIN64)
+#define LLVM_ENABLE_THREADS 1
+#else
+#define LLVM_ENABLE_THREADS 0
+#endif
+
+/* Installation directory for config files */
+#define LLVM_ETCDIR "/opt/llvm-android/etc/llvm"
+
+#if !defined(_WIN32) && !defined(_WIN64)
+
+/* Has gcc/MSVC atomic intrinsics */
+#define LLVM_HAS_ATOMICS 1
+
+#else
+
+#define LLVM_HAS_ATOMICS 0
+
+#endif /* !defined(_WIN32) && !defined(_WIN64) */
+
+/* Installation directory for include files */
+#define LLVM_INCLUDEDIR "/opt/llvm-android/include"
+
+/* Installation directory for .info files */
+#define LLVM_INFODIR "/opt/llvm-android/info"
+
+/* Installation directory for libraries */
+#define LLVM_LIBDIR "/opt/llvm-android/lib"
+
+/* Installation directory for man pages */
+#define LLVM_MANDIR "/opt/llvm-android/man"
+
+/* Define to path to circo program if found or 'echo circo' otherwise */
+/* #undef LLVM_PATH_CIRCO */
+
+/* Define to path to dot program if found or 'echo dot' otherwise */
+/* #undef LLVM_PATH_DOT */
+
+/* Define to path to dotty program if found or 'echo dotty' otherwise */
+/* #undef LLVM_PATH_DOTTY */
+
+/* Define to path to fdp program if found or 'echo fdp' otherwise */
+/* #undef LLVM_PATH_FDP */
+
+/* Define to path to Graphviz program if found or 'echo Graphviz' otherwise */
+/* #undef LLVM_PATH_GRAPHVIZ */
+
+/* Define to path to gv program if found or 'echo gv' otherwise */
+/* #undef LLVM_PATH_GV */
+
+/* Define to path to neato program if found or 'echo neato' otherwise */
+/* #undef LLVM_PATH_NEATO */
+
+/* Define to path to twopi program if found or 'echo twopi' otherwise */
+/* #undef LLVM_PATH_TWOPI */
+
+/* Define to path to xdot.py program if found or 'echo xdot.py' otherwise */
+/* #undef LLVM_PATH_XDOT_PY */
+
+/* Installation prefix directory */
+#define LLVM_PREFIX "/opt/llvm-android"
+
+/* Define if we have the Intel JIT API runtime support library */
+#define LLVM_USE_INTEL_JITEVENTS 0
+
+/* Define if we have the oprofile JIT-support library */
+#define LLVM_USE_OPROFILE 0
+
+/* Major version of the LLVM API */
+#define LLVM_VERSION_MAJOR 3
+
+/* Minor version of the LLVM API */
+#define LLVM_VERSION_MINOR 8
+
+/* Patch version of the LLVM API */
+#define LLVM_VERSION_PATCH 275480
+
+/* Define if the OS needs help to load dependent libraries for dlopen(). */
+/* #undef LTDL_DLOPEN_DEPLIBS */
+
+/* Define to the sub-directory in which libtool stores uninstalled libraries.
+   */
+#define LTDL_OBJDIR ".libs/"
+
+/* Define to the name of the environment variable that determines the dynamic
+   library search path. */
+#define LTDL_SHLIBPATH_VAR "LD_LIBRARY_PATH"
+
+/* Define to the extension used for shared libraries, say, ".so". */
+#if defined(__APPLE__)
+#define LTDL_SHLIB_EXT ".dylib"
+#elif defined(_WIN32)
+#define LTDL_SHLIB_EXT ".dll"
+#else
+#define LTDL_SHLIB_EXT ".so"
+#endif  /* __APPLE__ */
+
+/* Define to the system default library search path. */
+#define LTDL_SYSSEARCHPATH "/lib:/usr/lib:/usr/local/lib:/lib:/usr/lib:/lib64:/usr/lib64:/usr/local/lib64:/lib32:/usr/lib32:/usr/local/lib32:/usr/x86_64-pc-linux-gnu/lib:/usr/lib/gcc/x86_64-pc-linux-gnu/4.3.4:/usr/lib/gcc/x86_64-pc-linux-gnu/4.3.4/32:/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2:/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/32"
+
+/* Define if /dev/zero should be used when mapping RWX memory, or undefine if
+   its not necessary */
+/* #undef NEED_DEV_ZERO_FOR_MMAP */
+
+/* Define if dlsym() requires a leading underscore in symbol names. */
+/* #undef NEED_USCORE */
+
+/* Define to the address where bug reports for this package should be sent. */
+#define PACKAGE_BUGREPORT "http://llvm.org/bugs/"
+
+/* Define to the full name of this package. */
+#define PACKAGE_NAME "LLVM"
+
+/* Define to the full name and version of this package. */
+#define PACKAGE_STRING "LLVM 3.8.275480"
+
+/* Define to the one symbol short name of this package. */
+#define PACKAGE_TARNAME "llvm"
+
+/* Define to the version of this package. */
+#define PACKAGE_VERSION "3.8.275480"
+
+/* Define as the return type of signal handlers (`int' or `void'). */
+#define RETSIGTYPE void
+
+/* Define to 1 if the `S_IS*' macros in <sys/stat.h> do not work properly. */
+/* #undef STAT_MACROS_BROKEN */
+
+/* Define to 1 if you have the ANSI C header files. */
+#define STDC_HEADERS 1
+
+/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
+#define TIME_WITH_SYS_TIME 1
+
+/* Define to 1 if your <sys/time.h> declares `struct tm'. */
+/* #undef TM_IN_SYS_TIME */
+
+/* Define if use udis86 library */
+#define USE_UDIS86 0
+
+/* Define to empty if `const' does not conform to ANSI C. */
+/* #undef const */
+
+/* Define to a type to use for `error_t' if it is not otherwise available. */
+/* #undef error_t */
+
+/* Define to `int' if <sys/types.h> does not define. */
+/* #undef pid_t */
+
+/* Define to `unsigned int' if <sys/types.h> does not define. */
+/* #undef size_t */
+
+#include "llvm/Config/llvm-platform-config.h"
+
+#endif
diff --git a/host/include/llvm/Config/llvm-config.h b/host/include/llvm/Config/llvm-config.h
new file mode 100644 (file)
index 0000000..20bae49
--- /dev/null
@@ -0,0 +1,116 @@
+/* include/llvm/Config/llvm-config.h.  Generated from llvm-config.h.in by configure.  */
+/*===-- llvm/config/llvm-config.h - llvm configure variable -------*- C -*-===*/
+/*                                                                            */
+/*                     The LLVM Compiler Infrastructure                       */
+/*                                                                            */
+/* This file is distributed under the University of Illinois Open Source      */
+/* License. See LICENSE.TXT for details.                                      */
+/*                                                                            */
+/*===----------------------------------------------------------------------===*/
+
+/* This file enumerates all of the llvm variables from configure so that
+   they can be in exported headers and won't override package specific
+   directives.  This is a C file so we can include it in the llvm-c headers.  */
+
+/* To avoid multiple inclusions of these variables when we include the exported
+   headers and config.h, conditionally include these.  */
+/* TODO: This is a bit of a hack.  */
+#ifndef CONFIG_H
+
+/* Installation directory for binary executables */
+#define LLVM_BINDIR "/opt/llvm-android/bin"
+
+/* Time at which LLVM was configured */
+#define LLVM_CONFIGTIME "Tue May  8 14:22:45 CST 2012"
+
+/* Installation directory for data files */
+#define LLVM_DATADIR "/opt/llvm-android/share/llvm"
+
+/* Target triple LLVM will generate code for by default */
+#if defined(__APPLE__)
+#define LLVM_DEFAULT_TARGET_TRIPLE "x86_64-apple-darwin"
+#else
+#define LLVM_DEFAULT_TARGET_TRIPLE "x86_64-unknown-linux"
+#endif
+
+/* Installation directory for documentation */
+#define LLVM_DOCSDIR "/opt/llvm-android/share/doc/llvm"
+
+/* Define if threads enabled */
+#if !defined(_WIN32) && !defined(_WIN64)
+#define LLVM_ENABLE_THREADS 1
+#else
+#define LLVM_ENABLE_THREADS 0
+#endif
+
+/* Installation directory for config files */
+#define LLVM_ETCDIR "/opt/llvm-android/etc/llvm"
+
+#if !defined(_WIN32) && !defined(_WIN64)
+
+/* Has gcc/MSVC atomic intrinsics */
+#define LLVM_HAS_ATOMICS 1
+
+#else
+
+#define LLVM_HAS_ATOMICS 0
+
+#endif /* !defined(_WIN32) && !defined(_WIN64) */
+
+/* Installation directory for include files */
+#define LLVM_INCLUDEDIR "/opt/llvm-android/include"
+
+/* Installation directory for .info files */
+#define LLVM_INFODIR "/opt/llvm-android/info"
+
+/* Installation directory for libraries */
+#define LLVM_LIBDIR "/opt/llvm-android/lib"
+
+/* Installation directory for man pages */
+#define LLVM_MANDIR "/opt/llvm-android/man"
+
+/* Define to path to circo program if found or 'echo circo' otherwise */
+/* #undef LLVM_PATH_CIRCO */
+
+/* Define to path to dot program if found or 'echo dot' otherwise */
+/* #undef LLVM_PATH_DOT */
+
+/* Define to path to dotty program if found or 'echo dotty' otherwise */
+/* #undef LLVM_PATH_DOTTY */
+
+/* Define to path to fdp program if found or 'echo fdp' otherwise */
+/* #undef LLVM_PATH_FDP */
+
+/* Define to path to Graphviz program if found or 'echo Graphviz' otherwise */
+/* #undef LLVM_PATH_GRAPHVIZ */
+
+/* Define to path to gv program if found or 'echo gv' otherwise */
+/* #undef LLVM_PATH_GV */
+
+/* Define to path to neato program if found or 'echo neato' otherwise */
+/* #undef LLVM_PATH_NEATO */
+
+/* Define to path to twopi program if found or 'echo twopi' otherwise */
+/* #undef LLVM_PATH_TWOPI */
+
+/* Define to path to xdot.py program if found or 'echo xdot.py' otherwise */
+/* #undef LLVM_PATH_XDOT_PY */
+
+/* Installation prefix directory */
+#define LLVM_PREFIX "/opt/llvm-android"
+
+/* Major version of the LLVM API */
+#define LLVM_VERSION_MAJOR 3
+
+/* Minor version of the LLVM API */
+#define LLVM_VERSION_MINOR 8
+
+/* Patch version of the LLVM API */
+#define LLVM_VERSION_PATCH 275480
+
+/* LLVM version string */
+#define LLVM_VERSION_STRING "3.8.275480"
+
+#include "llvm/Config/llvm-platform-config.h"
+
+#endif
diff --git a/lib/Analysis/Android.bp b/lib/Analysis/Android.bp
new file mode 100644 (file)
index 0000000..ffccb5a
--- /dev/null
@@ -0,0 +1,7 @@
+cc_library_static {
+    name: "libLLVMAnalysis",
+    defaults: [
+        "llvm-lib-defaults",
+    ],
+    srcs: ["*.cpp"],
+}
diff --git a/lib/Android.bp b/lib/Android.bp
new file mode 100644 (file)
index 0000000..127ba59
--- /dev/null
@@ -0,0 +1,13 @@
+cc_defaults {
+    name: "llvm-lib-defaults",
+    vendor_available: true,
+    defaults: ["llvm-defaults"],
+    export_header_lib_headers: ["llvm-headers"],
+    target: {
+        windows: {
+            enabled: true,
+        },
+    },
+}
+
+subdirs = ["*"]
diff --git a/lib/AsmParser/Android.bp b/lib/AsmParser/Android.bp
new file mode 100644 (file)
index 0000000..3fff6b2
--- /dev/null
@@ -0,0 +1,7 @@
+cc_library_static {
+    name: "libLLVMAsmParser",
+    defaults: [
+        "llvm-lib-defaults",
+    ],
+    srcs: ["*.cpp"],
+}
diff --git a/lib/Bitcode/Android.bp b/lib/Bitcode/Android.bp
new file mode 100644 (file)
index 0000000..b44c296
--- /dev/null
@@ -0,0 +1 @@
+subdirs = ["*"]
diff --git a/lib/Bitcode/Reader/Android.bp b/lib/Bitcode/Reader/Android.bp
new file mode 100644 (file)
index 0000000..da7c543
--- /dev/null
@@ -0,0 +1,7 @@
+cc_library_static {
+    name: "libLLVMBitReader",
+    defaults: [
+        "llvm-lib-defaults",
+    ],
+    srcs: ["*.cpp"],
+}
diff --git a/lib/Bitcode/Writer/Android.bp b/lib/Bitcode/Writer/Android.bp
new file mode 100644 (file)
index 0000000..754a252
--- /dev/null
@@ -0,0 +1,7 @@
+cc_library_static {
+    name: "libLLVMBitWriter",
+    defaults: [
+        "llvm-lib-defaults",
+    ],
+    srcs: ["*.cpp"],
+}
diff --git a/lib/CodeGen/Android.bp b/lib/CodeGen/Android.bp
new file mode 100644 (file)
index 0000000..bcd447f
--- /dev/null
@@ -0,0 +1,9 @@
+cc_library_static {
+    name: "libLLVMCodeGen",
+    defaults: [
+        "llvm-lib-defaults",
+    ],
+    srcs: ["*.cpp"],
+}
+
+subdirs = ["*"]
diff --git a/lib/CodeGen/AsmPrinter/Android.bp b/lib/CodeGen/AsmPrinter/Android.bp
new file mode 100644 (file)
index 0000000..d94c00c
--- /dev/null
@@ -0,0 +1,7 @@
+cc_library_static {
+    name: "libLLVMAsmPrinter",
+    defaults: [
+        "llvm-lib-defaults",
+    ],
+    srcs: ["*.cpp"],
+}
diff --git a/lib/CodeGen/GlobalISel/Android.bp b/lib/CodeGen/GlobalISel/Android.bp
new file mode 100644 (file)
index 0000000..871be26
--- /dev/null
@@ -0,0 +1,9 @@
+cc_library_static {
+    name: "libLLVMGlobalISel",
+    defaults: [
+        "llvm-lib-defaults",
+    ],
+    // Only pull in this one file to ensure we aren't building with this
+    // experimental feature just yet.
+    srcs: ["GlobalISel.cpp"],
+}
diff --git a/lib/CodeGen/MIRParser/Android.bp b/lib/CodeGen/MIRParser/Android.bp
new file mode 100644 (file)
index 0000000..4c68ec6
--- /dev/null
@@ -0,0 +1,7 @@
+cc_library_static {
+    name: "libLLVMMIRParser",
+    defaults: [
+        "llvm-lib-defaults",
+    ],
+    srcs: ["*.cpp"],
+}
diff --git a/lib/CodeGen/SelectionDAG/Android.bp b/lib/CodeGen/SelectionDAG/Android.bp
new file mode 100644 (file)
index 0000000..79c705a
--- /dev/null
@@ -0,0 +1,7 @@
+cc_library_static {
+    name: "libLLVMSelectionDAG",
+    defaults: [
+        "llvm-lib-defaults",
+    ],
+    srcs: ["*.cpp"],
+}
diff --git a/lib/DebugInfo/Android.bp b/lib/DebugInfo/Android.bp
new file mode 100644 (file)
index 0000000..b44c296
--- /dev/null
@@ -0,0 +1 @@
+subdirs = ["*"]
diff --git a/lib/DebugInfo/CodeView/Android.bp b/lib/DebugInfo/CodeView/Android.bp
new file mode 100644 (file)
index 0000000..6abfae1
--- /dev/null
@@ -0,0 +1,7 @@
+cc_library_static {
+    name: "libLLVMDebugInfoCodeView",
+    defaults: [
+        "llvm-lib-defaults",
+    ],
+    srcs: ["*.cpp"],
+}
diff --git a/lib/DebugInfo/DWARF/Android.bp b/lib/DebugInfo/DWARF/Android.bp
new file mode 100644 (file)
index 0000000..c198e1f
--- /dev/null
@@ -0,0 +1,7 @@
+cc_library_static {
+    name: "libLLVMDebugInfoDWARF",
+    defaults: [
+        "llvm-lib-defaults",
+    ],
+    srcs: ["*.cpp"],
+}
diff --git a/lib/DebugInfo/PDB/Android.bp b/lib/DebugInfo/PDB/Android.bp
new file mode 100644 (file)
index 0000000..f319ded
--- /dev/null
@@ -0,0 +1,10 @@
+cc_library_static {
+    name: "libLLVMDebugInfoPDB",
+    defaults: [
+        "llvm-lib-defaults",
+    ],
+    srcs: [
+        "*.cpp",
+        "Raw/*.cpp",
+    ],
+}
diff --git a/lib/DebugInfo/Symbolize/Android.bp b/lib/DebugInfo/Symbolize/Android.bp
new file mode 100644 (file)
index 0000000..c859f58
--- /dev/null
@@ -0,0 +1,7 @@
+cc_library_static {
+    name: "libLLVMSymbolize",
+    defaults: [
+        "llvm-lib-defaults",
+    ],
+    srcs: ["*.cpp"],
+}
diff --git a/lib/ExecutionEngine/Android.bp b/lib/ExecutionEngine/Android.bp
new file mode 100644 (file)
index 0000000..41a4492
--- /dev/null
@@ -0,0 +1,9 @@
+cc_library_static {
+    name: "libLLVMExecutionEngine",
+    defaults: [
+        "llvm-lib-defaults",
+    ],
+    srcs: ["*.cpp"],
+}
+
+subdirs = ["*"]
diff --git a/lib/ExecutionEngine/Interpreter/Android.bp b/lib/ExecutionEngine/Interpreter/Android.bp
new file mode 100644 (file)
index 0000000..190a9a8
--- /dev/null
@@ -0,0 +1,7 @@
+cc_library_static {
+    name: "libLLVMInterpreter",
+    defaults: [
+        "llvm-lib-defaults",
+    ],
+    srcs: ["*.cpp"],
+}
diff --git a/lib/ExecutionEngine/MCJIT/Android.bp b/lib/ExecutionEngine/MCJIT/Android.bp
new file mode 100644 (file)
index 0000000..6b43bb1
--- /dev/null
@@ -0,0 +1,7 @@
+cc_library_static {
+    name: "libLLVMMCJIT",
+    defaults: [
+        "llvm-lib-defaults",
+    ],
+    srcs: ["*.cpp"],
+}
diff --git a/lib/ExecutionEngine/Orc/Android.bp b/lib/ExecutionEngine/Orc/Android.bp
new file mode 100644 (file)
index 0000000..1bb2fae
--- /dev/null
@@ -0,0 +1,7 @@
+cc_library_static {
+    name: "libLLVMOrcJIT",
+    defaults: [
+        "llvm-lib-defaults",
+    ],
+    srcs: ["*.cpp"],
+}
diff --git a/lib/ExecutionEngine/RuntimeDyld/Android.bp b/lib/ExecutionEngine/RuntimeDyld/Android.bp
new file mode 100644 (file)
index 0000000..4042bea
--- /dev/null
@@ -0,0 +1,7 @@
+cc_library_static {
+    name: "libLLVMRuntimeDyld",
+    defaults: [
+        "llvm-lib-defaults",
+    ],
+    srcs: ["*.cpp"],
+}
diff --git a/lib/Fuzzer/Android.bp b/lib/Fuzzer/Android.bp
new file mode 100644 (file)
index 0000000..b0b152c
--- /dev/null
@@ -0,0 +1,38 @@
+//
+// Copyright (C) 2015 The Android Open Source Project
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+cc_library_static {
+    name: "libLLVMFuzzerNoMain",
+    host_supported: true,
+    include_dirs: ["external/compiler-rt/include"],
+    srcs: ["*.cpp"],
+    exclude_srcs: ["FuzzerMain.cpp"],
+    sanitize: {
+        address: false,
+        coverage: false,
+    },
+}
+
+cc_library_static {
+    name: "libLLVMFuzzer",
+    host_supported: true,
+    srcs: ["FuzzerMain.cpp"],
+    whole_static_libs: ["libLLVMFuzzerNoMain"],
+    sanitize: {
+        address: false,
+        coverage: false,
+    },
+}
diff --git a/lib/IR/Android.bp b/lib/IR/Android.bp
new file mode 100644 (file)
index 0000000..9bac320
--- /dev/null
@@ -0,0 +1,14 @@
+cc_library_static {
+    name: "libLLVMCore",
+    defaults: [
+        "llvm-lib-defaults",
+    ],
+    generated_headers: ["llvm-gen-core"],
+    srcs: ["*.cpp"],
+}
+
+llvm_tblgen {
+    name: "llvm-gen-core",
+    in: "AttributesCompatFunc.td",
+    outs: ["AttributesCompatFunc.inc"],
+}
diff --git a/lib/IRReader/Android.bp b/lib/IRReader/Android.bp
new file mode 100644 (file)
index 0000000..a01a80f
--- /dev/null
@@ -0,0 +1,7 @@
+cc_library_static {
+    name: "libLLVMIRReader",
+    defaults: [
+        "llvm-lib-defaults",
+    ],
+    srcs: ["*.cpp"],
+}
diff --git a/lib/LTO/Android.bp b/lib/LTO/Android.bp
new file mode 100644 (file)
index 0000000..928bd5c
--- /dev/null
@@ -0,0 +1,7 @@
+cc_library_static {
+    name: "libLLVMLTO",
+    defaults: [
+        "llvm-lib-defaults",
+    ],
+    srcs: ["*.cpp"],
+}
diff --git a/lib/LibDriver/Android.bp b/lib/LibDriver/Android.bp
new file mode 100644 (file)
index 0000000..d33020b
--- /dev/null
@@ -0,0 +1,14 @@
+cc_library_static {
+    name: "libLLVMLibDriver",
+    defaults: [
+        "llvm-lib-defaults",
+    ],
+    generated_headers: ["llvm-gen-libdriver"],
+    srcs: ["*.cpp"],
+}
+
+llvm_tblgen {
+    name: "llvm-gen-libdriver",
+    in: "Options.td",
+    outs: ["Options.inc"],
+}
diff --git a/lib/Linker/Android.bp b/lib/Linker/Android.bp
new file mode 100644 (file)
index 0000000..a5e1a95
--- /dev/null
@@ -0,0 +1,7 @@
+cc_library_static {
+    name: "libLLVMLinker",
+    defaults: [
+        "llvm-lib-defaults",
+    ],
+    srcs: ["*.cpp"],
+}
diff --git a/lib/MC/Android.bp b/lib/MC/Android.bp
new file mode 100644 (file)
index 0000000..05e8445
--- /dev/null
@@ -0,0 +1,9 @@
+cc_library_static {
+    name: "libLLVMMC",
+    defaults: [
+        "llvm-lib-defaults",
+    ],
+    srcs: ["*.cpp"],
+}
+
+subdirs = ["*"]
diff --git a/lib/MC/MCDisassembler/Android.bp b/lib/MC/MCDisassembler/Android.bp
new file mode 100644 (file)
index 0000000..c2f25fa
--- /dev/null
@@ -0,0 +1,7 @@
+cc_library_static {
+    name: "libLLVMMCDisassembler",
+    defaults: [
+        "llvm-lib-defaults",
+    ],
+    srcs: ["*.cpp"],
+}
diff --git a/lib/MC/MCParser/Android.bp b/lib/MC/MCParser/Android.bp
new file mode 100644 (file)
index 0000000..cc7cd1f
--- /dev/null
@@ -0,0 +1,7 @@
+cc_library_static {
+    name: "libLLVMMCParser",
+    defaults: [
+        "llvm-lib-defaults",
+    ],
+    srcs: ["*.cpp"],
+}
diff --git a/lib/Object/Android.bp b/lib/Object/Android.bp
new file mode 100644 (file)
index 0000000..c389476
--- /dev/null
@@ -0,0 +1,7 @@
+cc_library_static {
+    name: "libLLVMObject",
+    defaults: [
+        "llvm-lib-defaults",
+    ],
+    srcs: ["*.cpp"],
+}
diff --git a/lib/ObjectYAML/Android.bp b/lib/ObjectYAML/Android.bp
new file mode 100644 (file)
index 0000000..17f4a67
--- /dev/null
@@ -0,0 +1,7 @@
+cc_library_static {
+    name: "libLLVMObjectYAML",
+    defaults: [
+        "llvm-lib-defaults",
+    ],
+    srcs: ["*.cpp"],
+}
diff --git a/lib/Option/Android.bp b/lib/Option/Android.bp
new file mode 100644 (file)
index 0000000..035db4d
--- /dev/null
@@ -0,0 +1,7 @@
+cc_library_static {
+    name: "libLLVMOption",
+    defaults: [
+        "llvm-lib-defaults",
+    ],
+    srcs: ["*.cpp"],
+}
diff --git a/lib/Passes/Android.bp b/lib/Passes/Android.bp
new file mode 100644 (file)
index 0000000..f98e1b6
--- /dev/null
@@ -0,0 +1,7 @@
+cc_library_static {
+    name: "libLLVMPasses",
+    defaults: [
+        "llvm-lib-defaults",
+    ],
+    srcs: ["*.cpp"],
+}
diff --git a/lib/ProfileData/Android.bp b/lib/ProfileData/Android.bp
new file mode 100644 (file)
index 0000000..710d5d4
--- /dev/null
@@ -0,0 +1,9 @@
+cc_library_static {
+    name: "libLLVMProfileData",
+    defaults: [
+        "llvm-lib-defaults",
+    ],
+    srcs: ["*.cpp"],
+}
+
+subdirs = ["*"]
diff --git a/lib/ProfileData/Coverage/Android.bp b/lib/ProfileData/Coverage/Android.bp
new file mode 100644 (file)
index 0000000..347c500
--- /dev/null
@@ -0,0 +1,7 @@
+cc_library_static {
+    name: "libLLVMProfileDataCoverage",
+    defaults: [
+        "llvm-lib-defaults",
+    ],
+    srcs: ["*.cpp"],
+}
diff --git a/lib/Support/Android.bp b/lib/Support/Android.bp
new file mode 100644 (file)
index 0000000..d00de3f
--- /dev/null
@@ -0,0 +1,19 @@
+cc_library_static {
+    name: "libLLVMSupport",
+    vendor_available: true,
+    defaults: ["llvm-defaults-no-generated-headers"],
+    target: {
+        // llvm-defaults turns off host builds by default, turn it back on for
+        // modules that are used to build llvm-tblgen
+        host: {
+            enabled: true,
+        },
+        windows: {
+            enabled: true,
+        },
+    },
+    srcs: [
+        "*.c",
+        "*.cpp",
+    ],
+}
diff --git a/lib/TableGen/Android.bp b/lib/TableGen/Android.bp
new file mode 100644 (file)
index 0000000..c331017
--- /dev/null
@@ -0,0 +1,12 @@
+cc_library_static {
+    name: "libLLVMTableGen",
+    defaults: ["llvm-defaults-no-generated-headers"],
+    srcs: ["*.cpp"],
+    target: {
+        // llvm-defaults turns off host builds by default, turn it back on for
+        // modules that are used to build llvm-tblgen
+        host: {
+            enabled: true,
+        },
+    },
+}
diff --git a/lib/Target/AArch64/Android.bp b/lib/Target/AArch64/Android.bp
new file mode 100644 (file)
index 0000000..6f23095
--- /dev/null
@@ -0,0 +1,55 @@
+cc_library_static {
+    name: "libLLVMAArch64CodeGen",
+    defaults: [
+        "llvm-lib-defaults",
+        "llvm-aarch64-defaults",
+    ],
+    srcs: ["*.cpp"],
+
+    // Global ISEL is an experimental feature.  If LLVM_BUILD_GLOBAL_ISEL is not
+    // set, these files fail compilation based on a macro check.
+    exclude_srcs: [
+        "AArch64CallLowering.cpp",
+        "AArch64RegisterBankInfo.cpp",
+    ],
+}
+
+cc_defaults {
+    name: "llvm-aarch64-defaults",
+    generated_headers: ["llvm-gen-aarch64"],
+    static_libs: ["llvm-aarch64-headers"],
+}
+
+cc_library_static {
+    name: "llvm-aarch64-headers",
+    vendor_available: true,
+    host_supported: true,
+    target: {
+        windows: {
+            enabled: true,
+        },
+    },
+    export_include_dirs: ["."],
+}
+
+llvm_tblgen {
+    name: "llvm-gen-aarch64",
+    in: "AArch64.td",
+    outs: [
+        "AArch64GenRegisterInfo.inc",
+        "AArch64GenInstrInfo.inc",
+        "AArch64GenAsmWriter.inc",
+        "AArch64GenAsmWriter1.inc",
+        "AArch64GenDAGISel.inc",
+        "AArch64GenCallingConv.inc",
+        "AArch64GenAsmMatcher.inc",
+        "AArch64GenSubtargetInfo.inc",
+        "AArch64GenMCCodeEmitter.inc",
+        "AArch64GenFastISel.inc",
+        "AArch64GenDisassemblerTables.inc",
+        "AArch64GenMCPseudoLowering.inc",
+        "AArch64GenSystemOperands.inc",
+    ],
+}
+
+subdirs = ["*"]
diff --git a/lib/Target/AArch64/AsmParser/Android.bp b/lib/Target/AArch64/AsmParser/Android.bp
new file mode 100644 (file)
index 0000000..9b409ae
--- /dev/null
@@ -0,0 +1,8 @@
+cc_library_static {
+    name: "libLLVMAArch64AsmParser",
+    defaults: [
+        "llvm-lib-defaults",
+        "llvm-aarch64-defaults",
+    ],
+    srcs: ["*.cpp"],
+}
diff --git a/lib/Target/AArch64/Disassembler/Android.bp b/lib/Target/AArch64/Disassembler/Android.bp
new file mode 100644 (file)
index 0000000..e7a04d3
--- /dev/null
@@ -0,0 +1,8 @@
+cc_library_static {
+    name: "libLLVMAArch64Disassembler",
+    defaults: [
+        "llvm-lib-defaults",
+        "llvm-aarch64-defaults",
+    ],
+    srcs: ["*.cpp"],
+}
diff --git a/lib/Target/AArch64/InstPrinter/Android.bp b/lib/Target/AArch64/InstPrinter/Android.bp
new file mode 100644 (file)
index 0000000..f1dac2a
--- /dev/null
@@ -0,0 +1,8 @@
+cc_library_static {
+    name: "libLLVMAArch64AsmPrinter",
+    defaults: [
+        "llvm-lib-defaults",
+        "llvm-aarch64-defaults",
+    ],
+    srcs: ["*.cpp"],
+}
diff --git a/lib/Target/AArch64/MCTargetDesc/Android.bp b/lib/Target/AArch64/MCTargetDesc/Android.bp
new file mode 100644 (file)
index 0000000..9edc154
--- /dev/null
@@ -0,0 +1,8 @@
+cc_library_static {
+    name: "libLLVMAArch64Desc",
+    defaults: [
+        "llvm-lib-defaults",
+        "llvm-aarch64-defaults",
+    ],
+    srcs: ["*.cpp"],
+}
diff --git a/lib/Target/AArch64/TargetInfo/Android.bp b/lib/Target/AArch64/TargetInfo/Android.bp
new file mode 100644 (file)
index 0000000..baa98ca
--- /dev/null
@@ -0,0 +1,8 @@
+cc_library_static {
+    name: "libLLVMAArch64Info",
+    defaults: [
+        "llvm-lib-defaults",
+        "llvm-aarch64-defaults",
+    ],
+    srcs: ["*.cpp"],
+}
diff --git a/lib/Target/AArch64/Utils/Android.bp b/lib/Target/AArch64/Utils/Android.bp
new file mode 100644 (file)
index 0000000..aa2db82
--- /dev/null
@@ -0,0 +1,8 @@
+cc_library_static {
+    name: "libLLVMAArch64Utils",
+    defaults: [
+        "llvm-lib-defaults",
+        "llvm-aarch64-defaults",
+    ],
+    srcs: ["*.cpp"],
+}
diff --git a/lib/Target/AMDGPU/Android.bp b/lib/Target/AMDGPU/Android.bp
new file mode 100644 (file)
index 0000000..314f581
--- /dev/null
@@ -0,0 +1,50 @@
+cc_library_static {
+    name: "libLLVMAMDGPUCodeGen",
+    defaults: [
+        "llvm-lib-defaults",
+        "llvm-amdgpu-defaults",
+    ],
+    srcs: ["*.cpp"],
+
+    // Global ISEL is an experimental feature.  If LLVM_BUILD_GLOBAL_ISEL is not
+    // set, these files fail compilation based on a macro check.
+    exclude_srcs: [
+        "AMDGPUCallLowering.cpp",
+    ],
+}
+
+cc_defaults {
+    name: "llvm-amdgpu-defaults",
+    generated_headers: ["llvm-gen-amdgpu"],
+    static_libs: ["llvm-amdgpu-headers"],
+}
+
+cc_library_static {
+    name: "llvm-amdgpu-headers",
+    host_supported: true,
+    target: {
+        windows: {
+            enabled: true,
+        },
+    },
+    export_include_dirs: ["."],
+}
+
+llvm_tblgen {
+    name: "llvm-gen-amdgpu",
+    in: "AMDGPU.td",
+    outs: [
+        "AMDGPUGenRegisterInfo.inc",
+        "AMDGPUGenInstrInfo.inc",
+        "AMDGPUGenMCCodeEmitter.inc",
+        "AMDGPUGenAsmWriter.inc",
+        "AMDGPUGenAsmMatcher.inc",
+        "AMDGPUGenDAGISel.inc",
+        "AMDGPUGenCallingConv.inc",
+        "AMDGPUGenSubtargetInfo.inc",
+        "AMDGPUGenIntrinsics.inc",
+        "AMDGPUGenDFAPacketizer.inc",
+    ],
+}
+
+subdirs = ["*"]
diff --git a/lib/Target/AMDGPU/AsmParser/Android.bp b/lib/Target/AMDGPU/AsmParser/Android.bp
new file mode 100644 (file)
index 0000000..9e6fd08
--- /dev/null
@@ -0,0 +1,8 @@
+cc_library_static {
+    name: "libLLVMAMDGPUAsmParser",
+    defaults: [
+        "llvm-lib-defaults",
+        "llvm-amdgpu-defaults",
+    ],
+    srcs: ["*.cpp"],
+}
diff --git a/lib/Target/AMDGPU/InstPrinter/Android.bp b/lib/Target/AMDGPU/InstPrinter/Android.bp
new file mode 100644 (file)
index 0000000..0ee4ec3
--- /dev/null
@@ -0,0 +1,8 @@
+cc_library_static {
+    name: "libLLVMAMDGPUAsmPrinter",
+    defaults: [
+        "llvm-lib-defaults",
+        "llvm-amdgpu-defaults",
+    ],
+    srcs: ["*.cpp"],
+}
diff --git a/lib/Target/AMDGPU/MCTargetDesc/Android.bp b/lib/Target/AMDGPU/MCTargetDesc/Android.bp
new file mode 100644 (file)
index 0000000..93a6ea5
--- /dev/null
@@ -0,0 +1,8 @@
+cc_library_static {
+    name: "libLLVMAMDGPUDesc",
+    defaults: [
+        "llvm-lib-defaults",
+        "llvm-amdgpu-defaults",
+    ],
+    srcs: ["*.cpp"],
+}
diff --git a/lib/Target/AMDGPU/TargetInfo/Android.bp b/lib/Target/AMDGPU/TargetInfo/Android.bp
new file mode 100644 (file)
index 0000000..db94c04
--- /dev/null
@@ -0,0 +1,8 @@
+cc_library_static {
+    name: "libLLVMAMDGPUInfo",
+    defaults: [
+        "llvm-lib-defaults",
+        "llvm-amdgpu-defaults",
+    ],
+    srcs: ["*.cpp"],
+}
diff --git a/lib/Target/AMDGPU/Utils/Android.bp b/lib/Target/AMDGPU/Utils/Android.bp
new file mode 100644 (file)
index 0000000..f6fb594
--- /dev/null
@@ -0,0 +1,8 @@
+cc_library_static {
+    name: "libLLVMAMDGPUUtils",
+    defaults: [
+        "llvm-lib-defaults",
+        "llvm-amdgpu-defaults",
+    ],
+    srcs: ["*.cpp"],
+}
diff --git a/lib/Target/ARM/Android.bp b/lib/Target/ARM/Android.bp
new file mode 100644 (file)
index 0000000..9f7f0db
--- /dev/null
@@ -0,0 +1,53 @@
+cc_library_static {
+    name: "libLLVMARMCodeGen",
+    defaults: [
+        "llvm-lib-defaults",
+        "llvm-arm-defaults",
+    ],
+    srcs: ["*.cpp"],
+
+    // b/31559947, b/31938382 clang-tidy segmentation fault.
+    tidy_checks: [
+        "-clang-analyzer-*",
+        "-readability-*",
+    ],
+}
+
+cc_defaults {
+    name: "llvm-arm-defaults",
+    generated_headers: ["llvm-gen-arm"],
+    static_libs: ["llvm-arm-headers"],
+}
+
+cc_library_static {
+    name: "llvm-arm-headers",
+    vendor_available: true,
+    host_supported: true,
+    target: {
+        windows: {
+            enabled: true,
+        },
+    },
+    export_include_dirs: ["."],
+}
+
+llvm_tblgen {
+    name: "llvm-gen-arm",
+    in: "ARM.td",
+    outs: [
+        "ARMGenRegisterInfo.inc",
+        "ARMGenInstrInfo.inc",
+        "ARMGenCodeEmitter.inc",
+        "ARMGenMCCodeEmitter.inc",
+        "ARMGenMCPseudoLowering.inc",
+        "ARMGenAsmWriter.inc",
+        "ARMGenAsmMatcher.inc",
+        "ARMGenDAGISel.inc",
+        "ARMGenFastISel.inc",
+        "ARMGenCallingConv.inc",
+        "ARMGenSubtargetInfo.inc",
+        "ARMGenDisassemblerTables.inc",
+    ],
+}
+
+subdirs = ["*"]
diff --git a/lib/Target/ARM/AsmParser/Android.bp b/lib/Target/ARM/AsmParser/Android.bp
new file mode 100644 (file)
index 0000000..3340db5
--- /dev/null
@@ -0,0 +1,8 @@
+cc_library_static {
+    name: "libLLVMARMAsmParser",
+    defaults: [
+        "llvm-lib-defaults",
+        "llvm-arm-defaults",
+    ],
+    srcs: ["*.cpp"],
+}
diff --git a/lib/Target/ARM/Disassembler/Android.bp b/lib/Target/ARM/Disassembler/Android.bp
new file mode 100644 (file)
index 0000000..8deda86
--- /dev/null
@@ -0,0 +1,8 @@
+cc_library_static {
+    name: "libLLVMARMDisassembler",
+    defaults: [
+        "llvm-lib-defaults",
+        "llvm-arm-defaults",
+    ],
+    srcs: ["*.cpp"],
+}
diff --git a/lib/Target/ARM/InstPrinter/Android.bp b/lib/Target/ARM/InstPrinter/Android.bp
new file mode 100644 (file)
index 0000000..f54529f
--- /dev/null
@@ -0,0 +1,8 @@
+cc_library_static {
+    name: "libLLVMARMAsmPrinter",
+    defaults: [
+        "llvm-lib-defaults",
+        "llvm-arm-defaults",
+    ],
+    srcs: ["*.cpp"],
+}
diff --git a/lib/Target/ARM/MCTargetDesc/Android.bp b/lib/Target/ARM/MCTargetDesc/Android.bp
new file mode 100644 (file)
index 0000000..de05686
--- /dev/null
@@ -0,0 +1,8 @@
+cc_library_static {
+    name: "libLLVMARMDesc",
+    defaults: [
+        "llvm-lib-defaults",
+        "llvm-arm-defaults",
+    ],
+    srcs: ["*.cpp"],
+}
diff --git a/lib/Target/ARM/TargetInfo/Android.bp b/lib/Target/ARM/TargetInfo/Android.bp
new file mode 100644 (file)
index 0000000..cfead24
--- /dev/null
@@ -0,0 +1,8 @@
+cc_library_static {
+    name: "libLLVMARMInfo",
+    defaults: [
+        "llvm-lib-defaults",
+        "llvm-arm-defaults",
+    ],
+    srcs: ["*.cpp"],
+}
diff --git a/lib/Target/Android.bp b/lib/Target/Android.bp
new file mode 100644 (file)
index 0000000..5101e66
--- /dev/null
@@ -0,0 +1,9 @@
+cc_library_static {
+    name: "libLLVMTarget",
+    defaults: [
+        "llvm-lib-defaults",
+    ],
+    srcs: ["*.cpp"],
+}
+
+subdirs = ["*"]
diff --git a/lib/Target/Mips/Android.bp b/lib/Target/Mips/Android.bp
new file mode 100644 (file)
index 0000000..8e1a99d
--- /dev/null
@@ -0,0 +1,47 @@
+cc_library_static {
+    name: "libLLVMMipsCodeGen",
+    defaults: [
+        "llvm-lib-defaults",
+        "llvm-mips-defaults",
+    ],
+    srcs: ["*.cpp"],
+}
+
+cc_defaults {
+    name: "llvm-mips-defaults",
+    generated_headers: ["llvm-gen-mips"],
+    static_libs: ["llvm-mips-headers"],
+}
+
+cc_library_static {
+    name: "llvm-mips-headers",
+    vendor_available: true,
+    host_supported: true,
+    target: {
+        windows: {
+            enabled: true,
+        },
+    },
+    export_include_dirs: ["."],
+}
+
+llvm_tblgen {
+    name: "llvm-gen-mips",
+    in: "Mips.td",
+    outs: [
+        "MipsGenRegisterInfo.inc",
+        "MipsGenInstrInfo.inc",
+        "MipsGenCodeEmitter.inc",
+        "MipsGenMCCodeEmitter.inc",
+        "MipsGenMCPseudoLowering.inc",
+        "MipsGenAsmWriter.inc",
+        "MipsGenAsmMatcher.inc",
+        "MipsGenDAGISel.inc",
+        "MipsGenFastISel.inc",
+        "MipsGenCallingConv.inc",
+        "MipsGenSubtargetInfo.inc",
+        "MipsGenDisassemblerTables.inc",
+    ],
+}
+
+subdirs = ["*"]
diff --git a/lib/Target/Mips/AsmParser/Android.bp b/lib/Target/Mips/AsmParser/Android.bp
new file mode 100644 (file)
index 0000000..b61dd02
--- /dev/null
@@ -0,0 +1,8 @@
+cc_library_static {
+    name: "libLLVMMipsAsmParser",
+    defaults: [
+        "llvm-lib-defaults",
+        "llvm-mips-defaults",
+    ],
+    srcs: ["*.cpp"],
+}
diff --git a/lib/Target/Mips/Disassembler/Android.bp b/lib/Target/Mips/Disassembler/Android.bp
new file mode 100644 (file)
index 0000000..66118be
--- /dev/null
@@ -0,0 +1,8 @@
+cc_library_static {
+    name: "libLLVMMipsDisassembler",
+    defaults: [
+        "llvm-lib-defaults",
+        "llvm-mips-defaults",
+    ],
+    srcs: ["*.cpp"],
+}
diff --git a/lib/Target/Mips/InstPrinter/Android.bp b/lib/Target/Mips/InstPrinter/Android.bp
new file mode 100644 (file)
index 0000000..28483b6
--- /dev/null
@@ -0,0 +1,8 @@
+cc_library_static {
+    name: "libLLVMMipsAsmPrinter",
+    defaults: [
+        "llvm-lib-defaults",
+        "llvm-mips-defaults",
+    ],
+    srcs: ["*.cpp"],
+}
diff --git a/lib/Target/Mips/MCTargetDesc/Android.bp b/lib/Target/Mips/MCTargetDesc/Android.bp
new file mode 100644 (file)
index 0000000..cc06b28
--- /dev/null
@@ -0,0 +1,8 @@
+cc_library_static {
+    name: "libLLVMMipsDesc",
+    defaults: [
+        "llvm-lib-defaults",
+        "llvm-mips-defaults",
+    ],
+    srcs: ["*.cpp"],
+}
diff --git a/lib/Target/Mips/TargetInfo/Android.bp b/lib/Target/Mips/TargetInfo/Android.bp
new file mode 100644 (file)
index 0000000..938c076
--- /dev/null
@@ -0,0 +1,8 @@
+cc_library_static {
+    name: "libLLVMMipsInfo",
+    defaults: [
+        "llvm-lib-defaults",
+        "llvm-mips-defaults",
+    ],
+    srcs: ["*.cpp"],
+}
diff --git a/lib/Target/X86/Android.bp b/lib/Target/X86/Android.bp
new file mode 100644 (file)
index 0000000..efcbc07
--- /dev/null
@@ -0,0 +1,52 @@
+cc_library_static {
+    name: "libLLVMX86CodeGen",
+    defaults: [
+        "llvm-lib-defaults",
+        "llvm-x86-defaults",
+    ],
+    srcs: ["*.cpp"],
+
+    // b/31559947, b/31938382 clang-tidy segmentation fault.
+    tidy_checks: [
+        "-clang-analyzer-*",
+        "-readability-*",
+        "-google-readability-*",
+    ],
+}
+
+cc_defaults {
+    name: "llvm-x86-defaults",
+    generated_headers: ["llvm-gen-x86"],
+    static_libs: ["llvm-x86-headers"],
+}
+
+cc_library_static {
+    name: "llvm-x86-headers",
+    vendor_available: true,
+    host_supported: true,
+    target: {
+        windows: {
+            enabled: true,
+        },
+    },
+    export_include_dirs: ["."],
+}
+
+llvm_tblgen {
+    name: "llvm-gen-x86",
+    in: "X86.td",
+    outs: [
+        "X86GenAsmMatcher.inc",
+        "X86GenAsmWriter.inc",
+        "X86GenAsmWriter1.inc",
+        "X86GenDisassemblerTables.inc",
+        "X86GenRegisterInfo.inc",
+        "X86GenInstrInfo.inc",
+        "X86GenDAGISel.inc",
+        "X86GenFastISel.inc",
+        "X86GenSubtargetInfo.inc",
+        "X86GenCallingConv.inc",
+    ],
+}
+
+subdirs = ["*"]
diff --git a/lib/Target/X86/AsmParser/Android.bp b/lib/Target/X86/AsmParser/Android.bp
new file mode 100644 (file)
index 0000000..830e02b
--- /dev/null
@@ -0,0 +1,8 @@
+cc_library_static {
+    name: "libLLVMX86AsmParser",
+    defaults: [
+        "llvm-lib-defaults",
+        "llvm-x86-defaults",
+    ],
+    srcs: ["*.cpp"],
+}
diff --git a/lib/Target/X86/Disassembler/Android.bp b/lib/Target/X86/Disassembler/Android.bp
new file mode 100644 (file)
index 0000000..0ee2e5e
--- /dev/null
@@ -0,0 +1,8 @@
+cc_library_static {
+    name: "libLLVMX86Disassembler",
+    defaults: [
+        "llvm-lib-defaults",
+        "llvm-x86-defaults",
+    ],
+    srcs: ["*.cpp"],
+}
diff --git a/lib/Target/X86/InstPrinter/Android.bp b/lib/Target/X86/InstPrinter/Android.bp
new file mode 100644 (file)
index 0000000..bd37b9e
--- /dev/null
@@ -0,0 +1,8 @@
+cc_library_static {
+    name: "libLLVMX86AsmPrinter",
+    defaults: [
+        "llvm-lib-defaults",
+        "llvm-x86-defaults",
+    ],
+    srcs: ["*.cpp"],
+}
diff --git a/lib/Target/X86/MCTargetDesc/Android.bp b/lib/Target/X86/MCTargetDesc/Android.bp
new file mode 100644 (file)
index 0000000..7eb5a6e
--- /dev/null
@@ -0,0 +1,8 @@
+cc_library_static {
+    name: "libLLVMX86Desc",
+    defaults: [
+        "llvm-lib-defaults",
+        "llvm-x86-defaults",
+    ],
+    srcs: ["*.cpp"],
+}
diff --git a/lib/Target/X86/TargetInfo/Android.bp b/lib/Target/X86/TargetInfo/Android.bp
new file mode 100644 (file)
index 0000000..a1a2f5c
--- /dev/null
@@ -0,0 +1,8 @@
+cc_library_static {
+    name: "libLLVMX86Info",
+    defaults: [
+        "llvm-lib-defaults",
+        "llvm-x86-defaults",
+    ],
+    srcs: ["*.cpp"],
+}
diff --git a/lib/Target/X86/Utils/Android.bp b/lib/Target/X86/Utils/Android.bp
new file mode 100644 (file)
index 0000000..30d8ec1
--- /dev/null
@@ -0,0 +1,8 @@
+cc_library_static {
+    name: "libLLVMX86Utils",
+    defaults: [
+        "llvm-lib-defaults",
+        "llvm-x86-defaults",
+    ],
+    srcs: ["*.cpp"],
+}
diff --git a/lib/Transforms/Android.bp b/lib/Transforms/Android.bp
new file mode 100644 (file)
index 0000000..b44c296
--- /dev/null
@@ -0,0 +1 @@
+subdirs = ["*"]
diff --git a/lib/Transforms/Hello/Android.bp b/lib/Transforms/Hello/Android.bp
new file mode 100644 (file)
index 0000000..64e2e6d
--- /dev/null
@@ -0,0 +1,13 @@
+cc_library_host_shared {
+    name: "LLVMHello",
+    defaults: [
+        "llvm-lib-defaults",
+    ],
+    srcs: ["*.cpp"],
+    allow_undefined_symbols: true,
+    target: {
+        windows: {
+            enabled: false,
+        },
+    },
+}
diff --git a/lib/Transforms/IPO/Android.bp b/lib/Transforms/IPO/Android.bp
new file mode 100644 (file)
index 0000000..644cee1
--- /dev/null
@@ -0,0 +1,7 @@
+cc_library_static {
+    name: "libLLVMipo",
+    defaults: [
+        "llvm-lib-defaults",
+    ],
+    srcs: ["*.cpp"],
+}
diff --git a/lib/Transforms/InstCombine/Android.bp b/lib/Transforms/InstCombine/Android.bp
new file mode 100644 (file)
index 0000000..dfcc7ca
--- /dev/null
@@ -0,0 +1,7 @@
+cc_library_static {
+    name: "libLLVMInstCombine",
+    defaults: [
+        "llvm-lib-defaults",
+    ],
+    srcs: ["*.cpp"],
+}
diff --git a/lib/Transforms/Instrumentation/Android.bp b/lib/Transforms/Instrumentation/Android.bp
new file mode 100644 (file)
index 0000000..b719f17
--- /dev/null
@@ -0,0 +1,7 @@
+cc_library_static {
+    name: "libLLVMInstrumentation",
+    defaults: [
+        "llvm-lib-defaults",
+    ],
+    srcs: ["*.cpp"],
+}
diff --git a/lib/Transforms/ObjCARC/Android.bp b/lib/Transforms/ObjCARC/Android.bp
new file mode 100644 (file)
index 0000000..64bc529
--- /dev/null
@@ -0,0 +1,7 @@
+cc_library_static {
+    name: "libLLVMTransformObjCARC",
+    defaults: [
+        "llvm-lib-defaults",
+    ],
+    srcs: ["*.cpp"],
+}
diff --git a/lib/Transforms/Scalar/Android.bp b/lib/Transforms/Scalar/Android.bp
new file mode 100644 (file)
index 0000000..42e1eb8
--- /dev/null
@@ -0,0 +1,7 @@
+cc_library_static {
+    name: "libLLVMScalarOpts",
+    defaults: [
+        "llvm-lib-defaults",
+    ],
+    srcs: ["*.cpp"],
+}
diff --git a/lib/Transforms/Utils/Android.bp b/lib/Transforms/Utils/Android.bp
new file mode 100644 (file)
index 0000000..8fcf7ef
--- /dev/null
@@ -0,0 +1,7 @@
+cc_library_static {
+    name: "libLLVMTransformUtils",
+    defaults: [
+        "llvm-lib-defaults",
+    ],
+    srcs: ["*.cpp"],
+}
diff --git a/lib/Transforms/Vectorize/Android.bp b/lib/Transforms/Vectorize/Android.bp
new file mode 100644 (file)
index 0000000..78b1685
--- /dev/null
@@ -0,0 +1,7 @@
+cc_library_static {
+    name: "libLLVMVectorize",
+    defaults: [
+        "llvm-lib-defaults",
+    ],
+    srcs: ["*.cpp"],
+}
diff --git a/soong/Android.bp b/soong/Android.bp
new file mode 100644 (file)
index 0000000..fe886dc
--- /dev/null
@@ -0,0 +1,17 @@
+bootstrap_go_package {
+    name: "soong-llvm",
+    pkgPath: "android/soong/external/llvm",
+    deps: [
+        "blueprint",
+        "blueprint-pathtools",
+        "soong",
+        "soong-android",
+        "soong-cc",
+        "soong-genrule",
+    ],
+    srcs: [
+        "llvm.go",
+        "tblgen.go",
+    ],
+    pluginFor: ["soong_build"],
+}
diff --git a/soong/llvm.go b/soong/llvm.go
new file mode 100644 (file)
index 0000000..7ff99bd
--- /dev/null
@@ -0,0 +1,115 @@
+// Copyright (C) 2016 The Android Open Source Project
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package llvm
+
+import (
+       "android/soong/android"
+       "android/soong/cc"
+
+       "github.com/google/blueprint/proptools"
+)
+
+func globalFlags(ctx android.BaseContext) []string {
+       var cflags []string
+
+       if ctx.AConfig().IsEnvTrue("FORCE_BUILD_LLVM_DISABLE_NDEBUG") {
+               cflags = append(cflags, "-D_DEBUG", "-UNDEBUG")
+       }
+
+       return cflags
+}
+
+func deviceFlags(ctx android.BaseContext) []string {
+       var cflags []string
+
+       return cflags
+}
+
+func hostFlags(ctx android.BaseContext) []string {
+       var cflags []string
+
+       if ctx.AConfig().IsEnvTrue("FORCE_BUILD_LLVM_DEBUG") {
+               cflags = append(cflags, "-O0", "-g")
+       }
+
+       return cflags
+}
+
+func llvmDefaults(ctx android.LoadHookContext) {
+       type props struct {
+               Target struct {
+                       Android struct {
+                               Cflags  []string
+                               Enabled *bool
+                       }
+                       Host struct {
+                               Enabled *bool
+                       }
+                       Linux struct {
+                               Cflags []string
+                       }
+                       Darwin struct {
+                               Cflags []string
+                       }
+               }
+               Cflags []string
+       }
+
+       p := &props{}
+       p.Cflags = globalFlags(ctx)
+       p.Target.Android.Cflags = deviceFlags(ctx)
+       h := hostFlags(ctx)
+       p.Target.Linux.Cflags = h
+       p.Target.Darwin.Cflags = h
+
+       if ctx.AConfig().IsEnvTrue("DISABLE_LLVM_DEVICE_BUILDS") {
+               p.Target.Android.Enabled = proptools.BoolPtr(false)
+       }
+
+       ctx.AppendProperties(p)
+}
+
+func forceBuildLlvmComponents(ctx android.LoadHookContext) {
+       if !ctx.AConfig().IsEnvTrue("FORCE_BUILD_LLVM_COMPONENTS") {
+               type props struct {
+                       Target struct {
+                               Host struct {
+                                       Enabled *bool
+                               }
+                       }
+               }
+               p := &props{}
+               p.Target.Host.Enabled = proptools.BoolPtr(false)
+               ctx.AppendProperties(p)
+       }
+}
+
+func init() {
+       android.RegisterModuleType("llvm_defaults", llvmDefaultsFactory)
+       android.RegisterModuleType("force_build_llvm_components_defaults", forceBuildLlvmComponentsDefaultsFactory)
+}
+
+func llvmDefaultsFactory() android.Module {
+       module := cc.DefaultsFactory()
+       android.AddLoadHook(module, llvmDefaults)
+
+       return module
+}
+
+func forceBuildLlvmComponentsDefaultsFactory() android.Module {
+       module := cc.DefaultsFactory()
+       android.AddLoadHook(module, forceBuildLlvmComponents)
+       return module
+}
diff --git a/soong/tblgen.go b/soong/tblgen.go
new file mode 100644 (file)
index 0000000..4e59fbf
--- /dev/null
@@ -0,0 +1,157 @@
+// Copyright (C) 2016 The Android Open Source Project
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package llvm
+
+import (
+       "path/filepath"
+       "strings"
+
+       "android/soong/android"
+       "android/soong/genrule"
+
+       "github.com/google/blueprint"
+)
+
+func init() {
+       android.RegisterModuleType("llvm_tblgen", llvmTblgenFactory)
+}
+
+var (
+       pctx = android.NewPackageContext("android/soong/llvm")
+
+       llvmTblgen = pctx.HostBinToolVariable("llvmTblgen", "llvm-tblgen")
+
+       tblgenRule = pctx.StaticRule("tblgenRule", blueprint.RuleParams{
+               Depfile:     "${out}.d",
+               Deps:        blueprint.DepsGCC,
+               Command:     "${llvmTblgen} ${includes} ${generator} -d ${depfile} -o ${out} ${in}",
+               CommandDeps: []string{"${llvmTblgen}"},
+               Description: "LLVM TableGen $in => $out",
+       }, "includes", "depfile", "generator")
+)
+
+type tblgenProperties struct {
+       In   string
+       Outs []string
+}
+
+type tblgen struct {
+       android.ModuleBase
+
+       properties tblgenProperties
+
+       exportedHeaderDirs android.Paths
+       generatedHeaders   android.Paths
+}
+
+var _ genrule.SourceFileGenerator = (*tblgen)(nil)
+
+func (t *tblgen) GenerateAndroidBuildActions(ctx android.ModuleContext) {
+       in := android.PathForModuleSrc(ctx, t.properties.In)
+
+       includes := []string{
+               "-I " + ctx.ModuleDir(),
+               "-I external/llvm/include",
+               "-I external/llvm/lib/Target",
+               "-I " + filepath.Dir(in.String()),
+       }
+
+       for _, o := range t.properties.Outs {
+               out := android.PathForModuleGen(ctx, o)
+               generator := outToGenerator(ctx, o)
+
+               ctx.ModuleBuild(pctx, android.ModuleBuildParams{
+                       Rule:   tblgenRule,
+                       Input:  in,
+                       Output: out,
+                       Args: map[string]string{
+                               "includes":  strings.Join(includes, " "),
+                               "generator": generator,
+                       },
+               })
+               t.generatedHeaders = append(t.generatedHeaders, out)
+       }
+
+       t.exportedHeaderDirs = append(t.exportedHeaderDirs, android.PathForModuleGen(ctx, ""))
+}
+
+func outToGenerator(ctx android.ModuleContext, out string) string {
+       out = filepath.Base(out)
+       switch {
+       case strings.HasSuffix(out, "GenRegisterInfo.inc"):
+               return "-gen-register-info"
+       case strings.HasSuffix(out, "GenInstrInfo.inc"):
+               return "-gen-instr-info"
+       case strings.HasSuffix(out, "GenAsmWriter.inc"):
+               return "-gen-asm-writer"
+       case strings.HasSuffix(out, "GenAsmWriter1.inc"):
+               return "-gen-asm-writer -asmwriternum=1"
+       case strings.HasSuffix(out, "GenAsmMatcher.inc"):
+               return "-gen-asm-matcher"
+       case strings.HasSuffix(out, "GenCodeEmitter.inc"):
+               return "-gen-emitter"
+       case strings.HasSuffix(out, "GenMCCodeEmitter.inc"):
+               return "-gen-emitter"
+       case strings.HasSuffix(out, "GenMCPseudoLowering.inc"):
+               return "-gen-pseudo-lowering"
+       case strings.HasSuffix(out, "GenDAGISel.inc"):
+               return "-gen-dag-isel"
+       case strings.HasSuffix(out, "GenDisassemblerTables.inc"):
+               return "-gen-disassembler"
+       case strings.HasSuffix(out, "GenSystemOperands.inc"):
+               return "-gen-searchable-tables"
+       case strings.HasSuffix(out, "GenEDInfo.inc"):
+               return "-gen-enhanced-disassembly-info"
+       case strings.HasSuffix(out, "GenFastISel.inc"):
+               return "-gen-fast-isel"
+       case strings.HasSuffix(out, "GenSubtargetInfo.inc"):
+               return "-gen-subtarget"
+       case strings.HasSuffix(out, "GenCallingConv.inc"):
+               return "-gen-callingconv"
+       case strings.HasSuffix(out, "GenIntrinsics.inc"):
+               return "-gen-tgt-intrinsic"
+       case strings.HasSuffix(out, "GenDecoderTables.inc"):
+               return "-gen-arm-decoder"
+       case strings.HasSuffix(out, "Options.inc"):
+               return "-gen-opt-parser-defs"
+       case strings.HasSuffix(out, "GenDFAPacketizer.inc"):
+               return "-gen-dfa-packetizer"
+       case out == "Attributes.inc", out == "AttributesCompatFunc.inc":
+               return "-gen-attrs"
+       case out == "Intrinsics.gen":
+               return "-gen-intrinsic"
+       }
+
+       ctx.ModuleErrorf("couldn't map output file %q to a generator", out)
+       return ""
+}
+
+func (t *tblgen) DepsMutator(ctx android.BottomUpMutatorContext) {
+}
+
+func (t *tblgen) GeneratedHeaderDirs() android.Paths {
+       return t.exportedHeaderDirs
+}
+
+func (t *tblgen) GeneratedSourceFiles() android.Paths {
+       return t.generatedHeaders
+}
+
+func llvmTblgenFactory() android.Module {
+       t := &tblgen{}
+       t.AddProperties(&t.properties)
+       android.InitAndroidModule(t)
+       return t
+}
diff --git a/tools/bugpoint-passes/Android.bp b/tools/bugpoint-passes/Android.bp
new file mode 100644 (file)
index 0000000..925c2bd
--- /dev/null
@@ -0,0 +1,14 @@
+// BugpointPasses module for the host
+// =====================================================
+
+cc_library_host_shared {
+    name: "BugpointPasses",
+    defaults: ["llvm-defaults"],
+    srcs: ["TestPasses.cpp"],
+    allow_undefined_symbols: true,
+    target: {
+        windows: {
+            enabled: false,
+        },
+    },
+}
diff --git a/tools/bugpoint/Android.bp b/tools/bugpoint/Android.bp
new file mode 100644 (file)
index 0000000..89514b8
--- /dev/null
@@ -0,0 +1,41 @@
+//===---------------------------------------------------------------===
+// bugpoint command line tool
+//===---------------------------------------------------------------===
+
+
+cc_binary_host {
+    name: "bugpoint",
+    defaults: ["llvm-defaults"],
+    srcs: ["*.cpp"],
+    static_libs: [
+        "libLLVMBitWriter",
+        "libLLVMCodeGen",
+        "libLLVMipo",
+        "libLLVMIRReader",
+        "libLLVMBitReader",
+        "libLLVMAsmParser",
+        "libLLVMInstCombine",
+        "libLLVMInstrumentation",
+        "libLLVMLinker",
+        "libLLVMTransformObjCARC",
+        "libLLVMObject",
+        "libLLVMScalarOpts",
+        "libLLVMTransformUtils",
+        "libLLVMAnalysis",
+        "libLLVMTarget",
+        "libLLVMCore",
+        "libLLVMMC",
+        "libLLVMMCParser",
+        "libLLVMProfileData",
+        "libLLVMVectorize",
+        "libLLVMSupport",
+    ],
+    target: {
+        darwin: {
+            ldflags: ["-Wl,-export_dynamic"],
+        },
+        linux: {
+            ldflags: ["-Wl,--export-dynamic"],
+        },
+    },
+}
diff --git a/tools/dsymutil/Android.bp b/tools/dsymutil/Android.bp
new file mode 100644 (file)
index 0000000..731d6c9
--- /dev/null
@@ -0,0 +1,53 @@
+cc_binary_host {
+    name: "llvm-dsymutil",
+    defaults: ["llvm-defaults"],
+    srcs: ["*.cpp"],
+    static_libs: [
+        "libLLVMARMCodeGen",
+        "libLLVMARMAsmParser",
+        "libLLVMARMInfo",
+        "libLLVMARMDesc",
+        "libLLVMARMAsmPrinter",
+        "libLLVMARMDisassembler",
+        "libLLVMAArch64CodeGen",
+        "libLLVMAArch64Info",
+        "libLLVMAArch64AsmParser",
+        "libLLVMAArch64Desc",
+        "libLLVMAArch64AsmPrinter",
+        "libLLVMAArch64Utils",
+        "libLLVMAArch64Disassembler",
+        "libLLVMMipsCodeGen",
+        "libLLVMMipsInfo",
+        "libLLVMMipsAsmParser",
+        "libLLVMMipsDesc",
+        "libLLVMMipsAsmPrinter",
+        "libLLVMMipsDisassembler",
+        "libLLVMX86CodeGen",
+        "libLLVMX86Info",
+        "libLLVMX86Desc",
+        "libLLVMX86AsmParser",
+        "libLLVMX86AsmPrinter",
+        "libLLVMX86Utils",
+        "libLLVMX86Disassembler",
+        "libLLVMX86CodeGen",
+        "libLLVMAsmPrinter",
+        "libLLVMDebugInfoCodeView",
+        "libLLVMSelectionDAG",
+        "libLLVMCodeGen",
+        "libLLVMProfileData",
+        "libLLVMGlobalISel",
+        "libLLVMDebugInfoDWARF",
+        "libLLVMInstrumentation",
+        "libLLVMMCParser",
+        "libLLVMMCDisassembler",
+        "libLLVMObject",
+        "libLLVMBitReader",
+        "libLLVMScalarOpts",
+        "libLLVMTransformUtils",
+        "libLLVMAnalysis",
+        "libLLVMTarget",
+        "libLLVMCore",
+        "libLLVMMC",
+        "libLLVMSupport",
+    ],
+}
diff --git a/tools/gold/Android.bp b/tools/gold/Android.bp
new file mode 100644 (file)
index 0000000..c7134d8
--- /dev/null
@@ -0,0 +1,27 @@
+//
+// Copyright (C) 2015 The Android Open Source Project
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+// For the host only
+// =====================================================
+
+cc_library_host_shared {
+    name: "LLVMgold",
+    defaults: ["llvm-defaults"],
+    srcs: ["gold-plugin.cpp"],
+    shared_libs: ["libLLVM"],
+    include_dirs: ["toolchain/binutils/binutils-2.25/include"],
+    compile_multilib: "first",
+}
diff --git a/tools/llc/Android.bp b/tools/llc/Android.bp
new file mode 100644 (file)
index 0000000..efe7b98
--- /dev/null
@@ -0,0 +1,105 @@
+//===---------------------------------------------------------------===
+// llc command line tool (common)
+//===---------------------------------------------------------------===
+
+llvm_llc_mips_STATIC_LIBRARIES = [
+    "libLLVMMipsAsmParser",
+    "libLLVMMipsInfo",
+    "libLLVMMipsCodeGen",
+    "libLLVMMipsDesc",
+    "libLLVMMipsAsmPrinter",
+]
+
+llvm_llc_x86_STATIC_LIBRARIES = [
+    "libLLVMX86Info",
+    "libLLVMX86AsmParser",
+    "libLLVMX86CodeGen",
+    "libLLVMX86Disassembler",
+    "libLLVMX86Desc",
+    "libLLVMX86AsmPrinter",
+    "libLLVMX86Utils",
+]
+
+llvm_llc_arm_STATIC_LIBRARIES = [
+    "libLLVMARMCodeGen",
+    "libLLVMARMDisassembler",
+    "libLLVMARMAsmParser",
+    "libLLVMARMAsmPrinter",
+    "libLLVMARMDesc",
+    "libLLVMARMInfo",
+]
+
+llvm_llc_aarch64_STATIC_LIBRARIES = [
+    "libLLVMAArch64Info",
+    "libLLVMAArch64AsmParser",
+    "libLLVMAArch64CodeGen",
+    "libLLVMAArch64Disassembler",
+    "libLLVMAArch64Desc",
+    "libLLVMAArch64AsmPrinter",
+    "libLLVMAArch64Utils",
+]
+
+//===---------------------------------------------------------------===
+// llc command line tool
+//===---------------------------------------------------------------===
+
+cc_binary_host {
+    name: "llc",
+    defaults: ["llvm-defaults"],
+    srcs: ["llc.cpp"],
+    static_libs: [
+        "libLLVMGlobalISel",
+        "libLLVMAsmPrinter",
+        "libLLVMDebugInfoCodeView",
+        "libLLVMIRReader",
+        "libLLVMAsmParser",
+        "libLLVMBitReader",
+        "libLLVMBitWriter",
+        "libLLVMSelectionDAG",
+        "libLLVMInstCombine",
+        "libLLVMCodeGen",
+        "libLLVMProfileData",
+        "libLLVMInstrumentation",
+        "libLLVMObject",
+        "libLLVMipo",
+        "libLLVMLinker",
+        "libLLVMMCDisassembler",
+        "libLLVMMC",
+        "libLLVMMIRParser",
+        "libLLVMMCParser",
+        "libLLVMScalarOpts",
+        "libLLVMTransformUtils",
+        "libLLVMVectorize",
+        "libLLVMAnalysis",
+        "libLLVMTarget",
+        "libLLVMCore",
+        "libLLVMSupport",
+        "libLLVMObject",
+    ],
+    target: {
+        host: {
+            static_libs: llvm_llc_arm_STATIC_LIBRARIES +
+                llvm_llc_mips_STATIC_LIBRARIES +
+                llvm_llc_x86_STATIC_LIBRARIES +
+                llvm_llc_aarch64_STATIC_LIBRARIES,
+        },
+        android_arm: {
+            static_libs: llvm_llc_arm_STATIC_LIBRARIES,
+        },
+        android_arm64: {
+            static_libs: llvm_llc_aarch64_STATIC_LIBRARIES + llvm_llc_arm_STATIC_LIBRARIES,
+        },
+        android_mips: {
+            static_libs: llvm_llc_mips_STATIC_LIBRARIES,
+        },
+        android_mips64: {
+            static_libs: llvm_llc_mips_STATIC_LIBRARIES,
+        },
+        android_x86: {
+            static_libs: llvm_llc_x86_STATIC_LIBRARIES,
+        },
+        android_x86_64: {
+            static_libs: llvm_llc_x86_STATIC_LIBRARIES,
+        },
+    },
+}
diff --git a/tools/lli/Android.bp b/tools/lli/Android.bp
new file mode 100644 (file)
index 0000000..4ab66bc
--- /dev/null
@@ -0,0 +1,69 @@
+//===---------------------------------------------------------------===
+// lli command line tool
+//===---------------------------------------------------------------===
+
+cc_binary_host {
+    name: "lli",
+    defaults: ["llvm-defaults"],
+    srcs: [
+        "lli.cpp",
+        "OrcLazyJIT.cpp",
+    ],
+    static_libs: [
+        "libLLVMIRReader",
+        "libLLVMBitReader",
+        "libLLVMARMCodeGen",
+        "libLLVMARMInfo",
+        "libLLVMARMDesc",
+        "libLLVMARMAsmPrinter",
+        "libLLVMARMAsmParser",
+        "libLLVMARMDisassembler",
+        "libLLVMAArch64CodeGen",
+        "libLLVMAArch64Info",
+        "libLLVMAArch64Desc",
+        "libLLVMAArch64AsmPrinter",
+        "libLLVMAArch64AsmParser",
+        "libLLVMAArch64Utils",
+        "libLLVMAArch64Disassembler",
+        "libLLVMMipsCodeGen",
+        "libLLVMMipsInfo",
+        "libLLVMMipsDesc",
+        "libLLVMMipsAsmPrinter",
+        "libLLVMMipsAsmParser",
+        "libLLVMMipsDisassembler",
+        "libLLVMX86CodeGen",
+        "libLLVMX86Info",
+        "libLLVMX86Desc",
+        "libLLVMX86AsmPrinter",
+        "libLLVMX86AsmParser",
+        "libLLVMX86Utils",
+        "libLLVMX86Disassembler",
+        "libLLVMAsmPrinter",
+        "libLLVMGlobalISel",
+        "libLLVMDebugInfoCodeView",
+        "libLLVMSelectionDAG",
+        "libLLVMCodeGen",
+        "libLLVMProfileData",
+        "libLLVMInstrumentation",
+        "libLLVMLinker",
+        "libLLVMInterpreter",
+        "libLLVMScalarOpts",
+        "libLLVMTransformUtils",
+        "libLLVMAnalysis",
+        "libLLVMTarget",
+        "libLLVMMC",
+        "libLLVMMCJIT",
+        "libLLVMOrcJIT",
+        "libLLVMExecutionEngine",
+        "libLLVMRuntimeDyld",
+        "libLLVMMCParser",
+        "libLLVMObject",
+        "libLLVMCore",
+        "libLLVMAsmParser",
+        "libLLVMOption",
+        "libLLVMSupport",
+        "libLLVMMCDisassembler",
+    ],
+}
+
+subdirs = ["ChildTarget"]
diff --git a/tools/lli/ChildTarget/Android.bp b/tools/lli/ChildTarget/Android.bp
new file mode 100644 (file)
index 0000000..a3f67cc
--- /dev/null
@@ -0,0 +1,19 @@
+//===---------------------------------------------------------------===
+// lli-child-target command line tool
+//===---------------------------------------------------------------===
+
+cc_binary_host {
+    name: "lli-child-target",
+    defaults: ["llvm-defaults"],
+    srcs: ["ChildTarget.cpp"],
+    static_libs: [
+        "libLLVMOrcJIT",
+        "libLLVMRuntimeDyld",
+        "libLLVMObject",
+        "libLLVMBitReader",
+        "libLLVMMC",
+        "libLLVMMCParser",
+        "libLLVMCore",
+        "libLLVMSupport",
+    ],
+}
diff --git a/tools/llvm-ar/Android.bp b/tools/llvm-ar/Android.bp
new file mode 100644 (file)
index 0000000..2cf5157
--- /dev/null
@@ -0,0 +1,14 @@
+//===---------------------------------------------------------------===
+// llvm-ar command line tool
+//===---------------------------------------------------------------===
+
+cc_binary_host {
+    name: "llvm-ar",
+    defaults: ["llvm-defaults"],
+    srcs: ["llvm-ar.cpp"],
+    shared_libs: ["libLLVM"],
+    symlinks: [
+        "llvm-lib",
+        "llvm-ranlib",
+    ],
+}
diff --git a/tools/llvm-as/Android.bp b/tools/llvm-as/Android.bp
new file mode 100644 (file)
index 0000000..f79f39c
--- /dev/null
@@ -0,0 +1,12 @@
+cc_binary_host {
+    name: "llvm-as",
+    defaults: ["llvm-defaults"],
+    srcs: ["llvm-as.cpp"],
+    static_libs: [
+        "libLLVMAsmParser",
+        "libLLVMBitWriter",
+        "libLLVMAnalysis",
+        "libLLVMCore",
+        "libLLVMSupport",
+    ],
+}
diff --git a/tools/llvm-bcanalyzer/Android.bp b/tools/llvm-bcanalyzer/Android.bp
new file mode 100644 (file)
index 0000000..81f80ea
--- /dev/null
@@ -0,0 +1,14 @@
+//===---------------------------------------------------------------===
+// llvm-bcanalyzer command line tool
+//===---------------------------------------------------------------===
+
+cc_binary_host {
+    name: "llvm-bcanalyzer",
+    defaults: ["llvm-defaults"],
+    srcs: ["llvm-bcanalyzer.cpp"],
+    static_libs: [
+        "libLLVMBitReader",
+        "libLLVMCore",
+        "libLLVMSupport",
+    ],
+}
diff --git a/tools/llvm-c-test/Android.bp b/tools/llvm-c-test/Android.bp
new file mode 100644 (file)
index 0000000..e89bae7
--- /dev/null
@@ -0,0 +1,55 @@
+//===---------------------------------------------------------------===
+// llvm-c-test command line tool
+//===---------------------------------------------------------------===
+
+cc_binary_host {
+    name: "llvm-c-test",
+    defaults: ["llvm-defaults"],
+    srcs: [
+        "*.c",
+        "*.cpp",
+    ],
+    static_libs: [
+        "libLLVMBitReader",
+        "libLLVMARMCodeGen",
+        "libLLVMARMInfo",
+        "libLLVMARMDesc",
+        "libLLVMARMAsmPrinter",
+        "libLLVMARMDisassembler",
+        "libLLVMAArch64CodeGen",
+        "libLLVMAArch64Info",
+        "libLLVMAArch64Desc",
+        "libLLVMAArch64AsmPrinter",
+        "libLLVMAArch64Utils",
+        "libLLVMAArch64Disassembler",
+        "libLLVMMipsCodeGen",
+        "libLLVMMipsInfo",
+        "libLLVMMipsDesc",
+        "libLLVMMipsAsmPrinter",
+        "libLLVMMipsDisassembler",
+        "libLLVMX86CodeGen",
+        "libLLVMX86Info",
+        "libLLVMX86Desc",
+        "libLLVMX86AsmPrinter",
+        "libLLVMX86Utils",
+        "libLLVMX86Disassembler",
+        "libLLVMAsmPrinter",
+        "libLLVMSelectionDAG",
+        "libLLVMCodeGen",
+        "libLLVMGlobalISel",
+        "libLLVMProfileData",
+        "libLLVMInstrumentation",
+        "libLLVMScalarOpts",
+        "libLLVMTransformUtils",
+        "libLLVMAnalysis",
+        "libLLVMTarget",
+        "libLLVMMC",
+        "libLLVMObject",
+        "libLLVMMCParser",
+        "libLLVMCore",
+        "libLLVMAsmParser",
+        "libLLVMOption",
+        "libLLVMSupport",
+        "libLLVMMCDisassembler",
+    ],
+}
diff --git a/tools/llvm-config/Android.bp b/tools/llvm-config/Android.bp
new file mode 100644 (file)
index 0000000..6f45736
--- /dev/null
@@ -0,0 +1,23 @@
+//===---------------------------------------------------------------===
+// llvm-config command line tool
+//===---------------------------------------------------------------===
+
+cc_binary_host {
+    name: "llvm-config",
+    defaults: ["llvm-defaults"],
+    generated_headers: ["llvm-gen-config"],
+    srcs: ["llvm-config.cpp"],
+    static_libs: [
+        "libLLVMCore",
+        "libLLVMSupport",
+    ],
+}
+
+// Create BuildVariables.inc dynamically from BuildVariables.inc.in
+genrule {
+    name: "llvm-gen-config",
+    srcs: ["BuildVariables.inc.in"],
+    out: ["BuildVariables.inc"],
+    tool_files: ["BuildVariables.inc.in"],
+    cmd: "sed -e \"s#@ANDROID_BUILD_TOP@#$$PWD#\" < $(in) > $(out)",
+}
diff --git a/tools/llvm-cov/Android.bp b/tools/llvm-cov/Android.bp
new file mode 100644 (file)
index 0000000..fb7e7e7
--- /dev/null
@@ -0,0 +1,19 @@
+//===---------------------------------------------------------------===
+// llvm-cov command line tool
+//===---------------------------------------------------------------===
+
+cc_binary_host {
+    name: "llvm-cov",
+    defaults: ["llvm-defaults"],
+    srcs: ["*.cpp"],
+    static_libs: [
+        "libLLVMObject",
+        "libLLVMProfileDataCoverage",
+        "libLLVMProfileData",
+        "libLLVMMC",
+        "libLLVMMCParser",
+        "libLLVMBitReader",
+        "libLLVMCore",
+        "libLLVMSupport",
+    ],
+}
diff --git a/tools/llvm-cxxdump/Android.bp b/tools/llvm-cxxdump/Android.bp
new file mode 100644 (file)
index 0000000..ef1aa93
--- /dev/null
@@ -0,0 +1,46 @@
+cc_binary_host {
+    name: "llvm-cxxdump",
+    defaults: ["llvm-defaults"],
+    srcs: [
+        "Error.cpp",
+        "llvm-cxxdump.cpp",
+    ],
+
+    static_libs: [
+        "libLLVMARMAsmParser",
+        "libLLVMARMInfo",
+        "libLLVMARMDesc",
+        "libLLVMARMAsmPrinter",
+        "libLLVMARMDisassembler",
+        "libLLVMAArch64Info",
+        "libLLVMAArch64AsmParser",
+        "libLLVMAArch64Desc",
+        "libLLVMAArch64AsmPrinter",
+        "libLLVMAArch64Utils",
+        "libLLVMAArch64Disassembler",
+        "libLLVMMipsInfo",
+        "libLLVMMipsAsmParser",
+        "libLLVMMipsDesc",
+        "libLLVMMipsAsmPrinter",
+        "libLLVMMipsDisassembler",
+        "libLLVMX86Info",
+        "libLLVMX86Desc",
+        "libLLVMX86AsmParser",
+        "libLLVMX86CodeGen",
+        "libLLVMX86AsmPrinter",
+        "libLLVMX86Utils",
+        "libLLVMX86Disassembler",
+        "libLLVMAsmPrinter",
+        "libLLVMCodeGen",
+        "libLLVMAnalysis",
+        "libLLVMTarget",
+        "libLLVMObject",
+        "libLLVMMCParser",
+        "libLLVMMC",
+        "libLLVMMCDisassembler",
+        "libLLVMBitReader",
+        "libLLVMCore",
+        "libLLVMAsmParser",
+        "libLLVMSupport",
+    ],
+}
diff --git a/tools/llvm-diff/Android.bp b/tools/llvm-diff/Android.bp
new file mode 100644 (file)
index 0000000..91ca31b
--- /dev/null
@@ -0,0 +1,21 @@
+//===---------------------------------------------------------------===
+// llvm-diff command line tool
+//===---------------------------------------------------------------===
+
+cc_binary_host {
+    name: "llvm-diff",
+    defaults: ["llvm-defaults"],
+    srcs: [
+        "llvm-diff.cpp",
+        "DiffConsumer.cpp",
+        "DifferenceEngine.cpp",
+        "DiffLog.cpp",
+    ],
+    static_libs: [
+        "libLLVMIRReader",
+        "libLLVMBitReader",
+        "libLLVMAsmParser",
+        "libLLVMCore",
+        "libLLVMSupport",
+    ],
+}
diff --git a/tools/llvm-dis/Android.bp b/tools/llvm-dis/Android.bp
new file mode 100644 (file)
index 0000000..1b21e5f
--- /dev/null
@@ -0,0 +1,11 @@
+cc_binary_host {
+    name: "llvm-dis",
+    defaults: ["llvm-defaults"],
+    srcs: ["llvm-dis.cpp"],
+    static_libs: [
+        "libLLVMAnalysis",
+        "libLLVMBitReader",
+        "libLLVMCore",
+        "libLLVMSupport",
+    ],
+}
diff --git a/tools/llvm-dwarfdump/Android.bp b/tools/llvm-dwarfdump/Android.bp
new file mode 100644 (file)
index 0000000..e3583cd
--- /dev/null
@@ -0,0 +1,19 @@
+//===---------------------------------------------------------------===
+// llvm-dwarfdump command line tool
+//===---------------------------------------------------------------===
+
+cc_binary_host {
+    name: "llvm-dwarfdump",
+    defaults: ["llvm-defaults"],
+    srcs: ["llvm-dwarfdump.cpp"],
+    static_libs: [
+        "libLLVMDebugInfoDWARF",
+        "libLLVMDebugInfoPDB",
+        "libLLVMObject",
+        "libLLVMBitReader",
+        "libLLVMMC",
+        "libLLVMMCParser",
+        "libLLVMCore",
+        "libLLVMSupport",
+    ],
+}
diff --git a/tools/llvm-dwp/Android.bp b/tools/llvm-dwp/Android.bp
new file mode 100644 (file)
index 0000000..3545cee
--- /dev/null
@@ -0,0 +1,68 @@
+//===---------------------------------------------------------------===
+// llvm-dwp command line tool
+//===---------------------------------------------------------------===
+
+cc_binary_host {
+    name: "llvm-dwp",
+    defaults: ["llvm-defaults"],
+
+    srcs: ["*.cpp"],
+
+    static_libs: [
+        "libLLVMDebugInfoDWARF",
+        "libLLVMObject",
+        "libLLVMBitReader",
+        "libLLVMARMCodeGen",
+        "libLLVMARMAsmParser",
+        "libLLVMARMAsmPrinter",
+        "libLLVMARMInfo",
+        "libLLVMARMDesc",
+        "libLLVMARMDisassembler",
+        "libLLVMMipsCodeGen",
+        "libLLVMMipsInfo",
+        "libLLVMMipsDesc",
+        "libLLVMMipsAsmParser",
+        "libLLVMMipsAsmPrinter",
+        "libLLVMMipsDisassembler",
+        "libLLVMX86CodeGen",
+        "libLLVMX86Info",
+        "libLLVMX86Desc",
+        "libLLVMX86AsmParser",
+        "libLLVMX86AsmPrinter",
+        "libLLVMX86Utils",
+        "libLLVMX86Disassembler",
+        "libLLVMAArch64CodeGen",
+        "libLLVMAArch64Info",
+        "libLLVMAArch64Desc",
+        "libLLVMAArch64AsmParser",
+        "libLLVMAArch64AsmPrinter",
+        "libLLVMAArch64Utils",
+        "libLLVMAArch64Disassembler",
+        "libLLVMExecutionEngine",
+        "libLLVMRuntimeDyld",
+        "libLLVMMCJIT",
+        "libLLVMOrcJIT",
+        "libLLVMGlobalISel",
+        "libLLVMAsmPrinter",
+        "libLLVMDebugInfoCodeView",
+        "libLLVMSelectionDAG",
+        "libLLVMCodeGen",
+        "libLLVMScalarOpts",
+        "libLLVMInstCombine",
+        "libLLVMInstrumentation",
+        "libLLVMTransformObjCARC",
+        "libLLVMTransformUtils",
+        "libLLVMVectorize",
+        "libLLVMAnalysis",
+        "libLLVMTarget",
+        "libLLVMMCDisassembler",
+        "libLLVMMC",
+        "libLLVMMCParser",
+        "libLLVMCore",
+        "libLLVMAsmParser",
+        "libLLVMOption",
+        "libLLVMLTO",
+        "libLLVMSupport",
+        "libLLVMProfileData",
+    ],
+}
diff --git a/tools/llvm-extract/Android.bp b/tools/llvm-extract/Android.bp
new file mode 100644 (file)
index 0000000..7743949
--- /dev/null
@@ -0,0 +1,22 @@
+//===---------------------------------------------------------------===
+// llvm-extract command line tool
+//===---------------------------------------------------------------===
+
+cc_binary_host {
+    name: "llvm-extract",
+    defaults: ["llvm-defaults"],
+    srcs: ["llvm-extract.cpp"],
+    static_libs: [
+        "libLLVMIRReader",
+        "libLLVMAsmParser",
+        "libLLVMObject",
+        "libLLVMBitReader",
+        "libLLVMBitWriter",
+        "libLLVMipo",
+        "libLLVMTransformUtils",
+        "libLLVMAnalysis",
+        "libLLVMTarget",
+        "libLLVMCore",
+        "libLLVMSupport",
+    ],
+}
diff --git a/tools/llvm-link/Android.bp b/tools/llvm-link/Android.bp
new file mode 100644 (file)
index 0000000..29b4c96
--- /dev/null
@@ -0,0 +1,24 @@
+//===---------------------------------------------------------------===
+// llvm-link command line tool
+//===---------------------------------------------------------------===
+
+cc_binary {
+    name: "llvm-link",
+    defaults: ["llvm-defaults"],
+    srcs: ["llvm-link.cpp"],
+    static_libs: [
+        "libLLVMLinker",
+        "libLLVMIRReader",
+        "libLLVMObject",
+        "libLLVMMC",
+        "libLLVMMCParser",
+        "libLLVMBitReader",
+        "libLLVMBitWriter",
+        "libLLVMAsmParser",
+        "libLLVMTransformUtils",
+        "libLLVMAnalysis",
+        "libLLVMTarget",
+        "libLLVMCore",
+        "libLLVMSupport",
+    ],
+}
diff --git a/tools/llvm-lto/Android.bp b/tools/llvm-lto/Android.bp
new file mode 100644 (file)
index 0000000..dd9d4e8
--- /dev/null
@@ -0,0 +1,65 @@
+//===---------------------------------------------------------------===
+// llvm-lto command line tool
+//===---------------------------------------------------------------===
+
+cc_binary_host {
+    name: "llvm-lto",
+    defaults: ["llvm-defaults"],
+    srcs: ["llvm-lto.cpp"],
+    static_libs: [
+        "libLLVMARMCodeGen",
+        "libLLVMARMInfo",
+        "libLLVMARMDesc",
+        "libLLVMARMAsmPrinter",
+        "libLLVMARMAsmParser",
+        "libLLVMARMDisassembler",
+        "libLLVMAArch64CodeGen",
+        "libLLVMAArch64Info",
+        "libLLVMAArch64AsmParser",
+        "libLLVMAArch64AsmPrinter",
+        "libLLVMAArch64Desc",
+        "libLLVMAArch64Utils",
+        "libLLVMAArch64Disassembler",
+        "libLLVMMipsCodeGen",
+        "libLLVMMipsInfo",
+        "libLLVMMipsDesc",
+        "libLLVMMipsAsmPrinter",
+        "libLLVMMipsAsmParser",
+        "libLLVMMipsDisassembler",
+        "libLLVMX86CodeGen",
+        "libLLVMX86Info",
+        "libLLVMX86Desc",
+        "libLLVMX86AsmPrinter",
+        "libLLVMX86AsmParser",
+        "libLLVMX86Utils",
+        "libLLVMX86Disassembler",
+        "libLLVMAsmPrinter",
+        "libLLVMSelectionDAG",
+        "libLLVMLTO",
+        "libLLVMCodeGen",
+        "libLLVMGlobalISel",
+        "libLLVMDebugInfoCodeView",
+        "libLLVMTarget",
+        "libLLVMBitReader",
+        "libLLVMBitWriter",
+        "libLLVMLinker",
+        "libLLVMipo",
+        "libLLVMIRReader",
+        "libLLVMTransformObjCARC",
+        "libLLVMScalarOpts",
+        "libLLVMInstCombine",
+        "libLLVMVectorize",
+        "libLLVMInstrumentation",
+        "libLLVMTransformUtils",
+        "libLLVMProfileData",
+        "libLLVMAnalysis",
+        "libLLVMMC",
+        "libLLVMMCParser",
+        "libLLVMMCDisassembler",
+        "libLLVMObject",
+        "libLLVMCore",
+        "libLLVMAsmParser",
+        "libLLVMOption",
+        "libLLVMSupport",
+    ],
+}
diff --git a/tools/llvm-mc/Android.bp b/tools/llvm-mc/Android.bp
new file mode 100644 (file)
index 0000000..abbdd94
--- /dev/null
@@ -0,0 +1,50 @@
+//===---------------------------------------------------------------===
+// llvm-mc command line tool
+//===---------------------------------------------------------------===
+
+cc_binary_host {
+    name: "llvm-mc",
+    defaults: ["llvm-defaults"],
+    srcs: [
+        "llvm-mc.cpp",
+        "Disassembler.cpp",
+    ],
+    static_libs: [
+        "libLLVMARMAsmParser",
+        "libLLVMARMInfo",
+        "libLLVMARMDesc",
+        "libLLVMARMAsmPrinter",
+        "libLLVMARMDisassembler",
+        "libLLVMAArch64Info",
+        "libLLVMAArch64AsmParser",
+        "libLLVMAArch64Desc",
+        "libLLVMAArch64AsmPrinter",
+        "libLLVMAArch64Utils",
+        "libLLVMAArch64Disassembler",
+        "libLLVMMipsInfo",
+        "libLLVMMipsAsmParser",
+        "libLLVMMipsDesc",
+        "libLLVMMipsAsmPrinter",
+        "libLLVMMipsDisassembler",
+        "libLLVMX86Info",
+        "libLLVMX86Desc",
+        "libLLVMX86AsmParser",
+        "libLLVMX86AsmPrinter",
+        "libLLVMX86Utils",
+        "libLLVMX86Disassembler",
+        "libLLVMX86CodeGen",
+        "libLLVMAsmPrinter",
+        "libLLVMCodeGen",
+        "libLLVMTransformUtils",
+        "libLLVMTarget",
+        "libLLVMAnalysis",
+        "libLLVMMC",
+        "libLLVMObject",
+        "libLLVMBitReader",
+        "libLLVMMCParser",
+        "libLLVMCore",
+        "libLLVMAsmParser",
+        "libLLVMSupport",
+        "libLLVMMCDisassembler",
+    ],
+}
diff --git a/tools/llvm-mcmarkup/Android.bp b/tools/llvm-mcmarkup/Android.bp
new file mode 100644 (file)
index 0000000..168bae7
--- /dev/null
@@ -0,0 +1,13 @@
+//===---------------------------------------------------------------===
+// llvm-mcmarkup command line tool
+//===---------------------------------------------------------------===
+
+cc_binary_host {
+    name: "llvm-mcmarkup",
+    defaults: ["llvm-defaults"],
+    srcs: ["llvm-mcmarkup.cpp"],
+    static_libs: [
+        "libLLVMCore",
+        "libLLVMSupport",
+    ],
+}
diff --git a/tools/llvm-nm/Android.bp b/tools/llvm-nm/Android.bp
new file mode 100644 (file)
index 0000000..d092530
--- /dev/null
@@ -0,0 +1,48 @@
+//===---------------------------------------------------------------===
+// llvm-nm command line tool
+//===---------------------------------------------------------------===
+
+cc_binary_host {
+    name: "llvm-nm",
+    defaults: ["llvm-defaults"],
+    srcs: ["llvm-nm.cpp"],
+    static_libs: [
+        "libLLVMARMCodeGen",
+        "libLLVMARMInfo",
+        "libLLVMARMDesc",
+        "libLLVMARMAsmPrinter",
+        "libLLVMARMAsmParser",
+        "libLLVMARMDisassembler",
+        "libLLVMAArch64CodeGen",
+        "libLLVMAArch64Info",
+        "libLLVMAArch64AsmParser",
+        "libLLVMAArch64Desc",
+        "libLLVMAArch64AsmPrinter",
+        "libLLVMAArch64Utils",
+        "libLLVMAArch64Disassembler",
+        "libLLVMMipsCodeGen",
+        "libLLVMMipsInfo",
+        "libLLVMMipsAsmParser",
+        "libLLVMMipsDesc",
+        "libLLVMMipsAsmPrinter",
+        "libLLVMMipsDisassembler",
+        "libLLVMX86Info",
+        "libLLVMX86Desc",
+        "libLLVMX86AsmPrinter",
+        "libLLVMX86AsmParser",
+        "libLLVMX86CodeGen",
+        "libLLVMX86Utils",
+        "libLLVMX86Disassembler",
+        "libLLVMCodeGen",
+        "libLLVMTransformUtils",
+        "libLLVMTarget",
+        "libLLVMAnalysis",
+        "libLLVMObject",
+        "libLLVMBitReader",
+        "libLLVMMC",
+        "libLLVMMCParser",
+        "libLLVMCore",
+        "libLLVMSupport",
+        "libLLVMMCDisassembler",
+    ],
+}
diff --git a/tools/llvm-objdump/Android.bp b/tools/llvm-objdump/Android.bp
new file mode 100644 (file)
index 0000000..46823d9
--- /dev/null
@@ -0,0 +1,60 @@
+//===---------------------------------------------------------------===
+// llvm-objdump command line tool
+//===---------------------------------------------------------------===
+
+cc_binary_host {
+    name: "llvm-objdump",
+    defaults: ["llvm-defaults"],
+    srcs: [
+        "llvm-objdump.cpp",
+        "COFFDump.cpp",
+        "ELFDump.cpp",
+        "MachODump.cpp",
+    ],
+    static_libs: [
+        "libLLVMDebugInfoDWARF",
+        "libLLVMDebugInfoPDB",
+        "libLLVMARMAsmParser",
+        "libLLVMARMInfo",
+        "libLLVMARMDesc",
+        "libLLVMARMAsmPrinter",
+        "libLLVMARMDisassembler",
+        "libLLVMAArch64Info",
+        "libLLVMAArch64AsmParser",
+        "libLLVMAArch64Desc",
+        "libLLVMAArch64AsmPrinter",
+        "libLLVMAArch64Utils",
+        "libLLVMAArch64Disassembler",
+        "libLLVMMipsInfo",
+        "libLLVMMipsAsmParser",
+        "libLLVMMipsDesc",
+        "libLLVMMipsAsmPrinter",
+        "libLLVMMipsDisassembler",
+        "libLLVMX86Info",
+        "libLLVMX86Desc",
+        "libLLVMX86AsmParser",
+        "libLLVMX86CodeGen",
+        "libLLVMX86AsmPrinter",
+        "libLLVMX86Utils",
+        "libLLVMX86Disassembler",
+        "libLLVMAsmPrinter",
+        "libLLVMCodeGen",
+        "libLLVMTransformUtils",
+        "libLLVMTarget",
+        "libLLVMAnalysis",
+        "libLLVMObject",
+        "libLLVMMCParser",
+        "libLLVMMC",
+        "libLLVMMCDisassembler",
+        "libLLVMBitReader",
+        "libLLVMCore",
+        "libLLVMAsmParser",
+        "libLLVMSupport",
+    ],
+
+    // b/31938382, clang-tidy segmentation fault on MachODump.cpp.
+    tidy_checks: [
+        "-readability-*",
+        "-google-readability-*",
+    ],
+}
diff --git a/tools/llvm-pdbdump/Android.bp b/tools/llvm-pdbdump/Android.bp
new file mode 100644 (file)
index 0000000..2cf9bb5
--- /dev/null
@@ -0,0 +1,10 @@
+cc_binary_host {
+    name: "llvm-pdbdump",
+    defaults: ["llvm-defaults"],
+    srcs: ["*.cpp"],
+    static_libs: [
+        "libLLVMDebugInfoPDB",
+        "libLLVMDebugInfoCodeView",
+        "libLLVMSupport",
+    ],
+}
diff --git a/tools/llvm-profdata/Android.bp b/tools/llvm-profdata/Android.bp
new file mode 100644 (file)
index 0000000..6d45002
--- /dev/null
@@ -0,0 +1,15 @@
+//===---------------------------------------------------------------===
+// llvm-profdata command line tool
+//===---------------------------------------------------------------===
+
+cc_binary_host {
+    name: "llvm-profdata",
+    defaults: ["llvm-defaults"],
+    srcs: ["llvm-profdata.cpp"],
+    static_libs: [
+        "libLLVMObject",
+        "libLLVMProfileData",
+        "libLLVMCore",
+        "libLLVMSupport",
+    ],
+}
diff --git a/tools/llvm-readobj/Android.bp b/tools/llvm-readobj/Android.bp
new file mode 100644 (file)
index 0000000..e5494ca
--- /dev/null
@@ -0,0 +1,22 @@
+//===---------------------------------------------------------------===
+// llvm-readobj command line tool
+//===---------------------------------------------------------------===
+
+cc_binary_host {
+    name: "llvm-readobj",
+    defaults: ["llvm-defaults"],
+    srcs: ["*.cpp"],
+    static_libs: [
+        "libLLVMARMInfo",
+        "libLLVMAArch64Info",
+        "libLLVMMipsInfo",
+        "libLLVMX86Info",
+        "libLLVMDebugInfoCodeView",
+        "libLLVMObject",
+        "libLLVMBitReader",
+        "libLLVMMC",
+        "libLLVMMCParser",
+        "libLLVMCore",
+        "libLLVMSupport",
+    ],
+}
diff --git a/tools/llvm-rtdyld/Android.bp b/tools/llvm-rtdyld/Android.bp
new file mode 100644 (file)
index 0000000..08fc9c0
--- /dev/null
@@ -0,0 +1,49 @@
+//===---------------------------------------------------------------===
+// llvm-rtdyld command line tool
+//===---------------------------------------------------------------===
+
+cc_binary_host {
+    name: "llvm-rtdyld",
+    defaults: ["llvm-defaults"],
+    srcs: ["llvm-rtdyld.cpp"],
+    static_libs: [
+        "libLLVMARMCodeGen",
+        "libLLVMARMInfo",
+        "libLLVMARMDesc",
+        "libLLVMARMAsmPrinter",
+        "libLLVMARMAsmParser",
+        "libLLVMARMDisassembler",
+        "libLLVMAArch64CodeGen",
+        "libLLVMAArch64Info",
+        "libLLVMAArch64AsmParser",
+        "libLLVMAArch64Desc",
+        "libLLVMAArch64AsmPrinter",
+        "libLLVMAArch64Utils",
+        "libLLVMAArch64Disassembler",
+        "libLLVMMipsCodeGen",
+        "libLLVMMipsInfo",
+        "libLLVMMipsDesc",
+        "libLLVMMipsAsmPrinter",
+        "libLLVMMipsAsmParser",
+        "libLLVMMipsDisassembler",
+        "libLLVMX86CodeGen",
+        "libLLVMX86Info",
+        "libLLVMX86Desc",
+        "libLLVMX86AsmPrinter",
+        "libLLVMX86AsmParser",
+        "libLLVMX86Utils",
+        "libLLVMX86Disassembler",
+        "libLLVMDebugInfoDWARF",
+        "libLLVMDebugInfoPDB",
+        "libLLVMExecutionEngine",
+        "libLLVMCodeGen",
+        "libLLVMObject",
+        "libLLVMMC",
+        "libLLVMMCParser",
+        "libLLVMRuntimeDyld",
+        "libLLVMBitReader",
+        "libLLVMCore",
+        "libLLVMSupport",
+        "libLLVMMCDisassembler",
+    ],
+}
diff --git a/tools/llvm-size/Android.bp b/tools/llvm-size/Android.bp
new file mode 100644 (file)
index 0000000..d929ce5
--- /dev/null
@@ -0,0 +1,17 @@
+//===---------------------------------------------------------------===
+// llvm-size command line tool
+//===---------------------------------------------------------------===
+
+cc_binary_host {
+    name: "llvm-size",
+    defaults: ["llvm-defaults"],
+    srcs: ["llvm-size.cpp"],
+    static_libs: [
+        "libLLVMObject",
+        "libLLVMMC",
+        "libLLVMMCParser",
+        "libLLVMBitReader",
+        "libLLVMCore",
+        "libLLVMSupport",
+    ],
+}
diff --git a/tools/llvm-split/Android.bp b/tools/llvm-split/Android.bp
new file mode 100644 (file)
index 0000000..8ae519c
--- /dev/null
@@ -0,0 +1,15 @@
+cc_binary_host {
+    name: "llvm-split",
+    defaults: ["llvm-defaults"],
+    srcs: ["llvm-split.cpp"],
+    static_libs: [
+        "libLLVMIRReader",
+        "libLLVMBitReader",
+        "libLLVMBitWriter",
+        "libLLVMTransformUtils",
+        "libLLVMAnalysis",
+        "libLLVMCore",
+        "libLLVMAsmParser",
+        "libLLVMSupport",
+    ],
+}
diff --git a/tools/llvm-symbolizer/Android.bp b/tools/llvm-symbolizer/Android.bp
new file mode 100644 (file)
index 0000000..c5a1c1b
--- /dev/null
@@ -0,0 +1,24 @@
+cc_binary {
+    name: "llvm-symbolizer",
+    defaults: ["llvm-defaults"],
+    srcs:  ["llvm-symbolizer.cpp"],
+    target: {
+        host: {
+            static_libs: [
+                "libLLVMSymbolize",
+                "libLLVMDebugInfoDWARF",
+                "libLLVMDebugInfoPDB",
+                "libLLVMDebugInfoCodeView",
+                "libLLVMObject",
+                "libLLVMBitReader",
+                "libLLVMMC",
+                "libLLVMMCParser",
+                "libLLVMCore",
+                "libLLVMSupport",
+            ],
+        },
+        android: {
+            shared_libs: ["libLLVM"],
+        },
+    },
+}
diff --git a/tools/lto/Android.bp b/tools/lto/Android.bp
new file mode 100644 (file)
index 0000000..d9a78fe
--- /dev/null
@@ -0,0 +1,90 @@
+//
+// Copyright (C) 2015 The Android Open Source Project
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+// For the host only
+// =====================================================
+
+cc_library_host_shared {
+    name: "libLTO",
+    defaults: ["llvm-defaults"],
+    srcs: [
+        "lto.cpp",
+        "LTODisassembler.cpp",
+    ],
+    group_static_libs: true,
+    static_libs: [
+        "libLLVMLinker",
+        "libLLVMipo",
+        "libLLVMDebugInfoDWARF",
+        "libLLVMDebugInfoPDB",
+        "libLLVMIRReader",
+        "libLLVMBitWriter",
+        "libLLVMBitReader",
+        "libLLVMARMCodeGen",
+        "libLLVMARMAsmParser",
+        "libLLVMARMAsmPrinter",
+        "libLLVMDebugInfoCodeView",
+        "libLLVMARMInfo",
+        "libLLVMARMDesc",
+        "libLLVMARMDisassembler",
+        "libLLVMMipsCodeGen",
+        "libLLVMMipsInfo",
+        "libLLVMMipsDesc",
+        "libLLVMMipsAsmParser",
+        "libLLVMMipsAsmPrinter",
+        "libLLVMMipsDisassembler",
+        "libLLVMX86CodeGen",
+        "libLLVMX86Info",
+        "libLLVMX86Desc",
+        "libLLVMX86AsmParser",
+        "libLLVMX86AsmPrinter",
+        "libLLVMX86Utils",
+        "libLLVMX86Disassembler",
+        "libLLVMAArch64CodeGen",
+        "libLLVMAArch64Info",
+        "libLLVMAArch64Desc",
+        "libLLVMAArch64AsmParser",
+        "libLLVMAArch64AsmPrinter",
+        "libLLVMAArch64Utils",
+        "libLLVMAArch64Disassembler",
+        "libLLVMExecutionEngine",
+        "libLLVMRuntimeDyld",
+        "libLLVMMCJIT",
+        "libLLVMOrcJIT",
+        "libLLVMGlobalISel",
+        "libLLVMAsmPrinter",
+        "libLLVMSelectionDAG",
+        "libLLVMCodeGen",
+        "libLLVMObject",
+        "libLLVMScalarOpts",
+        "libLLVMInstCombine",
+        "libLLVMInstrumentation",
+        "libLLVMTransformObjCARC",
+        "libLLVMTransformUtils",
+        "libLLVMVectorize",
+        "libLLVMAnalysis",
+        "libLLVMTarget",
+        "libLLVMMCDisassembler",
+        "libLLVMMC",
+        "libLLVMMCParser",
+        "libLLVMCore",
+        "libLLVMAsmParser",
+        "libLLVMOption",
+        "libLLVMLTO",
+        "libLLVMSupport",
+        "libLLVMProfileData",
+    ],
+}
diff --git a/tools/obj2yaml/Android.bp b/tools/obj2yaml/Android.bp
new file mode 100644 (file)
index 0000000..dbd9d63
--- /dev/null
@@ -0,0 +1,18 @@
+//===---------------------------------------------------------------===
+// obj2yaml command line tool
+//===---------------------------------------------------------------===
+
+cc_binary_host {
+    name: "obj2yaml",
+    defaults: ["llvm-defaults"],
+    srcs: ["*.cpp"],
+    static_libs: [
+        "libLLVMObject",
+        "libLLVMObjectYAML",
+        "libLLVMMC",
+        "libLLVMMCParser",
+        "libLLVMBitReader",
+        "libLLVMCore",
+        "libLLVMSupport",
+    ],
+}
diff --git a/tools/opt/Android.bp b/tools/opt/Android.bp
new file mode 100644 (file)
index 0000000..499c4d4
--- /dev/null
@@ -0,0 +1,69 @@
+//===---------------------------------------------------------------===
+// opt command line tool
+//===---------------------------------------------------------------===
+
+cc_binary_host {
+    name: "opt",
+    defaults: ["llvm-defaults"],
+    srcs: ["*.cpp"],
+    static_libs: [
+        "libLLVMIRReader",
+        "libLLVMBitReader",
+        "libLLVMBitWriter",
+        "libLLVMARMCodeGen",
+        "libLLVMARMInfo",
+        "libLLVMARMDesc",
+        "libLLVMARMAsmPrinter",
+        "libLLVMARMDisassembler",
+        "libLLVMAArch64CodeGen",
+        "libLLVMAArch64Info",
+        "libLLVMAArch64Desc",
+        "libLLVMAArch64AsmPrinter",
+        "libLLVMAArch64Utils",
+        "libLLVMAArch64Disassembler",
+        "libLLVMMipsCodeGen",
+        "libLLVMMipsInfo",
+        "libLLVMMipsDesc",
+        "libLLVMMipsAsmPrinter",
+        "libLLVMMipsDisassembler",
+        "libLLVMX86CodeGen",
+        "libLLVMX86Info",
+        "libLLVMX86Desc",
+        "libLLVMX86AsmPrinter",
+        "libLLVMX86Utils",
+        "libLLVMX86Disassembler",
+        "libLLVMGlobalISel",
+        "libLLVMAsmPrinter",
+        "libLLVMDebugInfoCodeView",
+        "libLLVMSelectionDAG",
+        "libLLVMCodeGen",
+        "libLLVMTransformObjCARC",
+        "libLLVMVectorize",
+        "libLLVMScalarOpts",
+        "libLLVMPasses",
+        "libLLVMipo",
+        "libLLVMLinker",
+        "libLLVMInstCombine",
+        "libLLVMInstrumentation",
+        "libLLVMTransformUtils",
+        "libLLVMAnalysis",
+        "libLLVMTarget",
+        "libLLVMMC",
+        "libLLVMMCParser",
+        "libLLVMObject",
+        "libLLVMProfileData",
+        "libLLVMCore",
+        "libLLVMAsmParser",
+        "libLLVMOption",
+        "libLLVMSupport",
+        "libLLVMMCDisassembler",
+    ],
+    target: {
+        darwin: {
+            ldflags: ["-Wl,-export_dynamic"],
+        },
+        linux: {
+            ldflags: ["-Wl,--export-dynamic"],
+        },
+    },
+}
diff --git a/tools/sancov/Android.bp b/tools/sancov/Android.bp
new file mode 100644 (file)
index 0000000..b6c483e
--- /dev/null
@@ -0,0 +1,63 @@
+//===---------------------------------------------------------------===
+// sancov command line tool
+//===---------------------------------------------------------------===
+
+cc_binary_host {
+    name: "sancov",
+    defaults: ["llvm-defaults"],
+    srcs: ["sancov.cc"],
+    static_libs: [
+        "libLLVMIRReader",
+        "libLLVMARMCodeGen",
+        "libLLVMARMInfo",
+        "libLLVMARMDesc",
+        "libLLVMARMAsmPrinter",
+        "libLLVMARMDisassembler",
+        "libLLVMAArch64CodeGen",
+        "libLLVMAArch64Info",
+        "libLLVMAArch64Desc",
+        "libLLVMAArch64AsmPrinter",
+        "libLLVMAArch64Utils",
+        "libLLVMAArch64Disassembler",
+        "libLLVMMipsCodeGen",
+        "libLLVMMipsInfo",
+        "libLLVMMipsDesc",
+        "libLLVMMipsAsmPrinter",
+        "libLLVMMipsDisassembler",
+        "libLLVMX86CodeGen",
+        "libLLVMX86Info",
+        "libLLVMX86Desc",
+        "libLLVMX86AsmPrinter",
+        "libLLVMX86Utils",
+        "libLLVMX86Disassembler",
+        "libLLVMSymbolize",
+        "libLLVMDebugInfoDWARF",
+        "libLLVMDebugInfoPDB",
+        "libLLVMDebugInfoCodeView",
+        "libLLVMAsmPrinter",
+        "libLLVMSelectionDAG",
+        "libLLVMCodeGen",
+        "libLLVMTransformObjCARC",
+        "libLLVMVectorize",
+        "libLLVMScalarOpts",
+        "libLLVMPasses",
+        "libLLVMipo",
+        "libLLVMLinker",
+        "libLLVMInstCombine",
+        "libLLVMInstrumentation",
+        "libLLVMTransformUtils",
+        "libLLVMAnalysis",
+        "libLLVMTarget",
+        "libLLVMObject",
+        "libLLVMBitReader",
+        "libLLVMBitWriter",
+        "libLLVMMC",
+        "libLLVMMCParser",
+        "libLLVMProfileData",
+        "libLLVMCore",
+        "libLLVMAsmParser",
+        "libLLVMOption",
+        "libLLVMSupport",
+        "libLLVMMCDisassembler",
+    ],
+}
diff --git a/tools/sanstats/Android.bp b/tools/sanstats/Android.bp
new file mode 100644 (file)
index 0000000..0494474
--- /dev/null
@@ -0,0 +1,21 @@
+//===---------------------------------------------------------------===
+// sanstats command line tool
+//===---------------------------------------------------------------===
+
+cc_binary_host {
+    name: "sanstats",
+    defaults: ["llvm-defaults"],
+    srcs: ["sanstats.cpp"],
+    static_libs: [
+        "libLLVMSymbolize",
+        "libLLVMDebugInfoDWARF",
+        "libLLVMDebugInfoPDB",
+        "libLLVMDebugInfoCodeView",
+        "libLLVMObject",
+        "libLLVMBitReader",
+        "libLLVMCore",
+        "libLLVMMCParser",
+        "libLLVMMC",
+        "libLLVMSupport",
+    ],
+}
diff --git a/tools/verify-uselistorder/Android.bp b/tools/verify-uselistorder/Android.bp
new file mode 100644 (file)
index 0000000..0aace22
--- /dev/null
@@ -0,0 +1,14 @@
+cc_binary_host {
+    name: "verify-uselistorder",
+    defaults: ["llvm-defaults"],
+    srcs: ["verify-uselistorder.cpp"],
+    static_libs: [
+        "libLLVMAsmParser",
+        "libLLVMBitReader",
+        "libLLVMBitWriter",
+        "libLLVMAnalysis",
+        "libLLVMCore",
+        "libLLVMIRReader",
+        "libLLVMSupport",
+    ],
+}
diff --git a/tools/yaml2obj/Android.bp b/tools/yaml2obj/Android.bp
new file mode 100644 (file)
index 0000000..d503bc1
--- /dev/null
@@ -0,0 +1,18 @@
+//===---------------------------------------------------------------===
+// yaml2obj command line tool
+//===---------------------------------------------------------------===
+
+cc_binary_host {
+    name: "yaml2obj",
+    defaults: ["llvm-defaults"],
+    srcs: ["*.cpp"],
+    static_libs: [
+        "libLLVMObject",
+        "libLLVMObjectYAML",
+        "libLLVMMC",
+        "libLLVMMCParser",
+        "libLLVMBitReader",
+        "libLLVMCore",
+        "libLLVMSupport",
+    ],
+}
diff --git a/utils/FileCheck/Android.bp b/utils/FileCheck/Android.bp
new file mode 100644 (file)
index 0000000..e21b9de
--- /dev/null
@@ -0,0 +1,10 @@
+cc_binary_host {
+    name: "FileCheck",
+    defaults: ["llvm-defaults"],
+    srcs: ["FileCheck.cpp"],
+    static_libs: ["libLLVMSupport"],
+    cflags: [
+        "-D__STDC_LIMIT_MACROS",
+        "-D__STDC_CONSTANT_MACROS",
+    ],
+}
diff --git a/utils/TableGen/Android.bp b/utils/TableGen/Android.bp
new file mode 100644 (file)
index 0000000..7dc34a6
--- /dev/null
@@ -0,0 +1,34 @@
+cc_binary_host {
+    name: "llvm-tblgen",
+    defaults: ["llvm-defaults-no-generated-headers"],
+    srcs: ["*.cpp"],
+
+    static_libs: [
+        "libLLVMTableGen",
+        "libLLVMSupport",
+    ],
+
+    host_ldlibs: ["-lm"],
+    target: {
+        windows: {
+            enabled: false,
+        },
+        // llvm-defaults turns off host builds by default, turn it back on for
+        // modules that are used to build llvm-tblgen
+        host: {
+            enabled: true,
+        },
+        darwin: {
+            host_ldlibs: [
+                "-lpthread",
+                "-ldl",
+            ],
+        },
+        linux: {
+            host_ldlibs: [
+                "-lpthread",
+                "-ldl",
+            ],
+        },
+    },
+}
diff --git a/utils/count/Android.bp b/utils/count/Android.bp
new file mode 100644 (file)
index 0000000..1d43809
--- /dev/null
@@ -0,0 +1,9 @@
+//===---------------------------------------------------------------===
+// count command line tool
+//===---------------------------------------------------------------===
+
+cc_binary_host {
+    name: "count",
+    defaults: ["llvm-defaults"],
+    srcs: ["count.c"],
+}
diff --git a/utils/not/Android.bp b/utils/not/Android.bp
new file mode 100644 (file)
index 0000000..25a2f83
--- /dev/null
@@ -0,0 +1,13 @@
+//===---------------------------------------------------------------===
+// not command line tool
+//===---------------------------------------------------------------===
+
+cc_binary_host {
+    name: "not",
+    defaults: ["llvm-defaults"],
+    srcs: ["not.cpp"],
+    static_libs: [
+        "libLLVMCore",
+        "libLLVMSupport",
+    ],
+}
diff --git a/utils/yaml-bench/Android.bp b/utils/yaml-bench/Android.bp
new file mode 100644 (file)
index 0000000..df5092f
--- /dev/null
@@ -0,0 +1,9 @@
+// yaml-bench executable for the host
+// =====================================================
+
+cc_binary_host {
+    name: "yaml-bench",
+    defaults: ["llvm-defaults"],
+    srcs: ["YAMLBench.cpp"],
+    static_libs: ["libLLVMSupport"],
+}