summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore3
-rw-r--r--Android.mk46
-rwxr-xr-xandroid_test.sh15
-rw-r--r--lib/Analysis/Android.mk2
-rw-r--r--lib/DebugInfo/Android.mk52
-rw-r--r--lib/ExecutionEngine/Interpreter/Android.mk18
-rw-r--r--lib/IR/Android.mk1
-rw-r--r--lib/LTO/Android.mk35
-rw-r--r--lib/MC/Android.mk12
-rw-r--r--lib/Object/Android.mk5
-rw-r--r--lib/ProfileData/Android.mk7
-rw-r--r--lib/Support/Android.mk1
-rw-r--r--test/Unit/lit.site.cfg26
-rw-r--r--test/lit.site.cfg40
-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
-rw-r--r--utils/FileCheck/Android.mk1
-rw-r--r--utils/FileUpdate/Android.mk33
-rw-r--r--utils/count/Android.mk26
-rw-r--r--utils/not/Android.mk32
46 files changed, 1532 insertions, 78 deletions
diff --git a/.gitignore b/.gitignore
index dd0f148..8225aa6 100644
--- a/.gitignore
+++ b/.gitignore
@@ -47,3 +47,6 @@ tools/lldb
tools/lld
# Sphinx build tree, if building in-source dir.
docs/_build
+
+# Ignore the generated BuildVariables.inc.
+tools/llvm-config/BuildVariables.inc
diff --git a/Android.mk b/Android.mk
index ea75e5e..d456977 100644
--- a/Android.mk
+++ b/Android.mk
@@ -15,12 +15,15 @@ subdirs := \
lib/ExecutionEngine/RuntimeDyld \
lib/ExecutionEngine/JIT \
lib/ExecutionEngine/MCJIT \
+ lib/ExecutionEngine/Interpreter \
lib/CodeGen \
lib/CodeGen/AsmPrinter \
lib/CodeGen/SelectionDAG \
+ lib/DebugInfo \
lib/IR \
lib/IRReader \
lib/Linker \
+ lib/LTO \
lib/MC \
lib/MC/MCDisassembler \
lib/MC/MCParser \
@@ -37,8 +40,6 @@ subdirs := \
lib/Transforms/Scalar \
lib/Transforms/Utils \
lib/Transforms/Vectorize \
- utils/FileCheck \
- utils/TableGen
# ARM Code Generation Libraries
subdirs += \
@@ -79,11 +80,42 @@ subdirs += \
lib/Target/X86/Utils
# LLVM Command Line Tools
-subdirs += tools/llc
-subdirs += tools/llvm-as
-subdirs += tools/llvm-dis
-subdirs += tools/llvm-link
-#subdirs += tools/opt
+subdirs += \
+ tools/bugpoint \
+ tools/llc \
+ tools/lli \
+ tools/llvm-ar \
+ tools/llvm-as \
+ tools/llvm-bcanalyzer \
+ tools/llvm-c-test \
+ tools/llvm-config \
+ tools/llvm-cov \
+ tools/llvm-dis \
+ tools/llvm-diff \
+ tools/llvm-dwarfdump \
+ tools/llvm-extract \
+ tools/llvm-link \
+ tools/llvm-lto \
+ tools/llvm-mc \
+ tools/llvm-mcmarkup \
+ tools/llvm-nm \
+ tools/llvm-objdump \
+ tools/llvm-profdata \
+ tools/llvm-readobj \
+ tools/llvm-rtdyld \
+ tools/llvm-size \
+ tools/macho-dump \
+ tools/obj2yaml \
+ tools/opt \
+ tools/yaml2obj \
+
+# LLVM Command Line Utilities
+subdirs += \
+ utils/count \
+ utils/FileCheck \
+ utils/FileUpdate \
+ utils/not \
+ utils/TableGen \
include $(LOCAL_PATH)/llvm.mk
include $(LOCAL_PATH)/shared_llvm.mk
diff --git a/android_test.sh b/android_test.sh
new file mode 100755
index 0000000..a9d40c3
--- /dev/null
+++ b/android_test.sh
@@ -0,0 +1,15 @@
+#!/bin/bash
+
+# Set resource limits
+ulimit -t 600
+ulimit -d 512000
+ulimit -m 512000
+ulimit -s 8192
+
+: ${ANDROID_BUILD_TOP:?"ANDROID_BUILD_TOP not set. Exiting."}
+
+if [ ! -d $ANDROID_BUILD_TOP/out/host/linux-x86/obj/test_llvm ]; then
+ mkdir $ANDROID_BUILD_TOP/out/host/linux-x86/obj/test_llvm
+fi
+
+python ./utils/lit/lit.py -s -v ./test
diff --git a/lib/Analysis/Android.mk b/lib/Analysis/Android.mk
index a8fef77..bca673e 100644
--- a/lib/Analysis/Android.mk
+++ b/lib/Analysis/Android.mk
@@ -21,11 +21,13 @@ analysis_SRC_FILES := \
DependenceAnalysis.cpp \
DomPrinter.cpp \
DominanceFrontier.cpp \
+ CGSCCPassManager.cpp \
IVUsers.cpp \
InstCount.cpp \
InstructionSimplify.cpp \
Interval.cpp \
IntervalPartition.cpp \
+ LazyCallGraph.cpp \
LazyValueInfo.cpp \
LibCallAliasAnalysis.cpp \
LibCallSemantics.cpp \
diff --git a/lib/DebugInfo/Android.mk b/lib/DebugInfo/Android.mk
new file mode 100644
index 0000000..12dfb3b
--- /dev/null
+++ b/lib/DebugInfo/Android.mk
@@ -0,0 +1,52 @@
+LOCAL_PATH:= $(call my-dir)
+
+debuginfo_SRC_FILES := \
+ DIContext.cpp \
+ DWARFAbbreviationDeclaration.cpp \
+ DWARFCompileUnit.cpp \
+ DWARFContext.cpp \
+ DWARFDebugAbbrev.cpp \
+ DWARFDebugArangeSet.cpp \
+ DWARFDebugAranges.cpp \
+ DWARFDebugFrame.cpp \
+ DWARFDebugInfoEntry.cpp \
+ DWARFDebugLine.cpp \
+ DWARFDebugLoc.cpp \
+ DWARFDebugRangeList.cpp \
+ DWARFFormValue.cpp \
+ DWARFTypeUnit.cpp \
+ DWARFUnit.cpp \
+
+# For the host
+# =====================================================
+include $(CLEAR_VARS)
+
+REQUIRES_RTTI := 1
+
+LOCAL_SRC_FILES := $(debuginfo_SRC_FILES)
+
+LOCAL_MODULE:= libLLVMDebugInfo
+
+LOCAL_MODULE_TAGS := optional
+
+include $(LLVM_HOST_BUILD_MK)
+include $(LLVM_GEN_INTRINSICS_MK)
+include $(BUILD_HOST_STATIC_LIBRARY)
+
+# For the device
+# =====================================================
+ifneq (true,$(DISABLE_LLVM_DEVICE_BUILDS))
+include $(CLEAR_VARS)
+
+REQUIRES_RTTI := 1
+
+LOCAL_SRC_FILES := $(debuginfo_SRC_FILES)
+
+LOCAL_MODULE:= libLLVMDebugInfo
+
+LOCAL_MODULE_TAGS := optional
+
+include $(LLVM_DEVICE_BUILD_MK)
+include $(LLVM_GEN_INTRINSICS_MK)
+include $(BUILD_STATIC_LIBRARY)
+endif
diff --git a/lib/ExecutionEngine/Interpreter/Android.mk b/lib/ExecutionEngine/Interpreter/Android.mk
new file mode 100644
index 0000000..3823b3e
--- /dev/null
+++ b/lib/ExecutionEngine/Interpreter/Android.mk
@@ -0,0 +1,18 @@
+LOCAL_PATH:= $(call my-dir)
+
+# For the host
+# =====================================================
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES := \
+ Execution.cpp \
+ ExternalFunctions.cpp \
+ Interpreter.cpp \
+
+LOCAL_MODULE:= libLLVMInterpreter
+
+LOCAL_MODULE_TAGS := optional
+
+include $(LLVM_HOST_BUILD_MK)
+include $(LLVM_GEN_INTRINSICS_MK)
+include $(BUILD_HOST_STATIC_LIBRARY)
diff --git a/lib/IR/Android.mk b/lib/IR/Android.mk
index dd95703..2ffc86c 100644
--- a/lib/IR/Android.mk
+++ b/lib/IR/Android.mk
@@ -17,6 +17,7 @@ vmcore_SRC_FILES := \
DIBuilder.cpp \
Dominators.cpp \
Function.cpp \
+ GCOV.cpp \
GVMaterializer.cpp \
Globals.cpp \
IRBuilder.cpp \
diff --git a/lib/LTO/Android.mk b/lib/LTO/Android.mk
new file mode 100644
index 0000000..68b7a72
--- /dev/null
+++ b/lib/LTO/Android.mk
@@ -0,0 +1,35 @@
+LOCAL_PATH:= $(call my-dir)
+
+lto_SRC_FILES := \
+ LTOModule.cpp \
+ LTOCodeGenerator.cpp \
+
+# For the host
+# =====================================================
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES := $(lto_SRC_FILES)
+
+LOCAL_MODULE:= libLLVMLTO
+
+LOCAL_MODULE_TAGS := optional
+
+include $(LLVM_HOST_BUILD_MK)
+include $(LLVM_GEN_INTRINSICS_MK)
+include $(BUILD_HOST_STATIC_LIBRARY)
+
+# For the device
+# =====================================================
+ifneq (true,$(DISABLE_LLVM_DEVICE_BUILDS))
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES := $(lto_SRC_FILES)
+
+LOCAL_MODULE:= libLLVMLTO
+
+LOCAL_MODULE_TAGS := optional
+
+include $(LLVM_DEVICE_BUILD_MK)
+include $(LLVM_GEN_INTRINSICS_MK)
+include $(BUILD_STATIC_LIBRARY)
+endif
diff --git a/lib/MC/Android.mk b/lib/MC/Android.mk
index 975f4e3..23ad1d3 100644
--- a/lib/MC/Android.mk
+++ b/lib/MC/Android.mk
@@ -2,7 +2,6 @@ LOCAL_PATH:= $(call my-dir)
mc_SRC_FILES := \
ELFObjectWriter.cpp \
- MachObjectWriter.cpp \
MCAsmBackend.cpp \
MCAsmInfo.cpp \
MCAsmInfoCOFF.cpp \
@@ -10,6 +9,7 @@ mc_SRC_FILES := \
MCAsmInfoELF.cpp \
MCAsmStreamer.cpp \
MCAssembler.cpp \
+ MCAtom.cpp \
MCCodeEmitter.cpp \
MCCodeGenInfo.cpp \
MCContext.cpp \
@@ -18,6 +18,7 @@ mc_SRC_FILES := \
MCELF.cpp \
MCELFObjectTargetWriter.cpp \
MCELFStreamer.cpp \
+ MCFunction.cpp \
MCExpr.cpp \
MCExternalSymbolizer.cpp \
MCInst.cpp \
@@ -25,11 +26,15 @@ mc_SRC_FILES := \
MCInstrAnalysis.cpp \
MCLabel.cpp \
MCLinkerOptimizationHint.cpp \
- MCMachObjectTargetWriter.cpp \
MCMachOStreamer.cpp \
+ MCMachObjectTargetWriter.cpp \
+ MCModule.cpp \
+ MCModuleYAML.cpp \
MCNullStreamer.cpp \
MCObjectFileInfo.cpp \
+ MCObjectDisassembler.cpp \
MCObjectStreamer.cpp \
+ MCObjectSymbolizer.cpp \
MCObjectWriter.cpp \
MCRegisterInfo.cpp \
MCRelocationInfo.cpp \
@@ -44,9 +49,10 @@ mc_SRC_FILES := \
MCTargetOptions.cpp \
MCValue.cpp \
MCWin64EH.cpp \
+ MachObjectWriter.cpp \
+ SubtargetFeature.cpp \
WinCOFFObjectWriter.cpp \
WinCOFFStreamer.cpp \
- SubtargetFeature.cpp
# For the host
# =====================================================
diff --git a/lib/Object/Android.mk b/lib/Object/Android.mk
index bd9659c..4385f5a 100644
--- a/lib/Object/Android.mk
+++ b/lib/Object/Android.mk
@@ -4,6 +4,7 @@ object_SRC_FILES := \
Archive.cpp \
Binary.cpp \
COFFObjectFile.cpp \
+ COFFYAML.cpp \
ELF.cpp \
ELFObjectFile.cpp \
Error.cpp \
@@ -13,7 +14,9 @@ object_SRC_FILES := \
Object.cpp \
ObjectFile.cpp \
StringTableBuilder.cpp \
- SymbolicFile.cpp
+ SymbolicFile.cpp \
+ YAML.cpp \
+ ELFYAML.cpp \
# For the host
diff --git a/lib/ProfileData/Android.mk b/lib/ProfileData/Android.mk
index 5ae5ba8..f4b3fa9 100644
--- a/lib/ProfileData/Android.mk
+++ b/lib/ProfileData/Android.mk
@@ -1,10 +1,9 @@
LOCAL_PATH:= $(call my-dir)
profiledata_SRC_FILES := \
- InstrProf.cpp \
- InstrProfReader.cpp \
- InstrProfWriter.cpp
-
+ InstrProf.cpp \
+ InstrProfReader.cpp \
+ InstrProfWriter.cpp \
# For the host
# =====================================================
diff --git a/lib/Support/Android.mk b/lib/Support/Android.mk
index ab65988..6efccf5 100644
--- a/lib/Support/Android.mk
+++ b/lib/Support/Android.mk
@@ -62,6 +62,7 @@ support_SRC_FILES := \
StringMap.cpp \
StringPool.cpp \
StringRef.cpp \
+ StringRefMemoryObject.cpp \
SystemUtils.cpp \
TargetRegistry.cpp \
Threading.cpp \
diff --git a/test/Unit/lit.site.cfg b/test/Unit/lit.site.cfg
new file mode 100644
index 0000000..be9dd33
--- /dev/null
+++ b/test/Unit/lit.site.cfg
@@ -0,0 +1,26 @@
+import sys
+import os
+
+aosp_dir = os.getenv("ANDROID_BUILD_TOP")
+
+## Autogenerated by LLVM/Clang configuration.
+# Do not edit!
+config.llvm_src_root = aosp_dir + "/external/llvm"
+config.llvm_obj_root = aosp_dir + "/out/host/linux-x86/obj/test_llvm"
+config.llvm_tools_dir = aosp_dir + "/out/host/linux-x86/bin"
+config.llvm_build_mode = "Release"
+config.enable_shared = 0
+config.shlibdir = aosp_dir + "/out/host/linux-x86/lib"
+
+# Support substitution of the tools_dir and build_mode with user parameters.
+# This is used when we can't determine the tool dir at configuration time.
+try:
+ config.llvm_tools_dir = config.llvm_tools_dir % lit_config.params
+ config.llvm_build_mode = config.llvm_build_mode % lit_config.params
+except KeyError:
+ e = sys.exc_info()[1]
+ key, = e.args
+ lit_config.fatal("unable to find %r parameter, use '--param=%s=VALUE'" % (key,key))
+
+# Let the main config do the real work.
+lit_config.load_config(config, aosp_dir + "/external/llvm/test/Unit/lit.cfg")
diff --git a/test/lit.site.cfg b/test/lit.site.cfg
new file mode 100644
index 0000000..4614eb8
--- /dev/null
+++ b/test/lit.site.cfg
@@ -0,0 +1,40 @@
+import sys
+import os
+
+aosp_dir = os.getenv("ANDROID_BUILD_TOP")
+
+## Autogenerated by LLVM/Clang configuration.
+# Do not edit!
+config.host_triple = "x86_64-unknown-linux-gnu"
+config.target_triple = "x86_64-unknown-linux-gnu"
+config.llvm_src_root = aosp_dir + "/external/llvm"
+config.llvm_obj_root = aosp_dir + "/out/host/linux-x86/obj/test_llvm"
+config.llvm_tools_dir = aosp_dir + "/out/host/linux-x86/bin"
+config.llvm_shlib_dir = aosp_dir + "/out/host/linux-x86/lib"
+config.llvm_shlib_ext = ".so"
+config.llvm_exe_ext = ""
+config.lit_tools_dir = ""
+config.python_executable = "/usr/bin/python"
+config.ocamlopt_executable = ""
+config.enable_shared = 0
+config.enable_assertions = 0
+config.targets_to_build = " X86 AArch64 ARM Mips"
+config.llvm_bindings = ""
+config.host_os = "Linux"
+config.host_arch = "x86_64"
+config.llvm_use_intel_jitevents = "OFF"
+config.llvm_use_sanitizer = ""
+config.have_zlib = "0"
+
+# Support substitution of the tools_dir with user parameters. This is
+# used when we can't determine the tool dir at configuration time.
+try:
+ config.llvm_tools_dir = config.llvm_tools_dir % lit_config.params
+ config.llvm_shlib_dir = config.llvm_shlib_dir % lit_config.params
+except KeyError:
+ e = sys.exc_info()[1]
+ key, = e.args
+ lit_config.fatal("unable to find %r parameter, use '--param=%s=VALUE'" % (key,key))
+
+# Let the main config do the real work.
+lit_config.load_config(config, aosp_dir + "/external/llvm/test/lit.cfg")
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)
diff --git a/utils/FileCheck/Android.mk b/utils/FileCheck/Android.mk
index 2c211cf..3d32008 100644
--- a/utils/FileCheck/Android.mk
+++ b/utils/FileCheck/Android.mk
@@ -11,7 +11,6 @@ include $(CLEAR_VARS)
LOCAL_MODULE := FileCheck
LOCAL_SRC_FILES := $(filecheck_SRC_FILES)
LOCAL_STATIC_LIBRARIES := $(filecheck_STATIC_LIBRARIES)
-LOCAL_C_INCLUDES += external/llvm/include
LOCAL_C_INCLUDES += external/llvm/host/include
LOCAL_LDLIBS += -lpthread -lm -ldl
LOCAL_CFLAGS += -D __STDC_LIMIT_MACROS -D __STDC_CONSTANT_MACROS
diff --git a/utils/FileUpdate/Android.mk b/utils/FileUpdate/Android.mk
new file mode 100644
index 0000000..d2b82f2
--- /dev/null
+++ b/utils/FileUpdate/Android.mk
@@ -0,0 +1,33 @@
+LOCAL_PATH := $(call my-dir)
+
+LLVM_ROOT_PATH := $(LOCAL_PATH)/../..
+
+
+#===---------------------------------------------------------------===
+# FileUpdate command line tool
+#===---------------------------------------------------------------===
+
+file_update_SRC_FILES := \
+ FileUpdate.cpp
+
+file_update_STATIC_LIBRARIES := \
+ libLLVMCore \
+ libLLVMSupport \
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := FileUpdate
+LOCAL_MODULE_TAGS := optional
+LOCAL_MODULE_CLASS := EXECUTABLES
+LOCAL_IS_HOST_MODULE := true
+
+LOCAL_SRC_FILES := $(file_update_SRC_FILES)
+
+LOCAL_STATIC_LIBRARIES := $(file_update_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/utils/count/Android.mk b/utils/count/Android.mk
new file mode 100644
index 0000000..1ee8271
--- /dev/null
+++ b/utils/count/Android.mk
@@ -0,0 +1,26 @@
+LOCAL_PATH := $(call my-dir)
+
+LLVM_ROOT_PATH := $(LOCAL_PATH)/../..
+
+
+#===---------------------------------------------------------------===
+# count command line tool
+#===---------------------------------------------------------------===
+
+count_SRC_FILES := \
+ count.c
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := count
+LOCAL_MODULE_TAGS := optional
+LOCAL_MODULE_CLASS := EXECUTABLES
+LOCAL_IS_HOST_MODULE := true
+
+LOCAL_SRC_FILES := $(count_SRC_FILES)
+
+LOCAL_LDLIBS += -lpthread -lm -ldl
+
+include $(LLVM_ROOT_PATH)/llvm.mk
+include $(LLVM_HOST_BUILD_MK)
+include $(BUILD_HOST_EXECUTABLE)
diff --git a/utils/not/Android.mk b/utils/not/Android.mk
new file mode 100644
index 0000000..93d2a46
--- /dev/null
+++ b/utils/not/Android.mk
@@ -0,0 +1,32 @@
+LOCAL_PATH := $(call my-dir)
+
+LLVM_ROOT_PATH := $(LOCAL_PATH)/../..
+
+
+#===---------------------------------------------------------------===
+# not command line tool
+#===---------------------------------------------------------------===
+
+not_SRC_FILES := \
+ not.cpp
+
+not_STATIC_LIBRARIES := \
+ libLLVMCore \
+ libLLVMSupport \
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := not
+LOCAL_MODULE_TAGS := optional
+LOCAL_MODULE_CLASS := EXECUTABLES
+LOCAL_IS_HOST_MODULE := true
+
+LOCAL_SRC_FILES := $(not_SRC_FILES)
+
+LOCAL_STATIC_LIBRARIES := $(not_STATIC_LIBRARIES)
+
+LOCAL_LDLIBS += -lpthread -lm -ldl
+
+include $(LLVM_ROOT_PATH)/llvm.mk
+include $(LLVM_HOST_BUILD_MK)
+include $(BUILD_HOST_EXECUTABLE)