Revert "Revert "ART: Fix mac build""
This reverts commit 350b03bca65f87895275d1ed4bb895d5afeeeff1.
Also fixes a fault_handler symbol.
Change-Id: I1315527400bffc8ded9f2a7e7fdb1c8a6c104b96
diff --git a/runtime/arch/x86/fault_handler_x86.cc b/runtime/arch/x86/fault_handler_x86.cc
index d7e3f9b..65a48f6 100644
--- a/runtime/arch/x86/fault_handler_x86.cc
+++ b/runtime/arch/x86/fault_handler_x86.cc
@@ -395,7 +395,7 @@
// the previous frame.
// Now arrange for the signal handler to return to art_quick_throw_stack_overflow.
- uc->CTX_EIP = reinterpret_cast<uintptr_t>(art_quick_throw_stack_overflow);
+ uc->CTX_EIP = reinterpret_cast<uintptr_t>(EXT_SYM(art_quick_throw_stack_overflow));
return true;
}
diff --git a/runtime/thread.cc b/runtime/thread.cc
index d151547..eaa1a83 100644
--- a/runtime/thread.cc
+++ b/runtime/thread.cc
@@ -506,9 +506,7 @@
}
// TODO: move this into the Linux GetThreadStack implementation.
-#if defined(__APPLE__)
- bool is_main_thread = false;
-#else
+#if !defined(__APPLE__)
// If we're the main thread, check whether we were run with an unlimited stack. In that case,
// glibc will have reported a 2GB stack for our 32-bit process, and our stack overflow detection
// will be broken because we'll die long before we get close to 2GB.