3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-04-23 17:15:33 +00:00

Fix compilation for emcc

This commit is contained in:
jiegec 2020-03-11 22:08:02 +08:00
parent dd8ebf7873
commit 7b679eecb3
4 changed files with 8 additions and 3 deletions

View file

@ -695,7 +695,6 @@ void log_check_expected()
log_warn_regexes.clear();
log("Expected error pattern '%s' found !!!\n", item.second.pattern.c_str());
#ifdef EMSCRIPTEN
log_files = backup_log_files;
throw 0;
#elif defined(_MSC_VER)
_exit(0);

View file

@ -341,7 +341,11 @@ int run_command(const std::string &command, std::function<void(const std::string
if (!process_line)
return system(command.c_str());
#ifdef EMSCRIPTEN
FILE *f = nullptr;
#else
FILE *f = popen(command.c_str(), "r");
#endif
if (f == nullptr)
return -1;