Turn parallel compilation back on.

Apparently we don't wind back class statuses any more.

Change-Id: Ice0c743114e62aa805d170aa62f317007b9dbdb4
diff --git a/src/class_linker.cc b/src/class_linker.cc
index 96baf59..a692e2c 100644
--- a/src/class_linker.cc
+++ b/src/class_linker.cc
@@ -115,15 +115,13 @@
 }
 
 static void ThrowEarlierClassFailure(Class* c) {
-  /*
-   * The class failed to initialize on a previous attempt, so we want to throw
-   * a NoClassDefFoundError (v2 2.17.5).  The exception to this rule is if we
-   * failed in verification, in which case v2 5.4.1 says we need to re-throw
-   * the previous error.
-   */
+  // The class failed to initialize on a previous attempt, so we want to throw
+  // a NoClassDefFoundError (v2 2.17.5).  The exception to this rule is if we
+  // failed in verification, in which case v2 5.4.1 says we need to re-throw
+  // the previous error.
   LOG(INFO) << "Rejecting re-init on previously-failed class " << PrettyClass(c);
 
-  CHECK(c->IsErroneous()) << PrettyClass(c);
+  CHECK(c->IsErroneous()) << PrettyClass(c) << " " << c->GetStatus();
   if (c->GetVerifyErrorClass() != NULL) {
     // TODO: change the verifier to store an _instance_, with a useful detail message?
     ClassHelper ve_ch(c->GetVerifyErrorClass());
@@ -1056,7 +1054,7 @@
       length);
 }
 
-Class* EnsureResolved(Class* klass) {
+static Class* EnsureResolved(Class* klass) {
   DCHECK(klass != NULL);
   // Wait for the class if it has not already been linked.
   Thread* self = Thread::Current();
@@ -1396,7 +1394,7 @@
   }
 }
 
-void LinkCode(SirtRef<Method>& method, const OatFile::OatClass* oat_class, uint32_t method_index) {
+static void LinkCode(SirtRef<Method>& method, const OatFile::OatClass* oat_class, uint32_t method_index) {
   // Every kind of method should at least get an invoke stub from the oat_method.
   // non-abstract methods also get their code pointers.
   const OatFile::OatMethod oat_method = oat_class->GetOatMethod(method_index);
diff --git a/src/dex2oat.cc b/src/dex2oat.cc
index 088cb45..e9acbad 100644
--- a/src/dex2oat.cc
+++ b/src/dex2oat.cc
@@ -475,7 +475,7 @@
   uintptr_t image_base = 0;
   UniquePtr<std::string> host_prefix;
   std::vector<const char*> runtime_args;
-  int thread_count = 2;
+  int thread_count = sysconf(_SC_NPROCESSORS_CONF);
   bool support_debugging = false;
 #if defined(__arm__)
   InstructionSet instruction_set = kThumb2;
@@ -563,10 +563,6 @@
     }
   }
 
-#if !defined(ART_USE_LLVM_COMPILER)
-  thread_count = 1;
-#endif
-
   if (oat_filename.empty() && oat_fd == -1) {
     Usage("Output must be supplied with either --oat-file or --oat-fd");
   }