diff --git a/src/main/main.cpp b/src/main/main.cpp index c622952..8401d2d 100644 --- a/src/main/main.cpp +++ b/src/main/main.cpp @@ -513,13 +513,25 @@ void release_preload(PreloadContext& context) { context = {}; } -#else +#elif defined(__linux__) || defined(APPLE) struct PreloadContext { }; -// TODO implement on other platforms +bool preload_executable(PreloadContext& context) { + // Preloading isn't implemented on Linux and MacOS, but it's also unnecessary there, as the OS already preloads the executable. + // Therefore, we can just consider the executable to be preloaded. + return true; +} + +void release_preload(PreloadContext& context) { +} + +#else + +struct PreloadContext {}; + bool preload_executable(PreloadContext& context) { return false; }