lib/MC \
lib/MC/MCParser \
tools/clang \
+ lib/Linker \
+ lib/AsmParser \
+ tools/llvm-link \
))
include $(LOCAL_PATH)/llvm.mk
# For the device
# =====================================================
-include $(CLEAR_VARS)
-
-LOCAL_SRC_FILES := $(asm_parser_SRC_FILES)
-
-LOCAL_MODULE:= libLLVMAsmParser
-
-include $(LOCAL_PATH)/../../llvm-device-build.mk
-include $(BUILD_STATIC_LIBRARY)
+#include $(CLEAR_VARS)
+#
+#LOCAL_SRC_FILES := $(asm_parser_SRC_FILES)
+#
+#LOCAL_MODULE:= libLLVMAsmParser
+#
+#include $(LOCAL_PATH)/../../llvm-device-build.mk
+#include $(BUILD_STATIC_LIBRARY)
endif
--- /dev/null
+# Only use this on the device or emulator.
+ifeq ($(TARGET_ARCH),arm)
+
+LOCAL_PATH:= $(call my-dir)
+
+# For the host
+# =====================================================
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES := \
+ LinkArchives.cpp \
+ LinkItems.cpp \
+ LinkModules.cpp \
+ Linker.cpp
+
+LOCAL_MODULE:= libLLVMLinker
+
+include $(LLVM_HOST_BUILD_MK)
+include $(BUILD_HOST_STATIC_LIBRARY)
+
+endif
--- /dev/null
+# Only use this on the device or emulator.
+ifeq ($(TARGET_ARCH),arm)
+
+LOCAL_PATH:= $(call my-dir)
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES := \
+ llvm-link.cpp
+
+LOCAL_STATIC_LIBRARIES := libLLVMLinker libLLVMBitReader libLLVMBitWriter libLLVMCore libLLVMSupport libLLVMSystem libLLVMAsmParser
+LOCAL_MODULE := llvm-link
+LOCAL_LDLIBS += -lpthread -lm -ldl
+
+include $(LLVM_HOST_BUILD_MK)
+include $(BUILD_HOST_EXECUTABLE)
+
+endif