Changeset - r26140:c672129ff6fc
[Not reviewed]
master
0 1 0
Loïc Guilloux - 2 years ago 2021-12-28 20:08:09
glx22@users.noreply.github.com
Fix: [MinGW] Disable ASLR for x64 Debug builds (#9773)
1 file changed with 5 insertions and 0 deletions:
0 comments (0 inline, 0 general)
cmake/CompileFlags.cmake
Show inline comments
 
@@ -43,6 +43,11 @@ macro(compile_flags)
 
        add_link_options(
 
            "$<$<NOT:$<CONFIG:Debug>>:-fstack-protector>" # Prevent undefined references when _FORTIFY_SOURCE > 0
 
        )
 
        if(CMAKE_SIZEOF_VOID_P EQUAL 8)
 
            add_link_options(
 
                "$<$<CONFIG:Debug>:-Wl,--disable-dynamicbase,--disable-high-entropy-va,--default-image-base-low>" # ASLR somehow breaks linking for x64 Debug builds
 
            )
 
        endif()
 
    endif()
 

	
 
    # Prepare a generator that checks if we are not a debug, and don't have asserts
0 comments (0 inline, 0 general)