summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorChris Wailes <chriswailes@google.com>2014-06-02 11:53:16 -0700
committerChris Wailes <chriswailes@google.com>2014-06-06 18:19:16 -0700
commit075c621d834af7ffc32d2067fadb147cc1758b99 (patch)
treef4f29ff2e71102ee86111bc695830ae5850ec50c /tools
parenta637ea99e253d9d3bd16ebb9e33f5828d38d94de (diff)
downloadexternal_llvm-075c621d834af7ffc32d2067fadb147cc1758b99.zip
external_llvm-075c621d834af7ffc32d2067fadb147cc1758b99.tar.gz
external_llvm-075c621d834af7ffc32d2067fadb147cc1758b99.tar.bz2
Adds the ability to run the llvm test suite in-tree.
This was accomplished by building additional tools and hand-generating several files that are auto-generated by the configuration system when LLVM is built out-of-tree. The LTO, Interpreter, and DebugInfo libraries are now being compiled, and several source files were added to existing compilation targets. To run these tests you must first run build/envsetup.sh and have used lunch to select a target. You can then launch the test script by running: cd $ANDROID_BUILD_TOP/external/llvm && ./android_test.sh Bug: 15433215 Change-Id: I43d87de0a4620cdd46c8d0f825dd4428e8409702
Diffstat (limited to 'tools')
-rw-r--r--tools/bugpoint/Android.mk58
-rw-r--r--tools/llc/Android.mk1
-rw-r--r--tools/lli/Android.mk84
-rw-r--r--tools/llvm-ar/Android.mk48
-rw-r--r--tools/llvm-as/Android.mk3
-rw-r--r--tools/llvm-bcanalyzer/Android.mk35
-rw-r--r--tools/llvm-c-test/Android.mk75
-rw-r--r--tools/llvm-config/Android.mk46
-rw-r--r--tools/llvm-config/BuildVariables.inc.in18
-rw-r--r--tools/llvm-config/LibraryDependencies.inc94
-rw-r--r--tools/llvm-cov/Android.mk33
-rw-r--r--tools/llvm-diff/Android.mk39
-rw-r--r--tools/llvm-dis/Android.mk3
-rw-r--r--tools/llvm-dwarfdump/Android.mk36
-rw-r--r--tools/llvm-extract/Android.mk42
-rw-r--r--tools/llvm-lto/Android.mk81
-rw-r--r--tools/llvm-mc/Android.mk64
-rw-r--r--tools/llvm-mcmarkup/Android.mk33
-rw-r--r--tools/llvm-nm/Android.mk35
-rw-r--r--tools/llvm-objdump/Android.mk68
-rw-r--r--tools/llvm-profdata/Android.mk35
-rw-r--r--tools/llvm-readobj/Android.mk47
-rw-r--r--tools/llvm-rtdyld/Android.mk39
-rw-r--r--tools/llvm-size/Android.mk35
-rw-r--r--tools/macho-dump/Android.mk35
-rw-r--r--tools/obj2yaml/Android.mk38
-rw-r--r--tools/opt/Android.mk93
-rw-r--r--tools/yaml2obj/Android.mk37
28 files changed, 1193 insertions, 62 deletions
diff --git a/tools/bugpoint/Android.mk b/tools/bugpoint/Android.mk
new file mode 100644
index 0000000..78f3eff
--- /dev/null
+++ b/tools/bugpoint/Android.mk
@@ -0,0 +1,58 @@
+LOCAL_PATH := $(call my-dir)
+
+LLVM_ROOT_PATH := $(LOCAL_PATH)/../..
+
+
+#===---------------------------------------------------------------===
+# bugpoint command line tool
+#===---------------------------------------------------------------===
+
+bugpoint_SRC_FILES := \
+ BugDriver.cpp \
+ CrashDebugger.cpp \
+ ExecutionDriver.cpp \
+ ExtractFunction.cpp \
+ FindBugs.cpp \
+ Miscompilation.cpp \
+ OptimizerDriver.cpp \
+ ToolRunner.cpp \
+ bugpoint.cpp \
+
+bugpoint_STATIC_LIBRARIES := \
+ libLLVMBitWriter \
+ libLLVMCodeGen \
+ libLLVMipo \
+ libLLVMipa \
+ libLLVMIRReader \
+ libLLVMBitReader \
+ libLLVMAsmParser \
+ libLLVMInstCombine \
+ libLLVMInstrumentation \
+ libLLVMLinker \
+ libLLVMTransformObjCARC \
+ libLLVMScalarOpts \
+ libLLVMAnalysis \
+ libLLVMTarget \
+ libLLVMCore \
+ libLLVMMC \
+ libLLVMTransformUtils \
+ libLLVMVectorize \
+ libLLVMSupport \
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := bugpoint
+LOCAL_MODULE_TAGS := optional
+LOCAL_MODULE_CLASS := EXECUTABLES
+LOCAL_IS_HOST_MODULE := true
+
+LOCAL_SRC_FILES := $(bugpoint_SRC_FILES)
+
+LOCAL_STATIC_LIBRARIES := $(bugpoint_STATIC_LIBRARIES)
+
+LOCAL_LDLIBS += -lpthread -lm -ldl
+
+include $(LLVM_ROOT_PATH)/llvm.mk
+include $(LLVM_HOST_BUILD_MK)
+include $(LLVM_GEN_INTRINSICS_MK)
+include $(BUILD_HOST_EXECUTABLE)
diff --git a/tools/llc/Android.mk b/tools/llc/Android.mk
index 4497bf3..a25cf5c 100644
--- a/tools/llc/Android.mk
+++ b/tools/llc/Android.mk
@@ -91,7 +91,6 @@ LOCAL_STATIC_LIBRARIES := \
$(llvm_llc_STATIC_LIBRARIES)
LOCAL_LDLIBS += -lpthread -lm -ldl
-LOCAL_C_INCLUDES += external/llvm/include
include $(LLVM_ROOT_PATH)/llvm.mk
include $(LLVM_HOST_BUILD_MK)
diff --git a/tools/lli/Android.mk b/tools/lli/Android.mk
new file mode 100644
index 0000000..f550f93
--- /dev/null
+++ b/tools/lli/Android.mk
@@ -0,0 +1,84 @@
+LOCAL_PATH := $(call my-dir)
+
+LLVM_ROOT_PATH := $(LOCAL_PATH)/../..
+
+
+#===---------------------------------------------------------------===
+# lli command line tool
+#===---------------------------------------------------------------===
+
+lli_SRC_FILES := \
+ lli.cpp \
+ RemoteMemoryManager.cpp \
+ RemoteTarget.cpp \
+ RemoteTargetExternal.cpp \
+
+lli_STATIC_LIBRARIES := \
+ 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 \
+ libLLVMSelectionDAG \
+ libLLVMJIT \
+ libLLVMCodeGen \
+ libLLVMInstrumentation \
+ libLLVMExecutionEngine \
+ libLLVMLinker \
+ libLLVMInterpreter \
+ libLLVMScalarOpts \
+ libLLVMTransformUtils \
+ libLLVMAnalysis \
+ libLLVMTarget \
+ libLLVMMC \
+ libLLVMMCJIT \
+ libLLVMRuntimeDyld \
+ libLLVMMCParser \
+ libLLVMObject \
+ libLLVMCore \
+ libLLVMAsmParser \
+ libLLVMOption \
+ libLLVMSupport \
+ libLLVMMCDisassembler \
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := lli
+LOCAL_MODULE_TAGS := optional
+LOCAL_MODULE_CLASS := EXECUTABLES
+LOCAL_IS_HOST_MODULE := true
+
+LOCAL_SRC_FILES := $(lli_SRC_FILES)
+
+LOCAL_STATIC_LIBRARIES := $(lli_STATIC_LIBRARIES)
+
+LOCAL_LDLIBS += -lpthread -lm -ldl
+
+include $(LLVM_ROOT_PATH)/llvm.mk
+include $(LLVM_HOST_BUILD_MK)
+include $(LLVM_GEN_INTRINSICS_MK)
+include $(BUILD_HOST_EXECUTABLE)
diff --git a/tools/llvm-ar/Android.mk b/tools/llvm-ar/Android.mk
new file mode 100644
index 0000000..24bad69
--- /dev/null
+++ b/tools/llvm-ar/Android.mk
@@ -0,0 +1,48 @@
+LOCAL_PATH := $(call my-dir)
+
+LLVM_ROOT_PATH := $(LOCAL_PATH)/../..
+
+
+#===---------------------------------------------------------------===
+# llvm-ar command line tool
+#===---------------------------------------------------------------===
+
+llvm_ar_SRC_FILES := \
+ llvm-ar.cpp
+
+llvm_ar_STATIC_LIBRARIES := \
+ libLLVMObject \
+ libLLVMBitReader \
+ libLLVMCore \
+ libLLVMSupport \
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := llvm-ar
+LOCAL_MODULE_TAGS := optional
+LOCAL_MODULE_CLASS := EXECUTABLES
+LOCAL_IS_HOST_MODULE := true
+
+LOCAL_SRC_FILES := $(llvm_ar_SRC_FILES)
+
+LOCAL_STATIC_LIBRARIES := $(llvm_ar_STATIC_LIBRARIES)
+
+LOCAL_LDLIBS += -lpthread -lm -ldl
+
+include $(LLVM_ROOT_PATH)/llvm.mk
+include $(LLVM_HOST_BUILD_MK)
+include $(BUILD_HOST_EXECUTABLE)
+
+LLVM_RANLIB = $(HOST_OUT)/bin/llvm-ranlib
+
+# Make sure if llvm-ar (i.e. $(LOCAL_MODULE)) get installed,
+# llvm-ranlib will get installed as well.
+ALL_MODULES.$(LOCAL_MODULE).INSTALLED := \
+ $(ALL_MODULES.$(LOCAL_MODULE).INSTALLED) $(LLVM_RANLIB)
+# the additional dependency is needed when you run mm/mmm.
+$(LOCAL_MODULE) : $(LLVM_RANLIB)
+
+# Symlink for llvm-ranlib
+$(LLVM_RANLIB) : $(LOCAL_INSTALLED_MODULE)
+ @echo "Symlink $@ -> $<"
+ $(hide) ln -sf $(notdir $<) $@
diff --git a/tools/llvm-as/Android.mk b/tools/llvm-as/Android.mk
index e58868b..963f6ec 100644
--- a/tools/llvm-as/Android.mk
+++ b/tools/llvm-as/Android.mk
@@ -15,9 +15,6 @@ else
LOCAL_LDLIBS += -lpthread -ldl
endif
-REQUIRES_EH := 1
-REQUIRES_RTTI := 1
-
LOCAL_STATIC_LIBRARIES := \
libLLVMAsmParser \
libLLVMBitWriter \
diff --git a/tools/llvm-bcanalyzer/Android.mk b/tools/llvm-bcanalyzer/Android.mk
new file mode 100644
index 0000000..bb25366
--- /dev/null
+++ b/tools/llvm-bcanalyzer/Android.mk
@@ -0,0 +1,35 @@
+LOCAL_PATH := $(call my-dir)
+
+LLVM_ROOT_PATH := $(LOCAL_PATH)/../..
+
+
+#===---------------------------------------------------------------===
+# llvm-bcanalyzer command line tool
+#===---------------------------------------------------------------===
+
+llvm_bcanalyzer_SRC_FILES := \
+ llvm-bcanalyzer.cpp
+
+llvm_bcanalyzer_STATIC_LIBRARIES := \
+ libLLVMBitReader \
+ libLLVMCore \
+ libLLVMSupport \
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := llvm-bcanalyzer
+LOCAL_MODULE_TAGS := optional
+LOCAL_MODULE_CLASS := EXECUTABLES
+LOCAL_IS_HOST_MODULE := true
+
+LOCAL_SRC_FILES := $(llvm_bcanalyzer_SRC_FILES)
+
+LOCAL_STATIC_LIBRARIES := $(llvm_bcanalyzer_STATIC_LIBRARIES)
+
+LOCAL_LDLIBS += -lpthread -lm -ldl
+LOCAL_C_INCLUDES += external/llvm/include
+
+include $(LLVM_ROOT_PATH)/llvm.mk
+include $(LLVM_HOST_BUILD_MK)
+include $(LLVM_GEN_INTRINSICS_MK)
+include $(BUILD_HOST_EXECUTABLE)
diff --git a/tools/llvm-c-test/Android.mk b/tools/llvm-c-test/Android.mk
new file mode 100644
index 0000000..f26c989
--- /dev/null
+++ b/tools/llvm-c-test/Android.mk
@@ -0,0 +1,75 @@
+LOCAL_PATH := $(call my-dir)
+
+LLVM_ROOT_PATH := $(LOCAL_PATH)/../..
+
+
+#===---------------------------------------------------------------===
+# llvm-c-test command line tool
+#===---------------------------------------------------------------===
+
+llvm_c_test_SRC_FILES := \
+ calc.c \
+ disassemble.c \
+ helpers.c \
+ include-all.c \
+ main.c \
+ module.c \
+ object.c \
+ targets.c \
+
+llvm_c_test_STATIC_LIBRARIES := \
+ 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 \
+ libLLVMScalarOpts \
+ libLLVMTransformUtils \
+ libLLVMAnalysis \
+ libLLVMTarget \
+ libLLVMMC \
+ libLLVMObject \
+ libLLVMCore \
+ libLLVMAsmParser \
+ libLLVMOption \
+ libLLVMSupport \
+ libLLVMMCDisassembler \
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := llvm-c-test
+LOCAL_MODULE_TAGS := optional
+LOCAL_MODULE_CLASS := EXECUTABLES
+LOCAL_IS_HOST_MODULE := true
+
+LOCAL_SRC_FILES := $(llvm_c_test_SRC_FILES)
+
+LOCAL_STATIC_LIBRARIES := $(llvm_c_test_STATIC_LIBRARIES)
+
+LOCAL_LDLIBS += -lpthread -lm -ldl
+
+include $(LLVM_ROOT_PATH)/llvm.mk
+include $(LLVM_HOST_BUILD_MK)
+include $(LLVM_GEN_INTRINSICS_MK)
+include $(BUILD_HOST_EXECUTABLE)
diff --git a/tools/llvm-config/Android.mk b/tools/llvm-config/Android.mk
new file mode 100644
index 0000000..628a62c
--- /dev/null
+++ b/tools/llvm-config/Android.mk
@@ -0,0 +1,46 @@
+LOCAL_PATH := $(call my-dir)
+
+LLVM_ROOT_PATH := $(LOCAL_PATH)/../..
+
+
+#===---------------------------------------------------------------===
+# llvm-config command line tool
+#===---------------------------------------------------------------===
+
+llvm_config_SRC_FILES := \
+ llvm-config.cpp \
+
+llvm_config_STATIC_LIBRARIES := \
+ libLLVMCore \
+ libLLVMSupport \
+
+llvm_config_LOCAL_INCLUDES := \
+ BuildVariables.inc \
+ LibraryDependencies.inc
+
+llvm_config_DEPENDENCIES := \
+ BuildVariables.inc
+
+include $(CLEAR_VARS)
+
+BUILD_VARIABLES_IN := $(LOCAL_PATH)/BuildVariables.inc.in
+BUILD_VARIABLES_OUT := $(LOCAL_PATH)/BuildVariables.inc
+
+BuildVariables.inc:
+ sed -e 's/@ANDROID_BUILD_TOP@/$(subst /,\/,$(ANDROID_BUILD_TOP))/' < $(BUILD_VARIABLES_IN) > $(BUILD_VARIABLES_OUT)
+
+LOCAL_MODULE := llvm-config
+LOCAL_MODULE_TAGS := optional
+LOCAL_MODULE_CLASS := EXECUTABLES
+LOCAL_IS_HOST_MODULE := true
+
+LOCAL_SRC_FILES := $(llvm_config_SRC_FILES)
+LOCAL_STATIC_LIBRARIES := $(llvm_config_STATIC_LIBRARIES)
+LOCAL_INCLUDES := $(llvm_config_LOCAL_INCLUDES)
+LOCAL_ADDITIONAL_DEPENDENCIES := $(llvm_config_DEPENDENCIES)
+
+LOCAL_LDLIBS += -lpthread -lm -ldl
+
+include $(LLVM_ROOT_PATH)/llvm.mk
+include $(LLVM_HOST_BUILD_MK)
+include $(BUILD_HOST_EXECUTABLE)
diff --git a/tools/llvm-config/BuildVariables.inc.in b/tools/llvm-config/BuildVariables.inc.in
index 2ec019b..59b5835 100644
--- a/tools/llvm-config/BuildVariables.inc.in
+++ b/tools/llvm-config/BuildVariables.inc.in
@@ -16,12 +16,12 @@
//
//===----------------------------------------------------------------------===//
-#define LLVM_SRC_ROOT "@LLVM_SRC_ROOT@"
-#define LLVM_OBJ_ROOT "@LLVM_OBJ_ROOT@"
-#define LLVM_CPPFLAGS "@LLVM_CPPFLAGS@"
-#define LLVM_CFLAGS "@LLVM_CFLAGS@"
-#define LLVM_LDFLAGS "@LLVM_LDFLAGS@"
-#define LLVM_CXXFLAGS "@LLVM_CXXFLAGS@"
-#define LLVM_BUILDMODE "@LLVM_BUILDMODE@"
-#define LLVM_TARGETS_BUILT "@LLVM_TARGETS_BUILT@"
-#define LLVM_SYSTEM_LIBS "@LLVM_SYSTEM_LIBS@"
+#define LLVM_SRC_ROOT "@ANDROID_BUILD_TOP@/external/llvm"
+#define LLVM_OBJ_ROOT ""
+#define LLVM_CPPFLAGS " -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS"
+#define LLVM_CFLAGS " -fPIC -Wall -W -Wno-unused-parameter -Wwrite-strings -Wmissing-field-initializers -pedantic -Wno-long-long -Wcovered-switch-default -fcolor-diagnostics -ffunction-sections -fdata-sections -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS"
+#define LLVM_LDFLAGS ""
+#define LLVM_CXXFLAGS " -fPIC -fvisibility-inlines-hidden -Wall -W -Wno-unused-parameter -Wwrite-strings -Wmissing-field-initializers -pedantic -Wno-long-long -Wcovered-switch-default -Wnon-virtual-dtor -std=c++11 -fcolor-diagnostics -ffunction-sections -fdata-sections -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS"
+#define LLVM_BUILDMODE ""
+#define LLVM_TARGETS_BUILT "X86 AArch64 ARM Mips"
+#define LLVM_SYSTEM_LIBS "-lrt -ldl -ltinfo -lpthread"
diff --git a/tools/llvm-config/LibraryDependencies.inc b/tools/llvm-config/LibraryDependencies.inc
new file mode 100644
index 0000000..47a51e6
--- /dev/null
+++ b/tools/llvm-config/LibraryDependencies.inc
@@ -0,0 +1,94 @@
+//===- llvm-build generated file --------------------------------*- C++ -*-===//
+//
+// Component Library Depenedency Table
+//
+// Automatically generated file, do not edit!
+//
+//===----------------------------------------------------------------------===//
+
+struct AvailableComponent {
+ /// The name of the component.
+ const char *Name;
+
+ /// The name of the library for this component (or NULL).
+ const char *Library;
+
+ /// Whether the component is installed.
+ bool IsInstalled;
+
+ /// The list of libraries required when linking this component.
+ const char *RequiredLibraries[16];
+} AvailableComponents[72] = {
+ { "aarch64", 0, 1, { "aarch64utils", "aarch64asmprinter", "aarch64info", "aarch64desc", "aarch64asmparser", "aarch64codegen", "aarch64disassembler" } },
+ { "aarch64asmparser", "libLLVMAArch64AsmParser.a", 1, { "aarch64desc", "aarch64info", "aarch64utils", "mc", "mcparser", "support" } },
+ { "aarch64asmprinter", "libLLVMAArch64AsmPrinter.a", 1, { "aarch64utils", "mc", "support" } },
+ { "aarch64codegen", "libLLVMAArch64CodeGen.a", 1, { "aarch64asmprinter", "aarch64desc", "aarch64info", "aarch64utils", "analysis", "asmprinter", "codegen", "core", "mc", "scalaropts", "selectiondag", "support", "target" } },
+ { "aarch64desc", "libLLVMAArch64Desc.a", 1, { "aarch64asmprinter", "aarch64info", "mc", "support" } },
+ { "aarch64disassembler", "libLLVMAArch64Disassembler.a", 1, { "aarch64info", "aarch64utils", "mc", "support" } },
+ { "aarch64info", "libLLVMAArch64Info.a", 1, { "support" } },
+ { "aarch64utils", "libLLVMAArch64Utils.a", 1, { "support" } },
+ { "all", 0, 1, { "mcjit", "interpreter", "mcdisassembler", "engine", "option", "debuginfo", "gtest_main", "all-targets", "irreader", "profiledata", "instrumentation", "lineeditor", "nativecodegen", "tablegen", "lto" } },
+ { "all-targets", 0, 1, { "x86", "aarch64", "arm", "mips" } },
+ { "analysis", "libLLVMAnalysis.a", 1, { "core", "support", "target" } },
+ { "arm", 0, 1, { "armasmprinter", "arminfo", "armdesc", "armasmparser", "armcodegen", "armdisassembler" } },
+ { "armasmparser", "libLLVMARMAsmParser.a", 1, { "armdesc", "arminfo", "mc", "mcparser", "support" } },
+ { "armasmprinter", "libLLVMARMAsmPrinter.a", 1, { "mc", "support" } },
+ { "armcodegen", "libLLVMARMCodeGen.a", 1, { "armasmprinter", "armdesc", "arminfo", "analysis", "asmprinter", "codegen", "core", "mc", "scalaropts", "selectiondag", "support", "target" } },
+ { "armdesc", "libLLVMARMDesc.a", 1, { "armasmprinter", "arminfo", "mc", "support" } },
+ { "armdisassembler", "libLLVMARMDisassembler.a", 1, { "armdesc", "arminfo", "mc", "support" } },
+ { "arminfo", "libLLVMARMInfo.a", 1, { "support" } },
+ { "asmparser", "libLLVMAsmParser.a", 1, { "core", "support" } },
+ { "asmprinter", "libLLVMAsmPrinter.a", 1, { "analysis", "codegen", "core", "mc", "mcparser", "support", "target", "transformutils" } },
+ { "bitreader", "libLLVMBitReader.a", 1, { "core", "support" } },
+ { "bitwriter", "libLLVMBitWriter.a", 1, { "core", "support" } },
+ { "codegen", "libLLVMCodeGen.a", 1, { "analysis", "core", "mc", "scalaropts", "support", "target", "transformutils" } },
+ { "core", "libLLVMCore.a", 1, { "support" } },
+ { "debuginfo", "libLLVMDebugInfo.a", 1, { "object", "support" } },
+ { "engine", 0, 1, { "jit", "native" } },
+ { "executionengine", "libLLVMExecutionEngine.a", 1, { "core", "mc", "support" } },
+ { "gtest", "libgtest.a", 0, { "support" } },
+ { "gtest_main", "libgtest_main.a", 0, { "gtest" } },
+ { "instcombine", "libLLVMInstCombine.a", 1, { "analysis", "core", "support", "target", "transformutils" } },
+ { "instrumentation", "libLLVMInstrumentation.a", 1, { "analysis", "core", "support", "target", "transformutils" } },
+ { "interpreter", "libLLVMInterpreter.a", 1, { "codegen", "core", "executionengine", "support" } },
+ { "ipa", "libLLVMipa.a", 1, { "analysis", "core", "support" } },
+ { "ipo", "libLLVMipo.a", 1, { "analysis", "core", "ipa", "instcombine", "scalaropts", "support", "target", "transformutils", "vectorize" } },
+ { "irreader", "libLLVMIRReader.a", 1, { "asmparser", "bitreader", "core", "support" } },
+ { "jit", "libLLVMJIT.a", 1, { "codegen", "core", "executionengine", "support" } },
+ { "lineeditor", "libLLVMLineEditor.a", 1, { "support" } },
+ { "linker", "libLLVMLinker.a", 1, { "core", "support", "transformutils" } },
+ { "lto", "libLLVMLTO.a", 1, { "bitreader", "bitwriter", "core", "ipa", "ipo", "instcombine", "linker", "mc", "mcparser", "objcarcopts", "scalaropts", "support", "target", "transformutils" } },
+ { "mc", "libLLVMMC.a", 1, { "object", "support" } },
+ { "mcdisassembler", "libLLVMMCDisassembler.a", 1, { "mc", "support" } },
+ { "mcjit", "libLLVMMCJIT.a", 1, { "core", "executionengine", "object", "runtimedyld", "support", "target" } },
+ { "mcparser", "libLLVMMCParser.a", 1, { "mc", "support" } },
+ { "mips", 0, 1, { "mipsasmprinter", "mipsinfo", "mipsdesc", "mipsasmparser", "mipscodegen", "mipsdisassembler" } },
+ { "mipsasmparser", "libLLVMMipsAsmParser.a", 1, { "mc", "mcparser", "mipsdesc", "mipsinfo", "support" } },
+ { "mipsasmprinter", "libLLVMMipsAsmPrinter.a", 1, { "mc", "support" } },
+ { "mipscodegen", "libLLVMMipsCodeGen.a", 1, { "analysis", "asmprinter", "codegen", "core", "mc", "mipsasmprinter", "mipsdesc", "mipsinfo", "scalaropts", "selectiondag", "support", "target" } },
+ { "mipsdesc", "libLLVMMipsDesc.a", 1, { "mc", "mipsasmprinter", "mipsinfo", "support" } },
+ { "mipsdisassembler", "libLLVMMipsDisassembler.a", 1, { "mc", "mipsinfo", "support" } },
+ { "mipsinfo", "libLLVMMipsInfo.a", 1, { "support" } },
+ { "native", 0, 1, { "x86" } },
+ { "nativecodegen", 0, 1, { "x86codegen" } },
+ { "objcarcopts", "libLLVMObjCARCOpts.a", 1, { "analysis", "core", "support", "transformutils" } },
+ { "object", "libLLVMObject.a", 1, { "bitreader", "core", "support" } },
+ { "option", "libLLVMOption.a", 1, { "support" } },
+ { "profiledata", "libLLVMProfileData.a", 1, { "support" } },
+ { "runtimedyld", "libLLVMRuntimeDyld.a", 1, { "object", "support" } },
+ { "scalaropts", "libLLVMScalarOpts.a", 1, { "analysis", "core", "ipa", "instcombine", "support", "target", "transformutils" } },
+ { "selectiondag", "libLLVMSelectionDAG.a", 1, { "analysis", "codegen", "core", "mc", "support", "target", "transformutils" } },
+ { "support", "libLLVMSupport.a", 1, { } },
+ { "tablegen", "libLLVMTableGen.a", 1, { "support" } },
+ { "target", "libLLVMTarget.a", 1, { "core", "mc", "support" } },
+ { "transformutils", "libLLVMTransformUtils.a", 1, { "analysis", "core", "ipa", "support", "target" } },
+ { "vectorize", "libLLVMVectorize.a", 1, { "analysis", "core", "support", "target", "transformutils" } },
+ { "x86", 0, 1, { "x86utils", "x86asmprinter", "x86info", "x86desc", "x86codegen", "x86asmparser", "x86disassembler" } },
+ { "x86asmparser", "libLLVMX86AsmParser.a", 1, { "mc", "mcparser", "support", "x86desc", "x86info" } },
+ { "x86asmprinter", "libLLVMX86AsmPrinter.a", 1, { "mc", "support", "x86utils" } },
+ { "x86codegen", "libLLVMX86CodeGen.a", 1, { "analysis", "asmprinter", "codegen", "core", "mc", "selectiondag", "support", "target", "x86asmprinter", "x86desc", "x86info", "x86utils" } },
+ { "x86desc", "libLLVMX86Desc.a", 1, { "mc", "object", "support", "x86asmprinter", "x86info" } },
+ { "x86disassembler", "libLLVMX86Disassembler.a", 1, { "mc", "support", "x86info" } },
+ { "x86info", "libLLVMX86Info.a", 1, { "support" } },
+ { "x86utils", "libLLVMX86Utils.a", 1, { "support" } },
+};
diff --git a/tools/llvm-cov/Android.mk b/tools/llvm-cov/Android.mk
new file mode 100644
index 0000000..dae211f
--- /dev/null
+++ b/tools/llvm-cov/Android.mk
@@ -0,0 +1,33 @@
+LOCAL_PATH := $(call my-dir)
+
+LLVM_ROOT_PATH := $(LOCAL_PATH)/../..
+
+
+#===---------------------------------------------------------------===
+# llvm-cov command line tool
+#===---------------------------------------------------------------===
+
+llvm_cov_SRC_FILES := \
+ llvm-cov.cpp
+
+llvm_cov_STATIC_LIBRARIES := \
+ libLLVMCore \
+ libLLVMSupport \
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := llvm-cov
+LOCAL_MODULE_TAGS := optional
+LOCAL_MODULE_CLASS := EXECUTABLES
+LOCAL_IS_HOST_MODULE := true
+
+LOCAL_SRC_FILES := $(llvm_cov_SRC_FILES)
+
+LOCAL_STATIC_LIBRARIES := $(llvm_cov_STATIC_LIBRARIES)
+
+LOCAL_LDLIBS += -lpthread -lm -ldl
+
+include $(LLVM_ROOT_PATH)/llvm.mk
+include $(LLVM_HOST_BUILD_MK)
+include $(LLVM_GEN_INTRINSICS_MK)
+include $(BUILD_HOST_EXECUTABLE)
diff --git a/tools/llvm-diff/Android.mk b/tools/llvm-diff/Android.mk
new file mode 100644
index 0000000..91213d8
--- /dev/null
+++ b/tools/llvm-diff/Android.mk
@@ -0,0 +1,39 @@
+LOCAL_PATH := $(call my-dir)
+
+LLVM_ROOT_PATH := $(LOCAL_PATH)/../..
+
+
+#===---------------------------------------------------------------===
+# llvm-diff command line tool
+#===---------------------------------------------------------------===
+
+llvm_diff_SRC_FILES := \
+ llvm-diff.cpp \
+ DiffConsumer.cpp \
+ DifferenceEngine.cpp \
+ DiffLog.cpp \
+
+llvm_diff_STATIC_LIBRARIES := \
+ libLLVMIRReader \
+ libLLVMBitReader \
+ libLLVMAsmParser \
+ libLLVMCore \
+ libLLVMSupport \
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := llvm-diff
+LOCAL_MODULE_TAGS := optional
+LOCAL_MODULE_CLASS := EXECUTABLES
+LOCAL_IS_HOST_MODULE := true
+
+LOCAL_SRC_FILES := $(llvm_diff_SRC_FILES)
+
+LOCAL_STATIC_LIBRARIES := $(llvm_diff_STATIC_LIBRARIES)
+
+LOCAL_LDLIBS += -lpthread -lm -ldl
+
+include $(LLVM_ROOT_PATH)/llvm.mk
+include $(LLVM_HOST_BUILD_MK)
+include $(LLVM_GEN_INTRINSICS_MK)
+include $(BUILD_HOST_EXECUTABLE)
diff --git a/tools/llvm-dis/Android.mk b/tools/llvm-dis/Android.mk
index 22d44fd..c5ff680 100644
--- a/tools/llvm-dis/Android.mk
+++ b/tools/llvm-dis/Android.mk
@@ -11,9 +11,6 @@ LOCAL_MODULE_TAGS := optional
LOCAL_SRC_FILES := $(llvm_dis_SRC_FILES)
LOCAL_LDLIBS += -lpthread -lm -ldl
-REQUIRES_EH := 1
-REQUIRES_RTTI := 1
-
LOCAL_STATIC_LIBRARIES := \
libLLVMAnalysis \
libLLVMBitReader \
diff --git a/tools/llvm-dwarfdump/Android.mk b/tools/llvm-dwarfdump/Android.mk
new file mode 100644
index 0000000..7908201
--- /dev/null
+++ b/tools/llvm-dwarfdump/Android.mk
@@ -0,0 +1,36 @@
+LOCAL_PATH := $(call my-dir)
+
+LLVM_ROOT_PATH := $(LOCAL_PATH)/../..
+
+
+#===---------------------------------------------------------------===
+# llvm-dwarfdump command line tool
+#===---------------------------------------------------------------===
+
+llvm_dwarfdump_SRC_FILES := \
+ llvm-dwarfdump.cpp
+
+llvm_dwarfdump_STATIC_LIBRARIES := \
+ libLLVMDebugInfo \
+ libLLVMObject \
+ libLLVMBitReader \
+ libLLVMCore \
+ libLLVMSupport \
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := llvm-dwarfdump
+LOCAL_MODULE_TAGS := optional
+LOCAL_MODULE_CLASS := EXECUTABLES
+LOCAL_IS_HOST_MODULE := true
+
+LOCAL_SRC_FILES := $(llvm_dwarfdump_SRC_FILES)
+
+LOCAL_STATIC_LIBRARIES := $(llvm_dwarfdump_STATIC_LIBRARIES)
+
+LOCAL_LDLIBS += -lpthread -lm -ldl
+
+include $(LLVM_ROOT_PATH)/llvm.mk
+include $(LLVM_HOST_BUILD_MK)
+include $(LLVM_GEN_INTRINSICS_MK)
+include $(BUILD_HOST_EXECUTABLE)
diff --git a/tools/llvm-extract/Android.mk b/tools/llvm-extract/Android.mk
new file mode 100644
index 0000000..dcd0b9b
--- /dev/null
+++ b/tools/llvm-extract/Android.mk
@@ -0,0 +1,42 @@
+LOCAL_PATH := $(call my-dir)
+
+LLVM_ROOT_PATH := $(LOCAL_PATH)/../..
+
+
+#===---------------------------------------------------------------===
+# llvm-extract command line tool
+#===---------------------------------------------------------------===
+
+llvm_extract_SRC_FILES := \
+ llvm-extract.cpp
+
+llvm_extract_STATIC_LIBRARIES := \
+ libLLVMIRReader \
+ libLLVMAsmParser \
+ libLLVMObject \
+ libLLVMBitReader \
+ libLLVMBitWriter \
+ libLLVMipo \
+ libLLVMTransformUtils \
+ libLLVMAnalysis \
+ libLLVMTarget \
+ libLLVMCore \
+ libLLVMSupport \
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := llvm-extract
+LOCAL_MODULE_TAGS := optional
+LOCAL_MODULE_CLASS := EXECUTABLES
+LOCAL_IS_HOST_MODULE := true
+
+LOCAL_SRC_FILES := $(llvm_extract_SRC_FILES)
+
+LOCAL_STATIC_LIBRARIES := $(llvm_extract_STATIC_LIBRARIES)
+
+LOCAL_LDLIBS += -lpthread -lm -ldl
+
+include $(LLVM_ROOT_PATH)/llvm.mk
+include $(LLVM_HOST_BUILD_MK)
+include $(LLVM_GEN_INTRINSICS_MK)
+include $(BUILD_HOST_EXECUTABLE)
diff --git a/tools/llvm-lto/Android.mk b/tools/llvm-lto/Android.mk
new file mode 100644
index 0000000..a5782d9
--- /dev/null
+++ b/tools/llvm-lto/Android.mk
@@ -0,0 +1,81 @@
+LOCAL_PATH := $(call my-dir)
+
+LLVM_ROOT_PATH := $(LOCAL_PATH)/../..
+
+
+#===---------------------------------------------------------------===
+# llvm-lto command line tool
+#===---------------------------------------------------------------===
+
+llvm_lto_SRC_FILES := \
+ llvm-lto.cpp
+
+llvm_lto_STATIC_LIBRARIES := \
+ 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 \
+ libLLVMSelectionDAG \
+ libLLVMCodeGen \
+ libLLVMTarget \
+ libLLVMLTO \
+ libLLVMBitReader \
+ libLLVMBitWriter \
+ libLLVMLinker \
+ libLLVMipo \
+ libLLVMTransformObjCARC \
+ libLLVMScalarOpts \
+ libLLVMInstCombine \
+ libLLVMVectorize \
+ libLLVMTransformUtils \
+ libLLVMAnalysis \
+ libLLVMipa \
+ libLLVMMC \
+ libLLVMMCParser \
+ libLLVMMCDisassembler \
+ libLLVMObject \
+ libLLVMCore \
+ libLLVMAsmParser \
+ libLLVMOption \
+ libLLVMSupport \
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := llvm-lto
+LOCAL_MODULE_TAGS := optional
+LOCAL_MODULE_CLASS := EXECUTABLES
+LOCAL_IS_HOST_MODULE := true
+
+LOCAL_SRC_FILES := $(llvm_lto_SRC_FILES)
+
+LOCAL_STATIC_LIBRARIES := $(llvm_lto_STATIC_LIBRARIES)
+
+LOCAL_LDLIBS += -lpthread -lm -ldl
+
+include $(LLVM_ROOT_PATH)/llvm.mk
+include $(LLVM_HOST_BUILD_MK)
+include $(LLVM_GEN_INTRINSICS_MK)
+include $(BUILD_HOST_EXECUTABLE)
diff --git a/tools/llvm-mc/Android.mk b/tools/llvm-mc/Android.mk
new file mode 100644
index 0000000..d794c8a
--- /dev/null
+++ b/tools/llvm-mc/Android.mk
@@ -0,0 +1,64 @@
+LOCAL_PATH := $(call my-dir)
+
+LLVM_ROOT_PATH := $(LOCAL_PATH)/../..
+
+
+#===---------------------------------------------------------------===
+# llvm-mc command line tool
+#===---------------------------------------------------------------===
+
+llvm_mc_SRC_FILES := \
+ llvm-mc.cpp \
+ Disassembler.cpp
+
+llvm_mc_STATIC_LIBRARIES := \
+ libLLVMARMAsmParser \
+ libLLVMARMInfo \
+ libLLVMARMDesc \
+ libLLVMARMAsmPrinter \
+ libLLVMARMDisassembler \
+ libLLVMAArch64Info \
+ libLLVMAArch64AsmParser \
+ libLLVMAArch64Desc \
+ libLLVMAArch64AsmPrinter \
+ libLLVMAArch64Utils \
+ libLLVMAArch64Disassembler \
+ libLLVMMipsInfo \
+ libLLVMMipsAsmParser \
+ libLLVMMipsDesc \
+ libLLVMMipsAsmPrinter \
+ libLLVMMipsDisassembler \
+ libLLVMX86Info \
+ libLLVMX86Desc \
+ libLLVMX86AsmParser \
+ libLLVMX86AsmPrinter \
+ libLLVMX86Utils \
+ libLLVMX86Disassembler \
+ libLLVMAsmPrinter \
+ libLLVMTarget \
+ libLLVMMC \
+ libLLVMObject \
+ libLLVMBitReader \
+ libLLVMMCParser \
+ libLLVMCore \
+ libLLVMAsmParser \
+ libLLVMSupport \
+ libLLVMMCDisassembler \
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := llvm-mc
+LOCAL_MODULE_TAGS := optional
+LOCAL_MODULE_CLASS := EXECUTABLES
+LOCAL_IS_HOST_MODULE := true
+
+LOCAL_SRC_FILES := $(llvm_mc_SRC_FILES)
+
+LOCAL_STATIC_LIBRARIES := $(llvm_mc_STATIC_LIBRARIES)
+
+LOCAL_LDLIBS += -lpthread -lm -ldl
+
+include $(LLVM_ROOT_PATH)/llvm.mk
+include $(LLVM_HOST_BUILD_MK)
+include $(LLVM_GEN_INTRINSICS_MK)
+include $(BUILD_HOST_EXECUTABLE)
diff --git a/tools/llvm-mcmarkup/Android.mk b/tools/llvm-mcmarkup/Android.mk
new file mode 100644
index 0000000..92529ea
--- /dev/null
+++ b/tools/llvm-mcmarkup/Android.mk
@@ -0,0 +1,33 @@
+LOCAL_PATH := $(call my-dir)
+
+LLVM_ROOT_PATH := $(LOCAL_PATH)/../..
+
+
+#===---------------------------------------------------------------===
+# llvm-mcmarkup command line tool
+#===---------------------------------------------------------------===
+
+llvm_mcmarkup_SRC_FILES := \
+ llvm-mcmarkup.cpp
+
+llvm_mcmarkup_STATIC_LIBRARIES := \
+ libLLVMCore \
+ libLLVMSupport \
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := llvm-mcmarkup
+LOCAL_MODULE_TAGS := optional
+LOCAL_MODULE_CLASS := EXECUTABLES
+LOCAL_IS_HOST_MODULE := true
+
+LOCAL_SRC_FILES := $(llvm_mcmarkup_SRC_FILES)
+
+LOCAL_STATIC_LIBRARIES := $(llvm_mcmarkup_STATIC_LIBRARIES)
+
+LOCAL_LDLIBS += -lpthread -lm -ldl
+
+include $(LLVM_ROOT_PATH)/llvm.mk
+include $(LLVM_HOST_BUILD_MK)
+include $(LLVM_GEN_INTRINSICS_MK)
+include $(BUILD_HOST_EXECUTABLE)
diff --git a/tools/llvm-nm/Android.mk b/tools/llvm-nm/Android.mk
new file mode 100644
index 0000000..93bd9a3
--- /dev/null
+++ b/tools/llvm-nm/Android.mk
@@ -0,0 +1,35 @@
+LOCAL_PATH := $(call my-dir)
+
+LLVM_ROOT_PATH := $(LOCAL_PATH)/../..
+
+
+#===---------------------------------------------------------------===
+# llvm-nm command line tool
+#===---------------------------------------------------------------===
+
+llvm_nm_SRC_FILES := \
+ llvm-nm.cpp
+
+llvm_nm_STATIC_LIBRARIES := \
+ libLLVMObject \
+ libLLVMBitReader \
+ libLLVMCore \
+ libLLVMSupport \
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := llvm-nm
+LOCAL_MODULE_TAGS := optional
+LOCAL_MODULE_CLASS := EXECUTABLES
+LOCAL_IS_HOST_MODULE := true
+
+LOCAL_SRC_FILES := $(llvm_nm_SRC_FILES)
+
+LOCAL_STATIC_LIBRARIES := $(llvm_nm_STATIC_LIBRARIES)
+
+LOCAL_LDLIBS += -lpthread -lm -ldl
+
+include $(LLVM_ROOT_PATH)/llvm.mk
+include $(LLVM_HOST_BUILD_MK)
+include $(LLVM_GEN_INTRINSICS_MK)
+include $(BUILD_HOST_EXECUTABLE)
diff --git a/tools/llvm-objdump/Android.mk b/tools/llvm-objdump/Android.mk
new file mode 100644
index 0000000..ea738f4
--- /dev/null
+++ b/tools/llvm-objdump/Android.mk
@@ -0,0 +1,68 @@
+LOCAL_PATH := $(call my-dir)
+
+LLVM_ROOT_PATH := $(LOCAL_PATH)/../..
+
+
+#===---------------------------------------------------------------===
+# llvm-objdump command line tool
+#===---------------------------------------------------------------===
+
+llvm_objdump_SRC_FILES := \
+ llvm-objdump.cpp \
+ COFFDump.cpp \
+ ELFDump.cpp \
+ MachODump.cpp \
+
+llvm_objdump_STATIC_LIBRARIES := \
+ libLLVMDebugInfo \
+ libLLVMARMAsmParser \
+ libLLVMARMInfo \
+ libLLVMARMDesc \
+ libLLVMARMAsmPrinter \
+ libLLVMARMDisassembler \
+ libLLVMAArch64Info \
+ libLLVMAArch64AsmParser \
+ libLLVMAArch64Desc \
+ libLLVMAArch64AsmPrinter \
+ libLLVMAArch64Utils \
+ libLLVMAArch64Disassembler \
+ libLLVMMipsInfo \
+ libLLVMMipsAsmParser \
+ libLLVMMipsDesc \
+ libLLVMMipsAsmPrinter \
+ libLLVMMipsDisassembler \
+ libLLVMX86Info \
+ libLLVMX86Desc \
+ libLLVMX86AsmParser \
+ libLLVMX86AsmPrinter \
+ libLLVMX86Utils \
+ libLLVMX86Disassembler \
+ libLLVMAsmPrinter \
+ libLLVMTarget \
+ libLLVMMCParser \
+ libLLVMMC \
+ libLLVMMCDisassembler \
+ libLLVMObject \
+ libLLVMBitReader \
+ libLLVMCore \
+ libLLVMAsmParser \
+ libLLVMSupport \
+ libLLVMMCDisassembler \
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := llvm-objdump
+LOCAL_MODULE_TAGS := optional
+LOCAL_MODULE_CLASS := EXECUTABLES
+LOCAL_IS_HOST_MODULE := true
+
+LOCAL_SRC_FILES := $(llvm_objdump_SRC_FILES)
+
+LOCAL_STATIC_LIBRARIES := $(llvm_objdump_STATIC_LIBRARIES)
+
+LOCAL_LDLIBS += -lpthread -lm -ldl
+
+include $(LLVM_ROOT_PATH)/llvm.mk
+include $(LLVM_HOST_BUILD_MK)
+include $(LLVM_GEN_INTRINSICS_MK)
+include $(BUILD_HOST_EXECUTABLE)
diff --git a/tools/llvm-profdata/Android.mk b/tools/llvm-profdata/Android.mk
new file mode 100644
index 0000000..1c83b46
--- /dev/null
+++ b/tools/llvm-profdata/Android.mk
@@ -0,0 +1,35 @@
+LOCAL_PATH := $(call my-dir)
+
+LLVM_ROOT_PATH := $(LOCAL_PATH)/../..
+
+
+#===---------------------------------------------------------------===
+# llvm-profdata command line tool
+#===---------------------------------------------------------------===
+
+llvm_profdata_SRC_FILES := \
+ llvm-profdata.cpp
+
+llvm_profdata_STATIC_LIBRARIES := \
+ libLLVMObject \
+ libLLVMProfileData \
+ libLLVMCore \
+ libLLVMSupport \
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := llvm-profdata
+LOCAL_MODULE_TAGS := optional
+LOCAL_MODULE_CLASS := EXECUTABLES
+LOCAL_IS_HOST_MODULE := true
+
+LOCAL_SRC_FILES := $(llvm_profdata_SRC_FILES)
+
+LOCAL_STATIC_LIBRARIES := $(llvm_profdata_STATIC_LIBRARIES)
+
+LOCAL_LDLIBS += -lpthread -lm -ldl
+
+include $(LLVM_ROOT_PATH)/llvm.mk
+include $(LLVM_HOST_BUILD_MK)
+include $(LLVM_GEN_INTRINSICS_MK)
+include $(BUILD_HOST_EXECUTABLE)
diff --git a/tools/llvm-readobj/Android.mk b/tools/llvm-readobj/Android.mk
new file mode 100644
index 0000000..10c99db
--- /dev/null
+++ b/tools/llvm-readobj/Android.mk
@@ -0,0 +1,47 @@
+LOCAL_PATH := $(call my-dir)
+
+LLVM_ROOT_PATH := $(LOCAL_PATH)/../..
+
+
+#===---------------------------------------------------------------===
+# llvm-readobj command line tool
+#===---------------------------------------------------------------===
+
+llvm_readobj_SRC_FILES := \
+ ARMAttributeParser.cpp \
+ COFFDumper.cpp \
+ ELFDumper.cpp \
+ Error.cpp \
+ llvm-readobj.cpp \
+ MachODumper.cpp \
+ ObjDumper.cpp \
+ StreamWriter.cpp \
+ Win64EHDumper.cpp \
+
+llvm_readobj_STATIC_LIBRARIES := \
+ libLLVMARMInfo \
+ libLLVMAArch64Info \
+ libLLVMMipsInfo \
+ libLLVMX86Info \
+ libLLVMObject \
+ libLLVMBitReader \
+ libLLVMCore \
+ libLLVMSupport \
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := llvm-readobj
+LOCAL_MODULE_TAGS := optional
+LOCAL_MODULE_CLASS := EXECUTABLES
+LOCAL_IS_HOST_MODULE := true
+
+LOCAL_SRC_FILES := $(llvm_readobj_SRC_FILES)
+
+LOCAL_STATIC_LIBRARIES := $(llvm_readobj_STATIC_LIBRARIES)
+
+LOCAL_LDLIBS += -lpthread -lm -ldl
+
+include $(LLVM_ROOT_PATH)/llvm.mk
+include $(LLVM_HOST_BUILD_MK)
+include $(LLVM_GEN_INTRINSICS_MK)
+include $(BUILD_HOST_EXECUTABLE)
diff --git a/tools/llvm-rtdyld/Android.mk b/tools/llvm-rtdyld/Android.mk
new file mode 100644
index 0000000..54a612a
--- /dev/null
+++ b/tools/llvm-rtdyld/Android.mk
@@ -0,0 +1,39 @@
+LOCAL_PATH := $(call my-dir)
+
+LLVM_ROOT_PATH := $(LOCAL_PATH)/../..
+
+
+#===---------------------------------------------------------------===
+# llvm-rtdyld command line tool
+#===---------------------------------------------------------------===
+
+llvm_rtdyld_SRC_FILES := \
+ llvm-rtdyld.cpp
+
+llvm_rtdyld_STATIC_LIBRARIES := \
+ libLLVMDebugInfo \
+ libLLVMExecutionEngine \
+ libLLVMMC \
+ libLLVMRuntimeDyld \
+ libLLVMObject \
+ libLLVMBitReader \
+ libLLVMCore \
+ libLLVMSupport \
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := llvm-rtdyld
+LOCAL_MODULE_TAGS := optional
+LOCAL_MODULE_CLASS := EXECUTABLES
+LOCAL_IS_HOST_MODULE := true
+
+LOCAL_SRC_FILES := $(llvm_rtdyld_SRC_FILES)
+
+LOCAL_STATIC_LIBRARIES := $(llvm_rtdyld_STATIC_LIBRARIES)
+
+LOCAL_LDLIBS += -lpthread -lm -ldl
+
+include $(LLVM_ROOT_PATH)/llvm.mk
+include $(LLVM_HOST_BUILD_MK)
+include $(LLVM_GEN_INTRINSICS_MK)
+include $(BUILD_HOST_EXECUTABLE)
diff --git a/tools/llvm-size/Android.mk b/tools/llvm-size/Android.mk
new file mode 100644
index 0000000..0efca96
--- /dev/null
+++ b/tools/llvm-size/Android.mk
@@ -0,0 +1,35 @@
+LOCAL_PATH := $(call my-dir)
+
+LLVM_ROOT_PATH := $(LOCAL_PATH)/../..
+
+
+#===---------------------------------------------------------------===
+# llvm-size command line tool
+#===---------------------------------------------------------------===
+
+llvm_size_SRC_FILES := \
+ llvm-size.cpp
+
+llvm_size_STATIC_LIBRARIES := \
+ libLLVMObject \
+ libLLVMBitReader \
+ libLLVMCore \
+ libLLVMSupport \
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := llvm-size
+LOCAL_MODULE_TAGS := optional
+LOCAL_MODULE_CLASS := EXECUTABLES
+LOCAL_IS_HOST_MODULE := true
+
+LOCAL_SRC_FILES := $(llvm_size_SRC_FILES)
+
+LOCAL_STATIC_LIBRARIES := $(llvm_size_STATIC_LIBRARIES)
+
+LOCAL_LDLIBS += -lpthread -lm -ldl
+
+include $(LLVM_ROOT_PATH)/llvm.mk
+include $(LLVM_HOST_BUILD_MK)
+include $(LLVM_GEN_INTRINSICS_MK)
+include $(BUILD_HOST_EXECUTABLE)
diff --git a/tools/macho-dump/Android.mk b/tools/macho-dump/Android.mk
new file mode 100644
index 0000000..9699d4a
--- /dev/null
+++ b/tools/macho-dump/Android.mk
@@ -0,0 +1,35 @@
+LOCAL_PATH := $(call my-dir)
+
+LLVM_ROOT_PATH := $(LOCAL_PATH)/../..
+
+
+#===---------------------------------------------------------------===
+# macho-dump command line tool
+#===---------------------------------------------------------------===
+
+macho_dump_SRC_FILES := \
+ macho-dump.cpp
+
+macho_dump_STATIC_LIBRARIES := \
+ libLLVMObject \
+ libLLVMBitReader \
+ libLLVMCore \
+ libLLVMSupport \
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := macho-dump
+LOCAL_MODULE_TAGS := optional
+LOCAL_MODULE_CLASS := EXECUTABLES
+LOCAL_IS_HOST_MODULE := true
+
+LOCAL_SRC_FILES := $(macho_dump_SRC_FILES)
+
+LOCAL_STATIC_LIBRARIES := $(macho_dump_STATIC_LIBRARIES)
+
+LOCAL_LDLIBS += -lpthread -lm -ldl
+
+include $(LLVM_ROOT_PATH)/llvm.mk
+include $(LLVM_HOST_BUILD_MK)
+include $(LLVM_GEN_INTRINSICS_MK)
+include $(BUILD_HOST_EXECUTABLE)
diff --git a/tools/obj2yaml/Android.mk b/tools/obj2yaml/Android.mk
new file mode 100644
index 0000000..8c8fdab
--- /dev/null
+++ b/tools/obj2yaml/Android.mk
@@ -0,0 +1,38 @@
+LOCAL_PATH := $(call my-dir)
+
+LLVM_ROOT_PATH := $(LOCAL_PATH)/../..
+
+
+#===---------------------------------------------------------------===
+# obj2yaml command line tool
+#===---------------------------------------------------------------===
+
+obj2yaml_SRC_FILES := \
+ obj2yaml.cpp \
+ coff2yaml.cpp \
+ elf2yaml.cpp \
+ Error.cpp \
+
+obj2yaml_STATIC_LIBRARIES := \
+ libLLVMObject \
+ libLLVMBitReader \
+ libLLVMCore \
+ libLLVMSupport \
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := obj2yaml
+LOCAL_MODULE_TAGS := optional
+LOCAL_MODULE_CLASS := EXECUTABLES
+LOCAL_IS_HOST_MODULE := true
+
+LOCAL_SRC_FILES := $(obj2yaml_SRC_FILES)
+
+LOCAL_STATIC_LIBRARIES := $(obj2yaml_STATIC_LIBRARIES)
+
+LOCAL_LDLIBS += -lpthread -lm -ldl
+
+include $(LLVM_ROOT_PATH)/llvm.mk
+include $(LLVM_HOST_BUILD_MK)
+include $(LLVM_GEN_INTRINSICS_MK)
+include $(BUILD_HOST_EXECUTABLE)
diff --git a/tools/opt/Android.mk b/tools/opt/Android.mk
index 9ba9584..3ebb97e 100644
--- a/tools/opt/Android.mk
+++ b/tools/opt/Android.mk
@@ -4,37 +4,66 @@ LLVM_ROOT_PATH := $(LOCAL_PATH)/../..
#===---------------------------------------------------------------===
-# opt command line tool (common)
+# opt command line tool
#===---------------------------------------------------------------===
llvm_opt_SRC_FILES := \
AnalysisWrappers.cpp \
+ BreakpointPrinter.cpp \
GraphPrinters.cpp \
+ NewPMDriver.cpp \
+ Passes.cpp \
+ PassPrinters.cpp \
PrintSCC.cpp \
- opt.cpp
+ opt.cpp \
llvm_opt_STATIC_LIBRARIES := \
- libLLVMScalarOpts \
- libLLVMInstCombine \
- libLLVMInstrumentation \
- libLLVMMCParser \
- libLLVMMC \
- libLLVMAsmParser \
- libLLVMBitWriter \
+ libLLVMIRReader \
libLLVMBitReader \
- libLLVMipa \
- libLLVMipo \
- libLLVMTransformUtils \
+ libLLVMBitWriter \
+ 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 \
+ libLLVMInstrumentation \
+ libLLVMTransformObjCARC \
libLLVMVectorize \
+ libLLVMScalarOpts \
+ libLLVMTransformUtils \
libLLVMAnalysis \
+ libLLVMipo \
+ libLLVMipa \
+ libLLVMInstCombine \
+ libLLVMTransformUtils \
libLLVMTarget \
+ libLLVMMC \
+ libLLVMObject \
libLLVMCore \
- libLLVMSupport
-
-
-#===---------------------------------------------------------------===
-# opt command line tool (host)
-#===---------------------------------------------------------------===
+ libLLVMAsmParser \
+ libLLVMOption \
+ libLLVMSupport \
+ libLLVMMCDisassembler \
include $(CLEAR_VARS)
@@ -46,36 +75,8 @@ LOCAL_IS_HOST_MODULE := true
LOCAL_SRC_FILES := $(llvm_opt_SRC_FILES)
LOCAL_STATIC_LIBRARIES := $(llvm_opt_STATIC_LIBRARIES)
LOCAL_LDLIBS += -lpthread -lm -ldl
-LOCAL_C_INCLUDES += external/llvm/include
include $(LLVM_ROOT_PATH)/llvm.mk
include $(LLVM_HOST_BUILD_MK)
include $(LLVM_GEN_INTRINSICS_MK)
include $(BUILD_HOST_EXECUTABLE)
-
-
-#===---------------------------------------------------------------===
-# opt command line tool (target)
-#===---------------------------------------------------------------===
-
-ifneq (true,$(DISABLE_LLVM_DEVICE_BUILDS))
-include $(CLEAR_VARS)
-
-LOCAL_MODULE := opt
-LOCAL_MODULE_TAGS := optional
-LOCAL_MODULE_CLASS := EXECUTABLES
-
-LOCAL_SRC_FILES := $(llvm_opt_SRC_FILES)
-LOCAL_C_INCLUDES += external/llvm/include
-LOCAL_STATIC_LIBRARIES := $(llvm_opt_STATIC_LIBRARIES)
-LOCAL_SHARED_LIBRARIES := \
- libcutils \
- libdl \
- libcxx
-
-
-include $(LLVM_ROOT_PATH)/llvm.mk
-include $(LLVM_DEVICE_BUILD_MK)
-include $(LLVM_GEN_INTRINSICS_MK)
-include $(BUILD_EXECUTABLE)
-endif
diff --git a/tools/yaml2obj/Android.mk b/tools/yaml2obj/Android.mk
new file mode 100644
index 0000000..d69075a
--- /dev/null
+++ b/tools/yaml2obj/Android.mk
@@ -0,0 +1,37 @@
+LOCAL_PATH := $(call my-dir)
+
+LLVM_ROOT_PATH := $(LOCAL_PATH)/../..
+
+
+#===---------------------------------------------------------------===
+# yaml2obj command line tool
+#===---------------------------------------------------------------===
+
+yaml2obj_SRC_FILES := \
+ yaml2obj.cpp \
+ yaml2coff.cpp \
+ yaml2elf.cpp \
+
+yaml2obj_STATIC_LIBRARIES := \
+ libLLVMObject \
+ libLLVMBitReader \
+ libLLVMCore \
+ libLLVMSupport \
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := yaml2obj
+LOCAL_MODULE_TAGS := optional
+LOCAL_MODULE_CLASS := EXECUTABLES
+LOCAL_IS_HOST_MODULE := true
+
+LOCAL_SRC_FILES := $(yaml2obj_SRC_FILES)
+
+LOCAL_STATIC_LIBRARIES := $(yaml2obj_STATIC_LIBRARIES)
+
+LOCAL_LDLIBS += -lpthread -lm -ldl
+
+include $(LLVM_ROOT_PATH)/llvm.mk
+include $(LLVM_HOST_BUILD_MK)
+include $(LLVM_GEN_INTRINSICS_MK)
+include $(BUILD_HOST_EXECUTABLE)