From 32e53bbd83b24150503376199946dde7a5bdf732 Mon Sep 17 00:00:00 2001 From: toaster Date: Sun, 18 Dec 2022 22:23:30 +0000 Subject: [PATCH] Remove dynamic base from CMake target link options Permits functional debugging of crash reports by preventing ASLR --- src/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 61e5ff86f..0bcb05e22 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -134,7 +134,7 @@ add_executable(SRB2SDL2 MACOSX_BUNDLE WIN32 if("${CMAKE_COMPILER_IS_GNUCC}" AND "${CMAKE_SYSTEM_NAME}" MATCHES "Windows" AND NOT "${SRB2_CONFIG_SYSTEM_LIBRARIES}" AND NOT "${SRB2_CONFIG_SHARED_INTERNAL_LIBRARIES}") # On MinGW with internal libraries, link the standard library statically - target_link_options(SRB2SDL2 PRIVATE "-static") + target_link_options(SRB2SDL2 PRIVATE "-static" "-Wl,--disable-dynamicbase") endif() target_compile_features(SRB2SDL2 PRIVATE c_std_11 cxx_std_17)