[libcxx-commits] [libcxx] [libc++] Warn when users request a deployment target below the minimum supported version (PR #172664)
Nikolas Klauser via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Dec 17 06:41:16 PST 2025
https://github.com/philnik777 created https://github.com/llvm/llvm-project/pull/172664
None
>From 394dea7a5d2f1a239f3ff2f25c98d78557170df5 Mon Sep 17 00:00:00 2001
From: Nikolas Klauser <nikolasklauser at berlin.de>
Date: Wed, 17 Dec 2025 15:40:36 +0100
Subject: [PATCH] [libc++] Warn when users request a deployment target below
the minimum supported version
---
libcxx/include/__configuration/availability.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/libcxx/include/__configuration/availability.h b/libcxx/include/__configuration/availability.h
index a5bd266b771fd..9806ca9d36bf9 100644
--- a/libcxx/include/__configuration/availability.h
+++ b/libcxx/include/__configuration/availability.h
@@ -196,6 +196,14 @@
__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__ < 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__ < 80000) || \
+ (defined(__ENVIRONMENT_DRIVERKIT_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_DRIVERKIT_VERSION_MIN_REQUIRED__ < 200000)
+# warning "The selected platform is no longer supported by libc++."
+# endif
+
#else
// ...New vendors can add availability markup here...
More information about the libcxx-commits
mailing list