mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-28 03:15:50 +00:00
Add support for "yosys -E"
Signed-off-by: Clifford Wolf <clifford@clifford.at>
This commit is contained in:
parent
446ccf1f05
commit
a96c775a73
13 changed files with 53 additions and 4 deletions
|
@ -428,6 +428,7 @@ void Frontend::extra_args(std::istream *&f, std::string &filename, std::vector<s
|
|||
}
|
||||
std::ifstream *ff = new std::ifstream;
|
||||
ff->open(filename.c_str());
|
||||
yosys_input_files.insert(filename);
|
||||
if (ff->fail())
|
||||
delete ff;
|
||||
else
|
||||
|
@ -543,6 +544,7 @@ void Backend::extra_args(std::ostream *&f, std::string &filename, std::vector<st
|
|||
filename = arg;
|
||||
std::ofstream *ff = new std::ofstream;
|
||||
ff->open(filename.c_str(), std::ofstream::trunc);
|
||||
yosys_output_files.insert(filename);
|
||||
if (ff->fail()) {
|
||||
delete ff;
|
||||
log_cmd_error("Can't open output file `%s' for writing: %s\n", filename.c_str(), strerror(errno));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue