[libcxx-commits] [libcxx] [libc++] Add a design document for Windows support (PR #202668)
A. Jiang via libcxx-commits
libcxx-commits at lists.llvm.org
Sun Aug 9 19:52:43 PDT 2026
https://github.com/frederick-vs-ja updated https://github.com/llvm/llvm-project/pull/202668
>From 35f53b7d7a52991da9e2d5a2006448670c6e12e2 Mon Sep 17 00:00:00 2001
From: siradam7th <oss at afterback.gq>
Date: Sun, 12 Jul 2026 23:04:24 +0100
Subject: [PATCH 1/2] [libc++] add design document for Windows support (MSVC
Mode)
---
libcxx/docs/DesignDocs/WindowsSupport.rst | 22 ++++++++++++++++++++++
libcxx/docs/index.rst | 1 +
2 files changed, 23 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..7e1ec23a5852a
--- /dev/null
+++ b/libcxx/docs/DesignDocs/WindowsSupport.rst
@@ -0,0 +1,22 @@
+===============
+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.
+
+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.
diff --git a/libcxx/docs/index.rst b/libcxx/docs/index.rst
index 38f77580d4530..796da1136584f 100644
--- a/libcxx/docs/index.rst
+++ b/libcxx/docs/index.rst
@@ -229,6 +229,7 @@ Design Documents
DesignDocs/UnspecifiedBehaviorRandomization
DesignDocs/VisibilityMacros
DesignDocs/TimeZone
+ DesignDocs/WindowsSupport
Build Bots and Test Coverage
>From bdd71030b17315775628d273217424fb78122b74 Mon Sep 17 00:00:00 2001
From: "A. Jiang" <de34 at live.cn>
Date: Mon, 10 Aug 2026 10:43:59 +0800
Subject: [PATCH 2/2] Remove one redundant line as suggested by @petrhosek
---
libcxx/docs/DesignDocs/WindowsSupport.rst | 2 --
1 file changed, 2 deletions(-)
diff --git a/libcxx/docs/DesignDocs/WindowsSupport.rst b/libcxx/docs/DesignDocs/WindowsSupport.rst
index 7e1ec23a5852a..bf79c0e827131 100644
--- a/libcxx/docs/DesignDocs/WindowsSupport.rst
+++ b/libcxx/docs/DesignDocs/WindowsSupport.rst
@@ -9,8 +9,6 @@ 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.
-To achieve this, we have decided on the following:
-
Goals:
------
More information about the libcxx-commits
mailing list