diff options
author | Clifford Wolf <clifford@clifford.at> | 2015-02-15 17:14:09 +0100 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2015-02-15 17:15:29 +0100 |
commit | 8d45f81046a159df38e20b00cf0d74b1bb02a073 (patch) | |
tree | d5aca0aca9ca0a78c33482b9d6e92d6d928a2605 /kernel | |
parent | c2cc342e1a3d223caf1059fd2f255b0985ded61c (diff) | |
download | yosys-8d45f81046a159df38e20b00cf0d74b1bb02a073.tar.gz yosys-8d45f81046a159df38e20b00cf0d74b1bb02a073.tar.bz2 yosys-8d45f81046a159df38e20b00cf0d74b1bb02a073.zip |
More emcc stuff
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/yosys.cc | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/kernel/yosys.cc b/kernel/yosys.cc index 530d78796..b54836621 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) { |