fixes case of unavailable backend

This commit is contained in:
Eyck Jentzsch 2023-05-12 15:45:53 +02:00
parent 3bc4884a9d
commit 6789cf4c32
1 changed files with 8 additions and 0 deletions

View File

@ -161,6 +161,14 @@ int main(int argc, char *argv[]) {
LOG(ERR) << "Illegal argument value for '--isa': " << isa_opt << std::endl;
return 127;
}
if(!cpu ){
LOG(ERR) << "Could not create cpu fore for isa " << isa_opt << " and backend " <<clim["backend"].as<std::string>()<< std::endl;
return 127;
}
if(!vm ){
LOG(ERR) << "Could not create vm fore for isa " << isa_opt << " and backend " <<clim["backend"].as<std::string>()<< std::endl;
return 127;
}
if (clim.count("plugin")) {
for (std::string const& opt_val : clim["plugin"].as<std::vector<std::string>>()) {
std::string plugin_name=opt_val;