Merge "ART: Do not recursively abort when visiting locks in a bad state" into lmp-dev
diff --git a/compiler/driver/compiler_driver.cc b/compiler/driver/compiler_driver.cc
index efc5bb7..a208b51 100644
--- a/compiler/driver/compiler_driver.cc
+++ b/compiler/driver/compiler_driver.cc
@@ -1491,7 +1491,13 @@
     return true;
   }
 
-  return SkipClassCheckClassPath(descriptor, dex_file, dex_files);
+  if (dex_files.size() > 1) {
+    // Multi-dex compilation, only take first class.
+    return SkipClassCheckClassPath(descriptor, dex_file, dex_files);
+  } else {
+    // Single dex, take everything.
+    return false;
+  }
 }
 
 // A fast version of SkipClass above if the class pointer is available