From b35a514ea6c6abeb034ecaf0b32d87007ab98ed0 Mon Sep 17 00:00:00 2001 From: Billy Laws Date: Tue, 23 Jul 2024 20:54:02 +0000 Subject: [PATCH] CMake: Don't link CMake's set of extra system libraries on Windows These are already linked in by default with clang, sp having these set here only served to prevent the -nostdlib compiler option from having any effect, as CMake will always explicitly include the libs in the compiler cmdline. --- toolchain_mingw.cmake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/toolchain_mingw.cmake b/toolchain_mingw.cmake index 3518c3ad3..be3611950 100644 --- a/toolchain_mingw.cmake +++ b/toolchain_mingw.cmake @@ -10,6 +10,8 @@ set(CMAKE_DLLTOOL ${MINGW_TRIPLE}-dlltool) # (https://github.com/llvm/llvm-project/issues/47432) set(CMAKE_SHARED_LINKER_FLAGS_INIT "-static -static-libgcc -static-libstdc++ -Wl,--file-alignment=4096,/mllvm:-align-loops=1") set(CMAKE_EXE_LINKER_FLAGS_INIT "-static -static-libgcc -static-libstdc++ -Wl,--file-alignment=4096,/mllvm:-align-loops=1") - +set(CMAKE_C_STANDARD_LIBRARIES "" CACHE STRING "" FORCE) +set(CMAKE_CXX_STANDARD_LIBRARIES "" CACHE STRING "" FORCE) +set(CMAKE_STANDARD_LIBRARIES "" CACHE STRING "" FORCE) set(CMAKE_SYSTEM_NAME Windows) set(CMAKE_SYSTEM_PROCESSOR ${MINGW_TRIPLE})