From f39208f6787928151153795a3cdae28cba964df6 Mon Sep 17 00:00:00 2001 From: Andreas Gampe Date: Thu, 19 Oct 2017 15:06:59 -0700 Subject: 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 --- compiler/driver/compiler_options_map-inl.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'compiler/driver/compiler_options_map-inl.h') diff --git a/compiler/driver/compiler_options_map-inl.h b/compiler/driver/compiler_options_map-inl.h index 9cb818a270..772d1b44de 100644 --- a/compiler/driver/compiler_options_map-inl.h +++ b/compiler/driver/compiler_options_map-inl.h @@ -60,6 +60,7 @@ inline bool ReadCompilerOptions(Base& map, CompilerOptions* options, std::string } 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 @@ inline void AddCompilerOptionsArgumentParserOptions(Builder& b) { .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() -- cgit v1.2.3-59-g8ed1b