[libcxx-commits] [libcxx] 2877672 - [libc++] Add a design document for Windows support (#202668)
via libcxx-commits
libcxx-commits at lists.llvm.org
Sun Aug 9 22:11:19 PDT 2026
Author: Adam
Date: 2026-08-10T13:11:14+08:00
New Revision: 2877672c1331f9a99f645a0ad25801380da42dcd
URL: https://github.com/llvm/llvm-project/commit/2877672c1331f9a99f645a0ad25801380da42dcd
DIFF: https://github.com/llvm/llvm-project/commit/2877672c1331f9a99f645a0ad25801380da42dcd.diff
LOG: [libc++] Add a design document for Windows support (#202668)
This adds a design document that sets the expectations for libc++
support on Windows.
Added:
libcxx/docs/DesignDocs/WindowsSupport.rst
Modified:
libcxx/docs/index.rst
Removed:
################################################################################
diff --git a/libcxx/docs/DesignDocs/WindowsSupport.rst b/libcxx/docs/DesignDocs/WindowsSupport.rst
new file mode 100644
index 0000000000000..bf79c0e827131
--- /dev/null
+++ b/libcxx/docs/DesignDocs/WindowsSupport.rst
@@ -0,0 +1,20 @@
+===============
+Windows support
+===============
+
+**This document only applies to the MSVC Mode.**
+
+Motivation:
+-----------
+
+Currently libc++ needs to link to the MSVC STL ``msvcprt`` library to implement part of the functionality on Windows. This dependency is counterintuitive since one standard library is depending on another standard library. Our goal is to remove this dependency by implementing the required functionality in libc++ itself.
+
+Goals:
+------
+
+- ``VCRuntime`` is the underlying ABI layer that libc++ will be using to implement the required functionality for Windows support.
+
+Non-Goals:
+----------
+
+- Interoperability with the MSVC STL in the case where both libraries are linked in the same binary is not a goal. For example if you link both libc++ and the MSVC STL in the same binary, a call to a function that needs to maintain internal state like ``std::set_new_handler`` from the libc++ side should not be expected to also change the MSVC STL internal state (since they are separate). We will be maintaining our own internal state for such functions, therefore any such functions should only be expected to have an effect on the libc++ side.
diff --git a/libcxx/docs/index.rst b/libcxx/docs/index.rst
index d6bbc771f0e6b..403ce9ca0f254 100644
--- a/libcxx/docs/index.rst
+++ b/libcxx/docs/index.rst
@@ -232,6 +232,7 @@ Design Documents
DesignDocs/UnspecifiedBehaviorRandomization
DesignDocs/VisibilityMacros
DesignDocs/TimeZone
+ DesignDocs/WindowsSupport
Build Bots and Test Coverage
More information about the libcxx-commits
mailing list