aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgatecat <gatecat@ds0.me>2021-03-16 09:43:35 +0000
committerGitHub <noreply@github.com>2021-03-16 09:43:35 +0000
commit701587241fb8d4b490c4998ab3f2590bc09d7f55 (patch)
tree879e64f5482abda1341b1223516bd159846f23b9
parentbf5f0fc58f2c055b6f45a6300ce3895aa79cd27c (diff)
parente1cd98ba15952d303f546b80c1b3a05e9bacb917 (diff)
downloadnextpnr-701587241fb8d4b490c4998ab3f2590bc09d7f55.tar.gz
nextpnr-701587241fb8d4b490c4998ab3f2590bc09d7f55.tar.bz2
nextpnr-701587241fb8d4b490c4998ab3f2590bc09d7f55.zip
Merge pull request #626 from YosysHQ/missing-includes
Add missing includes to fix WASI build
-rw-r--r--common/nextpnr.cc4
-rw-r--r--common/nextpnr_assertions.h1
2 files changed, 5 insertions, 0 deletions
diff --git a/common/nextpnr.cc b/common/nextpnr.cc
index 1229a7df..f8914ea5 100644
--- a/common/nextpnr.cc
+++ b/common/nextpnr.cc
@@ -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); }
diff --git a/common/nextpnr_assertions.h b/common/nextpnr_assertions.h
index 85a724c6..e1a30458 100644
--- a/common/nextpnr_assertions.h
+++ b/common/nextpnr_assertions.h
@@ -22,6 +22,7 @@
#define NEXTPNR_ASSERTIONS_H
#include <stdexcept>
+#include <string>
#include "nextpnr_namespaces.h"