Revert "Enable computed goto interpreter on the host"

This reverts commit 66d9bdb94f21106aaaa31a8fd686098672075e04.

Bug: 17716550
Change-Id: Ib404242c86e96e8edf019a2dcc14f0f8294b79e8
diff --git a/runtime/Android.mk b/runtime/Android.mk
index 46b2e10..61bc9ff 100644
--- a/runtime/Android.mk
+++ b/runtime/Android.mk
@@ -79,7 +79,6 @@
   intern_table.cc \
   interpreter/interpreter.cc \
   interpreter/interpreter_common.cc \
-  interpreter/interpreter_goto_table_impl.cc \
   interpreter/interpreter_switch_impl.cc \
   java_vm_ext.cc \
   jdwp/jdwp_event.cc \
@@ -201,6 +200,10 @@
   entrypoints/quick/quick_throw_entrypoints.cc \
   entrypoints/quick/quick_trampoline_entrypoints.cc
 
+# Source files that only compile with GCC.
+LIBART_GCC_ONLY_SRC_FILES := \
+  interpreter/interpreter_goto_table_impl.cc
+
 LIBART_TARGET_LDFLAGS :=
 LIBART_HOST_LDFLAGS :=
 
diff --git a/runtime/interpreter/interpreter.cc b/runtime/interpreter/interpreter.cc
index d2fcc64..07224ef 100644
--- a/runtime/interpreter/interpreter.cc
+++ b/runtime/interpreter/interpreter.cc
@@ -316,7 +316,35 @@
   kComputedGotoImplKind   // Computed-goto-based interpreter implementation.
 };
 
+#if !defined(__clang__)
 static constexpr InterpreterImplKind kInterpreterImplKind = kComputedGotoImplKind;
+#else
+// Clang 3.4 fails to build the goto interpreter implementation.
+static constexpr InterpreterImplKind kInterpreterImplKind = kSwitchImpl;
+template<bool do_access_check, bool transaction_active>
+JValue ExecuteGotoImpl(Thread* self, MethodHelper& mh, const DexFile::CodeItem* code_item,
+                       ShadowFrame& shadow_frame, JValue result_register) {
+  LOG(FATAL) << "UNREACHABLE";
+  exit(0);
+}
+// Explicit definitions of ExecuteGotoImpl.
+template<> SHARED_LOCKS_REQUIRED(Locks::mutator_lock_)
+JValue ExecuteGotoImpl<true, false>(Thread* self, MethodHelper& mh,
+                                    const DexFile::CodeItem* code_item,
+                                    ShadowFrame& shadow_frame, JValue result_register);
+template<> SHARED_LOCKS_REQUIRED(Locks::mutator_lock_)
+JValue ExecuteGotoImpl<false, false>(Thread* self, MethodHelper& mh,
+                                     const DexFile::CodeItem* code_item,
+                                     ShadowFrame& shadow_frame, JValue result_register);
+template<> SHARED_LOCKS_REQUIRED(Locks::mutator_lock_)
+JValue ExecuteGotoImpl<true, true>(Thread* self, MethodHelper& mh,
+                                    const DexFile::CodeItem* code_item,
+                                    ShadowFrame& shadow_frame, JValue result_register);
+template<> SHARED_LOCKS_REQUIRED(Locks::mutator_lock_)
+JValue ExecuteGotoImpl<false, true>(Thread* self, MethodHelper& mh,
+                                     const DexFile::CodeItem* code_item,
+                                     ShadowFrame& shadow_frame, JValue result_register);
+#endif
 
 static JValue Execute(Thread* self, MethodHelper& mh, const DexFile::CodeItem* code_item,
                       ShadowFrame& shadow_frame, JValue result_register)