Refactor the compilers out of libart.

This builds three separate compilers and dynamically links with the right one
at runtime.

Change-Id: I59d22b9884f41de733c09f97e29ee290236d5f4b
diff --git a/src/dex2oat.cc b/src/dex2oat.cc
index d5d036f..b8d782b 100644
--- a/src/dex2oat.cc
+++ b/src/dex2oat.cc
@@ -240,9 +240,10 @@
                        const std::string& oat_filename,
                        const std::string& oat_location) {
     // If we have an existing boot image, position new space after its oat file
-    if (Heap::GetSpaces().size() > 1) {
+    Heap* heap = Runtime::Current()->GetHeap();
+    if (heap->GetSpaces().size() > 1) {
       ImageSpace* last_image_space = NULL;
-      const std::vector<Space*>& spaces = Heap::GetSpaces();
+      const std::vector<Space*>& spaces = heap->GetSpaces();
       for (size_t i=0; i < spaces.size(); i++) {
         if (spaces[i]->IsImageSpace()) {
           last_image_space = spaces[i]->AsImageSpace();
@@ -250,7 +251,7 @@
       }
       CHECK(last_image_space != NULL);
       CHECK(last_image_space->IsImageSpace());
-      CHECK(!Heap::GetSpaces()[Heap::GetSpaces().size()-1]->IsImageSpace());
+      CHECK(!heap->GetSpaces()[heap->GetSpaces().size()-1]->IsImageSpace());
       byte* oat_limit_addr = last_image_space->GetImageHeader().GetOatEnd();
       image_base = RoundUp(reinterpret_cast<uintptr_t>(oat_limit_addr), kPageSize);
     }