[libcxx-commits] [libcxx] [libc++] increase minimum deployment target on macOS to 11.0 (PR #176094)
via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Jan 14 22:32:46 PST 2026
https://github.com/h-vetinari created https://github.com/llvm/llvm-project/pull/176094
#166172 moved the effective minimum deployment target on macOS to 10.15 (because `aligned_alloc` is not defined before that in the C stdlib), and indeed, @philnik777 said in that PR
> [...] libc++ only supports macOS 11 and later.
I've seen no discussion of this (closest PR seems to be #161640), the docs and release notes do not mention it (in contrast, there was an [announcement](https://discourse.llvm.org/t/libc-bumping-minimal-deployment-target-for-building-the-dylib-static-library-on-macos/68912) the last time the deployment target was increased), and indeed, `availability.h` only enforces the minimum of 10.13:
https://github.com/llvm/llvm-project/blob/2fa1ba62ac92fe95613d980e38ac2db36141fee8/libcxx/include/__configuration/availability.h#L199-L205
This PR attempts to rectify at least the documentation part; I assume the other targets in the condition above would also need to be updated, but I don't know the right versions for that.
PS. To avoid any misunderstandings, I'm neutral on increasing the deployment target[^1], just trying to reflect the state of things accurately before the v22 release.
[^1]: that is to say, I'm definitely not advocating for this.
>From edb881bfa2b200db6b4aa6052cd763beba1ce3b6 Mon Sep 17 00:00:00 2001
From: "H. Vetinari" <h.vetinari at gmx.com>
Date: Thu, 15 Jan 2026 17:20:12 +1100
Subject: [PATCH] [libc++] increase minimum deployment target on macOS to 11.0
---
libcxx/docs/ReleaseNotes/22.rst | 2 ++
libcxx/docs/index.rst | 2 +-
libcxx/include/__configuration/availability.h | 2 +-
3 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/libcxx/docs/ReleaseNotes/22.rst b/libcxx/docs/ReleaseNotes/22.rst
index 4d56c82a53170..e9c61594fa61d 100644
--- a/libcxx/docs/ReleaseNotes/22.rst
+++ b/libcxx/docs/ReleaseNotes/22.rst
@@ -107,6 +107,8 @@ Improvements and New Features
Deprecations and Removals
-------------------------
+- The minimally supported deployment target on macOS has been increased to 11.0.
+
Potentially breaking changes
----------------------------
diff --git a/libcxx/docs/index.rst b/libcxx/docs/index.rst
index a9f0a04eeb808..4069639dbb6b6 100644
--- a/libcxx/docs/index.rst
+++ b/libcxx/docs/index.rst
@@ -142,7 +142,7 @@ Libc++ also supports common platforms and architectures:
===================== ========================= ============================
Target platform Target architecture Notes
===================== ========================= ============================
-macOS 10.13+ i386, x86_64, arm64
+macOS 11.0+ 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
diff --git a/libcxx/include/__configuration/availability.h b/libcxx/include/__configuration/availability.h
index 2c76347090fca..b8bd0ec46293d 100644
--- a/libcxx/include/__configuration/availability.h
+++ b/libcxx/include/__configuration/availability.h
@@ -196,7 +196,7 @@
__attribute__((availability(bridgeos, strict, introduced = 6.0))) \
__attribute__((availability(driverkit, strict, introduced = 21.3)))
-# if (defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 101300) || \
+# if (defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 110000) || \
(defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ < 150000) || \
(defined(__ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__ < 150000) || \
(defined(__ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ < 70000) || \
More information about the libcxx-commits
mailing list