Mac build fixes.
This gets us pretty close. There are a few problems with libraries we depend
on (system/core/liblog and external/icu4c) that I have workarounds for, and
a problem with gtest that I haven't yet worked around that prevents us from
linking any of the tests. But this at least gives us a Mac dex2oat binary.
Change-Id: Iac39a6c2963c3d37ab2165d7d1a70e303ba22c45
diff --git a/src/thread_x86.cc b/src/thread_x86.cc
index 378889b..cdba138 100644
--- a/src/thread_x86.cc
+++ b/src/thread_x86.cc
@@ -2,16 +2,25 @@
#include "thread.h"
-#include <asm/ldt.h>
#include <sys/syscall.h>
#include <sys/types.h>
#include "asm_support.h"
#include "macros.h"
+#if defined(__APPLE__)
+#include <architecture/i386/table.h>
+#include <i386/user_ldt.h>
+#else
+#include <asm/ldt.h>
+#endif
+
namespace art {
void Thread::InitCpu() {
+#if defined(__APPLE__)
+ UNIMPLEMENTED(WARNING);
+#else
// Read LDT
CHECK_EQ((size_t)LDT_ENTRY_SIZE, sizeof(uint64_t));
std::vector<uint64_t> ldt(LDT_ENTRIES);
@@ -61,6 +70,7 @@
: "r"(THREAD_SELF_OFFSET) // input
:); // clobber
CHECK_EQ(self_check, this);
+#endif
}
} // namespace art