Remove dynamic base from CMake target link options

Permits functional debugging of crash reports by preventing ASLR
This commit is contained in:
toaster 2022-12-18 22:23:30 +00:00
parent d504af7b39
commit 32e53bbd83

View file

@ -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}") 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 # 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() endif()
target_compile_features(SRB2SDL2 PRIVATE c_std_11 cxx_std_17) target_compile_features(SRB2SDL2 PRIVATE c_std_11 cxx_std_17)