mirror of
https://github.com/YosysHQ/yosys
synced 2026-05-19 00:19:32 +00:00
Upgrade to WASI SDK 33 and enable exceptions
This commit is contained in:
parent
18b832247b
commit
5dfe1937a0
5 changed files with 14 additions and 20 deletions
|
|
@ -70,6 +70,9 @@
|
|||
# include <dirent.h>
|
||||
# include <sys/stat.h>
|
||||
#endif
|
||||
#if defined(__wasm)
|
||||
#include <wasi/libc.h>
|
||||
#endif
|
||||
|
||||
#include "frontends/blif/blifparse.h"
|
||||
#include "liberty_cache.h"
|
||||
|
|
@ -1382,7 +1385,7 @@ void RunAbcState::run(ConcurrentStack<AbcProcess> &)
|
|||
FILE *old_stdout = fopen(temp_stdouterr_name.c_str(), "r"); // need any fd for renumbering
|
||||
FILE *old_stderr = fopen(temp_stdouterr_name.c_str(), "r"); // need any fd for renumbering
|
||||
#if defined(__wasm)
|
||||
#define fd_renumber(from, to) (void)__wasi_fd_renumber(from, to)
|
||||
#define fd_renumber(from, to) (void)__wasilibc_fd_renumber(from, to)
|
||||
#else
|
||||
#define fd_renumber(from, to) dup2(from, to)
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -30,6 +30,9 @@
|
|||
# include <unistd.h>
|
||||
# include <dirent.h>
|
||||
#endif
|
||||
#if defined(__wasm)
|
||||
#include <wasi/libc.h>
|
||||
#endif
|
||||
|
||||
#ifdef YOSYS_LINK_ABC
|
||||
namespace abc {
|
||||
|
|
@ -296,7 +299,7 @@ void abc9_module(RTLIL::Design *design, std::string script_file, std::string exe
|
|||
FILE *old_stdout = fopen(temp_stdouterr_name.c_str(), "r"); // need any fd for renumbering
|
||||
FILE *old_stderr = fopen(temp_stdouterr_name.c_str(), "r"); // need any fd for renumbering
|
||||
#if defined(__wasm)
|
||||
#define fd_renumber(from, to) (void)__wasi_fd_renumber(from, to)
|
||||
#define fd_renumber(from, to) (void)__wasilibc_fd_renumber(from, to)
|
||||
#else
|
||||
#define fd_renumber(from, to) dup2(from, to)
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue