From f2ff3da018ce43a9c161aa78ef2189a88b214fb7 Mon Sep 17 00:00:00 2001 From: Thomas Debesse Date: Tue, 10 Nov 2026 01:22:43 +0100 Subject: [PATCH] VirtualMachine: simplify the bootstrap integration Now that we know that only 32-bit platforms require thez bootstrap, and that amd64 never requires it, the code is a lot simplified. Also, this unscatters the bootstrap code: everything is in one place. --- src/engine/framework/VirtualMachine.cpp | 51 ++++++++++--------------- 1 file changed, 21 insertions(+), 30 deletions(-) diff --git a/src/engine/framework/VirtualMachine.cpp b/src/engine/framework/VirtualMachine.cpp index 76e9ac9dc3..f17e590bce 100644 --- a/src/engine/framework/VirtualMachine.cpp +++ b/src/engine/framework/VirtualMachine.cpp @@ -79,9 +79,6 @@ static Cvar::Cvar workaround_naclSystem_freebsd_disableQualification( // Many BSDs have a Linuxulator, for now we only tested one. #if defined(__linux__) || defined(__FreeBSD__) #define DAEMON_NACL_RUNTIME_LINUX -#if YOKAI_ARCH_I686 || YOKAI_ARCH_ARM64 || YOKAI_ARCH_ARMHF -#define DAEMON_NACL_BOOSTRAP_ENABLED -#endif // !(YOKAI_ARCH_I686 || YOKAI_ARCH_ARM64 || YOKAI_ARCH_ARMHF) #endif // defined(__linux__) || defined(DAEMON_LINUXULATOR) #endif // defined(DAEMON_NACL_RUNTIME_ENABLED) @@ -182,6 +179,7 @@ static Cvar::Cvar vm_nacl_qualification( namespace VM { +#ifdef DAEMON_NACL_RUNTIME_LINUX // https://github.com/Unvanquished/Unvanquished/issues/944#issuecomment-744454772 static void CheckMinAddressSysctlTooLarge() { @@ -206,6 +204,7 @@ static void CheckMinAddressSysctlTooLarge() } #endif // __linux__ } +#endif // DAEMON_NACL_RUNTIME_LINUX #if defined(DAEMON_NACL_RUNTIME_LINUX) && (defined(YOKAI_ARCH_ARM64) || defined(YOKAI_ARCH_ARMHF)) static bool OnArm64() @@ -468,15 +467,6 @@ static std::pair CreateNaClVM(std::pair CreateNaClVM(std::pair CreateNaClVM(std::pair CreateNaClVM(std::pair