diff options
Diffstat (limited to 'runtime/parsed_options.cc')
-rw-r--r-- | runtime/parsed_options.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/runtime/parsed_options.cc b/runtime/parsed_options.cc index a023ff1..26360d7 100644 --- a/runtime/parsed_options.cc +++ b/runtime/parsed_options.cc @@ -414,8 +414,12 @@ bool ParsedOptions::Parse(const RuntimeOptions& options, bool ignore_unrecognize compiler_callbacks_ = reinterpret_cast<CompilerCallbacks*>(const_cast<void*>(options[i].second)); } else if (option == "imageinstructionset") { - image_isa_ = GetInstructionSetFromString( - reinterpret_cast<const char*>(options[i].second)); + const char* isa_str = reinterpret_cast<const char*>(options[i].second); + image_isa_ = GetInstructionSetFromString(isa_str); + if (image_isa_ == kNone) { + Usage("%s is not a valid instruction set.", isa_str); + return false; + } } else if (option == "-Xzygote") { is_zygote_ = true; } else if (StartsWith(option, "-Xpatchoat:")) { |