From 22327131fba64dc3bf5a2371d2e1564bd1c3df4f Mon Sep 17 00:00:00 2001
From: Yonggang Luo <luoyonggang@gmail.com>
Date: Sat, 7 May 2022 15:39:20 +0800
Subject: [PATCH] Do not statically link to the C++ runtime with mingw

---
 CMakeLists.txt | 9 ---------
 1 file changed, 9 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 76b87d8c..868e8ade 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -220,15 +220,6 @@ function(spvtools_default_compile_options TARGET)
       target_compile_options(${TARGET} PRIVATE /EHs)
     endif()
   endif()
-
-  # For MinGW cross compile, statically link to the C++ runtime.
-  # But it still depends on MSVCRT.dll.
-  if (${CMAKE_SYSTEM_NAME} MATCHES "Windows")
-    if (NOT MSVC)
-      set_target_properties(${TARGET} PROPERTIES
-        LINK_FLAGS -static -static-libgcc -static-libstdc++)
-    endif()
-  endif()
 endfunction()
 
 if(NOT COMMAND find_host_package)
-- 
2.36.0.windows.1

