From ce42730b3cd150c8b1a438855a47253c7c51dd26 Mon Sep 17 00:00:00 2001 From: Eidolon Date: Fri, 2 Feb 2024 20:43:42 -0600 Subject: [PATCH] Add large-address-aware flag on 32 bit mingw --- src/CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 92849c919..81fbbe99d 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -201,6 +201,9 @@ if("${CMAKE_COMPILER_IS_GNUCC}" AND "${CMAKE_SYSTEM_NAME}" MATCHES "Windows") # On MinGW with internal libraries, link the standard library statically target_link_options(SRB2SDL2 PRIVATE "-static") endif() + if(CMAKE_SIZEOF_VOID_P EQUAL 4) + target_link_options(SRB2SDL2 PRIVATE "-Wl,--large-address-aware") + endif() endif() target_compile_features(SRB2SDL2 PRIVATE c_std_11 cxx_std_17)