[libcxx-commits] [libcxx] [libc++] Add a design document for Windows support (PR #202668)
via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Jun 9 07:16:20 PDT 2026
https://github.com/siradam7th updated https://github.com/llvm/llvm-project/pull/202668
>From 55f38068aa918ed49d70a35fa7291fe2339b53c5 Mon Sep 17 00:00:00 2001
From: siradam7th <siradam7th at users.noreply.github.com>
Date: Tue, 9 Jun 2026 14:52:26 +0100
Subject: [PATCH 1/2] [libc++] add design document for Windows support
---
libcxx/docs/DesignDocs/WindowsSupport.rst | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
create mode 100644 libcxx/docs/DesignDocs/WindowsSupport.rst
diff --git a/libcxx/docs/DesignDocs/WindowsSupport.rst b/libcxx/docs/DesignDocs/WindowsSupport.rst
new file mode 100644
index 0000000000000..2020691273441
--- /dev/null
+++ b/libcxx/docs/DesignDocs/WindowsSupport.rst
@@ -0,0 +1,17 @@
+===========
+Windows support
+===========
+
+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.
+
+To achieve this, we have decided on the following:
+
+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.
>From d048bf2b1b376f63b222c4172292f22c9e6c3ec1 Mon Sep 17 00:00:00 2001
From: siradam7th <siradam7th at users.noreply.github.com>
Date: Tue, 9 Jun 2026 15:13:56 +0100
Subject: [PATCH 2/2] [libc++] fix document formatting
---
libcxx/docs/DesignDocs/WindowsSupport.rst | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/libcxx/docs/DesignDocs/WindowsSupport.rst b/libcxx/docs/DesignDocs/WindowsSupport.rst
index 2020691273441..dd6200ba67b79 100644
--- a/libcxx/docs/DesignDocs/WindowsSupport.rst
+++ b/libcxx/docs/DesignDocs/WindowsSupport.rst
@@ -1,6 +1,6 @@
-===========
+===============
Windows support
-===========
+===============
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.
@@ -12,6 +12,6 @@ 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.
More information about the libcxx-commits
mailing list