Skip to content

Conversation

@mstorsjo
Copy link
Member

The llvm-mingw toolchains defaults to _WIN32_WINNT=0x601, so this configuration is covered by our CI build matrix.

The llvm-mingw toolchains defaults to _WIN32_WINNT=0x601, so this
configuration is covered by our CI build matrix.
@mstorsjo mstorsjo requested a review from a team as a code owner November 13, 2025 08:19
@llvmbot llvmbot added the libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi. label Nov 13, 2025
@llvmbot
Copy link
Member

llvmbot commented Nov 13, 2025

@llvm/pr-subscribers-libcxx

Author: Martin Storsjö (mstorsjo)

Changes

The llvm-mingw toolchains defaults to _WIN32_WINNT=0x601, so this configuration is covered by our CI build matrix.


Full diff: https://github.com/llvm/llvm-project/pull/167845.diff

2 Files Affected:

  • (modified) libcxx/docs/VendorDocumentation.rst (+6)
  • (modified) libcxx/docs/index.rst (+1-1)
diff --git a/libcxx/docs/VendorDocumentation.rst b/libcxx/docs/VendorDocumentation.rst
index 7eba598909a74..2e5d5ebc1a14f 100644
--- a/libcxx/docs/VendorDocumentation.rst
+++ b/libcxx/docs/VendorDocumentation.rst
@@ -376,6 +376,12 @@ newer (19.14) is required.
 
 Libc++ also supports being built with clang targeting MinGW environments.
 
+Libc++ supports Windows 7 or newer. However, the minimum runtime version
+of the build is determined by the ``_WIN32_WINNT`` define, which in many
+SDKs defaults to the latest version. To build a version that runs on an
+older version, define e.g. ``_WIN32_WINNT=0x601`` while building libc++,
+to target Windows 7.
+
 CMake + Visual Studio
 ---------------------
 
diff --git a/libcxx/docs/index.rst b/libcxx/docs/index.rst
index 03dfb9d41aa1a..d006b52f24cec 100644
--- a/libcxx/docs/index.rst
+++ b/libcxx/docs/index.rst
@@ -147,7 +147,7 @@ macOS 10.13+          i386, x86_64, arm64
 FreeBSD 12+           i386, x86_64, arm
 Linux                 i386, x86_64, arm, arm64  Only glibc-2.24 and later and no other libc is officially supported
 Android 5.0+          i386, x86_64, arm, arm64
-Windows               i386, x86_64, arm64       Both MSVC and MinGW style environments, ABI in MSVC environments is :doc:`unstable <DesignDocs/ABIVersioning>`
+Windows 7+            i386, x86_64, arm64       Both MSVC and MinGW style environments, ABI in MSVC environments is :doc:`unstable <DesignDocs/ABIVersioning>`
 AIX 7.2TL5+           powerpc, powerpc64
 Embedded (picolibc)   arm
 ===================== ========================= ============================

@mstorsjo mstorsjo merged commit 80ae168 into llvm:main Nov 14, 2025
83 checks passed
@mstorsjo mstorsjo deleted the libcxx-doc-win-baseline branch November 14, 2025 07:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants