From a817d699e3a8eb8ece44e116f868228553a7c14b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Strehovsk=C3=BD?= Date: Mon, 17 Jun 2024 08:17:59 +0200 Subject: [PATCH] Revert "Remove chkstk workarounds" This reverts commit 739bfd9d08cb72cf7d49d910957d32d226650098. --- .../Microsoft.NETCore.Native.Windows.targets | 1 - src/coreclr/nativeaot/Msvcrt/CMakeLists.txt | 11 ----------- src/coreclr/nativeaot/Msvcrt/kernel32-supplements.def | 3 --- .../libs/System.Globalization.Native/CMakeLists.txt | 1 + .../libs/System.IO.Compression.Native/CMakeLists.txt | 1 + 5 files changed, 2 insertions(+), 15 deletions(-) delete mode 100644 src/coreclr/nativeaot/Msvcrt/kernel32-supplements.def diff --git a/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Windows.targets b/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Windows.targets index 7c98b720a818..823f5a5ef1b2 100644 --- a/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Windows.targets +++ b/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Windows.targets @@ -95,7 +95,6 @@ The .NET Foundation licenses this file to you under the MIT license. - diff --git a/src/coreclr/nativeaot/Msvcrt/CMakeLists.txt b/src/coreclr/nativeaot/Msvcrt/CMakeLists.txt index 49e7f50d170a..cb981823d71c 100644 --- a/src/coreclr/nativeaot/Msvcrt/CMakeLists.txt +++ b/src/coreclr/nativeaot/Msvcrt/CMakeLists.txt @@ -6,17 +6,6 @@ else() set(LIB_MACHINE_FLAG x64) endif() -add_custom_command( - OUTPUT kernel32-supplements.lib - COMMAND lib.exe /machine:${LIB_MACHINE_FLAG} /def:${CMAKE_CURRENT_SOURCE_DIR}/kernel32-supplements.def /out:kernel32-supplements.lib - DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/kernel32-supplements.def - VERBATIM) -add_custom_target(kernel32supplementslib ALL - DEPENDS kernel32-supplements.lib - VERBATIM) -add_dependencies(nativeaot kernel32supplementslib) -install (FILES ${CMAKE_CURRENT_BINARY_DIR}/kernel32-supplements.lib DESTINATION aotsdk COMPONENT nativeaot) - add_custom_command( OUTPUT api-ms-win-crt-conio-l1-1-0.lib COMMAND lib.exe /machine:${LIB_MACHINE_FLAG} /def:${CMAKE_CURRENT_SOURCE_DIR}/api-ms-win-crt-conio-l1-1-0.def /out:api-ms-win-crt-conio-l1-1-0.lib diff --git a/src/coreclr/nativeaot/Msvcrt/kernel32-supplements.def b/src/coreclr/nativeaot/Msvcrt/kernel32-supplements.def deleted file mode 100644 index a2adf7cf5aa9..000000000000 --- a/src/coreclr/nativeaot/Msvcrt/kernel32-supplements.def +++ /dev/null @@ -1,3 +0,0 @@ -LIBRARY kernel32 -EXPORTS - __chkstk diff --git a/src/native/libs/System.Globalization.Native/CMakeLists.txt b/src/native/libs/System.Globalization.Native/CMakeLists.txt index 21f28c632b1e..25544b9e8c63 100644 --- a/src/native/libs/System.Globalization.Native/CMakeLists.txt +++ b/src/native/libs/System.Globalization.Native/CMakeLists.txt @@ -173,6 +173,7 @@ if(CLR_CMAKE_TARGET_WIN32) if(CMAKE_CXX_FLAGS_DEBUG MATCHES "/RTC1") string(REPLACE "/RTC1" " " CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}") endif() + add_compile_options(/Gs10000000) # avoid __chkstk add_compile_options(/EHa-) add_compile_options(/GS-) add_compile_options(/Zl) diff --git a/src/native/libs/System.IO.Compression.Native/CMakeLists.txt b/src/native/libs/System.IO.Compression.Native/CMakeLists.txt index 0d13bc191b2d..a2475cca4370 100644 --- a/src/native/libs/System.IO.Compression.Native/CMakeLists.txt +++ b/src/native/libs/System.IO.Compression.Native/CMakeLists.txt @@ -144,6 +144,7 @@ else () if(CMAKE_CXX_FLAGS_DEBUG MATCHES "/RTC1") string(REPLACE "/RTC1" " " CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}") endif() + add_compile_options(/Gs10000000) # avoid __chkstk add_compile_options(/EHa-) add_compile_options(/GS-) add_compile_options(/Zl)