feat(util/lean_path.cpp): use '/library' as LEAN_PATH for emscripten
This commit is contained in:
parent
c92260d9ec
commit
e99463980a
1 changed files with 5 additions and 0 deletions
|
@ -119,6 +119,10 @@ static std::string * g_lean_path = nullptr;
|
||||||
static std::vector<std::string> * g_lean_path_vector = nullptr;
|
static std::vector<std::string> * g_lean_path_vector = nullptr;
|
||||||
|
|
||||||
void init_lean_path() {
|
void init_lean_path() {
|
||||||
|
#if defined(LEAN_EMSCRIPTEN)
|
||||||
|
*g_lean_path = "/library";
|
||||||
|
g_lean_path_vector->push_back(*g_lean_path);
|
||||||
|
#else
|
||||||
char * r = getenv("LEAN_PATH");
|
char * r = getenv("LEAN_PATH");
|
||||||
if (r == nullptr) {
|
if (r == nullptr) {
|
||||||
*g_lean_path = ".";
|
*g_lean_path = ".";
|
||||||
|
@ -144,6 +148,7 @@ void init_lean_path() {
|
||||||
}
|
}
|
||||||
if (j > i)
|
if (j > i)
|
||||||
g_lean_path_vector->push_back(g_lean_path->substr(i, j - i));
|
g_lean_path_vector->push_back(g_lean_path->substr(i, j - i));
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static char g_sep_str[2];
|
static char g_sep_str[2];
|
||||||
|
|
Loading…
Reference in a new issue