summaryrefslogtreecommitdiff
path: root/kernel/yosys.cc
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2015-02-15 17:14:09 +0100
committerClifford Wolf <clifford@clifford.at>2015-02-15 17:15:29 +0100
commit8d45f81046a159df38e20b00cf0d74b1bb02a073 (patch)
treed5aca0aca9ca0a78c33482b9d6e92d6d928a2605 /kernel/yosys.cc
parentc2cc342e1a3d223caf1059fd2f255b0985ded61c (diff)
More emcc stuff
Diffstat (limited to 'kernel/yosys.cc')
-rw-r--r--kernel/yosys.cc13
1 files changed, 10 insertions, 3 deletions
diff --git a/kernel/yosys.cc b/kernel/yosys.cc
index 530d7879..b5483662 100644
--- a/kernel/yosys.cc
+++ b/kernel/yosys.cc
@@ -619,26 +619,33 @@ std::string proc_self_dirname()
#error Dont know how to determine process executable base path!
#endif
+#ifdef EMSCRIPTEN
+std::string proc_share_dirname()
+{
+ return "/share";
+}
+#else
std::string proc_share_dirname()
{
std::string proc_self_path = proc_self_dirname();
-#ifdef _WIN32
+# ifdef _WIN32
std::string proc_share_path = proc_self_path + "share\\";
if (check_file_exists(proc_share_path, true))
return proc_share_path;
proc_share_path = proc_self_path + "..\\share\\";
if (check_file_exists(proc_share_path, true))
return proc_share_path;
-#else
+# else
std::string proc_share_path = proc_self_path + "share/";
if (check_file_exists(proc_share_path, true))
return proc_share_path;
proc_share_path = proc_self_path + "../share/yosys/";
if (check_file_exists(proc_share_path, true))
return proc_share_path;
-#endif
+# endif
log_error("proc_share_dirname: unable to determine share/ directory!\n");
}
+#endif
bool fgetline(FILE *f, std::string &buffer)
{