Skip to content

Commit

Permalink
[libc++][Apple] Add missing availabilty mappings for Apple platforms (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
ldionne authored and pull[bot] committed Oct 10, 2024
1 parent e7488d6 commit 7938367
Showing 1 changed file with 36 additions and 12 deletions.
48 changes: 36 additions & 12 deletions libcxx/include/__configuration/availability.h
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,9 @@
# if (defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 150000) || \
(defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ < 180000) || \
(defined(__ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__ < 180000) || \
(defined(__ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ < 110000)
(defined(__ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ < 110000) || \
(defined(__ENVIRONMENT_BRIDGE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_BRIDGE_OS_VERSION_MIN_REQUIRED__ < 90000) || \
(defined(__ENVIRONMENT_DRIVERKIT_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_DRIVERKIT_VERSION_MIN_REQUIRED__ < 240000)
# define _LIBCPP_INTRODUCED_IN_LLVM_18 0
# else
# define _LIBCPP_INTRODUCED_IN_LLVM_18 1
Expand All @@ -150,13 +152,17 @@
__attribute__((availability(macos, strict, introduced = 15.0))) \
__attribute__((availability(ios, strict, introduced = 18.0))) \
__attribute__((availability(tvos, strict, introduced = 18.0))) \
__attribute__((availability(watchos, strict, introduced = 11.0)))
__attribute__((availability(watchos, strict, introduced = 11.0))) \
__attribute__((availability(bridgeos, strict, introduced = 9.0))) \
__attribute__((availability(driverkit, strict, introduced = 24.0)))

// LLVM 17
# if (defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 140400) || \
(defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ < 170400) || \
(defined(__ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__ < 170400) || \
(defined(__ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ < 100400)
(defined(__ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ < 100400) || \
(defined(__ENVIRONMENT_BRIDGE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_BRIDGE_OS_VERSION_MIN_REQUIRED__ < 80400) || \
(defined(__ENVIRONMENT_DRIVERKIT_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_DRIVERKIT_VERSION_MIN_REQUIRED__ < 230400)
# define _LIBCPP_INTRODUCED_IN_LLVM_17 0
# else
# define _LIBCPP_INTRODUCED_IN_LLVM_17 1
Expand All @@ -165,13 +171,17 @@
__attribute__((availability(macos, strict, introduced = 14.4))) \
__attribute__((availability(ios, strict, introduced = 17.4))) \
__attribute__((availability(tvos, strict, introduced = 17.4))) \
__attribute__((availability(watchos, strict, introduced = 10.4)))
__attribute__((availability(watchos, strict, introduced = 10.4))) \
__attribute__((availability(bridgeos, strict, introduced = 8.4))) \
__attribute__((availability(driverkit, strict, introduced = 23.4)))

// LLVM 16
# if (defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 140000) || \
(defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ < 170000) || \
(defined(__ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__ < 170000) || \
(defined(__ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ < 100000)
(defined(__ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ < 100000) || \
(defined(__ENVIRONMENT_BRIDGE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_BRIDGE_OS_VERSION_MIN_REQUIRED__ < 80000) || \
(defined(__ENVIRONMENT_DRIVERKIT_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_DRIVERKIT_VERSION_MIN_REQUIRED__ < 230000)
# define _LIBCPP_INTRODUCED_IN_LLVM_16 0
# else
# define _LIBCPP_INTRODUCED_IN_LLVM_16 1
Expand All @@ -180,13 +190,17 @@
__attribute__((availability(macos, strict, introduced = 14.0))) \
__attribute__((availability(ios, strict, introduced = 17.0))) \
__attribute__((availability(tvos, strict, introduced = 17.0))) \
__attribute__((availability(watchos, strict, introduced = 10.0)))
__attribute__((availability(watchos, strict, introduced = 10.0))) \
__attribute__((availability(bridgeos, strict, introduced = 8.0))) \
__attribute__((availability(driverkit, strict, introduced = 23.0)))

// LLVM 15
# if (defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 130400) || \
(defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ < 160500) || \
(defined(__ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__ < 160500) || \
(defined(__ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ < 90500)
(defined(__ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ < 90500) || \
(defined(__ENVIRONMENT_BRIDGE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_BRIDGE_OS_VERSION_MIN_REQUIRED__ < 70500) || \
(defined(__ENVIRONMENT_DRIVERKIT_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_DRIVERKIT_VERSION_MIN_REQUIRED__ < 220400)
# define _LIBCPP_INTRODUCED_IN_LLVM_15 0
# else
# define _LIBCPP_INTRODUCED_IN_LLVM_15 1
Expand All @@ -195,7 +209,9 @@
__attribute__((availability(macos, strict, introduced = 13.4))) \
__attribute__((availability(ios, strict, introduced = 16.5))) \
__attribute__((availability(tvos, strict, introduced = 16.5))) \
__attribute__((availability(watchos, strict, introduced = 9.5)))
__attribute__((availability(watchos, strict, introduced = 9.5))) \
__attribute__((availability(bridgeos, strict, introduced = 7.5))) \
__attribute__((availability(driverkit, strict, introduced = 22.4)))

// LLVM 14
# define _LIBCPP_INTRODUCED_IN_LLVM_14 _LIBCPP_INTRODUCED_IN_LLVM_15
Expand All @@ -205,7 +221,9 @@
# if (defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 130000) || \
(defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ < 160000) || \
(defined(__ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__ < 160000) || \
(defined(__ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ < 90000)
(defined(__ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ < 90000) || \
(defined(__ENVIRONMENT_BRIDGE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_BRIDGE_OS_VERSION_MIN_REQUIRED__ < 70000) || \
(defined(__ENVIRONMENT_DRIVERKIT_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_DRIVERKIT_VERSION_MIN_REQUIRED__ < 220000)
# define _LIBCPP_INTRODUCED_IN_LLVM_13 0
# else
# define _LIBCPP_INTRODUCED_IN_LLVM_13 1
Expand All @@ -214,13 +232,17 @@
__attribute__((availability(macos, strict, introduced = 13.0))) \
__attribute__((availability(ios, strict, introduced = 16.0))) \
__attribute__((availability(tvos, strict, introduced = 16.0))) \
__attribute__((availability(watchos, strict, introduced = 9.0)))
__attribute__((availability(watchos, strict, introduced = 9.0))) \
__attribute__((availability(bridgeos, strict, introduced = 7.0))) \
__attribute__((availability(driverkit, strict, introduced = 22.0)))

// LLVM 12
# if (defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 120300) || \
(defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ < 150300) || \
(defined(__ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__ < 150300) || \
(defined(__ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ < 80300)
(defined(__ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ < 80300) || \
(defined(__ENVIRONMENT_BRIDGE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_BRIDGE_OS_VERSION_MIN_REQUIRED__ < 60000) || \
(defined(__ENVIRONMENT_DRIVERKIT_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_DRIVERKIT_VERSION_MIN_REQUIRED__ < 210300)
# define _LIBCPP_INTRODUCED_IN_LLVM_12 0
# else
# define _LIBCPP_INTRODUCED_IN_LLVM_12 1
Expand All @@ -229,7 +251,9 @@
__attribute__((availability(macos, strict, introduced = 12.3))) \
__attribute__((availability(ios, strict, introduced = 15.3))) \
__attribute__((availability(tvos, strict, introduced = 15.3))) \
__attribute__((availability(watchos, strict, introduced = 8.3)))
__attribute__((availability(watchos, strict, introduced = 8.3))) \
__attribute__((availability(bridgeos, strict, introduced = 6.0))) \
__attribute__((availability(driverkit, strict, introduced = 21.3)))

// LLVM 11
# if (defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 110000) || \
Expand Down

0 comments on commit 7938367

Please sign in to comment.