[libcxx-commits] [libcxx] [libc++] Add availability mapping for LLVM 18 on Apple platforms (PR #110158)
via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Sep 26 11:53:21 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-libcxx
Author: Louis Dionne (ldionne)
<details>
<summary>Changes</summary>
---
Full diff: https://github.com/llvm/llvm-project/pull/110158.diff
2 Files Affected:
- (modified) libcxx/include/__configuration/availability.h (+13-3)
- (modified) libcxx/utils/libcxx/test/features.py (+8-1)
``````````diff
diff --git a/libcxx/include/__configuration/availability.h b/libcxx/include/__configuration/availability.h
index ab483a07c9c137..6b39e20d858beb 100644
--- a/libcxx/include/__configuration/availability.h
+++ b/libcxx/include/__configuration/availability.h
@@ -138,9 +138,19 @@
# define _LIBCPP_INTRODUCED_IN_LLVM_19_ATTRIBUTE __attribute__((unavailable))
// LLVM 18
-// TODO: Fill this in
-# define _LIBCPP_INTRODUCED_IN_LLVM_18 0
-# define _LIBCPP_INTRODUCED_IN_LLVM_18_ATTRIBUTE __attribute__((unavailable))
+# 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)
+# define _LIBCPP_INTRODUCED_IN_LLVM_18 0
+# else
+# define _LIBCPP_INTRODUCED_IN_LLVM_18 1
+# endif
+# define _LIBCPP_INTRODUCED_IN_LLVM_18_ATTRIBUTE \
+ __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)))
// LLVM 17
# if (defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 140400) || \
diff --git a/libcxx/utils/libcxx/test/features.py b/libcxx/utils/libcxx/test/features.py
index 15456171b54837..9ee5f645b4d910 100644
--- a/libcxx/utils/libcxx/test/features.py
+++ b/libcxx/utils/libcxx/test/features.py
@@ -609,10 +609,17 @@ def check_gdb(cfg):
# Helpers to define correspondances between LLVM versions and vendor system versions.
# Those are used for backdeployment features below, do not use directly in tests.
DEFAULT_FEATURES += [
+ Feature(
+ name="_target-has-llvm-18",
+ when=lambda cfg: BooleanExpression.evaluate(
+ "target={{.+}}-apple-macosx{{15(.[0-9]+)?(.[0-9]+)?}}",
+ cfg.available_features,
+ ),
+ ),
Feature(
name="_target-has-llvm-17",
when=lambda cfg: BooleanExpression.evaluate(
- "target={{.+}}-apple-macosx{{14.[4-9](.0)?}} || target={{.+}}-apple-macosx{{1[5-9]([.].+)?}}",
+ "_target-has-llvm-18 || target={{.+}}-apple-macosx{{14.[4-9](.0)?}} || target={{.+}}-apple-macosx{{1[5-9]([.].+)?}}",
cfg.available_features,
),
),
``````````
</details>
https://github.com/llvm/llvm-project/pull/110158
More information about the libcxx-commits
mailing list