ART: Add option to abort dex2oat on hard failure

Add an option that aborts dex2oat when a hard verifier failure occurs.

Bug: 19606409
Change-Id: I53195284e22fe6207274101e85745af763c06271
diff --git a/compiler/driver/compiler_options.h b/compiler/driver/compiler_options.h
index fecc600..5042c75 100644
--- a/compiler/driver/compiler_options.h
+++ b/compiler/driver/compiler_options.h
@@ -70,7 +70,8 @@
                   bool compile_pic,
                   const std::vector<std::string>* verbose_methods,
                   PassManagerOptions* pass_manager_options,
-                  std::ostream* init_failure_output);
+                  std::ostream* init_failure_output,
+                  bool abort_on_hard_verifier_failure);
 
   CompilerFilter GetCompilerFilter() const {
     return compiler_filter_;
@@ -183,6 +184,10 @@
     return pass_manager_options_.get();
   }
 
+  bool AbortOnHardVerifierFailure() const {
+    return abort_on_hard_verifier_failure_;
+  }
+
  private:
   CompilerFilter compiler_filter_;
   const size_t huge_method_threshold_;
@@ -206,6 +211,10 @@
 
   std::unique_ptr<PassManagerOptions> pass_manager_options_;
 
+  // Abort compilation with an error if we find a class that fails verification with a hard
+  // failure.
+  const bool abort_on_hard_verifier_failure_;
+
   // Log initialization of initialization failures to this stream if not null.
   std::ostream* const init_failure_output_;