[libcxx] Link to fewer MSVC CRT libraries

The library msvcrt.lib pulls in ucrt.lib and vcruntime.lib anyway,
there's no need to manually link against the individual dependencies.

This matches how the tests link against libraries - they only link
against msvcrt and msvcprt, not directly against ucrt and vcruntime.

Differential Revision: https://reviews.llvm.org/D155555
This commit is contained in:
Martin Storsjö 2023-07-17 00:35:04 +03:00
parent f9e54a5c0f
commit 7506cb3c92

View File

@ -688,8 +688,6 @@ function(cxx_link_system_libraries target)
set(LIB_SUFFIX "")
endif()
target_link_libraries(${target} PRIVATE ucrt${LIB_SUFFIX}) # Universal C runtime
target_link_libraries(${target} PRIVATE vcruntime${LIB_SUFFIX}) # C++ runtime
target_link_libraries(${target} PRIVATE msvcrt${LIB_SUFFIX}) # C runtime startup files
target_link_libraries(${target} PRIVATE msvcprt${LIB_SUFFIX}) # C++ standard library. Required for exception_ptr internals.
# Required for standards-complaint wide character formatting functions