Merge pull request #312 from smunaut/fix_ice40_default_pkg

ice40: Only warn about default package if there is no package argument
This commit is contained in:
David Shah 2019-08-10 15:24:31 +01:00 committed by GitHub
commit 3f26cf5076
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -157,6 +157,10 @@ std::unique_ptr<Context> Ice40CommandHandler::createContext(std::unordered_map<s
if (vm.count("package"))
chipArgs.package = vm["package"].as<std::string>();
else
log_warning("Use of default value for --package is deprecated. Please add '--package %s' to arguments.\n",
chipArgs.package.c_str());
if (values.find("arch.name") != values.end()) {
std::string arch_name = values["arch.name"].as_string();
if (arch_name != "ice40")
@ -207,9 +211,6 @@ std::unique_ptr<Context> Ice40CommandHandler::createContext(std::unordered_map<s
}
#endif
log_warning("Use of default value for --package is deprecated. Please add '--package %s' to arguments.\n",
chipArgs.package.c_str());
auto ctx = std::unique_ptr<Context>(new Context(chipArgs));
for (auto &val : values)
ctx->settings[ctx->id(val.first)] = val.second;