diff --git a/cli/loader_lib.c b/cli/loader_lib.c index f253ce5e04cc6..0249c11f3f6c3 100644 --- a/cli/loader_lib.c +++ b/cli/loader_lib.c @@ -130,6 +130,11 @@ JL_DLLEXPORT const char * jl_get_libdir() void * libjulia_internal = NULL; __attribute__((constructor)) void jl_load_libjulia_internal(void) { + // Only initalize this once + if (libjulia_internal != NULL) { + return; + } + // Introspect to find our own path const char * lib_dir = jl_get_libdir();