diff --git a/runtime/src/platform/host_platform.cpp b/runtime/src/platform/host_platform.cpp index c0caa95..71c70d7 100644 --- a/runtime/src/platform/host_platform.cpp +++ b/runtime/src/platform/host_platform.cpp @@ -46,6 +46,13 @@ std::optional ExecutableDirectory() noexcept { std::error_code ec; const auto resolved = std::filesystem::weakly_canonical(path, ec); return (ec ? std::filesystem::path(path) : resolved).parent_path(); +#elif defined(__linux__) + std::error_code ec; + const auto executable = std::filesystem::read_symlink("/proc/self/exe", ec); + if (ec) { + return std::nullopt; + } + return executable.parent_path(); #else return std::nullopt; #endif