diff options
author | Clifford Wolf <clifford@clifford.at> | 2014-08-22 16:09:13 +0200 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2014-08-22 16:20:22 +0200 |
commit | 98442e019d745f1d61983c071decfa3ebc1ff0cf (patch) | |
tree | cb7776cfb0916f529042b4ffd2249404a3aaefdb /passes/cmds | |
parent | ba83a7bdc641c68344b41f407323c76b8c62c674 (diff) | |
download | yosys-98442e019d745f1d61983c071decfa3ebc1ff0cf.tar.gz yosys-98442e019d745f1d61983c071decfa3ebc1ff0cf.tar.bz2 yosys-98442e019d745f1d61983c071decfa3ebc1ff0cf.zip |
Added emscripten (emcc) support to build system and some build fixes
Diffstat (limited to 'passes/cmds')
-rw-r--r-- | passes/cmds/plugin.cc | 9 | ||||
-rw-r--r-- | passes/cmds/show.cc | 9 |
2 files changed, 16 insertions, 2 deletions
diff --git a/passes/cmds/plugin.cc b/passes/cmds/plugin.cc index c73684f1b..4e8234d16 100644 --- a/passes/cmds/plugin.cc +++ b/passes/cmds/plugin.cc @@ -18,7 +18,10 @@ */ #include "kernel/yosys.h" -#include <dlfcn.h> + +#ifdef YOSYS_ENABLE_PLUGINS +# include <dlfcn.h> +#endif YOSYS_NAMESPACE_BEGIN @@ -27,6 +30,7 @@ std::map<std::string, std::string> loaded_plugin_aliases; void load_plugin(std::string filename, std::vector<std::string> aliases) { +#ifdef YOSYS_ENABLE_PLUGINS if (filename.find('/') == std::string::npos) filename = "./" + filename; @@ -40,6 +44,9 @@ void load_plugin(std::string filename, std::vector<std::string> aliases) for (auto &alias : aliases) loaded_plugin_aliases[alias] = filename; +#else + log_error("This version of yosys is built without plugin support.\n"); +#endif } struct PluginPass : public Pass { diff --git a/passes/cmds/show.cc b/passes/cmds/show.cc index 4f6b811bc..fc6e972ee 100644 --- a/passes/cmds/show.cc +++ b/passes/cmds/show.cc @@ -22,7 +22,10 @@ #include "kernel/log.h" #include <string.h> #include <dirent.h> -#include <readline/readline.h> + +#ifdef YOSYS_ENABLE_READLINE +# include <readline/readline.h> +#endif using RTLIL::id2cstr; @@ -770,6 +773,7 @@ struct ShowPass : public Pass { } if (flag_pause) { + #ifdef YOSYS_ENABLE_READLINE char *input = NULL; while ((input = readline("Press ENTER to continue (or type 'shell' to open a shell)> ")) != NULL) { if (input[strspn(input, " \t\r\n")] == 0) @@ -780,6 +784,9 @@ struct ShowPass : public Pass { break; } } + #else + log_cmd_error("This version of yosys is built without readline support => 'show -pause' is not available.\n"); + #endif } log_pop(); |