aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorAndrew Hsieh <andrewhsieh@google.com>2012-05-06 20:19:44 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-05-06 20:19:44 -0700
commit7c101d874ef1ef2053c6f61d87680006fdd1a32d (patch)
treeaacd8e4ad2d012681d976a58d9216244b4bd28f9 /lib
parentfd6aea25184fd0735922461b88f059ee547844c3 (diff)
parentca8b2c655eb4d283187cbbb4f0f3acd34f60fa1c (diff)
downloadexternal_llvm-7c101d874ef1ef2053c6f61d87680006fdd1a32d.zip
external_llvm-7c101d874ef1ef2053c6f61d87680006fdd1a32d.tar.gz
external_llvm-7c101d874ef1ef2053c6f61d87680006fdd1a32d.tar.bz2
Merge "Add libLLVMObject to read executable file."
Diffstat (limited to 'lib')
-rw-r--r--lib/Object/Android.mk40
-rw-r--r--lib/Object/COFFObjectFile.cpp2
-rw-r--r--lib/Object/ELFObjectFile.cpp2
3 files changed, 44 insertions, 0 deletions
diff --git a/lib/Object/Android.mk b/lib/Object/Android.mk
new file mode 100644
index 0000000..d7ba85d
--- /dev/null
+++ b/lib/Object/Android.mk
@@ -0,0 +1,40 @@
+LOCAL_PATH := $(call my-dir)
+
+object_SRC_FILES := \
+ Archive.cpp \
+ Binary.cpp \
+ COFFObjectFile.cpp \
+ ELFObjectFile.cpp \
+ Error.cpp \
+ MachOObject.cpp \
+ MachOObjectFile.cpp \
+ Object.cpp \
+ ObjectFile.cpp
+
+
+# For the host
+# =====================================================
+include $(CLEAR_VARS)
+include $(CLEAR_TBLGEN_VARS)
+
+LOCAL_MODULE:= libLLVMObject
+LOCAL_MODULE_TAGS := optional
+
+LOCAL_SRC_FILES := $(object_SRC_FILES)
+
+include $(LLVM_HOST_BUILD_MK)
+include $(LLVM_GEN_INTRINSICS_MK)
+include $(BUILD_HOST_STATIC_LIBRARY)
+
+# For the device only
+# =====================================================
+include $(CLEAR_VARS)
+
+LOCAL_MODULE:= libLLVMObject
+LOCAL_MODULE_TAGS := optional
+
+LOCAL_SRC_FILES := $(object_SRC_FILES)
+
+include $(LLVM_DEVICE_BUILD_MK)
+include $(LLVM_GEN_INTRINSICS_MK)
+include $(BUILD_STATIC_LIBRARY)
diff --git a/lib/Object/COFFObjectFile.cpp b/lib/Object/COFFObjectFile.cpp
index bd27a56..8024ac8 100644
--- a/lib/Object/COFFObjectFile.cpp
+++ b/lib/Object/COFFObjectFile.cpp
@@ -17,6 +17,8 @@
#include "llvm/ADT/StringSwitch.h"
#include "llvm/ADT/Triple.h"
+#include <ctype.h>
+
using namespace llvm;
using namespace object;
diff --git a/lib/Object/ELFObjectFile.cpp b/lib/Object/ELFObjectFile.cpp
index 663b84e..c77e238 100644
--- a/lib/Object/ELFObjectFile.cpp
+++ b/lib/Object/ELFObjectFile.cpp
@@ -13,6 +13,8 @@
#include "llvm/Object/ELF.h"
+#include <ctype.h>
+
namespace llvm {
using namespace object;