Add support for -Xverify:none mode.

This mode skips all verification and compilation.
Public bug: https://code.google.com/p/android/issues/detail?id=67664

Change-Id: Idd00ab8e9e46d129c02988b063c41a507e07bf5b
diff --git a/runtime/class_linker.cc b/runtime/class_linker.cc
index 19cc23c..6c5406e 100644
--- a/runtime/class_linker.cc
+++ b/runtime/class_linker.cc
@@ -569,6 +569,10 @@
 
   Runtime::Current()->AddCurrentRuntimeFeaturesAsDex2OatArguments(&argv);
 
+  if (!Runtime::Current()->IsVerificationEnabled()) {
+    argv.push_back("--compiler-filter=verify-none");
+  }
+
   if (!kIsTargetBuild) {
     argv.push_back("--host");
   }
@@ -2533,6 +2537,12 @@
     klass->SetStatus(mirror::Class::kStatusVerifyingAtRuntime, self);
   }
 
+  // Skip verification if disabled.
+  if (!Runtime::Current()->IsVerificationEnabled()) {
+    klass->SetStatus(mirror::Class::kStatusVerified, self);
+    return;
+  }
+
   // Verify super class.
   SirtRef<mirror::Class> super(self, klass->GetSuperClass());
   if (super.get() != NULL) {