Fix LLVM runtime failures.
Change-Id: I39b35696687e00f7c3153b65fd49d741ce4625d0
diff --git a/build/Android.common.mk b/build/Android.common.mk
index 179d140..6c2041c 100644
--- a/build/Android.common.mk
+++ b/build/Android.common.mk
@@ -201,7 +201,8 @@
src/compiler_llvm/elf_loader.cc \
src/compiler_llvm/inferred_reg_category_map.cc \
src/compiler_llvm/runtime_support_llvm.cc
-else
+endif
+
LIBART_COMMON_SRC_FILES += \
src/oat/runtime/context.cc \
src/oat/runtime/support_alloc.cc \
@@ -219,7 +220,6 @@
src/oat/runtime/support_thread.cc \
src/oat/runtime/support_throw.cc \
src/oat/runtime/support_trace.cc
-endif # ART_USE_LLVM_COMPILER == true
LIBART_TARGET_SRC_FILES := \
$(LIBART_COMMON_SRC_FILES) \
@@ -229,7 +229,6 @@
src/runtime_android.cc \
src/thread_android.cc
-ifeq ($(ART_USE_LLVM_COMPILER),false)
ifeq ($(TARGET_ARCH),arm)
LIBART_TARGET_SRC_FILES += \
src/oat/runtime/arm/context_arm.cc.arm \
@@ -251,7 +250,6 @@
endif # TARGET_ARCH != mips
endif # TARGET_ARCH != x86
endif # TARGET_ARCH != arm
-endif # ART_USE_LLVM_COMPILER == false
ifeq ($(TARGET_ARCH),arm)
LIBART_TARGET_SRC_FILES += src/thread_arm.cc
@@ -274,7 +272,6 @@
src/runtime_linux.cc \
src/thread_linux.cc
-ifeq ($(ART_USE_LLVM_COMPILER),false)
ifeq ($(HOST_ARCH),x86)
LIBART_HOST_SRC_FILES += \
src/oat/runtime/x86/oat_support_entrypoints_x86.cc \
@@ -283,7 +280,6 @@
else # HOST_ARCH != x86
$(error unsupported HOST_ARCH=$(HOST_ARCH))
endif # HOST_ARCH != x86
-endif # ART_USE_LLVM_COMPILER == false
ifeq ($(HOST_ARCH),x86)
LIBART_HOST_SRC_FILES += src/thread_x86.cc
diff --git a/src/object.cc b/src/object.cc
index 8c101ba..158f0e6 100644
--- a/src/object.cc
+++ b/src/object.cc
@@ -591,10 +591,6 @@
DCHECK(Thread::Current() == self);
CHECK(IsNative()) << PrettyMethod(this);
CHECK(native_method != NULL) << PrettyMethod(this);
-#if defined(ART_USE_LLVM_COMPILER)
- SetFieldPtr<const void*>(OFFSET_OF_OBJECT_MEMBER(Method, native_method_),
- native_method, false);
-#else
if (!self->GetJniEnv()->vm->work_around_app_jni_bugs) {
SetFieldPtr<const void*>(OFFSET_OF_OBJECT_MEMBER(Method, native_method_),
native_method, false);
@@ -612,7 +608,6 @@
SetFieldPtr<const uint8_t*>(OFFSET_OF_OBJECT_MEMBER(Method, gc_map_),
reinterpret_cast<const uint8_t*>(native_method), false);
}
-#endif
}
void Method::UnregisterNative(Thread* self) {
diff --git a/src/thread.cc b/src/thread.cc
index fbf2390..ca8922b 100644
--- a/src/thread.cc
+++ b/src/thread.cc
@@ -34,9 +34,7 @@
#include "heap.h"
#include "jni_internal.h"
#include "monitor.h"
-#if !defined(ART_USE_LLVM_COMPILER)
#include "oat/runtime/context.h"
-#endif
#include "object.h"
#include "object_utils.h"
#include "reflection.h"
@@ -82,9 +80,6 @@
}
void Thread::InitFunctionPointers() {
-#if defined(ART_USE_LLVM_COMPILER)
- memset(&entrypoints_, 0, sizeof(entrypoints_));
-#else
// Insert a placeholder so we can easily tell if we call an unimplemented entry point.
uintptr_t* begin = reinterpret_cast<uintptr_t*>(&entrypoints_);
uintptr_t* end = reinterpret_cast<uintptr_t*>(reinterpret_cast<uint8_t*>(begin) + sizeof(entrypoints_));
@@ -92,7 +87,6 @@
*it = reinterpret_cast<uintptr_t>(UnimplementedEntryPoint);
}
InitEntryPoints(&entrypoints_);
-#endif
}
void Thread::SetDebuggerUpdatesEnabled(bool enabled) {