[libcxx-commits] [libcxx] 7506cb3 - [libcxx] Link to fewer MSVC CRT libraries
Martin Storsjö via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Jul 19 01:32:12 PDT 2023
Author: Martin Storsjö
Date: 2023-07-19T11:31:53+03:00
New Revision: 7506cb3c926a6d585b04a1425294666ef4e97a86
URL: https://github.com/llvm/llvm-project/commit/7506cb3c926a6d585b04a1425294666ef4e97a86
DIFF: https://github.com/llvm/llvm-project/commit/7506cb3c926a6d585b04a1425294666ef4e97a86.diff
LOG: [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
Added:
Modified:
libcxx/CMakeLists.txt
Removed:
################################################################################
diff --git a/libcxx/CMakeLists.txt b/libcxx/CMakeLists.txt
index 86bc1ebce1a64c..90eb60c8eb6f87 100644
--- a/libcxx/CMakeLists.txt
+++ b/libcxx/CMakeLists.txt
@@ -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
More information about the libcxx-commits
mailing list