From c294e8b19fdf7b4534bb432da44f659779ac982e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Guilloux?= Date: Sun, 6 Nov 2022 11:24:35 +0100 Subject: [PATCH] Codechange: [MinGW] use pe-bigobj-x86-64 format for x64 debug builds (#10142) --- cmake/CompileFlags.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake/CompileFlags.cmake b/cmake/CompileFlags.cmake index b1cec89daf..e3a4381136 100644 --- a/cmake/CompileFlags.cmake +++ b/cmake/CompileFlags.cmake @@ -44,8 +44,8 @@ macro(compile_flags) "$<$>:-fstack-protector>" # Prevent undefined references when _FORTIFY_SOURCE > 0 ) if(CMAKE_SIZEOF_VOID_P EQUAL 8) - add_link_options( - "$<$:-Wl,--disable-dynamicbase,--disable-high-entropy-va,--default-image-base-low>" # ASLR somehow breaks linking for x64 Debug builds + add_compile_options( + "$<$:-Wa,-mbig-obj>" # Switch to pe-bigobj-x86-64 as x64 Debug builds push pe-x86-64 to the limits (linking errors with ASLR, ...) ) endif() endif()