fix(library/native_compiler): get_exe_location does not exist on emscripten
This commit is contained in:
parent
a06d9adfec
commit
6fa246032f
2 changed files with 6 additions and 0 deletions
|
|
@ -51,8 +51,12 @@ expr mk_local(name const & n) {
|
|||
void initialize_install_path() {
|
||||
// 8 is the size of the string bin/lean which we want to remove from
|
||||
// the installed version of Lean.
|
||||
#if defined(LEAN_EMSCRIPTEN)
|
||||
g_lean_install_path = new std::string;
|
||||
#else
|
||||
auto path = get_exe_location();
|
||||
g_lean_install_path = new std::string(path.substr(0, path.size() - 8));
|
||||
#endif
|
||||
}
|
||||
|
||||
std::string get_install_path() {
|
||||
|
|
|
|||
|
|
@ -20,7 +20,9 @@ public:
|
|||
/** \brief Initialize the lean_path */
|
||||
void init_lean_path();
|
||||
|
||||
#if !defined(LEAN_EMSCRIPTEN)
|
||||
std::string get_exe_location();
|
||||
#endif
|
||||
|
||||
/** \brief Return the LEAN_PATH string */
|
||||
char const * get_lean_path();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue