Add missing includes to fix WASI build.

This commit is contained in:
whitequark 2021-03-16 05:52:41 +00:00
parent bf5f0fc58f
commit e1cd98ba15
2 changed files with 5 additions and 0 deletions

View File

@ -18,6 +18,10 @@
*/
#if defined(__wasm)
#include <typeinfo>
#include <exception>
#include "log.h"
extern "C" {
// FIXME: WASI does not currently support exceptions.
void *__cxa_allocate_exception(size_t thrown_size) throw() { return malloc(thrown_size); }

View File

@ -22,6 +22,7 @@
#define NEXTPNR_ASSERTIONS_H
#include <stdexcept>
#include <string>
#include "nextpnr_namespaces.h"