mirror of
https://github.com/YosysHQ/yosys
synced 2025-06-06 14:13:23 +00:00
- kernel/register.h, kernel/driver.cc: refactor rewrite_yosys_exe()/get_share_file_name() to portable proc_self_dirname()/proc_share_dirname().
This refactoring improves robustness and allows OSX support with only 7 new lines of code, and easy extension for other systems. - passes/abc/abc.cc, passes/cmds/show.cc, passes/techmap/techmap.cc: use new, refactored semantics.
This commit is contained in:
parent
3152863479
commit
8127d5e8c3
5 changed files with 44 additions and 37 deletions
|
@ -548,13 +548,14 @@ struct TechmapPass : public Pass {
|
|||
int max_iter = -1;
|
||||
|
||||
size_t argidx;
|
||||
std::string proc_share_path = proc_share_dirname();
|
||||
for (argidx = 1; argidx < args.size(); argidx++) {
|
||||
if (args[argidx] == "-map" && argidx+1 < args.size()) {
|
||||
map_files.push_back(args[++argidx]);
|
||||
continue;
|
||||
}
|
||||
if (args[argidx] == "-share_map" && argidx+1 < args.size()) {
|
||||
map_files.push_back(get_share_file_name(args[++argidx]));
|
||||
map_files.push_back(proc_share_path + args[++argidx]);
|
||||
continue;
|
||||
}
|
||||
if (args[argidx] == "-max_iter" && argidx+1 < args.size()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue