From 31a4c92ee53a89935d022c4af3384409f3be2a48 Mon Sep 17 00:00:00 2001
From: Anonymous Maarten <[EMAIL REDACTED]>
Date: Sat, 28 Dec 2024 13:57:00 +0100
Subject: [PATCH] When building with libc enabled, we don't need to provide
__chkstk ourselves
---
CMakeLists.txt | 2 +-
VisualC/SDL/SDL.vcxproj | 5 -----
2 files changed, 1 insertion(+), 6 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 94b1c9bfe0531..2d9687243f50c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -498,7 +498,7 @@ else()
sdl_include_directories(NO_EXPORT SYSTEM PRIVATE "$<BUILD_INTERFACE:${SDL3_SOURCE_DIR}/src/video/khronos>")
endif()
-if(MSVC AND TARGET SDL3-shared)
+if(MSVC AND TARGET SDL3-shared AND NOT SDL_LIBC)
if(SDL_CPU_X64)
enable_language(ASM_MASM)
set(asm_src "${SDL3_SOURCE_DIR}/src/stdlib/SDL_mslibc_x64.masm")
diff --git a/VisualC/SDL/SDL.vcxproj b/VisualC/SDL/SDL.vcxproj
index e860035ae625a..ada62e856d8c7 100644
--- a/VisualC/SDL/SDL.vcxproj
+++ b/VisualC/SDL/SDL.vcxproj
@@ -43,7 +43,6 @@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
- <Import Project="$(VCTargetsPath)\BuildCustomizations\masm.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
@@ -647,9 +646,6 @@
<ClCompile Include="..\..\src\stdlib\SDL_memmove.c" />
<ClCompile Include="..\..\src\stdlib\SDL_memset.c" />
<ClCompile Include="..\..\src\stdlib\SDL_mslibc.c" />
- <MASM Condition="'$(Platform)'=='x64'" Include="..\..\src\stdlib\SDL_mslibc_x64.masm">
- <PrecompiledHeader>NotUsing</PrecompiledHeader>
- </MASM>
<ClCompile Include="..\..\src\stdlib\SDL_murmur3.c" />
<ClCompile Include="..\..\src\stdlib\SDL_qsort.c" />
<ClCompile Include="..\..\src\stdlib\SDL_random.c" />
@@ -729,6 +725,5 @@
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
- <Import Project="$(VCTargetsPath)\BuildCustomizations\masm.targets" />
</ImportGroup>
</Project>