ART: Add abort-on-soft-verifier-error

Add an option to abort compilation if any class fails compile-time
verification.

Bug: 65318848
Bug: 67358823
Test: m test-art-host-gtest-dex2oat_test
Change-Id: I5d2a7cd1d2ed048ab39d6f787ecc9eb2f41d3d77
diff --git a/compiler/driver/compiler_options_map-inl.h b/compiler/driver/compiler_options_map-inl.h
index 9cb818a..772d1b4 100644
--- a/compiler/driver/compiler_options_map-inl.h
+++ b/compiler/driver/compiler_options_map-inl.h
@@ -60,6 +60,7 @@
   }
   map.AssignIfExists(Base::TopKProfileThreshold, &options->top_k_profile_threshold_);
   map.AssignIfExists(Base::AbortOnHardVerifierFailure, &options->abort_on_hard_verifier_failure_);
+  map.AssignIfExists(Base::AbortOnSoftVerifierFailure, &options->abort_on_soft_verifier_failure_);
   if (map.Exists(Base::DumpInitFailures)) {
     if (!options->ParseDumpInitFailures(*map.Get(Base::DumpInitFailures), error_msg)) {
       return false;
@@ -132,6 +133,9 @@
       .Define({"--abort-on-hard-verifier-error", "--no-abort-on-hard-verifier-error"})
           .WithValues({true, false})
           .IntoKey(Map::AbortOnHardVerifierFailure)
+      .Define({"--abort-on-soft-verifier-error", "--no-abort-on-soft-verifier-error"})
+          .WithValues({true, false})
+          .IntoKey(Map::AbortOnSoftVerifierFailure)
 
       .Define("--dump-init-failures=_")
           .template WithType<std::string>()